/[jquery]/tag_complete/tag_complete.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 /tag_complete/tag_complete.js

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

revision 46 by dpavlin, Fri Aug 18 22:59:04 2006 UTC revision 48 by dpavlin, Fri Aug 18 23:10:48 2006 UTC
# Line 69  var _tag = { Line 69  var _tag = {
69                          return true;                          return true;
70                  }                  }
71    
72                  $.log.info('take suggestion: '+s);                  _tag.add_tag( s );
73                    _tag.clean_selected();
74                    return false;
75            },
76    
77            add_tag: function( t ) {
78                    $.log.info('add: '+t);
79                  $('#tags').val(                  $('#tags').val(
80                          $('#tags').val().replace(                          $('#tags').val().replace(
81                                  /[^ ]*$/, s + ' '                                  /[^ ]*$/, t + ' '
82                          )                          )
83                  );                  );
84                  _tag.clean_selected();                  _tag.focus();
85                  return false;                  return false;
86          },          },
87    
# Line 113  var _tag = { Line 119  var _tag = {
119  $(document).ready( function() {  $(document).ready( function() {
120    
121          $('.tag').each( function(i) {          $('.tag').each( function(i) {
122                  _tag.name[i] = this.firstChild.nodeValue;                  var n = this.firstChild.nodeValue;
123                    _tag.name[i] = n;
124                  _tag.obj[i] = this;                  _tag.obj[i] = this;
125                    this.onclick = function() {
126                            return _tag.add_tag( n );
127                    }
128          });          });
129          $.log.info( 'found ' + _tag.name.length + ' tags' );          $.log.info( 'found ' + _tag.name.length + ' tags' );
130    

Legend:
Removed from v.46  
changed lines
  Added in v.48

  ViewVC Help
Powered by ViewVC 1.1.26