Переглянути джерело

Makes chat message notifications more visible.

master
yanas 10 роки тому
джерело
коміт
a89555b4b6
3 змінених файлів з 26 додано та 12 видалено
  1. 5
    3
      chat.js
  2. 16
    7
      css/main.css
  3. 5
    2
      toolbar.js

+ 5
- 3
chat.js Переглянути файл

@@ -135,8 +135,7 @@ var Chat = (function (my) {
135 135
         {
136 136
             $("#subject").css({display: "block"});
137 137
         }
138
-    }
139
-
138
+    };
140 139
 
141 140
     /**
142 141
      * Opens / closes the chat area.
@@ -187,6 +186,9 @@ var Chat = (function (my) {
187 186
                                             duration: 500});
188 187
         }
189 188
         else {
189
+            // Undock the toolbar when the chat is shown.
190
+            Toolbar.dockToolbar(false);
191
+
190 192
             videospace.animate({right: chatSize[0],
191 193
                                 width: videospaceWidth,
192 194
                                 height: videospaceHeight},
@@ -290,7 +292,7 @@ var Chat = (function (my) {
290 292
         if (unreadMessages) {
291 293
             unreadMsgElement.innerHTML = unreadMessages.toString();
292 294
 
293
-            Toolbar.showToolbar();
295
+            Toolbar.dockToolbar(true);
294 296
 
295 297
             var chatButtonElement
296 298
                 = document.getElementById('chatButton').parentNode;

+ 16
- 7
css/main.css Переглянути файл

@@ -131,15 +131,24 @@ html, body{
131 131
 }
132 132
 
133 133
 #chatButton {
134
-    -webkit-transition: all .5s ease-in-out;;
135
-       -moz-transition: all .5s ease-in-out;;
136
-            transition: all .5s ease-in-out;;
134
+    -webkit-transition: all .5s ease-in-out;
135
+       -moz-transition: all .5s ease-in-out;
136
+            transition: all .5s ease-in-out;
137 137
 }
138
-
138
+/*#ffde00*/
139 139
 #chatButton.active {
140
-    -webkit-text-shadow: 0 0 10px #ffffff;
141
-    -moz-text-shadow: 0 0 10px #ffffff;
142
-    text-shadow: 0 0 10px #ffffff;
140
+    -webkit-text-shadow:    -1px 0 10px #00ccff,
141
+                            0 1px 10px #00ccff,
142
+                            1px 0 10px #00ccff,
143
+                            0 -1px 10px #00ccff;
144
+    -moz-text-shadow:   1px 0 10px #00ccff,
145
+                        0 1px 10px #00ccff,
146
+                        1px 0 10px #00ccff,
147
+                        0 -1px 10px #00ccff;
148
+    text-shadow:    -1px 0 10px #00ccff,
149
+                    0 1px 10px #00ccff,
150
+                    1px 0 10px #00ccff,
151
+                    0 -1px 10px #00ccff;
143 152
 }
144 153
 
145 154
 a.button:hover {

+ 5
- 2
toolbar.js Переглянути файл

@@ -236,9 +236,12 @@ var Toolbar = (function (my) {
236 236
             if (!$('#header').is(':visible')) {
237 237
                 Toolbar.showToolbar();
238 238
             }
239
+
239 240
             // Then clear the time out, to dock the toolbar.
240
-            clearTimeout(toolbarTimeout);
241
-            toolbarTimeout = null;
241
+            if (toolbarTimeout) {
242
+                clearTimeout(toolbarTimeout);
243
+                toolbarTimeout = null;
244
+            }
242 245
         }
243 246
         else {
244 247
             if (!$('#header').is(':visible')) {

Завантаження…
Відмінити
Зберегти