From a544071bcee24fd8688258b4630a16ee9ead3df1 Mon Sep 17 00:00:00 2001 From: juhasch Date: Sun, 14 Dec 2014 08:46:32 +0100 Subject: [PATCH 1/2] Fix runtools for 2.x and use relative CSS import --- usability/runtools/runtools.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/usability/runtools/runtools.js b/usability/runtools/runtools.js index 00cbd62..572f999 100644 --- a/usability/runtools/runtools.js +++ b/usability/runtools/runtools.js @@ -8,8 +8,9 @@ // - Execute marked codecells // - Stop execution -define( function () { - var load_ipython_extension = function () { +define([ + 'require' +], function(require) { "use strict"; if (IPython.version[0] != 2) { console.log("This extension requires IPython 2.x") @@ -109,7 +110,7 @@ define( function () { * @param {Object} event * @param {Object} nbcell notebook cell */ - create_cell = function (event,nbcell) { + var create_cell = function (event,nbcell) { var cell = nbcell.cell; if ((cell.cell_type == "code")) { cell.code_mirror.on("gutterClick", changeEvent); @@ -140,7 +141,7 @@ define( function () { { id : 'run_c', label : 'Execute current cell', - icon : 'fa-step-forward', + icon : 'icon-step-forward', callback : function () { IPython.notebook.execute_cell(); } @@ -188,7 +189,7 @@ define( function () { { id : 'interrupt_b', label : 'Interrupt', - icon : 'fa-stop', + icon : 'icon-stop', callback : function () { IPython.notebook.kernel.interrupt(); } @@ -232,12 +233,11 @@ define( function () { }; $([IPython.events]).on('create.Cell',create_cell); - load_css('/nbextensions/usability/runtools/runtools.css'); - }; - + load_css('./runtools.css'); + return { load_ipython_extension : load_ipython_extension, - }; + } }); From 291cb376662b53702a76ffb30da3c0759875c026 Mon Sep 17 00:00:00 2001 From: juhasch Date: Sun, 14 Dec 2014 08:53:13 +0100 Subject: [PATCH 2/2] Remove unused initialization --- usability/runtools/runtools.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/usability/runtools/runtools.js b/usability/runtools/runtools.js index 572f999..b1e7571 100644 --- a/usability/runtools/runtools.js +++ b/usability/runtools/runtools.js @@ -235,9 +235,6 @@ define([ $([IPython.events]).on('create.Cell',create_cell); load_css('./runtools.css'); - return { - load_ipython_extension : load_ipython_extension, - } });