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

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

revision 59 by dpavlin, Sun Aug 20 23:37:52 2006 UTC revision 61 by dpavlin, Wed Aug 23 15:58:16 2006 UTC
# Line 285  tac.prototype.parse = function() { Line 285  tac.prototype.parse = function() {
285          var t = $(this.tags_input).val().replace(/^  */,'').replace(/  *$/,'').split(/ /);          var t = $(this.tags_input).val().replace(/^  */,'').replace(/  *$/,'').split(/ /);
286    
287          if (this.entered.ordered.length) $('.entered').removeClass('entered');          if (this.entered.ordered.length) $('.entered').removeClass('entered');
         this.clean_suggested();  
288    
289          this.entered = {          this.entered = {
290                  ordered: new Array(),                  ordered: new Array(),
# Line 309  tac.prototype.parse = function() { Line 308  tac.prototype.parse = function() {
308    
309  tac.prototype.current_tag = function() {  tac.prototype.current_tag = function() {
310          var tags = $(this.tags_input).val();          var tags = $(this.tags_input).val();
311            var t = this;
312          if (tags != this.last_tags) {          if (tags != this.last_tags) {
313                  this.last_tags = tags;                  this.last_tags = tags;
314                  this.parse();                  defer(function() { t.parse() }, 500, 'parse');
315          }          }
316          var last_tag = tags.replace(/^([^ ][^ ]* )*/, '');          var last_tag = tags.replace(/^([^ ][^ ]* )*/, '');
317          if (last_tag != this.last_tag) {          if (last_tag != this.last_tag) {
318                  this.last_tag = last_tag;                  this.last_tag = last_tag;
319                  return last_tag;                  return last_tag;
320          } else {          } else {
321                  this.parse();                  defer(function() { t.parse() }, 500, 'parse');
322                  return '';                  return '';
323          }          }
324  }  }

Legend:
Removed from v.59  
changed lines
  Added in v.61

  ViewVC Help
Powered by ViewVC 1.1.26