Browse Source

Web UI tidying.

- Fix various issues with overflowing text
- Tidy up logging a bit
- Other minor tidying

Change-Id: I5e1392a2db7c76057c5f80b0be9e2f9c6b0ed3de
Fixes-issue: CLIENT-382
Fixes-issue: CLIENT-381
Fixes-issue: CLIENT-377
Reviewed-on: http://gerrit.dmdirc.com/2490
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
tags/0.7rc1
Chris Smith 12 years ago
parent
commit
4737d24b74

+ 8
- 6
src/com/dmdirc/addons/ui_web/res/javascript/dmdirc.js View File

17
     setTimeout(doUpdate, 100);
17
     setTimeout(doUpdate, 100);
18
 }
18
 }
19
 
19
 
20
+function log() {
21
+    console && console.log && console.log.apply(console, arguments);
22
+}
23
+
20
 (function() {
24
 (function() {
21
     Treeview = function(element) {
25
     Treeview = function(element) {
22
         this.element = element;
26
         this.element = element;
125
         },
129
         },
126
 
130
 
127
         add: function(nick) {
131
         add: function(nick) {
128
-            var entry = document.createElement('li');
129
-            entry.innerHTML = nick;
130
-
131
-            this.element.append(entry);
132
+            this.element.append($('<li>').text(nick));
132
         },
133
         },
133
 
134
 
134
         hide: function() {
135
         hide: function() {
458
         handlerFunc(transport);
459
         handlerFunc(transport);
459
         doUpdate();
460
         doUpdate();
460
     } catch (ex) {
461
     } catch (ex) {
461
-        console && console.log('Exception: ' + ex.stack);
462
+        log('Exception when handling update results', ex);
462
     }
463
     }
463
 }
464
 }
464
 
465
 
506
 function errFunc(transport) {
507
 function errFunc(transport) {
507
     statusbar_settext('Error while perfoming remote call...');
508
     statusbar_settext('Error while perfoming remote call...');
508
 
509
 
509
-    console && console.log(transport.status + "\n" + transport.statusText + "\n" + transport.responseText);
510
+    log('Error when performing remote call, status: ', transport.status,
511
+        ' text: ', transport.statusText, ' response: ', transport.responseText);
510
 }
512
 }

+ 4
- 1
src/com/dmdirc/addons/ui_web/res/style.css View File

71
     border: 1px solid black;
71
     border: 1px solid black;
72
     padding-left: 30px;
72
     padding-left: 30px;
73
     margin: 0px;
73
     margin: 0px;
74
+    overflow-y: auto;
74
 }
75
 }
75
 
76
 
76
 #treeview ul {
77
 #treeview ul {
103
     bottom: 40px;
104
     bottom: 40px;
104
     padding: 4px;
105
     padding: 4px;
105
     border: 1px solid black;
106
     border: 1px solid black;
106
-    overflow: auto;
107
+    overflow-y: auto;
108
+    word-wrap: break-word;
107
 }
109
 }
108
 
110
 
109
 #content p, #wus_requests p {
111
 #content p, #wus_requests p {
129
     margin: 0px;
131
     margin: 0px;
130
     padding: 0px;
132
     padding: 0px;
131
     display: none;
133
     display: none;
134
+    overflow-y: auto;
132
 }
135
 }
133
 
136
 
134
 #nicklist li {
137
 #nicklist li {

Loading…
Cancel
Save