##// END OF EJS Templates
Better fix for empty dropdown button alignment...
Jonathan Frederic -
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('&nbsp;')
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('&nbsp;');
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('');
@@ -98,7 +98,6
98
98
99 .widget-combo-btn {
99 .widget-combo-btn {
100 min-width: 138px; /* + 26px drop arrow btn = 164px */
100 min-width: 138px; /* + 26px drop arrow btn = 164px */
101 min-height: 1ex;
102 }
101 }
103
102
104 .widget-container {
103 .widget-container {
General Comments 0
You need to be logged in to leave comments. Login now