ControlInput.addPluginIcon()
authorDarren <darren@Darrens-MacBook-Pro.local>
Wed, 3 Apr 2013 20:03:13 +0000 (21:03 +0100)
committerDarren <darren@Darrens-MacBook-Pro.local>
Wed, 3 Apr 2013 20:03:13 +0000 (21:03 +0100)
client/assets/dev/app.js
client/assets/dev/view.js

index 046eb3fbd123ab6283a0f4d42ba50fe35c00cdad..e14e42f8488590c58046d06a1b110a54384fdaf8 100644 (file)
@@ -67,7 +67,7 @@ _kiwi.global = {
            ControlInput: function() {\r
                var obj = new this.EventComponent(_kiwi.app.controlbox);\r
                var funcs = {\r
-                       processInput: 'run'\r
+                       processInput: 'run', addPluginIcon: 'addPluginIcon'\r
                };\r
 \r
                _.each(funcs, function(controlbox_fn, func_name) {\r
index 1ad4bfad5638d15457f70213c98f25299576bd68..407c660e4d2df13cd0625551d337139eacf37234 100644 (file)
@@ -1025,6 +1025,13 @@ _kiwi.view.ControlBox = Backbone.View.extend({
         if (!this._callbacks['command:' + command]) {\r
             this.trigger('unknown_command', {command: command, params: params});\r
         }\r
+    },\r
+\r
+\r
+    addPluginIcon: function ($icon) {\r
+        var $tool = $('<div class="tool"></div>').append($icon);\r
+        this.$el.find('.input_tools').append($tool);\r
+        _kiwi.app.view.doLayout();\r
     }\r
 });\r
 \r