Element tabbing/focussing. #66 #67 #68
authorDarren <darren@darrenwhitlen.com>
Mon, 1 Oct 2012 16:35:35 +0000 (17:35 +0100)
committerDarren <darren@darrenwhitlen.com>
Mon, 1 Oct 2012 16:35:35 +0000 (17:35 +0100)
client_backbone/dev/model_application.js
client_backbone/dev/view.js
client_backbone/index.html

index d3ec065b4c656def160ae05b8453929cb194f955..0828ee52020640d6666c007e467c0e91d7aaefc8 100755 (executable)
@@ -60,6 +60,8 @@ kiwi.model.Application = function () {
             });\r
         });\r
 \r
+        // TODO: Shouldn't really be here but it's not working in the view.. :/\r
+        this.panels.server.server_login.$el.find('.nick').select();\r
     };\r
 \r
 \r
index 6a77777241205d1e0a818a510e5116aaefe6b880..00edbac7f0eccbd8407d0cc1363c3cca48405aa8 100755 (executable)
@@ -59,7 +59,7 @@ kiwi.view.UserBox = Backbone.View.extend({
     }\r
 });\r
 \r
-kiwi.view.NickChangeBox = Backbone.View.extend({
+kiwi.view.NickChangeBox = Backbone.View.extend({\r
     events: {\r
         'submit': 'changeNick',\r
         'click .cancel': 'close'\r
@@ -145,6 +145,7 @@ kiwi.view.ServerSelect = function () {
 \r
         showMore: function (event) {\r
             $('.more', this.$el).slideDown('fast');\r
+            $('.server', this.$el).select();\r
         },\r
 \r
         populateFields: function (defaults) {\r
@@ -178,7 +179,6 @@ kiwi.view.ServerSelect = function () {
 \r
             if (new_state === 'all') {\r
                 $('.show_more', this.$el).show();\r
-                $('.nick', this.$el).focus();\r
 \r
             } else if (new_state === 'more') {\r
                 $('.more', this.$el).slideDown('fast');\r
@@ -595,8 +595,8 @@ kiwi.view.ControlBox = Backbone.View.extend({
     // Instance of InputPreProcessor\r
     preprocessor: null,\r
 \r
-    events: {
-        'keydown input.inp': 'process',
+    events: {\r
+        'keydown input.inp': 'process',\r
         'click .nick': 'showNickChange'\r
     },\r
 \r
index 374fd9bbb4b0d6797fc727a55572ed47c07d709c..7189dbb4e167ffbdf7bc39e373b0e4614d1e67be 100755 (executable)
@@ -60,7 +60,7 @@
                     <input type="text" class="nick" id="server_select_nick"> <br />
 
                     <button type="submit">Connect..</button> <br />
-                    <a class="show_more">More</a>
+                    <a href="" onclick="return false;" class="show_more">More</a>
                 </div>
 
                 <div class="more">