Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Method to show hide linenumber of cell
mostly convenience methods to wrap codemirror one,
plus doc and 1 doc fix (missing curly bracket)
  • Loading branch information
Carreau committed Feb 10, 2013
commit 4f23a77838dcdf3c3f3c11437c08408c16391b16
11 changes: 11 additions & 0 deletions IPython/frontend/html/notebook/static/js/cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,17 @@ var IPython = (function (IPython) {
}
};

/**
* Show/Hide CodeMirror LineNumber
* @method show_line_number
*
* @param value {Bool} show (true), or hide (false) the line number in CodeMirror
**/
Cell.prototype.show_line_numbers = function (value) {
this.code_mirror.setOption('lineNumbers', value);
this.code_mirror.refresh();
};

/**
* Toggle CodeMirror LineNumber
* @method toggle_line_numbers
Expand Down
2 changes: 1 addition & 1 deletion IPython/frontend/html/notebook/static/js/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var IPython = (function (IPython) {
* {
* label:'my button',
* icon:'ui-icon-disk',
* callback:function(){alert('hoho'),
* callback:function(){alert('hoho')},
* id : 'my_button_id', // this is optional
* },
* {
Expand Down