##// END OF EJS Templates
MAJOR CSS FIXES...
Jonathan Frederic -
Show More
@@ -8,19 +8,15 b' require(["notebook/js/widget"], function(){'
8
8
9 // Called when view is rendered.
9 // Called when view is rendered.
10 render : function(){
10 render : function(){
11 this.$el
11 this.$el = $('<div />')
12 .html('');
12 .addClass('widget-hbox-single');
13
13 this.$label = $('<div />')
14 var $label = $('<label />')
15 .addClass('checkbox')
16 .addClass('widget-label')
14 .addClass('widget-label')
17 .appendTo(this.$el);
15 .appendTo(this.$el)
18 this.$checkbox_label = $('<div />')
19 .appendTo($label)
20 .hide();
16 .hide();
21 this.$checkbox = $('<input />')
17 this.$checkbox = $('<input />')
22 .attr('type', 'checkbox')
18 .attr('type', 'checkbox')
23 .appendTo($label);
19 .appendTo(this.$el);
24
20
25 this.update(); // Set defaults.
21 this.update(); // Set defaults.
26 },
22 },
@@ -33,10 +29,10 b' require(["notebook/js/widget"], function(){'
33
29
34 var description = this.model.get('description');
30 var description = this.model.get('description');
35 if (description.length == 0) {
31 if (description.length == 0) {
36 this.$checkbox_label.hide();
32 this.$label.hide();
37 } else {
33 } else {
38 this.$checkbox_label.html(description);
34 this.$label.html(description);
39 this.$checkbox_label.show();
35 this.$label.show();
40 }
36 }
41 }
37 }
42 return IPython.WidgetView.prototype.update.call(this);
38 return IPython.WidgetView.prototype.update.call(this);
@@ -7,6 +7,7 b' require(["notebook/js/widget"], function(){'
7 // Called when view is rendered.
7 // Called when view is rendered.
8 render : function(){
8 render : function(){
9 this.$el
9 this.$el
10 .addClass('widget-hbox-single')
10 .html('');
11 .html('');
11 this.$label = $('<div />')
12 this.$label = $('<div />')
12 .appendTo(this.$el)
13 .appendTo(this.$el)
@@ -18,8 +19,7 b' require(["notebook/js/widget"], function(){'
18
19
19 // Put the slider in a container
20 // Put the slider in a container
20 this.$slider_container = $('<div />')
21 this.$slider_container = $('<div />')
21 .css('padding-top', '4px')
22 .addClass('widget-slider')
22 .css('padding-bottom', '4px')
23 .append(this.$slider);
23 .append(this.$slider);
24 this.$el.append(this.$slider_container);
24 this.$el.append(this.$slider_container);
25
25
@@ -65,6 +65,7 b' require(["notebook/js/widget"], function(){'
65 // Called when view is rendered.
65 // Called when view is rendered.
66 render : function(){
66 render : function(){
67 this.$el
67 this.$el
68 .addClass('widget-hbox-single')
68 .html('');
69 .html('');
69 this.$label = $('<div />')
70 this.$label = $('<div />')
70 .appendTo(this.$el)
71 .appendTo(this.$el)
@@ -72,6 +73,7 b' require(["notebook/js/widget"], function(){'
72 .hide();
73 .hide();
73 this.$textbox = $('<input type="text" />')
74 this.$textbox = $('<input type="text" />')
74 .addClass('input')
75 .addClass('input')
76 .addClass('widget-numeric-text')
75 .appendTo(this.$el);
77 .appendTo(this.$el);
76 this.update(); // Set defaults.
78 this.update(); // Set defaults.
77 },
79 },
@@ -7,6 +7,7 b' require(["notebook/js/widget"], function(){'
7 // Called when view is rendered.
7 // Called when view is rendered.
8 render : function(){
8 render : function(){
9 this.$el
9 this.$el
10 .addClass('widget-hbox-single')
10 .html('');
11 .html('');
11 this.$label = $('<div />')
12 this.$label = $('<div />')
12 .appendTo(this.$el)
13 .appendTo(this.$el)
@@ -18,8 +19,7 b' require(["notebook/js/widget"], function(){'
18
19
19 // Put the slider in a container
20 // Put the slider in a container
20 this.$slider_container = $('<div />')
21 this.$slider_container = $('<div />')
21 .css('padding-top', '4px')
22 .addClass('widget-slider')
22 .css('padding-bottom', '4px')
23 .append(this.$slider);
23 .append(this.$slider);
24 this.$el.append(this.$slider_container);
24 this.$el.append(this.$slider_container);
25
25
@@ -64,6 +64,7 b' require(["notebook/js/widget"], function(){'
64 // Called when view is rendered.
64 // Called when view is rendered.
65 render : function(){
65 render : function(){
66 this.$el
66 this.$el
67 .addClass('widget-hbox-single')
67 .html('');
68 .html('');
68 this.$label = $('<div />')
69 this.$label = $('<div />')
69 .appendTo(this.$el)
70 .appendTo(this.$el)
@@ -71,6 +72,7 b' require(["notebook/js/widget"], function(){'
71 .hide();
72 .hide();
72 this.$textbox = $('<input type="text" />')
73 this.$textbox = $('<input type="text" />')
73 .addClass('input')
74 .addClass('input')
75 .addClass('widget-numeric-text')
74 .appendTo(this.$el);
76 .appendTo(this.$el);
75 this.update(); // Set defaults.
77 this.update(); // Set defaults.
76 },
78 },
@@ -8,6 +8,7 b' require(["notebook/js/widget"], function(){'
8 render : function(){
8 render : function(){
9
9
10 this.$el
10 this.$el
11 .addClass('widget-hbox-single')
11 .html('');
12 .html('');
12 this.$label = $('<div />')
13 this.$label = $('<div />')
13 .appendTo(this.$el)
14 .appendTo(this.$el)
@@ -19,6 +20,7 b' require(["notebook/js/widget"], function(){'
19 .appendTo(this.$el);
20 .appendTo(this.$el);
20 this.$droplabel = $('<button />')
21 this.$droplabel = $('<button />')
21 .addClass('btn')
22 .addClass('btn')
23 .addClass('widget-combo-btn')
22 .appendTo(this.$buttongroup);
24 .appendTo(this.$buttongroup);
23 this.$dropbutton = $('<button />')
25 this.$dropbutton = $('<button />')
24 .addClass('btn')
26 .addClass('btn')
@@ -84,11 +86,16 b' require(["notebook/js/widget"], function(){'
84 // Called when view is rendered.
86 // Called when view is rendered.
85 render : function(){
87 render : function(){
86 this.$el
88 this.$el
89 .addClass('widget-hbox')
87 .html('');
90 .html('');
88 this.$label = $('<div />')
91 this.$label = $('<div />')
89 .appendTo(this.$el)
92 .appendTo(this.$el)
90 .addClass('widget-label')
93 .addClass('widget-label')
91 .hide();
94 .hide();
95 this.$container = $('<div />')
96 .appendTo(this.$el)
97 .addClass('widget-container')
98 .addClass('vbox');
92 this.update();
99 this.update();
93 },
100 },
94
101
@@ -104,7 +111,7 b' require(["notebook/js/widget"], function(){'
104 var $label = $('<label />')
111 var $label = $('<label />')
105 .addClass('radio')
112 .addClass('radio')
106 .html(items[index])
113 .html(items[index])
107 .appendTo(this.$el);
114 .appendTo(this.$container);
108
115
109 var that = this;
116 var that = this;
110 $('<input />')
117 $('<input />')
@@ -119,14 +126,14 b' require(["notebook/js/widget"], function(){'
119 }
126 }
120
127
121 if (this.model.get('value') == items[index]) {
128 if (this.model.get('value') == items[index]) {
122 this.$el.find(item_query).prop('checked', true);
129 this.$container.find(item_query).prop('checked', true);
123 } else {
130 } else {
124 this.$el.find(item_query).prop('checked', false);
131 this.$container.find(item_query).prop('checked', false);
125 }
132 }
126 }
133 }
127
134
128 // Remove items that no longer exist.
135 // Remove items that no longer exist.
129 this.$el.find('input').each(function(i, obj) {
136 this.$container.find('input').each(function(i, obj) {
130 var value = $(obj).val();
137 var value = $(obj).val();
131 var found = false;
138 var found = false;
132 for (var index in items) {
139 for (var index in items) {
@@ -161,6 +168,7 b' require(["notebook/js/widget"], function(){'
161 // Called when view is rendered.
168 // Called when view is rendered.
162 render : function(){
169 render : function(){
163 this.$el
170 this.$el
171 .addClass('widget-hbox-single')
164 .html('');
172 .html('');
165 this.$label = $('<div />')
173 this.$label = $('<div />')
166 .appendTo(this.$el)
174 .appendTo(this.$el)
@@ -26,6 +26,7 b' require(["notebook/js/widget"], function(){'
26 // Called when view is rendered.
26 // Called when view is rendered.
27 render : function(){
27 render : function(){
28 this.$el
28 this.$el
29 .addClass('widget-hbox')
29 .html('');
30 .html('');
30 this.$label = $('<div />')
31 this.$label = $('<div />')
31 .appendTo(this.$el)
32 .appendTo(this.$el)
@@ -33,6 +34,7 b' require(["notebook/js/widget"], function(){'
33 .hide();
34 .hide();
34 this.$textbox = $('<textarea />')
35 this.$textbox = $('<textarea />')
35 .attr('rows', 5)
36 .attr('rows', 5)
37 .addClass('widget-text')
36 .appendTo(this.$el);
38 .appendTo(this.$el);
37 this.update(); // Set defaults.
39 this.update(); // Set defaults.
38 },
40 },
@@ -74,6 +76,7 b' require(["notebook/js/widget"], function(){'
74 // Called when view is rendered.
76 // Called when view is rendered.
75 render : function(){
77 render : function(){
76 this.$el
78 this.$el
79 .addClass('widget-hbox-single')
77 .html('');
80 .html('');
78 this.$label = $('<div />')
81 this.$label = $('<div />')
79 .addClass('widget-label')
82 .addClass('widget-label')
@@ -81,6 +84,7 b' require(["notebook/js/widget"], function(){'
81 .hide();
84 .hide();
82 this.$textbox = $('<input type="text" />')
85 this.$textbox = $('<input type="text" />')
83 .addClass('input')
86 .addClass('input')
87 .addClass('widget-text')
84 .appendTo(this.$el);
88 .appendTo(this.$el);
85 this.update(); // Set defaults.
89 this.update(); // Set defaults.
86 },
90 },
@@ -1,23 +1,79 b''
1 .widget-label {
2 min-width: 300px;
3 }
4
5 div.widget-container {
6 .box-flex2();
7 .border-box-sizing();
8 }
9
1
10 div.widget-area {
2 .widget-area {
11 page-break-inside: avoid;
3 page-break-inside: avoid;
12 .hbox();
4 .hbox();
13 }
14
5
15 /* This class is for the widget subarea inside the widget_area and after
6 .widget-subarea {
16 the prompt div. */
7 padding: 0.44em 0.4em 0.4em 1px;
17 div.widget-subarea {
8 margin-left: 6px;
18 padding: 0.44em 0.4em 0.4em 1px;
9 .border-box-sizing();
19 margin-left: 6px;
10 .vbox();
20 .border-box-sizing();
11 .box-flex2();
21 .vbox();
12
22 .box-flex2()
13 .widget-label {
14 min-width: 10ex;
15 padding-right: 8px;
16 text-align: right;
17 vertical-align: text-top;
18 padding-top: 3px;
19 }
20
21 .widget-slider {
22 padding-left: 8px;
23 padding-right: 5px;
24 margin-top: 11px;
25
26 width: 348px;
27 height: 5px !important;
28 overflow: visible !important;
29
30 border: 1px solid #CCCCCC;
31 background: #FFFFFF;
32 .corner-all();
33
34 .ui-slider {
35 border: 0px !important;
36 background: none !important;
37
38 .ui-slider-handle {
39 width: 14px !important;
40 height: 28px !important;
41
42 margin-top: -7px !important;
43 }
44 }
45 }
46
47 .widget-text {
48 width: 350px;
49 margin-bottom: 0px;
50 }
51
52 .widget-numeric-text {
53 width: 150px;
54 }
55
56 .widget-combo-btn {
57 min-width: 138px; /* + 26px drop arrow btn = 164px */
58 height: 30px;
59 }
60
61 .widget-container {
62 .box-flex1();
63 .border-box-sizing();
64 }
65
66 .widget-hbox {
67 .hbox();
68 .start();
69 .widget-container();
70 margin-bottom: 5px;
71 margin-top: 5px;
72 }
73
74 .widget-hbox-single {
75 .widget-hbox();
76 height: 30px;
77 }
78 }
23 }
79 }
@@ -165,10 +165,7 b' h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anch'
165 .ipython_tooltip .tooltiptext pre{border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;font-size:100%;background-color:#f7f7f7;}
165 .ipython_tooltip .tooltiptext pre{border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;font-size:100%;background-color:#f7f7f7;}
166 .pretooltiparrow{left:0px;margin:0px;top:-16px;width:40px;height:16px;overflow:hidden;position:absolute;}
166 .pretooltiparrow{left:0px;margin:0px;top:-16px;width:40px;height:16px;overflow:hidden;position:absolute;}
167 .pretooltiparrow:before{background-color:#f7f7f7;border:1px #ababab solid;z-index:11;content:"";position:absolute;left:15px;top:10px;width:25px;height:25px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);}
167 .pretooltiparrow:before{background-color:#f7f7f7;border:1px #ababab solid;z-index:11;content:"";position:absolute;left:15px;top:10px;width:25px;height:25px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);}
168 .hbox{display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
168 .widget-label{min-width:300px;}
169 .hbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
169 div.widget-container{-webkit-box-flex:2;-moz-box-flex:2;box-flex:2;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;}
170 .vbox{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;}
170 div.widget-area{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
171 .vbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
171 div.widget-subarea{padding:0.44em 0.4em 0.4em 1px;margin-left:6px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;-webkit-box-flex:2;-moz-box-flex:2;box-flex:2;}
172 div.widget_area{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
173 div.widget_item{display:inline-block;}
174 div.widget_subarea{padding:0.44em 0.4em 0.4em 1px;margin-left:6px;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;}
@@ -1584,10 +1584,7 b' span#checkpoint_status,span#autosave_status{font-size:small;}'
1584 .ipython_tooltip .tooltiptext pre{border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;font-size:100%;background-color:#f7f7f7;}
1584 .ipython_tooltip .tooltiptext pre{border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;font-size:100%;background-color:#f7f7f7;}
1585 .pretooltiparrow{left:0px;margin:0px;top:-16px;width:40px;height:16px;overflow:hidden;position:absolute;}
1585 .pretooltiparrow{left:0px;margin:0px;top:-16px;width:40px;height:16px;overflow:hidden;position:absolute;}
1586 .pretooltiparrow:before{background-color:#f7f7f7;border:1px #ababab solid;z-index:11;content:"";position:absolute;left:15px;top:10px;width:25px;height:25px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);}
1586 .pretooltiparrow:before{background-color:#f7f7f7;border:1px #ababab solid;z-index:11;content:"";position:absolute;left:15px;top:10px;width:25px;height:25px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);}
1587 .hbox{display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
1587 .widget-label{min-width:300px;}
1588 .hbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
1588 div.widget-container{-webkit-box-flex:2;-moz-box-flex:2;box-flex:2;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;}
1589 .vbox{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;}
1589 div.widget-area{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
1590 .vbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
1590 div.widget-subarea{padding:0.44em 0.4em 0.4em 1px;margin-left:6px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;-webkit-box-flex:2;-moz-box-flex:2;box-flex:2;}
1591 div.widget_area{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;}
1592 div.widget_item{display:inline-block;}
1593 div.widget_subarea{padding:0.44em 0.4em 0.4em 1px;margin-left:6px;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;}
General Comments 0
You need to be logged in to leave comments. Login now