##// END OF EJS Templates
Move code into is_cell_editor_focused
Jonathan Frederic -
Show More
@@ -162,7 +162,13 b' casper.notebook_test(function () {'
162 };
162 };
163
163
164 this.is_cell_editor_focused = function(index) {
164 this.is_cell_editor_focused = function(index) {
165 return this._is_cell_inputfield(index, '.CodeMirror-focused *');
165 return this.evaluate(function(i) {
166 var cell = IPython.notebook.get_cell(i);
167 if (cell) {
168 return $(cell.code_mirror.getInputField()).is('.CodeMirror-focused *');
169 }
170 return false;
171 }, {i : index});
166 };
172 };
167
173
168 this.is_cell_on = function(i, on_class, off_class) {
174 this.is_cell_on = function(i, on_class, off_class) {
@@ -209,16 +215,6 b' casper.notebook_test(function () {'
209 }, {i : index});
215 }, {i : index});
210 };
216 };
211
217
212 this._is_cell_inputfield = function(index, selector) {
213 return this.evaluate(function(i, s) {
214 var cell = IPython.notebook.get_cell(i);
215 if (cell) {
216 return $(cell.code_mirror.getInputField()).is(s);
217 }
218 return false;
219 }, {i : index, s: selector});
220 };
221
222 this._has_cell_class = function(index, classes) {
218 this._has_cell_class = function(index, classes) {
223 return this.evaluate(function(i, c) {
219 return this.evaluate(function(i, c) {
224 var cell = IPython.notebook.get_cell(i);
220 var cell = IPython.notebook.get_cell(i);
General Comments 0
You need to be logged in to leave comments. Login now