##// END OF EJS Templates
Updated comments in File Upload Widget example.
Jonathan Frederic -
Show More
@@ -97,7 +97,7 b''
97 "output_type": "display_data"
97 "output_type": "display_data"
98 }
98 }
99 ],
99 ],
100 "prompt_number": 22
100 "prompt_number": 1
101 },
101 },
102 {
102 {
103 "cell_type": "code",
103 "cell_type": "code",
@@ -121,7 +121,7 b''
121 "language": "python",
121 "language": "python",
122 "metadata": {},
122 "metadata": {},
123 "outputs": [],
123 "outputs": [],
124 "prompt_number": 23
124 "prompt_number": 2
125 },
125 },
126 {
126 {
127 "cell_type": "code",
127 "cell_type": "code",
@@ -131,11 +131,11 b''
131 "\n",
131 "\n",
132 "require([\"notebook/js/widget\"], function(){\n",
132 "require([\"notebook/js/widget\"], function(){\n",
133 " \n",
133 " \n",
134 " // Define the DateModel and register it with the widget manager.\n",
134 " // Define the FileModel and register it with the widget manager.\n",
135 " var FileModel = IPython.WidgetModel.extend({});\n",
135 " var FileModel = IPython.WidgetModel.extend({});\n",
136 " IPython.notebook.widget_manager.register_widget_model('FileWidgetModel', FileModel);\n",
136 " IPython.notebook.widget_manager.register_widget_model('FileWidgetModel', FileModel);\n",
137 " \n",
137 " \n",
138 " // Define the DatePickerView\n",
138 " // Define the FilePickerView\n",
139 " var FilePickerView = IPython.WidgetView.extend({\n",
139 " var FilePickerView = IPython.WidgetView.extend({\n",
140 " \n",
140 " \n",
141 " render: function(){\n",
141 " render: function(){\n",
@@ -159,9 +159,7 b''
159 " that.model.update_other_views(that);\n",
159 " that.model.update_other_views(that);\n",
160 " }\n",
160 " }\n",
161 " r.readAsText(f);\n",
161 " r.readAsText(f);\n",
162 " }\n",
162 " } else {\n",
163 " else\n",
164 " {\n",
165 " this.model.set('on_failed', this.model.get('on_failed') + 1);\n",
163 " this.model.set('on_failed', this.model.get('on_failed') + 1);\n",
166 " this.model.update_other_views(this);\n",
164 " this.model.update_other_views(this);\n",
167 " }\n",
165 " }\n",
@@ -182,11 +180,11 b''
182 "\n",
180 "\n",
183 "require([\"notebook/js/widget\"], function(){\n",
181 "require([\"notebook/js/widget\"], function(){\n",
184 " \n",
182 " \n",
185 " // Define the DateModel and register it with the widget manager.\n",
183 " // Define the FileModel and register it with the widget manager.\n",
186 " var FileModel = IPython.WidgetModel.extend({});\n",
184 " var FileModel = IPython.WidgetModel.extend({});\n",
187 " IPython.notebook.widget_manager.register_widget_model('FileWidgetModel', FileModel);\n",
185 " IPython.notebook.widget_manager.register_widget_model('FileWidgetModel', FileModel);\n",
188 " \n",
186 " \n",
189 " // Define the DatePickerView\n",
187 " // Define the FilePickerView\n",
190 " var FilePickerView = IPython.WidgetView.extend({\n",
188 " var FilePickerView = IPython.WidgetView.extend({\n",
191 " \n",
189 " \n",
192 " render: function(){\n",
190 " render: function(){\n",
@@ -210,9 +208,7 b''
210 " that.model.update_other_views(that);\n",
208 " that.model.update_other_views(that);\n",
211 " }\n",
209 " }\n",
212 " r.readAsText(f);\n",
210 " r.readAsText(f);\n",
213 " }\n",
211 " } else {\n",
214 " else\n",
215 " {\n",
216 " this.model.set('on_failed', this.model.get('on_failed') + 1);\n",
212 " this.model.set('on_failed', this.model.get('on_failed') + 1);\n",
217 " this.model.update_other_views(this);\n",
213 " this.model.update_other_views(this);\n",
218 " }\n",
214 " }\n",
@@ -228,11 +224,11 b''
228 "metadata": {},
224 "metadata": {},
229 "output_type": "display_data",
225 "output_type": "display_data",
230 "text": [
226 "text": [
231 "<IPython.core.display.Javascript at 0x21d8cd0>"
227 "<IPython.core.display.Javascript at 0x2fa80d0>"
232 ]
228 ]
233 }
229 }
234 ],
230 ],
235 "prompt_number": 24
231 "prompt_number": 3
236 },
232 },
237 {
233 {
238 "cell_type": "code",
234 "cell_type": "code",
@@ -275,7 +271,7 b''
275 ]
271 ]
276 }
272 }
277 ],
273 ],
278 "prompt_number": 25
274 "prompt_number": 4
279 },
275 },
280 {
276 {
281 "cell_type": "code",
277 "cell_type": "code",
General Comments 0
You need to be logged in to leave comments. Login now