##// END OF EJS Templates
Start JSDoc integration
Jonathan Frederic -
Show More
@@ -0,0 +1,16 b''
1 {
2 "tags": {
3 "allowUnknownTags": true
4 },
5 "source": {
6 "include": [
7 "../IPython/html/static/notebook/js/notebook.js"
8 ]
9 },
10 "plugins": [],
11 "templates": {
12 "cleverLinks": false,
13 "monospaceLinks": false
14 },
15 "destination": "./out/"
16 } No newline at end of file
@@ -1,6 +1,9 b''
1 1 // Copyright (c) IPython Development Team.
2 2 // Distributed under the terms of the Modified BSD License.
3 3
4 /**
5 * @module notebook
6 */
4 7 define([
5 8 'base/js/namespace',
6 9 'jquery',
@@ -44,25 +47,14 b' define(['
44 47 ) {
45 48 "use strict";
46 49
50 /**
51 *
52 * @exports Notebook
53 * @class
54 * @param {String} selector
55 * @param {dictionary} options
56 */
47 57 var Notebook = function (selector, options) {
48 /**
49 * Constructor
50 *
51 * A notebook contains and manages cells.
52 *
53 * Parameters:
54 * selector: string
55 * options: dictionary
56 * Dictionary of keyword arguments.
57 * events: $(Events) instance
58 * keyboard_manager: KeyboardManager instance
59 * contents: Contents instance
60 * save_widget: SaveWidget instance
61 * config: dictionary
62 * base_url : string
63 * notebook_path : string
64 * notebook_name : string
65 */
66 58 this.config = utils.mergeopt(Notebook, options.config);
67 59 this.base_url = options.base_url;
68 60 this.notebook_path = options.notebook_path;
@@ -180,8 +172,6 b' define(['
180 172
181 173 /**
182 174 * Create an HTML and CSS representation of the notebook.
183 *
184 * @method create_elements
185 175 */
186 176 Notebook.prototype.create_elements = function () {
187 177 var that = this;
@@ -202,8 +192,6 b' define(['
202 192
203 193 /**
204 194 * Bind JavaScript events: key presses and custom IPython events.
205 *
206 * @method bind_events
207 195 */
208 196 Notebook.prototype.bind_events = function () {
209 197 var that = this;
@@ -346,8 +334,6 b' define(['
346 334
347 335 /**
348 336 * Set the dirty flag, and trigger the set_dirty.Notebook event
349 *
350 * @method set_dirty
351 337 */
352 338 Notebook.prototype.set_dirty = function (value) {
353 339 if (value === undefined) {
@@ -362,7 +348,6 b' define(['
362 348 /**
363 349 * Scroll the top of the page to a given cell.
364 350 *
365 * @method scroll_to_cell
366 351 * @param {Number} cell_number An index of the cell to view
367 352 * @param {Number} time Animation time in milliseconds
368 353 * @return {Number} Pixel offset from the top of the container
@@ -379,8 +364,6 b' define(['
379 364
380 365 /**
381 366 * Scroll to the bottom of the page.
382 *
383 * @method scroll_to_bottom
384 367 */
385 368 Notebook.prototype.scroll_to_bottom = function () {
386 369 this.element.animate({scrollTop:this.element.get(0).scrollHeight}, 0);
@@ -388,8 +371,6 b' define(['
388 371
389 372 /**
390 373 * Scroll to the top of the page.
391 *
392 * @method scroll_to_top
393 374 */
394 375 Notebook.prototype.scroll_to_top = function () {
395 376 this.element.animate({scrollTop:0}, 0);
@@ -414,7 +395,6 b' define(['
414 395 /**
415 396 * Get all cell elements in the notebook.
416 397 *
417 * @method get_cell_elements
418 398 * @return {jQuery} A selector of all cell elements
419 399 */
420 400 Notebook.prototype.get_cell_elements = function () {
@@ -424,7 +404,6 b' define(['
424 404 /**
425 405 * Get a particular cell element.
426 406 *
427 * @method get_cell_element
428 407 * @param {Number} index An index of a cell to select
429 408 * @return {jQuery} A selector of the given cell.
430 409 */
@@ -440,7 +419,6 b' define(['
440 419 /**
441 420 * Try to get a particular cell by msg_id.
442 421 *
443 * @method get_msg_cell
444 422 * @param {String} msg_id A message UUID
445 423 * @return {Cell} Cell or null if no cell was found.
446 424 */
@@ -451,7 +429,6 b' define(['
451 429 /**
452 430 * Count the cells in this notebook.
453 431 *
454 * @method ncells
455 432 * @return {Number} The number of cells in this notebook
456 433 */
457 434 Notebook.prototype.ncells = function () {
@@ -461,7 +438,6 b' define(['
461 438 /**
462 439 * Get all Cell objects in this notebook.
463 440 *
464 * @method get_cells
465 441 * @return {Array} This notebook's Cell objects
466 442 */
467 443 // TODO: we are often calling cells as cells()[i], which we should optimize
@@ -475,7 +451,6 b' define(['
475 451 /**
476 452 * Get a Cell object from this notebook.
477 453 *
478 * @method get_cell
479 454 * @param {Number} index An index of a cell to retrieve
480 455 * @return {Cell} Cell or null if no cell was found.
481 456 */
@@ -491,7 +466,6 b' define(['
491 466 /**
492 467 * Get the cell below a given cell.
493 468 *
494 * @method get_next_cell
495 469 * @param {Cell} cell The provided cell
496 470 * @return {Cell} the next cell or null if no cell was found.
497 471 */
@@ -507,7 +481,6 b' define(['
507 481 /**
508 482 * Get the cell above a given cell.
509 483 *
510 * @method get_prev_cell
511 484 * @param {Cell} cell The provided cell
512 485 * @return {Cell} The previous cell or null if no cell was found.
513 486 */
@@ -523,7 +496,6 b' define(['
523 496 /**
524 497 * Get the numeric index of a given cell.
525 498 *
526 * @method find_cell_index
527 499 * @param {Cell} cell The provided cell
528 500 * @return {Number} The cell's numeric index or null if no cell was found.
529 501 */
@@ -540,7 +512,6 b' define(['
540 512 /**
541 513 * Get a given index , or the selected index if none is provided.
542 514 *
543 * @method index_or_selected
544 515 * @param {Number} index A cell's index
545 516 * @return {Number} The given index, or selected index if none is provided.
546 517 */
@@ -559,7 +530,6 b' define(['
559 530
560 531 /**
561 532 * Get the currently selected cell.
562 * @method get_selected_cell
563 533 * @return {Cell} The selected cell
564 534 */
565 535 Notebook.prototype.get_selected_cell = function () {
@@ -570,7 +540,6 b' define(['
570 540 /**
571 541 * Check whether a cell index is valid.
572 542 *
573 * @method is_valid_cell_index
574 543 * @param {Number} index A cell index
575 544 * @return True if the index is valid, false otherwise
576 545 */
@@ -585,7 +554,6 b' define(['
585 554 /**
586 555 * Get the index of the currently selected cell.
587 556
588 * @method get_selected_index
589 557 * @return {Number} The selected cell's numeric index
590 558 */
591 559 Notebook.prototype.get_selected_index = function () {
@@ -604,7 +572,6 b' define(['
604 572 /**
605 573 * Programmatically select a cell.
606 574 *
607 * @method select
608 575 * @param {Number} index A cell's index
609 576 * @return {Notebook} This notebook
610 577 */
@@ -637,7 +604,6 b' define(['
637 604 /**
638 605 * Programmatically select the next cell.
639 606 *
640 * @method select_next
641 607 * @return {Notebook} This notebook
642 608 */
643 609 Notebook.prototype.select_next = function () {
@@ -649,7 +615,6 b' define(['
649 615 /**
650 616 * Programmatically select the previous cell.
651 617 *
652 * @method select_prev
653 618 * @return {Notebook} This notebook
654 619 */
655 620 Notebook.prototype.select_prev = function () {
@@ -664,8 +629,6 b' define(['
664 629 /**
665 630 * Gets the index of the cell that is in edit mode.
666 631 *
667 * @method get_edit_index
668 *
669 632 * @return index {int}
670 633 **/
671 634 Notebook.prototype.get_edit_index = function () {
@@ -681,7 +644,6 b' define(['
681 644 /**
682 645 * Handle when a a cell blurs and the notebook should enter command mode.
683 646 *
684 * @method handle_command_mode
685 647 * @param [cell] {Cell} Cell to enter command mode on.
686 648 **/
687 649 Notebook.prototype.handle_command_mode = function (cell) {
@@ -695,8 +657,6 b' define(['
695 657
696 658 /**
697 659 * Make the notebook enter command mode.
698 *
699 * @method command_mode
700 660 **/
701 661 Notebook.prototype.command_mode = function () {
702 662 var cell = this.get_cell(this.get_edit_index());
@@ -711,7 +671,6 b' define(['
711 671 /**
712 672 * Handle when a cell fires it's edit_mode event.
713 673 *
714 * @method handle_edit_mode
715 674 * @param [cell] {Cell} Cell to enter edit mode on.
716 675 **/
717 676 Notebook.prototype.handle_edit_mode = function (cell) {
@@ -725,8 +684,6 b' define(['
725 684
726 685 /**
727 686 * Make a cell enter edit mode.
728 *
729 * @method edit_mode
730 687 **/
731 688 Notebook.prototype.edit_mode = function () {
732 689 var cell = this.get_selected_cell();
@@ -738,8 +695,6 b' define(['
738 695
739 696 /**
740 697 * Focus the currently selected cell.
741 *
742 * @method focus_cell
743 698 **/
744 699 Notebook.prototype.focus_cell = function () {
745 700 var cell = this.get_selected_cell();
@@ -752,7 +707,6 b' define(['
752 707 /**
753 708 * Move given (or selected) cell up and select it.
754 709 *
755 * @method move_cell_up
756 710 * @param [index] {integer} cell index
757 711 * @return {Notebook} This notebook
758 712 **/
@@ -777,7 +731,6 b' define(['
777 731 /**
778 732 * Move given (or selected) cell down and select it
779 733 *
780 * @method move_cell_down
781 734 * @param [index] {integer} cell index
782 735 * @return {Notebook} This notebook
783 736 **/
@@ -804,7 +757,6 b' define(['
804 757 /**
805 758 * Delete a cell from the notebook.
806 759 *
807 * @method delete_cell
808 760 * @param [index] A cell's numeric index
809 761 * @return {Notebook} This notebook
810 762 */
@@ -846,8 +798,6 b' define(['
846 798
847 799 /**
848 800 * Restore the most recently deleted cell.
849 *
850 * @method undelete
851 801 */
852 802 Notebook.prototype.undelete_cell = function() {
853 803 if (this.undelete_backup !== null && this.undelete_index !== null) {
@@ -890,7 +840,6 b' define(['
890 840 *
891 841 * Index will be brought back into the accessible range [0,n]
892 842 *
893 * @method insert_cell_at_index
894 843 * @param [type] {string} in ['code','markdown', 'raw'], defaults to 'code'
895 844 * @param [index] {int} a valid index where to insert cell
896 845 *
@@ -960,13 +909,11 b' define(['
960 909
961 910 /**
962 911 * Insert an element at given cell index.
912 * return true if everything whent fine.
963 913 *
964 * @method _insert_element_at_index
965 914 * @param element {dom_element} a cell element
966 915 * @param [index] {int} a valid index where to inser cell
967 916 * @private
968 *
969 * return true if everything whent fine.
970 917 **/
971 918 Notebook.prototype._insert_element_at_index = function(element, index){
972 919 if (element === undefined){
@@ -1001,7 +948,6 b' define(['
1001 948 *
1002 949 * default index value is the one of currently selected cell
1003 950 *
1004 * @method insert_cell_above
1005 951 * @param [type] {string} cell type
1006 952 * @param [index] {integer}
1007 953 *
@@ -1018,12 +964,10 b' define(['
1018 964 *
1019 965 * default index value is the one of currently selected cell
1020 966 *
1021 * @method insert_cell_below
1022 967 * @param [type] {string} cell type
1023 968 * @param [index] {integer}
1024 969 *
1025 970 * @return handle to created cell or null
1026 *
1027 971 **/
1028 972 Notebook.prototype.insert_cell_below = function (type, index) {
1029 973 index = this.index_or_selected(index);
@@ -1034,7 +978,6 b' define(['
1034 978 /**
1035 979 * Insert cell at end of notebook
1036 980 *
1037 * @method insert_cell_at_bottom
1038 981 * @param {String} type cell type
1039 982 *
1040 983 * @return the added cell; or null
@@ -1047,7 +990,6 b' define(['
1047 990 /**
1048 991 * Turn a cell into a code cell.
1049 992 *
1050 * @method to_code
1051 993 * @param {Number} [index] A cell's index
1052 994 */
1053 995 Notebook.prototype.to_code = function (index) {
@@ -1079,7 +1021,6 b' define(['
1079 1021 /**
1080 1022 * Turn a cell into a Markdown cell.
1081 1023 *
1082 * @method to_markdown
1083 1024 * @param {Number} [index] A cell's index
1084 1025 */
1085 1026 Notebook.prototype.to_markdown = function (index) {
@@ -1117,7 +1058,6 b' define(['
1117 1058 /**
1118 1059 * Turn a cell into a raw text cell.
1119 1060 *
1120 * @method to_raw
1121 1061 * @param {Number} [index] A cell's index
1122 1062 */
1123 1063 Notebook.prototype.to_raw = function (index) {
@@ -1151,8 +1091,9 b' define(['
1151 1091
1152 1092 Notebook.prototype._warn_heading = function () {
1153 1093 /**
1154 * warn about heading cells being removed
1094 * @private
1155 1095 */
1096 // warn about heading cells being removed
1156 1097 dialog.modal({
1157 1098 notebook: this,
1158 1099 keyboard_manager: this.keyboard_manager,
@@ -1169,14 +1110,13 b' define(['
1169 1110 });
1170 1111 };
1171 1112
1113 Notebook.prototype.to_heading = function (index, level) {
1172 1114 /**
1173 1115 * Turn a cell into a markdown cell with a heading.
1174 1116 *
1175 * @method to_heading
1176 1117 * @param {Number} [index] A cell's index
1177 1118 * @param {Number} [level] A heading level (e.g., 1 for h1)
1178 1119 */
1179 Notebook.prototype.to_heading = function (index, level) {
1180 1120 this.to_markdown(index);
1181 1121 level = level || 1;
1182 1122 var i = this.index_or_selected(index);
@@ -1192,8 +1132,6 b' define(['
1192 1132
1193 1133 /**
1194 1134 * Enable UI elements for pasting cells.
1195 *
1196 * @method enable_paste
1197 1135 */
1198 1136 Notebook.prototype.enable_paste = function () {
1199 1137 var that = this;
@@ -1210,8 +1148,6 b' define(['
1210 1148
1211 1149 /**
1212 1150 * Disable UI elements for pasting cells.
1213 *
1214 * @method disable_paste
1215 1151 */
1216 1152 Notebook.prototype.disable_paste = function () {
1217 1153 if (this.paste_enabled) {
@@ -1224,8 +1160,6 b' define(['
1224 1160
1225 1161 /**
1226 1162 * Cut a cell.
1227 *
1228 * @method cut_cell
1229 1163 */
1230 1164 Notebook.prototype.cut_cell = function () {
1231 1165 this.copy_cell();
@@ -1234,8 +1168,6 b' define(['
1234 1168
1235 1169 /**
1236 1170 * Copy a cell.
1237 *
1238 * @method copy_cell
1239 1171 */
1240 1172 Notebook.prototype.copy_cell = function () {
1241 1173 var cell = this.get_selected_cell();
@@ -1249,8 +1181,6 b' define(['
1249 1181
1250 1182 /**
1251 1183 * Replace the selected cell with a cell in the clipboard.
1252 *
1253 * @method paste_cell_replace
1254 1184 */
1255 1185 Notebook.prototype.paste_cell_replace = function () {
1256 1186 if (this.clipboard !== null && this.paste_enabled) {
@@ -1265,8 +1195,6 b' define(['
1265 1195
1266 1196 /**
1267 1197 * Paste a cell from the clipboard above the selected cell.
1268 *
1269 * @method paste_cell_above
1270 1198 */
1271 1199 Notebook.prototype.paste_cell_above = function () {
1272 1200 if (this.clipboard !== null && this.paste_enabled) {
@@ -1279,8 +1207,6 b' define(['
1279 1207
1280 1208 /**
1281 1209 * Paste a cell from the clipboard below the selected cell.
1282 *
1283 * @method paste_cell_below
1284 1210 */
1285 1211 Notebook.prototype.paste_cell_below = function () {
1286 1212 if (this.clipboard !== null && this.paste_enabled) {
@@ -1295,8 +1221,6 b' define(['
1295 1221
1296 1222 /**
1297 1223 * Split the selected cell into two, at the cursor.
1298 *
1299 * @method split_cell
1300 1224 */
1301 1225 Notebook.prototype.split_cell = function () {
1302 1226 var cell = this.get_selected_cell();
@@ -1313,8 +1237,6 b' define(['
1313 1237
1314 1238 /**
1315 1239 * Combine the selected cell into the cell above it.
1316 *
1317 * @method merge_cell_above
1318 1240 */
1319 1241 Notebook.prototype.merge_cell_above = function () {
1320 1242 var index = this.get_selected_index();
@@ -1348,8 +1270,6 b' define(['
1348 1270
1349 1271 /**
1350 1272 * Combine the selected cell into the cell below it.
1351 *
1352 * @method merge_cell_below
1353 1273 */
1354 1274 Notebook.prototype.merge_cell_below = function () {
1355 1275 var index = this.get_selected_index();
@@ -1387,7 +1307,6 b' define(['
1387 1307 /**
1388 1308 * Hide a cell's output.
1389 1309 *
1390 * @method collapse_output
1391 1310 * @param {Number} index A cell's numeric index
1392 1311 */
1393 1312 Notebook.prototype.collapse_output = function (index) {
@@ -1401,8 +1320,6 b' define(['
1401 1320
1402 1321 /**
1403 1322 * Hide each code cell's output area.
1404 *
1405 * @method collapse_all_output
1406 1323 */
1407 1324 Notebook.prototype.collapse_all_output = function () {
1408 1325 this.get_cells().map(function (cell, i) {
@@ -1417,7 +1334,6 b' define(['
1417 1334 /**
1418 1335 * Show a cell's output.
1419 1336 *
1420 * @method expand_output
1421 1337 * @param {Number} index A cell's numeric index
1422 1338 */
1423 1339 Notebook.prototype.expand_output = function (index) {
@@ -1431,8 +1347,6 b' define(['
1431 1347
1432 1348 /**
1433 1349 * Expand each code cell's output area, and remove scrollbars.
1434 *
1435 * @method expand_all_output
1436 1350 */
1437 1351 Notebook.prototype.expand_all_output = function () {
1438 1352 this.get_cells().map(function (cell, i) {
@@ -1447,7 +1361,6 b' define(['
1447 1361 /**
1448 1362 * Clear the selected CodeCell's output area.
1449 1363 *
1450 * @method clear_output
1451 1364 * @param {Number} index A cell's numeric index
1452 1365 */
1453 1366 Notebook.prototype.clear_output = function (index) {
@@ -1461,8 +1374,6 b' define(['
1461 1374
1462 1375 /**
1463 1376 * Clear each code cell's output area.
1464 *
1465 * @method clear_all_output
1466 1377 */
1467 1378 Notebook.prototype.clear_all_output = function () {
1468 1379 this.get_cells().map(function (cell, i) {
@@ -1476,7 +1387,6 b' define(['
1476 1387 /**
1477 1388 * Scroll the selected CodeCell's output area.
1478 1389 *
1479 * @method scroll_output
1480 1390 * @param {Number} index A cell's numeric index
1481 1391 */
1482 1392 Notebook.prototype.scroll_output = function (index) {
@@ -1490,8 +1400,6 b' define(['
1490 1400
1491 1401 /**
1492 1402 * Expand each code cell's output area, and add a scrollbar for long output.
1493 *
1494 * @method scroll_all_output
1495 1403 */
1496 1404 Notebook.prototype.scroll_all_output = function () {
1497 1405 this.get_cells().map(function (cell, i) {
@@ -1505,7 +1413,6 b' define(['
1505 1413
1506 1414 /** Toggle whether a cell's output is collapsed or expanded.
1507 1415 *
1508 * @method toggle_output
1509 1416 * @param {Number} index A cell's numeric index
1510 1417 */
1511 1418 Notebook.prototype.toggle_output = function (index) {
@@ -1519,8 +1426,6 b' define(['
1519 1426
1520 1427 /**
1521 1428 * Hide/show the output of all cells.
1522 *
1523 * @method toggle_all_output
1524 1429 */
1525 1430 Notebook.prototype.toggle_all_output = function () {
1526 1431 this.get_cells().map(function (cell, i) {
@@ -1535,7 +1440,6 b' define(['
1535 1440 /**
1536 1441 * Toggle a scrollbar for long cell outputs.
1537 1442 *
1538 * @method toggle_output_scroll
1539 1443 * @param {Number} index A cell's numeric index
1540 1444 */
1541 1445 Notebook.prototype.toggle_output_scroll = function (index) {
@@ -1549,8 +1453,6 b' define(['
1549 1453
1550 1454 /**
1551 1455 * Toggle the scrolling of long output on all cells.
1552 *
1553 * @method toggle_all_output_scrolling
1554 1456 */
1555 1457 Notebook.prototype.toggle_all_output_scroll = function () {
1556 1458 this.get_cells().map(function (cell, i) {
@@ -1566,8 +1468,6 b' define(['
1566 1468
1567 1469 /**
1568 1470 * Toggle line numbers in the selected cell's input area.
1569 *
1570 * @method cell_toggle_line_numbers
1571 1471 */
1572 1472 Notebook.prototype.cell_toggle_line_numbers = function() {
1573 1473 this.get_selected_cell().toggle_line_numbers();
@@ -1576,8 +1476,6 b' define(['
1576 1476 /**
1577 1477 * Set the codemirror mode for all code cells, including the default for
1578 1478 * new code cells.
1579 *
1580 * @method set_codemirror_mode
1581 1479 */
1582 1480 Notebook.prototype.set_codemirror_mode = function(newmode){
1583 1481 if (newmode === this.codemirror_mode) {
@@ -1604,8 +1502,6 b' define(['
1604 1502
1605 1503 /**
1606 1504 * Start a new session and set it on each code cell.
1607 *
1608 * @method start_session
1609 1505 */
1610 1506 Notebook.prototype.start_session = function (kernel_name) {
1611 1507 if (this._session_starting) {
@@ -1637,7 +1533,7 b' define(['
1637 1533 /**
1638 1534 * Once a session is started, link the code cells to the kernel and pass the
1639 1535 * comm manager to the widget manager
1640 *
1536 * @private
1641 1537 */
1642 1538 Notebook.prototype._session_started = function (){
1643 1539 this._session_starting = false;
@@ -1650,6 +1546,9 b' define(['
1650 1546 }
1651 1547 }
1652 1548 };
1549 /**
1550 * @private
1551 */
1653 1552 Notebook.prototype._session_start_failed = function (jqxhr, status, error){
1654 1553 this._session_starting = false;
1655 1554 utils.log_ajax_error(jqxhr, status, error);
@@ -1657,8 +1556,6 b' define(['
1657 1556
1658 1557 /**
1659 1558 * Prompt the user to restart the IPython kernel.
1660 *
1661 * @method restart_kernel
1662 1559 */
1663 1560 Notebook.prototype.restart_kernel = function () {
1664 1561 var that = this;
@@ -1683,13 +1580,9 b' define(['
1683 1580
1684 1581 /**
1685 1582 * Execute or render cell outputs and go into command mode.
1686 *
1687 * @method execute_cell
1688 1583 */
1689 1584 Notebook.prototype.execute_cell = function () {
1690 /**
1691 * mode = shift, ctrl, alt
1692 */
1585 // mode = shift, ctrl, alt
1693 1586 var cell = this.get_selected_cell();
1694 1587
1695 1588 cell.execute();
@@ -1699,8 +1592,6 b' define(['
1699 1592
1700 1593 /**
1701 1594 * Execute or render cell outputs and insert a new cell below.
1702 *
1703 * @method execute_cell_and_insert_below
1704 1595 */
1705 1596 Notebook.prototype.execute_cell_and_insert_below = function () {
1706 1597 var cell = this.get_selected_cell();
@@ -1728,8 +1619,6 b' define(['
1728 1619
1729 1620 /**
1730 1621 * Execute or render cell outputs and select the next cell.
1731 *
1732 * @method execute_cell_and_select_below
1733 1622 */
1734 1623 Notebook.prototype.execute_cell_and_select_below = function () {
1735 1624
@@ -1757,8 +1646,6 b' define(['
1757 1646
1758 1647 /**
1759 1648 * Execute all cells below the selected cell.
1760 *
1761 * @method execute_cells_below
1762 1649 */
1763 1650 Notebook.prototype.execute_cells_below = function () {
1764 1651 this.execute_cell_range(this.get_selected_index(), this.ncells());
@@ -1767,8 +1654,6 b' define(['
1767 1654
1768 1655 /**
1769 1656 * Execute all cells above the selected cell.
1770 *
1771 * @method execute_cells_above
1772 1657 */
1773 1658 Notebook.prototype.execute_cells_above = function () {
1774 1659 this.execute_cell_range(0, this.get_selected_index());
@@ -1776,8 +1661,6 b' define(['
1776 1661
1777 1662 /**
1778 1663 * Execute all cells.
1779 *
1780 * @method execute_all_cells
1781 1664 */
1782 1665 Notebook.prototype.execute_all_cells = function () {
1783 1666 this.execute_cell_range(0, this.ncells());
@@ -1787,7 +1670,6 b' define(['
1787 1670 /**
1788 1671 * Execute a contiguous range of cells.
1789 1672 *
1790 * @method execute_cell_range
1791 1673 * @param {Number} start Index of the first cell to execute (inclusive)
1792 1674 * @param {Number} end Index of the last cell to execute (exclusive)
1793 1675 */
@@ -1804,7 +1686,6 b' define(['
1804 1686 /**
1805 1687 * Getter method for this notebook's name.
1806 1688 *
1807 * @method get_notebook_name
1808 1689 * @return {String} This notebook's name (excluding file extension)
1809 1690 */
1810 1691 Notebook.prototype.get_notebook_name = function () {
@@ -1815,7 +1696,6 b' define(['
1815 1696 /**
1816 1697 * Setter method for this notebook's name.
1817 1698 *
1818 * @method set_notebook_name
1819 1699 * @param {String} name A new name for this notebook
1820 1700 */
1821 1701 Notebook.prototype.set_notebook_name = function (name) {
@@ -1827,7 +1707,6 b' define(['
1827 1707 /**
1828 1708 * Check that a notebook's name is valid.
1829 1709 *
1830 * @method test_notebook_name
1831 1710 * @param {String} nbname A name for this notebook
1832 1711 * @return {Boolean} True if the name is valid, false if invalid
1833 1712 */
@@ -1843,7 +1722,6 b' define(['
1843 1722 /**
1844 1723 * Load a notebook from JSON (.ipynb).
1845 1724 *
1846 * @method fromJSON
1847 1725 * @param {Object} data JSON representation of a notebook
1848 1726 */
1849 1727 Notebook.prototype.fromJSON = function (data) {
@@ -1896,13 +1774,10 b' define(['
1896 1774 /**
1897 1775 * Dump this notebook into a JSON-friendly object.
1898 1776 *
1899 * @method toJSON
1900 1777 * @return {Object} A JSON-friendly representation of this notebook.
1901 1778 */
1902 1779 Notebook.prototype.toJSON = function () {
1903 /**
1904 * remove the conversion indicator, which only belongs in-memory
1905 */
1780 // remove the conversion indicator, which only belongs in-memory
1906 1781 delete this.metadata.orig_nbformat;
1907 1782 delete this.metadata.orig_nbformat_minor;
1908 1783
@@ -1933,7 +1808,6 b' define(['
1933 1808 /**
1934 1809 * Start an autosave timer, for periodically saving the notebook.
1935 1810 *
1936 * @method set_autosave_interval
1937 1811 * @param {Integer} interval the autosave interval in milliseconds
1938 1812 */
1939 1813 Notebook.prototype.set_autosave_interval = function (interval) {
@@ -1964,8 +1838,6 b' define(['
1964 1838 /**
1965 1839 * Save this notebook on the server. This becomes a notebook instance's
1966 1840 * .save_notebook method *after* the entire notebook has been loaded.
1967 *
1968 * @method save_notebook
1969 1841 */
1970 1842 Notebook.prototype.save_notebook = function () {
1971 1843 if (!this._fully_loaded) {
@@ -2004,7 +1876,6 b' define(['
2004 1876 /**
2005 1877 * Success callback for saving a notebook.
2006 1878 *
2007 * @method save_notebook_success
2008 1879 * @param {Integer} start Time when the save request start
2009 1880 * @param {Object} data JSON representation of a notebook
2010 1881 */
@@ -2045,8 +1916,8 b' define(['
2045 1916 /**
2046 1917 * update the autosave interval based on how long the last save took
2047 1918 *
2048 * @method _update_autosave_interval
2049 1919 * @param {Integer} timestamp when the save request started
1920 * @private
2050 1921 */
2051 1922 Notebook.prototype._update_autosave_interval = function (start) {
2052 1923 var duration = (new Date().getTime() - start);
@@ -2065,7 +1936,6 b' define(['
2065 1936 /**
2066 1937 * Explicitly trust the output of this notebook.
2067 1938 *
2068 * @method trust_notebook
2069 1939 */
2070 1940 Notebook.prototype.trust_notebook = function () {
2071 1941 var body = $("<div>").append($("<p>")
@@ -2155,7 +2025,6 b' define(['
2155 2025 /**
2156 2026 * Request a notebook's data from the server.
2157 2027 *
2158 * @method load_notebook
2159 2028 * @param {String} notebook_path A notebook to load
2160 2029 */
2161 2030 Notebook.prototype.load_notebook = function (notebook_path) {
@@ -2173,7 +2042,6 b' define(['
2173 2042 *
2174 2043 * Load notebook data from the JSON response.
2175 2044 *
2176 * @method load_notebook_success
2177 2045 * @param {Object} data JSON representation of a notebook
2178 2046 */
2179 2047 Notebook.prototype.load_notebook_success = function (data) {
@@ -2311,7 +2179,6 b' define(['
2311 2179 /**
2312 2180 * Failure callback for loading a notebook from the server.
2313 2181 *
2314 * @method load_notebook_error
2315 2182 * @param {Error} error
2316 2183 */
2317 2184 Notebook.prototype.load_notebook_error = function (error) {
@@ -2340,8 +2207,6 b' define(['
2340 2207
2341 2208 /**
2342 2209 * Save the notebook then immediately create a checkpoint.
2343 *
2344 * @method save_checkpoint
2345 2210 */
2346 2211 Notebook.prototype.save_checkpoint = function () {
2347 2212 this._checkpoint_after_save = true;
@@ -2351,8 +2216,6 b' define(['
2351 2216 /**
2352 2217 * Add a checkpoint for this notebook.
2353 2218 * for use as a callback from checkpoint creation.
2354 *
2355 * @method add_checkpoint
2356 2219 */
2357 2220 Notebook.prototype.add_checkpoint = function (checkpoint) {
2358 2221 var found = false;
@@ -2372,8 +2235,6 b' define(['
2372 2235
2373 2236 /**
2374 2237 * List checkpoints for this notebook.
2375 *
2376 * @method list_checkpoints
2377 2238 */
2378 2239 Notebook.prototype.list_checkpoints = function () {
2379 2240 var that = this;
@@ -2388,7 +2249,6 b' define(['
2388 2249 /**
2389 2250 * Success callback for listing checkpoints.
2390 2251 *
2391 * @method list_checkpoint_success
2392 2252 * @param {Object} data JSON representation of a checkpoint
2393 2253 */
2394 2254 Notebook.prototype.list_checkpoints_success = function (data) {
@@ -2403,8 +2263,6 b' define(['
2403 2263
2404 2264 /**
2405 2265 * Create a checkpoint of this notebook on the server from the most recent save.
2406 *
2407 * @method create_checkpoint
2408 2266 */
2409 2267 Notebook.prototype.create_checkpoint = function () {
2410 2268 var that = this;
@@ -2419,7 +2277,6 b' define(['
2419 2277 /**
2420 2278 * Success callback for creating a checkpoint.
2421 2279 *
2422 * @method create_checkpoint_success
2423 2280 * @param {Object} data JSON representation of a checkpoint
2424 2281 */
2425 2282 Notebook.prototype.create_checkpoint_success = function (data) {
@@ -2471,7 +2328,6 b' define(['
2471 2328 /**
2472 2329 * Restore the notebook to a checkpoint state.
2473 2330 *
2474 * @method restore_checkpoint
2475 2331 * @param {String} checkpoint ID
2476 2332 */
2477 2333 Notebook.prototype.restore_checkpoint = function (checkpoint) {
@@ -2487,8 +2343,6 b' define(['
2487 2343
2488 2344 /**
2489 2345 * Success callback for restoring a notebook to a checkpoint.
2490 *
2491 * @method restore_checkpoint_success
2492 2346 */
2493 2347 Notebook.prototype.restore_checkpoint_success = function () {
2494 2348 this.events.trigger('checkpoint_restored.Notebook');
@@ -2498,7 +2352,6 b' define(['
2498 2352 /**
2499 2353 * Delete a notebook checkpoint.
2500 2354 *
2501 * @method delete_checkpoint
2502 2355 * @param {String} checkpoint ID
2503 2356 */
2504 2357 Notebook.prototype.delete_checkpoint = function (checkpoint) {
@@ -2514,8 +2367,6 b' define(['
2514 2367
2515 2368 /**
2516 2369 * Success callback for deleting a notebook checkpoint
2517 *
2518 * @method delete_checkpoint_success
2519 2370 */
2520 2371 Notebook.prototype.delete_checkpoint_success = function () {
2521 2372 this.events.trigger('checkpoint_deleted.Notebook');
@@ -7,11 +7,12 b' Requirements'
7 7 ------------
8 8 The following tools are needed to build the documentation:
9 9
10 sphinx
10 sphinx jsdoc
11 11
12 12 On Debian-based systems, you should be able to run::
13 13
14 sudo apt-get install sphinx
14 sudo apt-get install sphinx npm
15 sudo npm install -g jsdoc@"<=3.3.0"
15 16
16 17 The documentation gets built using ``make``, and comes in several flavors.
17 18
General Comments 0
You need to be logged in to leave comments. Login now