NewConnection info view switching
authorDarren <darren@Darrens-MacBook-Pro.local>
Thu, 9 May 2013 14:55:40 +0000 (15:55 +0100)
committerDarren <darren@Darrens-MacBook-Pro.local>
Thu, 9 May 2013 14:55:40 +0000 (15:55 +0100)
client/assets/dev/index.html.tmpl
client/assets/dev/model_application.js
client/assets/dev/view.js

index 288ed7501162fded4ea5cd3b8f28480de943098a..7127402fe1b317f38bcf7f4481035b6a345d08e4 100644 (file)
         </form>\r
     </script>\r
 \r
+    <script type="text/html" id="tmpl_new_connection_info">\r
+        <div style="margin:1em 20px;">\r
+            <img src="https://kiwiirc.com/img/ico.png" alt="KiwiIRC Logo" title="Kiwi IRC" style="display:block; margin:0 auto;"/> <br />\r
+            <p style="font-style:italic;">A <strong>hand-crafted IRC client</strong> that you can enjoy. Designed to be used <strong>easily</strong> and <strong>freely</strong>.</p>\r
+\r
+            <p style="font-size:0.9em;margin-top:2em;">Peek at the <a href="https://www.kiwiirc.com/">Kiwi IRC homepage</a> for more information or to find out how to embed it on your own website. Looking for source code? Try the <a href="http://github.com/prawnsalad/KiwiIRC/">GitHub</a> page. This network of people may not be associated with Kiwi IRC itself.</p>\r
+        </div>\r
+    </script>\r
+\r
     <script type="text/html" id="tmpl_server_select">\r
         <div class="server_select">\r
 \r
+            <div class="side_panel" style="position:absolute;top:0px;left:320px;">\r
+                <div class="content" style="position:relative;width:300px;">\r
+                </div>\r
+            </div>\r
+\r
             <div class="server_details" style="position:relative;width:320px;">\r
                 <div class="status">Think of a nickname..</div>\r
 \r
index 04239985485e7a01b2df076bae58eefb2458e8a7..2e96956d46c8124581e363b32082f5ed665ca820 100644 (file)
@@ -76,6 +76,13 @@ _kiwi.model.Application = function () {
             connection_dialog.view.$el.addClass('initial');\r
             this.view.$el.find('.panel_container:first').append(connection_dialog.view.$el);\r
 \r
+            var $info = $($('#tmpl_new_connection_info').html());\r
+\r
+            if ($info.html()) {\r
+                connection_dialog.view.infoBoxSet($info);\r
+                connection_dialog.view.infoBoxShow();\r
+            }\r
+\r
             // TODO: Shouldn't really be here but it's not working in the view.. :/\r
             // Hack for firefox browers: Focus is not given on this event loop iteration\r
             setTimeout(function(){\r
index 11ae8fe178d19747a410beef5eb97c937636959c..57e14ca7390737ae5180e9f375eba7f80b3d12ff 100644 (file)
@@ -316,6 +316,12 @@ _kiwi.view.ServerSelect = function () {
             });\r
         },\r
 \r
+        infoBoxSet: function($info_view) {\r
+            this.$el.find('.side_panel .content')\r
+                .empty()\r
+                .append($info_view);\r
+        },\r
+\r
         setStatus: function (text, class_name) {\r
             $('.status', this.$el)\r
                 .text(text)\r