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(), |
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 |
} |
} |