Browse Source

Drop dragresize-tm class. Don't set height if not available

JC Brand 9 years ago
parent
commit
414265299a
4 changed files with 10 additions and 12 deletions
  1. 4 5
      converse.js
  2. 2 2
      src/templates/chatbox.html
  3. 2 3
      src/templates/chatroom.html
  4. 2 2
      src/templates/controlbox.html

+ 4 - 5
converse.js

@@ -1197,7 +1197,7 @@
                 'click .end-otr': 'endOTR',
                 'click .auth-otr': 'authOTR',
                 'click .toggle-call': 'toggleCall',
-                'mousedown .dragresize-tm': 'onDragResizeStart'
+                'mousedown .dragresize': 'onDragResizeStart'
             },
 
             initialize: function () {
@@ -2017,8 +2017,7 @@
                         callback.apply(this, arguments);
                     }
                     if (converse.connection.connected) {
-                        // Without a connection, we haven't yet initialized
-                        // localstorage
+                        // Without a connection, we haven't yet initialized localstorage
                         this.model.save();
                         this.initDragResize();
                     }
@@ -2375,7 +2374,7 @@
             events: {
                 'click a.close-chatbox-button': 'close',
                 'click ul#controlbox-tabs li a': 'switchTab',
-                'mousedown .dragresize-tm': 'onDragResizeStart'
+                'mousedown .dragresize': 'onDragResizeStart'
             },
 
             initialize: function () {
@@ -2734,7 +2733,7 @@
                 'click .toggle-call': 'toggleCall',
                 'click .toggle-participants a': 'toggleOccupants',
                 'keypress textarea.chat-textarea': 'keyPressed',
-                'mousedown .dragresize-tm': 'onDragResizeStart'
+                'mousedown .dragresize': 'onDragResizeStart'
             },
             is_chatroom: true,
 

+ 2 - 2
src/templates/chatbox.html

@@ -1,5 +1,5 @@
-<div class="box-flyout" style="height: {{height}}px">
-    <div class="dragresize dragresize-tm"></div>
+<div class="box-flyout" {[ if (height) { ]} style="height: {{height}}px" {[ } ]}>
+    <div class="dragresize"></div>
     <div class="chat-head chat-head-chatbox">
         <a class="close-chatbox-button icon-close"></a>
         <a class="toggle-chatbox-button icon-minus"></a>

+ 2 - 3
src/templates/chatroom.html

@@ -1,6 +1,5 @@
-<div class="box-flyout" style="height: {{height}}px"
-    {[ if (minimized) { ]} style="display:none" {[ } ]}>
-    <div class="dragresize dragresize-tm"></div>
+<div class="box-flyout" {[ if (height) { ]} style="height: {{height}}px" {[ } ]}>
+    <div class="dragresize"></div>
     <div class="chat-head chat-head-chatroom">
         <a class="close-chatbox-button icon-close"></a>
         <a class="toggle-chatbox-button icon-minus"></a>

+ 2 - 2
src/templates/controlbox.html

@@ -1,5 +1,5 @@
-<div class="box-flyout" style="height: {{height}}px">
-    <div class="dragresize dragresize-tm"></div>
+<div class="box-flyout" {[ if (height) { ]} style="height: {{height}}px" {[ } ]}>
+    <div class="dragresize"></div>
     <div class="chat-head controlbox-head">
         <ul id="controlbox-tabs"></ul>
         <a class="close-chatbox-button icon-close"></a>