From 343cd9675e7a22cac6749a189630aa5229313dc1 Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Fri, 12 Apr 2013 19:15:39 +0200 Subject: [PATCH] change server icon to reflec connection status --- client/assets/css/style.css | 9 ++++++--- client/assets/dev/model_application.js | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/assets/css/style.css b/client/assets/css/style.css index 3b52fc6..35c2c5c 100644 --- a/client/assets/css/style.css +++ b/client/assets/css/style.css @@ -312,7 +312,8 @@ html, body { height:100%; } #kiwi.theme_relaxed #toolbar .panellist li .part:before { content:"\f00d"; } #kiwi.theme_relaxed #toolbar .panellist li.server span { padding-left: 5px; } -#kiwi.theme_relaxed #toolbar .panellist li.server:before { content: "\f0ec"; } +#kiwi.connected.theme_relaxed #toolbar .panellist li.server:before { content: "\f0ec"; } +#kiwi.theme_relaxed #toolbar .panellist li.server:before { content: "\f06a"; } /* Tab texts are within a span */ #kiwi.theme_relaxed #toolbar .panellist li span { line-height:20px; vertical-align:middle; display:inline-block; } @@ -644,7 +645,8 @@ html, body { height:100%; } #kiwi.theme_mini #toolbar .panellist li .part:before { content:"\f00d"; } #kiwi.theme_mini #toolbar .panellist li.server span { padding-left:5px; } -#kiwi.theme_mini #toolbar .panellist li.server:before { content: "\f0ec"; } +#kiwi.connected.theme_mini #toolbar .panellist li.server:before { content: "\f0ec"; } +#kiwi.theme_mini #toolbar .panellist li.server:before { content: "\f06a"; } /* Tab texts are within a span */ #kiwi.theme_mini #toolbar .panellist li span { line-height:20px; vertical-align:middle; display:inline-block; } @@ -905,7 +907,8 @@ html, body { height:100%; } #kiwi.theme_cli #toolbar .panellist li .part:before { content:"\f00d"; } #kiwi.theme_cli #toolbar .panellist li.server span { padding-left:5px; } -#kiwi.theme_cli #toolbar .panellist li.server:before { content: "\f0ec"; } +#kiwi.connected.theme_cli #toolbar .panellist li.server:before { content: "\f0ec"; } +#kiwi.theme_cli #toolbar .panellist li.server:before { content: "\f06a"; } /* Tab texts are within a span */ #kiwi.theme_cli #toolbar .panellist li span { line-height:20px; vertical-align:middle; display:inline-block; } diff --git a/client/assets/dev/model_application.js b/client/assets/dev/model_application.js index ba9313c..915a538 100644 --- a/client/assets/dev/model_application.js +++ b/client/assets/dev/model_application.js @@ -302,6 +302,8 @@ _kiwi.model.Application = function () { var msg = 'You have been disconnected. Attempting to reconnect for you..'; that.message.text(msg, {timeout: 10000}); + that.view.$el.removeClass('connected'); + // Mention the disconnection on every channel $.each(_kiwi.app.panels.models, function (idx, panel) { if (!panel || !panel.isChannel()) return; @@ -315,7 +317,8 @@ _kiwi.model.Application = function () { msg = 'You have been disconnected. Attempting to reconnect again in ' + (event.delay/1000) + ' seconds..'; _kiwi.app.panels.server.addMsg('', msg, 'action quit'); }); - gw.on('connect', function (event) { + gw.on('onconnect', function (event) { + that.view.$el.addClass('connected'); if (gw_stat !== 1) return; var msg = 'It\'s OK, you\'re connected again :)'; -- 2.25.1