Browse Source

added `amber/helpers`, you can popup Helios conveniently

Use `require('amber/helpers').popupHelios()`.
Herbert Vojčík 10 years ago
parent
commit
c9b3f3ca96
5 changed files with 12 additions and 0 deletions
  1. 1 0
      support/amber.js
  2. 1 0
      support/deploy.js
  3. 1 0
      support/devel.js
  4. 1 0
      support/helios.js
  5. 8 0
      support/helpers.js

+ 1 - 0
support/amber.js

@@ -33,6 +33,7 @@ require = function (require) {
             'amber_lib': home+'/support',
             'amber_core': home+'/js',
             'amber_core/_source': home+'/st',
+            'amber_html': home,
             'jquery': home+'/support/jQuery/jquery-1.8.2.min',
             'jquery-ui': home+'/support/jQuery/jquery-ui-1.8.24.custom.min'
         },

+ 1 - 0
support/deploy.js

@@ -1,5 +1,6 @@
 define([
     'amber_vm/smalltalk',
+    './helpers',
     'amber_core/Kernel-Objects',
     'amber_core/Kernel-Classes',
     'amber_core/Kernel-Methods',

+ 1 - 0
support/devel.js

@@ -1,5 +1,6 @@
 define([
     'amber_vm/smalltalk',
+    './helpers',
     'jquery',
     'jquery-ui',
     'amber_lib/jQuery/jquery.textarea',

+ 1 - 0
support/helios.js

@@ -1,5 +1,6 @@
 define([
     'amber_vm/smalltalk',
+    './helpers',
     'jquery',
     'jquery-ui',
     'amber_lib/jQuery/jquery.textarea',

+ 8 - 0
support/helpers.js

@@ -0,0 +1,8 @@
+define("amber/helpers", ["amber_vm/smalltalk", "require"], function (smalltalk, require) {
+    return {
+        popupHelios: function () {
+            window.open(require.toUrl('amber_html/helios.html'), "Helios", "menubar=no, status=no, scrollbars=no, menubar=no, width=1000, height=600");
+        },
+        get smalltalk() { return smalltalk; }
+    };
+});