Procházet zdrojové kódy

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 před 12 roky
rodič
revize
4737d24b74

+ 8
- 6
src/com/dmdirc/addons/ui_web/res/javascript/dmdirc.js Zobrazit soubor

@@ -17,6 +17,10 @@ function dmdirc_start() {
17 17
     setTimeout(doUpdate, 100);
18 18
 }
19 19
 
20
+function log() {
21
+    console && console.log && console.log.apply(console, arguments);
22
+}
23
+
20 24
 (function() {
21 25
     Treeview = function(element) {
22 26
         this.element = element;
@@ -125,10 +129,7 @@ function dmdirc_start() {
125 129
         },
126 130
 
127 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 135
         hide: function() {
@@ -458,7 +459,7 @@ function updateHandlerFunc(transport) {
458 459
         handlerFunc(transport);
459 460
         doUpdate();
460 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,5 +507,6 @@ function updateErrFunc(transport) {
506 507
 function errFunc(transport) {
507 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 Zobrazit soubor

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

Načítá se…
Zrušit
Uložit