kiwi.app.panels.server.addMsg(' ', '=== The nickname ' + data.nick + ' is already in use. Please select a new nickname', 'status');\r
if (kiwi.app.panels.server !== kiwi.app.panels.active) {\r
kiwi.app.message.text('The nickname "' + data.nick + '" is already in use. Please select a new nickname');\r
- }\r
++ }
+ \r
+ // Only show the nickchange component if the controlbox is open\r
+ if (that.controlbox.$el.css('display') !== 'none') {\r
+ (new kiwi.view.NickChangeBox()).render();\r
}\r
- (new kiwi.view.NickChangeBox()).render();\r
-\r
++
break;\r
default:\r
// We don't know what data contains, so don't do anything with it.\r
return (channel_prefix.indexOf(channel_name[0]) > -1);\r
};\r
\r
- })());
+ \r
+ \r
+ return new (Backbone.Model.extend(this))(arguments);\r
-};
++};
}\r
});\r
\r
--kiwi.view.NickChangeBox = Backbone.View.extend({\r
++kiwi.view.NickChangeBox = Backbone.View.extend({
events: {\r
- 'click .btn_nickchange': 'changeNick'\r
+ 'submit': 'changeNick',\r
+ 'click .cancel': 'close'\r
},\r
\r
initialize: function () {\r
// Instance of InputPreProcessor\r
preprocessor: null,\r
\r
-- events: {\r
- 'keydown input': 'process',\r
- 'keydown input.inp': 'process',\r
++ events: {
++ 'keydown input.inp': 'process',
'click .nick': 'showNickChange'\r
},\r
\r