Show More
@@ -104,19 +104,19 b'' | |||||
104 |
|
104 | |||
105 | /* Code below was added on 11/6/2013 by Jonathan Frederic */ |
|
105 | /* Code below was added on 11/6/2013 by Jonathan Frederic */ | |
106 |
|
106 | |||
107 |
.align |
|
107 | .align-start { | |
108 | -webkit-box-align: start; |
|
108 | -webkit-box-align: start; | |
109 | -moz-box-align: start; |
|
109 | -moz-box-align: start; | |
110 | box-align: start; |
|
110 | box-align: start; | |
111 | } |
|
111 | } | |
112 |
|
112 | |||
113 |
.align |
|
113 | .align-end { | |
114 | -webkit-box-align: end; |
|
114 | -webkit-box-align: end; | |
115 | -moz-box-align: end; |
|
115 | -moz-box-align: end; | |
116 | box-align: end; |
|
116 | box-align: end; | |
117 | } |
|
117 | } | |
118 |
|
118 | |||
119 |
.align |
|
119 | .align-center { | |
120 | -webkit-box-align: center; |
|
120 | -webkit-box-align: center; | |
121 | -moz-box-align: center; |
|
121 | -moz-box-align: center; | |
122 | box-align: center; |
|
122 | box-align: center; |
@@ -19,9 +19,12 b' require(["notebook/js/widget"], function(){' | |||||
19 | this.set_flex_property('start', this.model.get('_pack_start')); |
|
19 | this.set_flex_property('start', this.model.get('_pack_start')); | |
20 | this.set_flex_property('center', this.model.get('_pack_center')); |
|
20 | this.set_flex_property('center', this.model.get('_pack_center')); | |
21 | this.set_flex_property('end', this.model.get('_pack_end')); |
|
21 | this.set_flex_property('end', this.model.get('_pack_end')); | |
22 |
this.set_flex_property('align |
|
22 | this.set_flex_property('align-start', this.model.get('_align_start')); | |
23 |
this.set_flex_property('align |
|
23 | this.set_flex_property('align-center', this.model.get('_align_center')); | |
24 |
this.set_flex_property('align |
|
24 | this.set_flex_property('align-end', this.model.get('_align_end')); | |
|
25 | this.set_flex_property('box-flex0', this.model.get('_flex0')); | |||
|
26 | this.set_flex_property('box-flex1', this.model.get('_flex1')); | |||
|
27 | this.set_flex_property('box-flex2', this.model.get('_flex2')); | |||
25 |
|
28 | |||
26 | return IPython.WidgetView.prototype.update.call(this); |
|
29 | return IPython.WidgetView.prototype.update.call(this); | |
27 | }, |
|
30 | }, |
@@ -19,6 +19,7 b'' | |||||
19 | .end{-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;} |
|
19 | .end{-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;} | |
20 | .center{-webkit-box-pack:center;-moz-box-pack:center;box-pack:center;} |
|
20 | .center{-webkit-box-pack:center;-moz-box-pack:center;box-pack:center;} | |
21 | <<<<<<< HEAD |
|
21 | <<<<<<< HEAD | |
|
22 | <<<<<<< HEAD | |||
22 | div.error{margin:2em;text-align:center;} |
|
23 | div.error{margin:2em;text-align:center;} | |
23 | div.error>h1{font-size:500%;line-height:normal;} |
|
24 | div.error>h1{font-size:500%;line-height:normal;} | |
24 | div.error>p{font-size:200%;line-height:normal;} |
|
25 | div.error>p{font-size:200%;line-height:normal;} | |
@@ -28,6 +29,11 b' div.traceback-wrapper{text-align:left;max-width:800px;margin:auto;}' | |||||
28 | .align_end{-webkit-box-align:end;-moz-box-align:end;box-align:end;} |
|
29 | .align_end{-webkit-box-align:end;-moz-box-align:end;box-align:end;} | |
29 | .align_center{-webkit-box-align:center;-moz-box-align:center;box-align:center;} |
|
30 | .align_center{-webkit-box-align:center;-moz-box-align:center;box-align:center;} | |
30 | >>>>>>> Added flexible box model align properties. |
|
31 | >>>>>>> Added flexible box model align properties. | |
|
32 | ======= | |||
|
33 | .align-start{-webkit-box-align:start;-moz-box-align:start;box-align:start;} | |||
|
34 | .align-end{-webkit-box-align:end;-moz-box-align:end;box-align:end;} | |||
|
35 | .align-center{-webkit-box-align:center;-moz-box-align:center;box-align:center;} | |||
|
36 | >>>>>>> Added flex properties to container. | |||
31 | .center-nav{display:inline-block;margin-bottom:-4px;} |
|
37 | .center-nav{display:inline-block;margin-bottom:-4px;} | |
32 | .alternate_upload{background-color:none;display:inline;} |
|
38 | .alternate_upload{background-color:none;display:inline;} | |
33 | .alternate_upload.form{padding:0;margin:0;} |
|
39 | .alternate_upload.form{padding:0;margin:0;} |
@@ -1386,6 +1386,7 b' ul.icons-ul{list-style-type:none;text-indent:-0.7142857142857143em;margin-left:2' | |||||
1386 | .end{-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;} |
|
1386 | .end{-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;} | |
1387 | .center{-webkit-box-pack:center;-moz-box-pack:center;box-pack:center;} |
|
1387 | .center{-webkit-box-pack:center;-moz-box-pack:center;box-pack:center;} | |
1388 | <<<<<<< HEAD |
|
1388 | <<<<<<< HEAD | |
|
1389 | <<<<<<< HEAD | |||
1389 | div.error{margin:2em;text-align:center;} |
|
1390 | div.error{margin:2em;text-align:center;} | |
1390 | div.error>h1{font-size:500%;line-height:normal;} |
|
1391 | div.error>h1{font-size:500%;line-height:normal;} | |
1391 | div.error>p{font-size:200%;line-height:normal;} |
|
1392 | div.error>p{font-size:200%;line-height:normal;} | |
@@ -1395,6 +1396,11 b' div.traceback-wrapper{text-align:left;max-width:800px;margin:auto;}' | |||||
1395 | .align_end{-webkit-box-align:end;-moz-box-align:end;box-align:end;} |
|
1396 | .align_end{-webkit-box-align:end;-moz-box-align:end;box-align:end;} | |
1396 | .align_center{-webkit-box-align:center;-moz-box-align:center;box-align:center;} |
|
1397 | .align_center{-webkit-box-align:center;-moz-box-align:center;box-align:center;} | |
1397 | >>>>>>> Added flexible box model align properties. |
|
1398 | >>>>>>> Added flexible box model align properties. | |
|
1399 | ======= | |||
|
1400 | .align-start{-webkit-box-align:start;-moz-box-align:start;box-align:start;} | |||
|
1401 | .align-end{-webkit-box-align:end;-moz-box-align:end;box-align:end;} | |||
|
1402 | .align-center{-webkit-box-align:center;-moz-box-align:center;box-align:center;} | |||
|
1403 | >>>>>>> Added flex properties to container. | |||
1398 | body{background-color:white;position:absolute;left:0px;right:0px;top:0px;bottom:0px;overflow:visible;} |
|
1404 | body{background-color:white;position:absolute;left:0px;right:0px;top:0px;bottom:0px;overflow:visible;} | |
1399 | div#header{display:none;} |
|
1405 | div#header{display:none;} | |
1400 | #ipython_notebook{padding-left:16px;} |
|
1406 | #ipython_notebook{padding-left:16px;} |
@@ -26,7 +26,8 b' class ContainerWidget(Widget):' | |||||
26 | # Keys, all private and managed by helper methods. Flexible box model |
|
26 | # Keys, all private and managed by helper methods. Flexible box model | |
27 | # classes... |
|
27 | # classes... | |
28 | _keys = ['_vbox', '_hbox', '_align_start', '_align_end', '_align_center', |
|
28 | _keys = ['_vbox', '_hbox', '_align_start', '_align_end', '_align_center', | |
29 |
'_pack_start', '_pack_end', '_pack_center' |
|
29 | '_pack_start', '_pack_end', '_pack_center', '_flex0', '_flex1', | |
|
30 | '_flex2'] | |||
30 | _hbox = Bool(False) |
|
31 | _hbox = Bool(False) | |
31 | _vbox = Bool(False) |
|
32 | _vbox = Bool(False) | |
32 | _align_start = Bool(False) |
|
33 | _align_start = Bool(False) | |
@@ -35,6 +36,9 b' class ContainerWidget(Widget):' | |||||
35 | _pack_start = Bool(False) |
|
36 | _pack_start = Bool(False) | |
36 | _pack_end = Bool(False) |
|
37 | _pack_end = Bool(False) | |
37 | _pack_center = Bool(False) |
|
38 | _pack_center = Bool(False) | |
|
39 | _flex0 = Bool(False) | |||
|
40 | _flex1 = Bool(False) | |||
|
41 | _flex2 = Bool(False) | |||
38 |
|
42 | |||
39 | def hbox(self, enabled=True): |
|
43 | def hbox(self, enabled=True): | |
40 | """Make this container an hbox. Automatically disables conflicting |
|
44 | """Make this container an hbox. Automatically disables conflicting | |
@@ -146,3 +150,49 b' class ContainerWidget(Widget):' | |||||
146 | if enabled: |
|
150 | if enabled: | |
147 | self._pack_start = False |
|
151 | self._pack_start = False | |
148 | self._pack_end = False |
|
152 | self._pack_end = False | |
|
153 | ||||
|
154 | ||||
|
155 | def flex0(self, enabled=True): | |||
|
156 | """Put this container in flex0 mode. Automatically disables conflicting | |||
|
157 | flex modes. See the widget tutorial part 5 example notebook for more | |||
|
158 | information. | |||
|
159 | ||||
|
160 | Parameters | |||
|
161 | ---------- | |||
|
162 | enabled: bool (optional) | |||
|
163 | Enabled or disable the flex0 attribute of the container, defaults to | |||
|
164 | True.""" | |||
|
165 | self._flex0 = enabled | |||
|
166 | if enabled: | |||
|
167 | self._flex1 = False | |||
|
168 | self._flex2 = False | |||
|
169 | ||||
|
170 | def flex1(self, enabled=True): | |||
|
171 | """Put this container in flex1 mode. Automatically disables conflicting | |||
|
172 | flex modes. See the widget tutorial part 5 example notebook for more | |||
|
173 | information. | |||
|
174 | ||||
|
175 | Parameters | |||
|
176 | ---------- | |||
|
177 | enabled: bool (optional) | |||
|
178 | Enabled or disable the flex1 attribute of the container, defaults to | |||
|
179 | True.""" | |||
|
180 | self._flex1 = enabled | |||
|
181 | if enabled: | |||
|
182 | self._flex0 = False | |||
|
183 | self._flex2 = False | |||
|
184 | ||||
|
185 | def flex2(self, enabled=True): | |||
|
186 | """Put this container in flex2 mode. Automatically disables conflicting | |||
|
187 | flex modes. See the widget tutorial part 5 example notebook for more | |||
|
188 | information. | |||
|
189 | ||||
|
190 | Parameters | |||
|
191 | ---------- | |||
|
192 | enabled: bool (optional) | |||
|
193 | Enabled or disable the flex2 attribute of the container, defaults to | |||
|
194 | True.""" | |||
|
195 | self._flex2 = enabled | |||
|
196 | if enabled: | |||
|
197 | self._flex0 = False | |||
|
198 | self._flex1 = False |
General Comments 0
You need to be logged in to leave comments.
Login now