From 4133f39b2c1ad41632cdbdcf17f21cffafcf9caa Mon Sep 17 00:00:00 2001 From: Darren Date: Wed, 3 Apr 2013 21:03:13 +0100 Subject: [PATCH] ControlInput.addPluginIcon() --- client/assets/dev/app.js | 2 +- client/assets/dev/view.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/client/assets/dev/app.js b/client/assets/dev/app.js index 046eb3f..e14e42f 100644 --- a/client/assets/dev/app.js +++ b/client/assets/dev/app.js @@ -67,7 +67,7 @@ _kiwi.global = { ControlInput: function() { var obj = new this.EventComponent(_kiwi.app.controlbox); var funcs = { - processInput: 'run' + processInput: 'run', addPluginIcon: 'addPluginIcon' }; _.each(funcs, function(controlbox_fn, func_name) { diff --git a/client/assets/dev/view.js b/client/assets/dev/view.js index 1ad4bfa..407c660 100644 --- a/client/assets/dev/view.js +++ b/client/assets/dev/view.js @@ -1025,6 +1025,13 @@ _kiwi.view.ControlBox = Backbone.View.extend({ if (!this._callbacks['command:' + command]) { this.trigger('unknown_command', {command: command, params: params}); } + }, + + + addPluginIcon: function ($icon) { + var $tool = $('
').append($icon); + this.$el.find('.input_tools').append($tool); + _kiwi.app.view.doLayout(); } }); -- 2.25.1