##// END OF EJS Templates
jslint
Matthias BUSSONNIER -
Show More
@@ -25,7 +25,7 b' var IPython = (function (IPython) {'
25 25 this.prompt_area = true;
26 26 } else {
27 27 this.prompt_area = prompt_area;
28 };
28 }
29 29 this.create_elements();
30 30 this.style();
31 31 this.bind_events();
@@ -107,7 +107,7 b' var IPython = (function (IPython) {'
107 107 this.collapse_button.show();
108 108 }
109 109 this.collapsed = true;
110 };
110 }
111 111 };
112 112
113 113
@@ -117,7 +117,7 b' var IPython = (function (IPython) {'
117 117 this.element.show();
118 118 this.prompt_overlay.show();
119 119 this.collapsed = false;
120 };
120 }
121 121 };
122 122
123 123
@@ -126,7 +126,7 b' var IPython = (function (IPython) {'
126 126 this.expand();
127 127 } else {
128 128 this.collapse();
129 };
129 }
130 130 };
131 131
132 132
@@ -148,7 +148,7 b' var IPython = (function (IPython) {'
148 148 if (this._should_scroll(lines)) {
149 149 // only allow scrolling long-enough output
150 150 this.scroll_area();
151 };
151 }
152 152 };
153 153
154 154
@@ -158,7 +158,7 b' var IPython = (function (IPython) {'
158 158 } else {
159 159 // only allow scrolling long-enough output
160 160 this.scroll_if_long(20);
161 };
161 }
162 162 };
163 163
164 164
@@ -185,7 +185,7 b' var IPython = (function (IPython) {'
185 185 json.ename = content.ename;
186 186 json.evalue = content.evalue;
187 187 json.traceback = content.traceback;
188 };
188 }
189 189 // append with dynamic=true
190 190 this.append_output(json, true);
191 191 };
@@ -194,25 +194,25 b' var IPython = (function (IPython) {'
194 194 OutputArea.prototype.convert_mime_types = function (json, data) {
195 195 if (data['text/plain'] !== undefined) {
196 196 json.text = data['text/plain'];
197 };
197 }
198 198 if (data['text/html'] !== undefined) {
199 199 json.html = data['text/html'];
200 };
200 }
201 201 if (data['image/svg+xml'] !== undefined) {
202 202 json.svg = data['image/svg+xml'];
203 };
203 }
204 204 if (data['image/png'] !== undefined) {
205 205 json.png = data['image/png'];
206 };
206 }
207 207 if (data['image/jpeg'] !== undefined) {
208 208 json.jpeg = data['image/jpeg'];
209 };
209 }
210 210 if (data['text/latex'] !== undefined) {
211 211 json.latex = data['text/latex'];
212 };
212 }
213 213 if (data['application/json'] !== undefined) {
214 214 json.json = data['application/json'];
215 };
215 }
216 216 if (data['application/javascript'] !== undefined) {
217 217 json.javascript = data['application/javascript'];
218 218 }
@@ -232,7 +232,7 b' var IPython = (function (IPython) {'
232 232 this.append_display_data(json, dynamic);
233 233 } else if (json.output_type === 'stream') {
234 234 this.append_stream(json);
235 };
235 }
236 236 this.outputs.push(json);
237 237 var that = this;
238 238 setTimeout(function(){that.element.trigger('resize');}, 100);
@@ -259,7 +259,7 b' var IPython = (function (IPython) {'
259 259 // If we just output latex, typeset it.
260 260 if ((json.latex !== undefined) || (json.html !== undefined)) {
261 261 this.typeset();
262 };
262 }
263 263 };
264 264
265 265
@@ -275,7 +275,7 b' var IPython = (function (IPython) {'
275 275 var toinsert = this.create_output_area();
276 276 this.append_text(s, toinsert);
277 277 this.element.append(toinsert);
278 };
278 }
279 279 };
280 280
281 281
@@ -322,7 +322,7 b' var IPython = (function (IPython) {'
322 322 // If we just output latex, typeset it.
323 323 if ( (json.latex !== undefined) || (json.html !== undefined) ) {
324 324 this.typeset();
325 };
325 }
326 326 };
327 327
328 328 OutputArea.display_order = ['javascript','html','latex','svg','png','jpeg','text'];
@@ -334,9 +334,9 b' var IPython = (function (IPython) {'
334 334 if(type == 'javascript' && dynamic){
335 335 this.append_javascript(json.javascript, element, dynamic);
336 336 } else {
337 this['append_'+type](json[type],element)
337 this['append_'+type](json[type], element);
338 338 }
339 return
339 return;
340 340 }
341 341 }
342 342 };
@@ -370,7 +370,7 b' var IPython = (function (IPython) {'
370 370 .addClass('js-error')
371 371 );
372 372 }
373 }
373 };
374 374
375 375
376 376 OutputArea.prototype.append_text = function (data, element, extra_class) {
@@ -405,7 +405,7 b' var IPython = (function (IPython) {'
405 405 if (!(h0 && w0)) {
406 406 // zero size, schedule another timeout
407 407 that._dblclick_to_reset_size(img);
408 return
408 return;
409 409 }
410 410 img.resizable({
411 411 aspectRatio: true,
@@ -419,7 +419,7 b' var IPython = (function (IPython) {'
419 419 img.width(w0);
420 420 });
421 421 }, 250);
422 }
422 };
423 423
424 424
425 425 OutputArea.prototype.append_png = function (png, element) {
@@ -451,7 +451,7 b' var IPython = (function (IPython) {'
451 451
452 452 OutputArea.prototype.handle_clear_output = function (content) {
453 453 this.clear_output(content.stdout, content.stderr, content.other);
454 }
454 };
455 455
456 456
457 457 OutputArea.prototype.clear_output = function (stdout, stderr, other) {
@@ -524,8 +524,8 b' var IPython = (function (IPython) {'
524 524 clearTimeout(this.clear_out_timeout);
525 525 this.clear_out_timeout = null;
526 526 this.clear_output_callback(this._clear_stdout, this._clear_stderr, this._clear_other);
527 };
528 }
527 }
528 };
529 529
530 530
531 531 // JSON serialization
@@ -535,7 +535,7 b' var IPython = (function (IPython) {'
535 535 for (var i=0; i<len; i++) {
536 536 // append with dynamic=false.
537 537 this.append_output(outputs[i], false);
538 };
538 }
539 539 };
540 540
541 541
@@ -544,7 +544,7 b' var IPython = (function (IPython) {'
544 544 var len = this.outputs.length;
545 545 for (var i=0; i<len; i++) {
546 546 outputs[i] = this.outputs[i];
547 };
547 }
548 548 return outputs;
549 549 };
550 550
General Comments 0
You need to be logged in to leave comments. Login now