Browse code

Lepsie vertikalne resizovanie rostera

Cinan Rakosnik authored on 18/05/2013 at 17:50:23
Showing 3 changed files
... ...
@@ -12,9 +12,14 @@ this.App =
12 12
 
13 13
   UI:
14 14
     setAutoHeight: ->
15
-      height = $(window).height()
16
-      $("#height-setter-1").css({height: height - 50})
17
-      $("#height-setter-2").css({height: height - $('#tabbar').outerHeight() - $('#msg-writer').outerHeight() - 57})
15
+      windowHeight = $(window).height()
16
+      if (windowHeight < $('.roster').css('min-height').replace(/[^-\d\.]/g, ''))
17
+        return
18
+
19
+      toolboxHeight = $("#height-setter-1 .toolbox").height()
20
+      $("#height-setter-1").css({height: windowHeight - toolboxHeight - 70})
21
+      $("#height-setter-1 .friends").css({height: windowHeight - toolboxHeight - 100})
22
+      $("#height-setter-2").css({height: windowHeight - $('#tabbar').outerHeight() - $('#msg-writer').outerHeight() - 57})
18 23
 
19 24
     filterContacts: (searchTerm) ->
20 25
       App.Collections.contacts.filter(searchTerm)
... ...
@@ -241,6 +246,7 @@ this.App =
241 241
           )
242 242
 
243 243
           tab.chatWindow.appendMessage(contact, new Date(), result.message)
244
+          tab.chatWindow.log(message)
244 245
       )
245 246
 
246 247
   Models:
... ...
@@ -39,6 +39,11 @@
39 39
   &:hover, &:active {
40 40
     cursor: default;
41 41
   }
42
+
43
+  .wrap {
44
+    overflow-y: auto;
45
+    overflow-x: hidden;
46
+  }
42 47
 }
43 48
 
44 49
 .my-info {
... ...
@@ -192,6 +197,10 @@
192 192
 }
193 193
 
194 194
 .friends {
195
+  height: inherit;
196
+  overflow-x: hidden;
197
+  overflow-y: auto;
198
+
195 199
   .group-header {
196 200
     margin: 16px 3px 3px;
197 201
     font-size: 12px;
... ...
@@ -385,6 +394,7 @@
385 385
 .tabbar {
386 386
   display: inline-block;
387 387
   margin-bottom: -3px;
388
+  width: 750px;
388 389
 
389 390
   .tab {
390 391
     background: #f7f6f5;
... ...
@@ -436,6 +446,7 @@
436 436
   background: white;
437 437
   padding: 9px;
438 438
   min-height: 367px;
439
+  width: 730px;
439 440
 
440 441
   .event {
441 442
     color: $status-color;
... ...
@@ -14,18 +14,19 @@
14 14
 
15 15
 .container
16 16
   .leftside.left
17
-    .roster.border.no-top-border.top-border#height-setter-1
17
+    .roster.border.no-top-border.top-border
18 18
       .my-info#js-me
19
-      .friends
20
-        #js-active-friends
21
-        #js-inactive-friends
22
-      .toolbox
23
-        %input#js-search-contacts{type: 'search', placeholder: "#{I18n.t('chat.roster.search')}", name: 'contact'}
24
-        %a{ href: '#'}
25
-          %span.icon-cog
19
+      .wrap#height-setter-1
20
+        .friends
21
+          #js-active-friends
22
+          #js-inactive-friends
23
+        .toolbox
24
+          %input#js-search-contacts{type: 'search', placeholder: "#{I18n.t('chat.roster.search')}", name: 'contact'}
25
+          %a{ href: '#'}
26
+            %span.icon-cog
26 27
   .chatting-window.left.rightside
27 28
     .tabbar#tabbar
28
-      #js-tabbar
29
+      .wrap#js-tabbar
29 30
     #conversation-js
30 31
       -#.conversation.clear.border
31 32
         -#.messages#height-setter-2{style: "overflow: auto;"}