##// END OF EJS Templates
Address Sylvain's comments.
Jonathan Frederic -
Show More
@@ -19,7 +19,8 b' define(['
19
19
20 render: function(){
20 render: function(){
21 // Called when view is rendered.
21 // Called when view is rendered.
22 this.$el.addClass('widget-container');
22 this.$box = this.$el;
23 this.$el.addClass('widget-box');
23 },
24 },
24
25
25 update_children: function(old_list, new_list) {
26 update_children: function(old_list, new_list) {
@@ -37,7 +38,7 b' define(['
37 add_child_model: function(model) {
38 add_child_model: function(model) {
38 // Called when a model is added to the children list.
39 // Called when a model is added to the children list.
39 var view = this.create_child_view(model);
40 var view = this.create_child_view(model);
40 this.$el.append(view.$el);
41 this.$box.append(view.$el);
41
42
42 // Trigger the displayed event of the child view.
43 // Trigger the displayed event of the child view.
43 this.after_displayed(function() {
44 this.after_displayed(function() {
@@ -178,9 +179,10 b' define(['
178 this.$body = $('<div />')
179 this.$body = $('<div />')
179 .addClass('modal-body')
180 .addClass('modal-body')
180 .addClass('widget-modal-body')
181 .addClass('widget-modal-body')
181 .addClass('widget-container')
182 .addClass('widget-box')
182 .addClass('vbox')
183 .addClass('vbox')
183 .appendTo(this.$window);
184 .appendTo(this.$window);
185 this.$box = this.$body;
184
186
185 this.$show_button = $('<button />')
187 this.$show_button = $('<button />')
186 .html("&nbsp;")
188 .html("&nbsp;")
@@ -247,29 +249,6 b' define(['
247 this.$window.css('z-index', max_zindex);
249 this.$window.css('z-index', max_zindex);
248 },
250 },
249
251
250 update_children: function(old_list, new_list) {
251 // Called when the children list is modified.
252 this.do_diff(old_list, new_list,
253 $.proxy(this.remove_child_model, this),
254 $.proxy(this.add_child_model, this));
255 },
256
257 remove_child_model: function(model) {
258 // Called when a child is removed from children list.
259 this.pop_child_view(model).remove();
260 },
261
262 add_child_model: function(model) {
263 // Called when a child is added to children list.
264 var view = this.create_child_view(model);
265 this.$body.append(view.$el);
266
267 // Trigger the displayed event of the child view.
268 this.after_displayed(function() {
269 view.trigger('displayed');
270 });
271 },
272
273 update: function(){
252 update: function(){
274 // Update the contents of this view
253 // Update the contents of this view
275 //
254 //
@@ -216,7 +216,7 b''
216 margin : 5px;
216 margin : 5px;
217
217
218 .start();
218 .start();
219 .widget-container();
219 .widget-box();
220 }
220 }
221
221
222 .widget-hbox {
222 .widget-hbox {
@@ -261,7 +261,7 b''
261 max-height: none !important;
261 max-height: none !important;
262 }
262 }
263
263
264 .widget-container {
264 .widget-box {
265 /* Box */
265 /* Box */
266 .border-box-sizing();
266 .border-box-sizing();
267 .align-start();
267 .align-start();
@@ -23,7 +23,7 b' casper.notebook_test(function () {'
23 'Widget subarea exists.');
23 'Widget subarea exists.');
24
24
25 this.test.assert(this.cell_element_exists(index,
25 this.test.assert(this.cell_element_exists(index,
26 '.widget-area .widget-subarea .widget-container'),
26 '.widget-area .widget-subarea .widget-box'),
27 'Widget container exists.');
27 'Widget container exists.');
28
28
29 this.test.assert(this.cell_element_exists(index,
29 this.test.assert(this.cell_element_exists(index,
@@ -70,7 +70,7 b' casper.notebook_test(function () {'
70 'Display container child executed with correct output.');
70 'Display container child executed with correct output.');
71
71
72 this.test.assert(! this.cell_element_exists(index,
72 this.test.assert(! this.cell_element_exists(index,
73 '.widget-area .widget-subarea .widget-container'),
73 '.widget-area .widget-subarea .widget-box'),
74 'Parent container not displayed.');
74 'Parent container not displayed.');
75
75
76 this.test.assert(this.cell_element_exists(index,
76 this.test.assert(this.cell_element_exists(index,
General Comments 0
You need to be logged in to leave comments. Login now