From: Aleksander Ɓukasz Date: Tue, 25 Mar 2014 13:04:15 +0000 (+0100) Subject: editor: openSelect view - allow for clearing items list X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/8cb259de1463a7cab1464f888e0704cf809ab8ea editor: openSelect view - allow for clearing items list --- diff --git a/src/editor/views/openSelect/openSelect.js b/src/editor/views/openSelect/openSelect.js index eeea988..cc94854 100644 --- a/src/editor/views/openSelect/openSelect.js +++ b/src/editor/views/openSelect/openSelect.js @@ -32,6 +32,10 @@ var OpenSelect = Backbone.View.extend({ this.menu.append(_.template(itemTemplate)({value: value})); this.toggleHandler(true); }, + clearItems: function() { + this.menu.empty(); + this.toggleHandler(false); + }, onSelection: function(e) { var val = $(e.target).text(); if(this.options.setInput) {