/[jquery]/jquery/jquery-log.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /jquery/jquery-log.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 34 by dpavlin, Fri Aug 18 13:20:53 2006 UTC revision 37 by dpavlin, Fri Aug 18 15:35:54 2006 UTC
# Line 17  $.log = { Line 17  $.log = {
17                  return m;                  return m;
18          },          },
19    
20          counter: function() {          insert: function(class, m) {
21                    if (! _log_count) this.create();
22    
23                    _log_count[ class ]++;
24    
25                    var html = '<div class="jql-' + class + '">' + m + '</div>';
26                    $('#jql').append( html );
27                    //$('#jql').prepend( html );
28    
29                    // refresh count
30                  $('#jql-counter').html(                  $('#jql-counter').html(
31                          '<span class="jql-info">'+_log_count.info+'</span> ' +                          '<span class="jql-info">'+_log_count.info+'</span> ' +
32                          '<span class="jql-debug">'+_log_count.debug+'</span> ' +                          '<span class="jql-debug">'+_log_count.debug+'</span> ' +
# Line 25  $.log = { Line 34  $.log = {
34                  );                  );
35          },          },
36    
         toggle: function() {  
                 $('#jql').toggle();  
                 $('#jql-show').toggle();  
                 return false;  
         },  
   
37          /* public functions */          /* public functions */
38    
39          create: function() {          create: function() {
# Line 53  $.log = { Line 56  $.log = {
56                  this.debug('created logger');                  this.debug('created logger');
57          },          },
58    
59            toggle: function() {
60                    $('#jql').toggle();
61                    $('#jql-show').toggle();
62                    return false;
63            },
64    
65          info: function() {          info: function() {
66                  if (arguments) {                  if (arguments) this.insert( 'info', this.join(arguments) );
                         if (! _log_count) this.create();  
                         _log_count.info++;  
                         $('#jql').append( '<div class="jql-info">'+this.join(arguments)+'</div>' );  
                         this.counter();  
                 }  
67          },          },
68          debug: function() {          debug: function() {
69                  if (arguments) {                  if (arguments) this.insert( 'debug', this.join(arguments) );
                         if (! _log_count) this.create();  
                         _log_count.debug++;  
                         $('#jql').append( '<div class="jql-debug">'+this.join(arguments)+'</div>' );  
                         this.counter();  
                 }  
70          },          },
71          error: function() {          error: function() {
72                  if (arguments) {                  if (arguments) this.insert( 'error', this.join(arguments) );
                         if (! _log_count) this.create();  
                         _log_count.error++;  
                         $('#jql').append( '<div class="jql-error">'+this.join(arguments)+'</div>' );  
                         this.counter();  
                 }  
73          }          }
74  };  };
75    

Legend:
Removed from v.34  
changed lines
  Added in v.37

  ViewVC Help
Powered by ViewVC 1.1.26