##// END OF EJS Templates
Added ability to title multicontainer pages before multicontainer display()
Jonathan Frederic -
Show More
@@ -14,10 +14,14 require(["notebook/js/widget"], function(){
14 // Set tab titles
14 // Set tab titles
15 var titles = this.model.get('_titles');
15 var titles = this.model.get('_titles');
16 for (var page_index in titles) {
16 for (var page_index in titles) {
17 var accordian_toggle = this.containers[page_index]
17
18 var accordian = this.containers[page_index]
19 if (accordian != undefined) {
20 accordian
18 .find('.accordion-heading')
21 .find('.accordion-heading')
19 .find('.accordion-toggle');
22 .find('.accordion-toggle')
20 accordian_toggle.html(titles[page_index]);
23 .html(titles[page_index]);
24 }
21 }
25 }
22
26
23 return IPython.WidgetView.prototype.update.call(this);
27 return IPython.WidgetView.prototype.update.call(this);
@@ -49,6 +53,7 require(["notebook/js/widget"], function(){
49 this.containers.push(accordion_group);
53 this.containers.push(accordion_group);
50
54
51 accordion_inner.append(view.$el);
55 accordion_inner.append(view.$el);
56 this.update();
52 },
57 },
53 });
58 });
54
59
@@ -160,6 +160,7 class Widget(LoggingConfigurable):
160 key : unicode (optional)
160 key : unicode (optional)
161 A single property's name to sync with the frontend.
161 A single property's name to sync with the frontend.
162 """
162 """
163 if self.comm is not None:
163 state = {}
164 state = {}
164
165
165 # If a key is provided, just send the state of that key.
166 # If a key is provided, just send the state of that key.
General Comments 0
You need to be logged in to leave comments. Login now