##// END OF EJS Templates
MAJOR CSS FIXES...
Jonathan Frederic -
Show More
@@ -8,19 +8,15 b' require(["notebook/js/widget"], function(){'
8 8
9 9 // Called when view is rendered.
10 10 render : function(){
11 this.$el
12 .html('');
13
14 var $label = $('<label />')
15 .addClass('checkbox')
11 this.$el = $('<div />')
12 .addClass('widget-hbox-single');
13 this.$label = $('<div />')
16 14 .addClass('widget-label')
17 .appendTo(this.$el);
18 this.$checkbox_label = $('<div />')
19 .appendTo($label)
15 .appendTo(this.$el)
20 16 .hide();
21 17 this.$checkbox = $('<input />')
22 18 .attr('type', 'checkbox')
23 .appendTo($label);
19 .appendTo(this.$el);
24 20
25 21 this.update(); // Set defaults.
26 22 },
@@ -33,10 +29,10 b' require(["notebook/js/widget"], function(){'
33 29
34 30 var description = this.model.get('description');
35 31 if (description.length == 0) {
36 this.$checkbox_label.hide();
32 this.$label.hide();
37 33 } else {
38 this.$checkbox_label.html(description);
39 this.$checkbox_label.show();
34 this.$label.html(description);
35 this.$label.show();
40 36 }
41 37 }
42 38 return IPython.WidgetView.prototype.update.call(this);
@@ -7,6 +7,7 b' require(["notebook/js/widget"], function(){'
7 7 // Called when view is rendered.
8 8 render : function(){
9 9 this.$el
10 .addClass('widget-hbox-single')
10 11 .html('');
11 12 this.$label = $('<div />')
12 13 .appendTo(this.$el)
@@ -18,8 +19,7 b' require(["notebook/js/widget"], function(){'
18 19
19 20 // Put the slider in a container
20 21 this.$slider_container = $('<div />')
21 .css('padding-top', '4px')
22 .css('padding-bottom', '4px')
22 .addClass('widget-slider')
23 23 .append(this.$slider);
24 24 this.$el.append(this.$slider_container);
25 25
@@ -65,6 +65,7 b' require(["notebook/js/widget"], function(){'
65 65 // Called when view is rendered.
66 66 render : function(){
67 67 this.$el
68 .addClass('widget-hbox-single')
68 69 .html('');
69 70 this.$label = $('<div />')
70 71 .appendTo(this.$el)
@@ -72,6 +73,7 b' require(["notebook/js/widget"], function(){'
72 73 .hide();
73 74 this.$textbox = $('<input type="text" />')
74 75 .addClass('input')
76 .addClass('widget-numeric-text')
75 77 .appendTo(this.$el);
76 78 this.update(); // Set defaults.
77 79 },
@@ -7,6 +7,7 b' require(["notebook/js/widget"], function(){'
7 7 // Called when view is rendered.
8 8 render : function(){
9 9 this.$el
10 .addClass('widget-hbox-single')
10 11 .html('');
11 12 this.$label = $('<div />')
12 13 .appendTo(this.$el)
@@ -18,8 +19,7 b' require(["notebook/js/widget"], function(){'
18 19
19 20 // Put the slider in a container
20 21 this.$slider_container = $('<div />')
21 .css('padding-top', '4px')
22 .css('padding-bottom', '4px')
22 .addClass('widget-slider')
23 23 .append(this.$slider);
24 24 this.$el.append(this.$slider_container);
25 25
@@ -64,6 +64,7 b' require(["notebook/js/widget"], function(){'
64 64 // Called when view is rendered.
65 65 render : function(){
66 66 this.$el
67 .addClass('widget-hbox-single')
67 68 .html('');
68 69 this.$label = $('<div />')
69 70 .appendTo(this.$el)
@@ -71,6 +72,7 b' require(["notebook/js/widget"], function(){'
71 72 .hide();
72 73 this.$textbox = $('<input type="text" />')
73 74 .addClass('input')
75 .addClass('widget-numeric-text')
74 76 .appendTo(this.$el);
75 77 this.update(); // Set defaults.
76 78 },
@@ -8,6 +8,7 b' require(["notebook/js/widget"], function(){'
8 8 render : function(){
9 9
10 10 this.$el
11 .addClass('widget-hbox-single')
11 12 .html('');
12 13 this.$label = $('<div />')
13 14 .appendTo(this.$el)
@@ -19,6 +20,7 b' require(["notebook/js/widget"], function(){'
19 20 .appendTo(this.$el);
20 21 this.$droplabel = $('<button />')
21 22 .addClass('btn')
23 .addClass('widget-combo-btn')
22 24 .appendTo(this.$buttongroup);
23 25 this.$dropbutton = $('<button />')
24 26 .addClass('btn')
@@ -84,11 +86,16 b' require(["notebook/js/widget"], function(){'
84 86 // Called when view is rendered.
85 87 render : function(){
86 88 this.$el
89 .addClass('widget-hbox')
87 90 .html('');
88 91 this.$label = $('<div />')
89 92 .appendTo(this.$el)
90 93 .addClass('widget-label')
91 94 .hide();
95 this.$container = $('<div />')
96 .appendTo(this.$el)
97 .addClass('widget-container')
98 .addClass('vbox');
92 99 this.update();
93 100 },
94 101
@@ -104,7 +111,7 b' require(["notebook/js/widget"], function(){'
104 111 var $label = $('<label />')
105 112 .addClass('radio')
106 113 .html(items[index])
107 .appendTo(this.$el);
114 .appendTo(this.$container);
108 115
109 116 var that = this;
110 117 $('<input />')
@@ -119,14 +126,14 b' require(["notebook/js/widget"], function(){'
119 126 }
120 127
121 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 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 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 137 var value = $(obj).val();
131 138 var found = false;
132 139 for (var index in items) {
@@ -161,6 +168,7 b' require(["notebook/js/widget"], function(){'
161 168 // Called when view is rendered.
162 169 render : function(){
163 170 this.$el
171 .addClass('widget-hbox-single')
164 172 .html('');
165 173 this.$label = $('<div />')
166 174 .appendTo(this.$el)
@@ -26,6 +26,7 b' require(["notebook/js/widget"], function(){'
26 26 // Called when view is rendered.
27 27 render : function(){
28 28 this.$el
29 .addClass('widget-hbox')
29 30 .html('');
30 31 this.$label = $('<div />')
31 32 .appendTo(this.$el)
@@ -33,6 +34,7 b' require(["notebook/js/widget"], function(){'
33 34 .hide();
34 35 this.$textbox = $('<textarea />')
35 36 .attr('rows', 5)
37 .addClass('widget-text')
36 38 .appendTo(this.$el);
37 39 this.update(); // Set defaults.
38 40 },
@@ -74,6 +76,7 b' require(["notebook/js/widget"], function(){'
74 76 // Called when view is rendered.
75 77 render : function(){
76 78 this.$el
79 .addClass('widget-hbox-single')
77 80 .html('');
78 81 this.$label = $('<div />')
79 82 .addClass('widget-label')
@@ -81,6 +84,7 b' require(["notebook/js/widget"], function(){'
81 84 .hide();
82 85 this.$textbox = $('<input type="text" />')
83 86 .addClass('input')
87 .addClass('widget-text')
84 88 .appendTo(this.$el);
85 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 3 page-break-inside: avoid;
12 4 .hbox();
13 }
14 5
15 /* This class is for the widget subarea inside the widget_area and after
16 the prompt div. */
17 div.widget-subarea {
18 padding: 0.44em 0.4em 0.4em 1px;
19 margin-left: 6px;
20 .border-box-sizing();
21 .vbox();
22 .box-flex2()
6 .widget-subarea {
7 padding: 0.44em 0.4em 0.4em 1px;
8 margin-left: 6px;
9 .border-box-sizing();
10 .vbox();
11 .box-flex2();
12
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 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 166 .pretooltiparrow{left:0px;margin:0px;top:-16px;width:40px;height:16px;overflow:hidden;position:absolute;}
167 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;}
169 .hbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
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;}
171 .vbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
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;}
168 .widget-label{min-width:300px;}
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 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 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;}
@@ -1584,10 +1584,7 b' span#checkpoint_status,span#autosave_status{font-size:small;}'
1584 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 1585 .pretooltiparrow{left:0px;margin:0px;top:-16px;width:40px;height:16px;overflow:hidden;position:absolute;}
1586 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;}
1588 .hbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
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;}
1590 .vbox>*{-webkit-box-flex:0;-moz-box-flex:0;box-flex:0;display:block;}
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;}
1587 .widget-label{min-width:300px;}
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 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 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;}
General Comments 0
You need to be logged in to leave comments. Login now