Browse code

Ikonky pre odstranenie cloveka z rostera

Cinan Rakosnik authored on 16/05/2013 at 15:56:48
Showing 3 changed files
... ...
@@ -21,8 +21,8 @@
21 21
   %span.icon-make-owner.make-owner
22 22
     -# ak som admin otvoreneho multichatu
23 23
     %span owner
24
-  -#%span.icon-x-full.remove
25
-    %span remove
24
+  %span.icon-x-full.remove
25
+    %span rem
26 26
 
27 27
 -#  .avatar
28 28
 -#    %img{src: 'assets/avatar.png', alt: t("chat.avatar_alt")}
... ...
@@ -14,6 +14,8 @@ class Xmpp.Views.Contacts.ContactView extends Backbone.View
14 14
     mouseover: 'showIcons'
15 15
     mouseleave: 'hideIcons'
16 16
 
17
+  @iconClasses = ['multichat', 'invite', 'kick', 'make-owner', 'remove']
18
+
17 19
   initialize: () ->
18 20
     _.bindAll(this)
19 21
 
... ...
@@ -100,7 +102,7 @@ class Xmpp.Views.Contacts.ContactView extends Backbone.View
100 100
   showIcons: ->
101 101
     activeChat = App.Collections.chats.activeChat
102 102
 
103
-    $(@el).find('.action .multichat, .action .invite, .action .kick, .action .make-owner').hide()
103
+    @hideIcons()
104 104
 
105 105
     if @model.get('usingMyApp') and @model.get('status') != 'offline'
106 106
       if not activeChat or not activeChat.get('isMultiChat')
... ...
@@ -111,5 +113,9 @@ class Xmpp.Views.Contacts.ContactView extends Backbone.View
111 111
         $(@el).find('.action .kick').show()
112 112
         $(@el).find('.action .make-owner').show()
113 113
 
114
+    if not activeChat or not activeChat.get('isMultiChat')
115
+      $(@el).find('.action .remove').show()
116
+
114 117
   hideIcons: ->
115
-    $(@el).find('.action .multichat, .action .invite, .action .kick, .action .make-owner').hide()
118
+    all_icons = '.action .' + ContactView.iconClasses.join(', .action .')
119
+    $(@el).find(all_icons).hide()
... ...
@@ -299,11 +299,23 @@
299 299
       }
300 300
     }
301 301
 
302
-    .icon-bubbles, .icon-x-full {
302
+    .icon-bubbles {
303 303
       span {
304 304
         left: 1px;
305 305
       }
306 306
     }
307
+
308
+    .icon-x-full {
309
+      span {
310
+        left: 7px;
311
+      }
312
+    }
313
+
314
+    .icon-x-full {
315
+      &:before {
316
+        margin-left: 9px;
317
+      }
318
+    }
307 319
   }
308 320
 }
309 321