Merge branch 'backbone_ui' of github.com:prawnsalad/KiwiIRC into backbone_ui
authorJack Allnutt <m2ys4u@Gmail.com>
Sun, 23 Sep 2012 23:08:41 +0000 (00:08 +0100)
committerJack Allnutt <m2ys4u@Gmail.com>
Sun, 23 Sep 2012 23:08:41 +0000 (00:08 +0100)
Conflicts:
client_backbone/css/style.css
client_backbone/dev/model_application.js
client_backbone/dev/view.js
client_backbone/index.html

1  2 
client_backbone/dev/model_application.js
client_backbone/dev/view.js

index c9c5fd1b4bc3a1e639ef771e2c6de1a7758087e7,ba04fe09fd174ef925f9fc85c5294c2ee83c19a9..7a1f88f843ed4d1956e13ef35b94a2a81cc75825
@@@ -495,8 -516,13 +516,13 @@@ kiwi.model.Application = function () 
                  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
 -};
++};
index 1940fe6ca548000fa8725b4896a9bc2eef910eea,b0773b6b835c6139bd324bcfd287e940ada60ec9..6a77777241205d1e0a818a510e5116aaefe6b880
@@@ -59,9 -59,10 +59,10 @@@ kiwi.view.UserBox = Backbone.View.exten
      }\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
@@@ -542,8 -595,8 +595,8 @@@ kiwi.view.ControlBox = Backbone.View.ex
      // 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