From 8cb259de1463a7cab1464f888e0704cf809ab8ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Tue, 25 Mar 2014 14:04:15 +0100 Subject: [PATCH] editor: openSelect view - allow for clearing items list --- src/editor/views/openSelect/openSelect.js | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.20.1