##// END OF EJS Templates
Better fix for empty dropdown button alignment...
Jonathan Frederic -
Show More
@@ -22,10 +22,12 b' define(["notebook/js/widget"], function(){'
22 22 this.$droplabel = $('<button />')
23 23 .addClass('btn')
24 24 .addClass('widget-combo-btn')
25 .html('&nbsp;')
25 26 .appendTo(this.$buttongroup);
26 27 this.$dropbutton = $('<button />')
27 28 .addClass('btn')
28 29 .addClass('dropdown-toggle')
30 .addClass('widget-combo-carrot-btn')
29 31 .attr('data-toggle', 'dropdown')
30 32 .html('<span class="caret"></span>')
31 33 .appendTo(this.$buttongroup);
@@ -40,7 +42,14 b' define(["notebook/js/widget"], function(){'
40 42 // Handles: Backend -> Frontend Sync
41 43 // Frontent -> Frontend Sync
42 44 update : function(){
43 this.$droplabel.html(this.model.get('value'));
45
46 var selected_item_text = this.model.get('value');
47 selected_item_text.replace(' ', '');
48 if (selected_item_text == '') {
49 this.$droplabel.html('&nbsp;');
50 } else {
51 this.$droplabel.html(this.model.get('value'));
52 }
44 53
45 54 var items = this.model.get('values');
46 55 this.$droplist.html('');
@@ -98,7 +98,6 b''
98 98
99 99 .widget-combo-btn {
100 100 min-width: 138px; /* + 26px drop arrow btn = 164px */
101 min-height: 1ex;
102 101 }
103 102
104 103 .widget-container {
General Comments 0
You need to be logged in to leave comments. Login now