Show More
@@ -22,10 +22,12 define(["notebook/js/widget"], function(){ | |||||
22 | this.$droplabel = $('<button />') |
|
22 | this.$droplabel = $('<button />') | |
23 | .addClass('btn') |
|
23 | .addClass('btn') | |
24 | .addClass('widget-combo-btn') |
|
24 | .addClass('widget-combo-btn') | |
|
25 | .html(' ') | |||
25 | .appendTo(this.$buttongroup); |
|
26 | .appendTo(this.$buttongroup); | |
26 | this.$dropbutton = $('<button />') |
|
27 | this.$dropbutton = $('<button />') | |
27 | .addClass('btn') |
|
28 | .addClass('btn') | |
28 | .addClass('dropdown-toggle') |
|
29 | .addClass('dropdown-toggle') | |
|
30 | .addClass('widget-combo-carrot-btn') | |||
29 | .attr('data-toggle', 'dropdown') |
|
31 | .attr('data-toggle', 'dropdown') | |
30 | .html('<span class="caret"></span>') |
|
32 | .html('<span class="caret"></span>') | |
31 | .appendTo(this.$buttongroup); |
|
33 | .appendTo(this.$buttongroup); | |
@@ -40,7 +42,14 define(["notebook/js/widget"], function(){ | |||||
40 | // Handles: Backend -> Frontend Sync |
|
42 | // Handles: Backend -> Frontend Sync | |
41 | // Frontent -> Frontend Sync |
|
43 | // Frontent -> Frontend Sync | |
42 | update : function(){ |
|
44 | update : function(){ | |
|
45 | ||||
|
46 | var selected_item_text = this.model.get('value'); | |||
|
47 | selected_item_text.replace(' ', ''); | |||
|
48 | if (selected_item_text == '') { | |||
|
49 | this.$droplabel.html(' '); | |||
|
50 | } else { | |||
43 | this.$droplabel.html(this.model.get('value')); |
|
51 | this.$droplabel.html(this.model.get('value')); | |
|
52 | } | |||
44 |
|
53 | |||
45 | var items = this.model.get('values'); |
|
54 | var items = this.model.get('values'); | |
46 | this.$droplist.html(''); |
|
55 | this.$droplist.html(''); |
General Comments 0
You need to be logged in to leave comments.
Login now