bvj 5 lat temu
rodzic
commit
bb49d71f87
2 zmienionych plików z 11 dodań i 6 usunięć
  1. 1 1
      README.md
  2. 10 5
      main.js

+ 1 - 1
README.md

@@ -13,5 +13,5 @@ The MIcKA Search extension, searches configured metadata catalogue and show retu
 
 The initial configuration can be given using the IPython-contrib nbextensions facility. It includes:
 
-- mickaSearch.micka_url - URL of MIcKA (default: https://hub.lesprojekt.cz/micka/micka2/)
+- mickaSearch.micka_url - URL of MIcKA (default: https://hub.lesprojekt.cz/micka/)
 - mickaSearch.proxy_url - URL of CORS proxy (default: https://cors-anywhere.herokuapp.com/)

+ 10 - 5
main.js

@@ -1,13 +1,18 @@
 /*jshint esversion: 6 */
 define([
+    'require',
+    'jqueryui',
     'base/js/namespace',
-    'jquery'
+    'base/js/events',
 ], function(
     Jupyter,
-    $
+    requirejs,
+    $,
+    IPython,
+    events
 ) {
     var mod_name = "mickaSearch";
-    var log_prefix = '[' + mod_name + '] ';
+    var log_prefix = `[${mod_name}] `;
     // default configuration
     var cfg = {
         'micka_url': 'https://hub.lesprojekt.cz/micka/',
@@ -60,7 +65,7 @@ define([
             output += '</details>';
         });
         document.getElementById('msres').innerHTML = output;
-    }
+    };
 
     var initialize = function () {
         read_config();
@@ -90,7 +95,7 @@ define([
         var full_action_name = Jupyter.actions.register(action, action_name, prefix);
         Jupyter.toolbar.add_buttons_group([full_action_name]);
         console.log(log_prefix + 'button added');
-    }
+    };
 
     var load_ipython_extension = function() {
         return IPython.notebook.config.loaded.then(initialize);