Show More
@@ -33,7 +33,7 b'' | |||
|
33 | 33 | } else if (value === 'dialog'){ |
|
34 | 34 | var dialog = $('<div/>').append( |
|
35 | 35 | $("<p/>") |
|
36 |
. |
|
|
36 | .text("Set the MIME type of the raw cell:") | |
|
37 | 37 | ).append( |
|
38 | 38 | $("<br/>") |
|
39 | 39 | ).append( |
@@ -38,40 +38,40 b' IPython.mathjaxutils = (function (IPython) {' | |||
|
38 | 38 | // Don't have MathJax, but should. Show dialog. |
|
39 | 39 | var message = $('<div/>') |
|
40 | 40 | .append( |
|
41 |
$("<p/></p>").addClass('dialog'). |
|
|
41 | $("<p/></p>").addClass('dialog').text( | |
|
42 | 42 | "Math/LaTeX rendering will be disabled." |
|
43 | 43 | ) |
|
44 | 44 | ).append( |
|
45 |
$("<p></p>").addClass('dialog'). |
|
|
45 | $("<p></p>").addClass('dialog').text( | |
|
46 | 46 | "If you have administrative access to the notebook server and" + |
|
47 | 47 | " a working internet connection, you can install a local copy" + |
|
48 | 48 | " of MathJax for offline use with the following command on the server" + |
|
49 | 49 | " at a Python or IPython prompt:" |
|
50 | 50 | ) |
|
51 | 51 | ).append( |
|
52 |
$("<pre></pre>").addClass('dialog'). |
|
|
52 | $("<pre></pre>").addClass('dialog').text( | |
|
53 | 53 | ">>> from IPython.external import mathjax; mathjax.install_mathjax()" |
|
54 | 54 | ) |
|
55 | 55 | ).append( |
|
56 |
$("<p></p>").addClass('dialog'). |
|
|
56 | $("<p></p>").addClass('dialog').text( | |
|
57 | 57 | "This will try to install MathJax into the IPython source directory." |
|
58 | 58 | ) |
|
59 | 59 | ).append( |
|
60 |
$("<p></p>").addClass('dialog'). |
|
|
60 | $("<p></p>").addClass('dialog').text( | |
|
61 | 61 | "If IPython is installed to a location that requires" + |
|
62 | 62 | " administrative privileges to write, you will need to make this call as" + |
|
63 | 63 | " an administrator, via 'sudo'." |
|
64 | 64 | ) |
|
65 | 65 | ).append( |
|
66 |
$("<p></p>").addClass('dialog'). |
|
|
66 | $("<p></p>").addClass('dialog').text( | |
|
67 | 67 | "When you start the notebook server, you can instruct it to disable MathJax support altogether:" |
|
68 | 68 | ) |
|
69 | 69 | ).append( |
|
70 |
$("<pre></pre>").addClass('dialog'). |
|
|
70 | $("<pre></pre>").addClass('dialog').text( | |
|
71 | 71 | "$ ipython notebook --no-mathjax" |
|
72 | 72 | ) |
|
73 | 73 | ).append( |
|
74 |
$("<p></p>").addClass('dialog'). |
|
|
74 | $("<p></p>").addClass('dialog').text( | |
|
75 | 75 | "which will prevent this dialog from appearing." |
|
76 | 76 | ) |
|
77 | 77 | ); |
@@ -1318,7 +1318,7 b' var IPython = (function (IPython) {' | |||
|
1318 | 1318 | var that = this; |
|
1319 | 1319 | IPython.dialog.modal({ |
|
1320 | 1320 | title : "Restart kernel or continue running?", |
|
1321 |
body : $("<p/>"). |
|
|
1321 | body : $("<p/>").text( | |
|
1322 | 1322 | 'Do you want to restart the current kernel? You will lose all variables defined in it.' |
|
1323 | 1323 | ), |
|
1324 | 1324 | buttons : { |
@@ -1781,7 +1781,7 b' var IPython = (function (IPython) {' | |||
|
1781 | 1781 | var that = this; |
|
1782 | 1782 | var dialog = $('<div/>').append( |
|
1783 | 1783 | $("<p/>").addClass("rename-message") |
|
1784 |
. |
|
|
1784 | .text('This notebook name already exists.') | |
|
1785 | 1785 | ) |
|
1786 | 1786 | $([IPython.events]).trigger('notebook_rename_failed.Notebook', [xhr, status, error]); |
|
1787 | 1787 | IPython.dialog.modal({ |
@@ -43,7 +43,7 b' var IPython = (function (IPython) {' | |||
|
43 | 43 | NotificationWidget.prototype.set_message = function (msg, timeout, click_callback) { |
|
44 | 44 | var callback = click_callback || function() {return false;}; |
|
45 | 45 | var that = this; |
|
46 |
this.element. |
|
|
46 | this.element.text(msg); | |
|
47 | 47 | this.element.fadeIn(100); |
|
48 | 48 | if (this.timeout !== null) { |
|
49 | 49 | clearTimeout(this.timeout); |
@@ -51,13 +51,13 b' var IPython = (function (IPython) {' | |||
|
51 | 51 | } |
|
52 | 52 | if (timeout !== undefined && timeout >=0) { |
|
53 | 53 | this.timeout = setTimeout(function () { |
|
54 |
that.element.fadeOut(100, function () {that.element. |
|
|
54 | that.element.fadeOut(100, function () {that.element.text('');}); | |
|
55 | 55 | that.timeout = null; |
|
56 | 56 | }, timeout); |
|
57 | 57 | } else { |
|
58 | 58 | this.element.click(function() { |
|
59 | 59 | if( callback() != false ) { |
|
60 |
that.element.fadeOut(100, function () {that.element. |
|
|
60 | that.element.fadeOut(100, function () {that.element.text('');}); | |
|
61 | 61 | that.element.unbind('click'); |
|
62 | 62 | } |
|
63 | 63 | if (that.timeout !== undefined) { |
@@ -61,7 +61,7 b' var IPython = (function (IPython) {' | |||
|
61 | 61 | |
|
62 | 62 | this.collapse_button.addClass("btn output_collapsed"); |
|
63 | 63 | this.collapse_button.attr('title', 'click to expand output'); |
|
64 |
this.collapse_button. |
|
|
64 | this.collapse_button.text('. . .'); | |
|
65 | 65 | |
|
66 | 66 | this.prompt_overlay.addClass('out_prompt_overlay prompt'); |
|
67 | 67 | this.prompt_overlay.attr('title', 'click to expand output; double click to hide output'); |
@@ -442,7 +442,7 b' var IPython = (function (IPython) {' | |||
|
442 | 442 | var n = json.prompt_number || ' '; |
|
443 | 443 | var toinsert = this.create_output_area(); |
|
444 | 444 | if (this.prompt_area) { |
|
445 |
toinsert.find('div.prompt').addClass('output_prompt'). |
|
|
445 | toinsert.find('div.prompt').addClass('output_prompt').text('Out[' + n + ']:'); | |
|
446 | 446 | } |
|
447 | 447 | this.append_mime_type(json, toinsert); |
|
448 | 448 | this._safe_append(toinsert); |
@@ -32,7 +32,7 b' var IPython = (function (IPython) {' | |||
|
32 | 32 | // The documentation |
|
33 | 33 | var doc = $('<div/>').addClass('alert'); |
|
34 | 34 | doc.append( |
|
35 | $('<button/>').addClass('close').attr('data-dismiss','alert').html('×') | |
|
35 | $('<button/>').addClass('close').attr('data-dismiss','alert').html('×') | |
|
36 | 36 | ).append( |
|
37 | 37 | 'The IPython Notebook has two different keyboard input modes. <b>Edit mode</b> '+ |
|
38 | 38 | 'allow you the type code/text into a cell and is indicated by a green cell '+ |
@@ -75,16 +75,16 b' var IPython = (function (IPython) {' | |||
|
75 | 75 | help = command_shortcuts[i]['help']; |
|
76 | 76 | shortcut = command_shortcuts[i]['shortcut']; |
|
77 | 77 | cmd_col1.append($('<div>').addClass('quickhelp'). |
|
78 |
append($('<span/>').addClass('shortcut_key'). |
|
|
79 |
append($('<span/>').addClass('shortcut_descr'). |
|
|
78 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
|
79 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) | |
|
80 | 80 | ); |
|
81 | 81 | }; |
|
82 | 82 | for (i=half; i<n; i++) { |
|
83 | 83 | help = command_shortcuts[i]['help']; |
|
84 | 84 | shortcut = command_shortcuts[i]['shortcut']; |
|
85 | 85 | cmd_col2.append($('<div>').addClass('quickhelp'). |
|
86 |
append($('<span/>').addClass('shortcut_key'). |
|
|
87 |
append($('<span/>').addClass('shortcut_descr'). |
|
|
86 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
|
87 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) | |
|
88 | 88 | ); |
|
89 | 89 | }; |
|
90 | 90 | cmd_sub_div.append(cmd_col1).append(cmd_col2); |
@@ -108,16 +108,16 b' var IPython = (function (IPython) {' | |||
|
108 | 108 | help = edit_shortcuts[i]['help']; |
|
109 | 109 | shortcut = edit_shortcuts[i]['shortcut']; |
|
110 | 110 | edit_col1.append($('<div>').addClass('quickhelp'). |
|
111 |
append($('<span/>').addClass('shortcut_key'). |
|
|
112 |
append($('<span/>').addClass('shortcut_descr'). |
|
|
111 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
|
112 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) | |
|
113 | 113 | ); |
|
114 | 114 | }; |
|
115 | 115 | for (i=half; i<n; i++) { |
|
116 | 116 | help = edit_shortcuts[i]['help']; |
|
117 | 117 | shortcut = edit_shortcuts[i]['shortcut']; |
|
118 | 118 | edit_col2.append($('<div>').addClass('quickhelp'). |
|
119 |
append($('<span/>').addClass('shortcut_key'). |
|
|
120 |
append($('<span/>').addClass('shortcut_descr'). |
|
|
119 | append($('<span/>').addClass('shortcut_key').text(shortcut)). | |
|
120 | append($('<span/>').addClass('shortcut_descr').text(' : ' + help)) | |
|
121 | 121 | ); |
|
122 | 122 | }; |
|
123 | 123 | edit_sub_div.append(edit_col1).append(edit_col2); |
@@ -71,7 +71,7 b' var IPython = (function (IPython) {' | |||
|
71 | 71 | var that = this; |
|
72 | 72 | var dialog = $('<div/>').append( |
|
73 | 73 | $("<p/>").addClass("rename-message") |
|
74 |
. |
|
|
74 | .text('Enter a new notebook name:') | |
|
75 | 75 | ).append( |
|
76 | 76 | $("<br/>") |
|
77 | 77 | ).append( |
@@ -88,7 +88,7 b' var IPython = (function (IPython) {' | |||
|
88 | 88 | click: function () { |
|
89 | 89 | var new_name = $(this).find('input').val(); |
|
90 | 90 | if (!IPython.notebook.test_notebook_name(new_name)) { |
|
91 |
$(this).find('.rename-message'). |
|
|
91 | $(this).find('.rename-message').text( | |
|
92 | 92 | "Invalid notebook name. Notebook names must "+ |
|
93 | 93 | "have 1 or more characters and can contain any characters " + |
|
94 | 94 | "except :/\\. Please enter a new notebook name:" |
@@ -116,7 +116,7 b' var IPython = (function (IPython) {' | |||
|
116 | 116 | |
|
117 | 117 | SaveWidget.prototype.update_notebook_name = function () { |
|
118 | 118 | var nbname = IPython.notebook.get_notebook_name(); |
|
119 |
this.element.find('span#notebook_name'). |
|
|
119 | this.element.find('span#notebook_name').text(nbname); | |
|
120 | 120 | }; |
|
121 | 121 | |
|
122 | 122 | |
@@ -138,11 +138,11 b' var IPython = (function (IPython) {' | |||
|
138 | 138 | |
|
139 | 139 | |
|
140 | 140 | SaveWidget.prototype.set_save_status = function (msg) { |
|
141 |
this.element.find('span#autosave_status'). |
|
|
141 | this.element.find('span#autosave_status').text(msg); | |
|
142 | 142 | } |
|
143 | 143 | |
|
144 | 144 | SaveWidget.prototype.set_checkpoint_status = function (msg) { |
|
145 |
this.element.find('span#checkpoint_status'). |
|
|
145 | this.element.find('span#checkpoint_status').text(msg); | |
|
146 | 146 | } |
|
147 | 147 | |
|
148 | 148 | SaveWidget.prototype.set_last_checkpoint = function (checkpoint) { |
@@ -101,7 +101,7 b' var IPython = (function (IPython) {' | |||
|
101 | 101 | ClusterItem.prototype.state_stopped = function () { |
|
102 | 102 | var that = this; |
|
103 | 103 | var profile_col = $('<span/>').addClass('profile_col span4').text(this.data.profile); |
|
104 |
var status_col = $('<span/>').addClass('status_col span3'). |
|
|
104 | var status_col = $('<span/>').addClass('status_col span3').text('stopped'); | |
|
105 | 105 | var engines_col = $('<span/>').addClass('engine_col span3'); |
|
106 | 106 | var input = $('<input/>').attr('type','number') |
|
107 | 107 | .attr('min',1) |
@@ -122,7 +122,7 b' var IPython = (function (IPython) {' | |||
|
122 | 122 | start_button.click(function (e) { |
|
123 | 123 | var n = that.element.find('.engine_num_input').val(); |
|
124 | 124 | if (!/^\d+$/.test(n) && n.length>0) { |
|
125 |
status_col. |
|
|
125 | status_col.text('invalid engine #'); | |
|
126 | 126 | } else { |
|
127 | 127 | var settings = { |
|
128 | 128 | cache : false, |
@@ -133,10 +133,10 b' var IPython = (function (IPython) {' | |||
|
133 | 133 | that.update_state(data); |
|
134 | 134 | }, |
|
135 | 135 | error : function (data, status, xhr) { |
|
136 |
status_col. |
|
|
136 | status_col.text("error starting cluster"); | |
|
137 | 137 | } |
|
138 | 138 | }; |
|
139 |
status_col. |
|
|
139 | status_col.text('starting'); | |
|
140 | 140 | var url = utils.url_join_encode( |
|
141 | 141 | that.baseProjectUrl(), |
|
142 | 142 | 'clusters', |
@@ -152,8 +152,8 b' var IPython = (function (IPython) {' | |||
|
152 | 152 | ClusterItem.prototype.state_running = function () { |
|
153 | 153 | var that = this; |
|
154 | 154 | var profile_col = $('<span/>').addClass('profile_col span4').text(this.data.profile); |
|
155 |
var status_col = $('<span/>').addClass('status_col span3'). |
|
|
156 |
var engines_col = $('<span/>').addClass('engines_col span3'). |
|
|
155 | var status_col = $('<span/>').addClass('status_col span3').text('running'); | |
|
156 | var engines_col = $('<span/>').addClass('engines_col span3').text(this.data.n); | |
|
157 | 157 | var stop_button = $('<button/>').addClass("btn btn-mini").text("Stop"); |
|
158 | 158 | var action_col = $('<span/>').addClass('action_col span2').append( |
|
159 | 159 | $("<span/>").addClass("item_buttons btn-group").append( |
@@ -175,10 +175,10 b' var IPython = (function (IPython) {' | |||
|
175 | 175 | }, |
|
176 | 176 | error : function (data, status, xhr) { |
|
177 | 177 | console.log('error',data); |
|
178 |
status_col. |
|
|
178 | status_col.text("error stopping cluster"); | |
|
179 | 179 | } |
|
180 | 180 | }; |
|
181 |
status_col. |
|
|
181 | status_col.text('stopping'); | |
|
182 | 182 | var url = utils.url_join_encode( |
|
183 | 183 | that.baseProjectUrl(), |
|
184 | 184 | 'clusters', |
@@ -263,7 +263,7 b' var IPython = (function (IPython) {' | |||
|
263 | 263 | return false; |
|
264 | 264 | }); |
|
265 | 265 | // var new_buttons = item.find('a'); // shutdown_button; |
|
266 |
item.find(".item_buttons"). |
|
|
266 | item.find(".item_buttons").text("").append(shutdown_button); | |
|
267 | 267 | }; |
|
268 | 268 | |
|
269 | 269 | NotebookList.prototype.add_delete_button = function (item) { |
@@ -308,7 +308,7 b' var IPython = (function (IPython) {' | |||
|
308 | 308 | }); |
|
309 | 309 | return false; |
|
310 | 310 | }); |
|
311 |
item.find(".item_buttons"). |
|
|
311 | item.find(".item_buttons").text("").append(delete_button); | |
|
312 | 312 | }; |
|
313 | 313 | |
|
314 | 314 |
General Comments 0
You need to be logged in to leave comments.
Login now