1 _kiwi
.view
.NickChangeBox
= Backbone
.View
.extend({
3 'submit': 'changeNick',
4 'click .cancel': 'close'
7 initialize: function () {
9 new_nick
: _kiwi
.global
.i18n
.translate('client_views_nickchangebox_new').fetch(),
10 change
: _kiwi
.global
.i18n
.translate('client_views_nickchangebox_change').fetch(),
11 cancel
: _kiwi
.global
.i18n
.translate('client_views_nickchangebox_cancel').fetch()
13 this.$el
= $(_
.template($('#tmpl_nickchange').html().trim(), text
));
17 // Add the UI component and give it focus
18 _kiwi
.app
.controlbox
.$el
.prepend(this.$el
);
19 this.$el
.find('input').focus();
21 this.$el
.css('bottom', _kiwi
.app
.controlbox
.$el
.outerHeight(true));
29 changeNick: function (event
) {
32 event
.preventDefault();
34 _kiwi
.app
.connections
.active_connection
.gateway
.changeNick(this.$el
.find('input').val(), function (err
, val
) {