From: Darren Date: Wed, 3 Apr 2013 20:03:13 +0000 (+0100) Subject: ControlInput.addPluginIcon() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4133f39b2c1ad41632cdbdcf17f21cffafcf9caa;p=KiwiIRC.git ControlInput.addPluginIcon() --- 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(); } });