diff --git a/Source/TextboxList.js b/Source/TextboxList.js index 5f69556..590eeef 100644 --- a/Source/TextboxList.js +++ b/Source/TextboxList.js @@ -216,6 +216,14 @@ var TextboxList = new Class({ if (v) this.add.apply(this, $type(v) == 'array' ? [v[1], v[0], v[2]] : [v]); }, this); }, + + clearValues: function() { + this.list.getChildren().map(function(){ + var bit = getBit(this); + if (bit.toElement().attr('class').indexOf('deletable') > -1 ) + bit.remove(); + }); + }, update: function(){ this.original.set('value', this.options.encode(this.getValues())); @@ -433,4 +441,4 @@ TextboxListBit.Box = new Class({ this.bit.getChildren().addEvent('click', function(e){ e.stop(); }); } -}); \ No newline at end of file +});