Changeset e11e2c
- Timestamp:
- Aug 20, 2008, 6:37:22 PM (12 years ago)
- Branches:
- master
- Children:
- 49dcdd
- Parents:
- a26656
- Location:
- chrome/content/v_identity
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chrome/content/v_identity/vI_notificationBar.js
ra26656 re11e2c 97 97 clear : function() { 98 98 if (!vI_notificationBar.Obj_vINotification) return; 99 // workaround, seems that my usage of notificationbox doesn't display multiple lines100 vI_notificationBar. Obj_vINotification.height = 0;99 if (vI_notificationBar.timer) window.clearTimeout(vI_notificationBar.timer); 100 vI_notificationBar.timer = null; 101 101 vI_notificationBar.Obj_vINotification.removeAllNotifications(false); 102 102 }, … … 172 172 }, 173 173 174 hide : function() {175 vI_notificationBar.timer = null;176 vI_notificationBar.clear()177 },178 179 174 setNote: function(note, prefstring, title) { 180 175 vI_notificationBar.clear(); … … 185 180 // height will be cut off from messagepane (in 3pane window) 186 181 var objMessagepane = document.getElementById("messagepane"); 187 var maxHeight = 1000; 188 if (objMessagepane) maxHeight = parseInt(objMessagepane.boxObject.height / 2) +1 189 var tooBig = (elem.inputField.scrollHeight > maxHeight) 190 var newHeight = (tooBig)?maxHeight:elem.inputField.scrollHeight 182 var maxHeight = (objMessagepane)?parseInt(objMessagepane.boxObject.height / 2)+1:null; 183 var tooBig = (maxHeight)?(elem.inputField.scrollHeight > maxHeight):false; 184 var newHeight = (tooBig)?maxHeight:elem.inputField.scrollHeight; 191 185 elem.height = newHeight; 192 vI_notificationBar.Obj_vINotification.height = newHeight + 24; // a little bigger 193 // give the box a frame if it is to bigger 186 // give the box a frame if it is to big 194 187 if (tooBig) document.getElementById("vINotificationTextbox").setAttribute("class", "plain border") 195 188 }, … … 198 191 if (!title) return; 199 192 vI_notificationBar.dump("** setTitle: " + title + "\n"); 200 var Obj_v vINotificationTitle = document.getElementById("vINotificationTitle");201 Obj_v vINotificationTitle.setAttribute("value", title);202 Obj_v vINotificationTitle.removeAttribute("hidden");193 var Obj_vINotificationTitle = document.getElementById("vINotificationTitle"); 194 Obj_vINotificationTitle.setAttribute("value", title); 195 Obj_vINotificationTitle.removeAttribute("hidden"); 203 196 }, 204 197 … … 209 202 if (!vI_notificationBar.Obj_vINotification) return; 210 203 if (!vI_notificationBar.versionOk) return; 211 if (vI_notificationBar.timer) window.clearTimeout(vI_notificationBar.timer);212 204 var oldNotification = vI_notificationBar.Obj_vINotification.currentNotification 213 205 var newLabel = (oldNotification)?oldNotification.label + note:note; … … 218 210 219 211 if (vI_notificationBar.preferences.getIntPref("notification_timeout") != 0) 220 vI_notificationBar.timer = window.setTimeout(vI_notificationBar. hide,212 vI_notificationBar.timer = window.setTimeout(vI_notificationBar.clear, 221 213 vI_notificationBar.preferences.getIntPref("notification_timeout") * 1000); 222 214 }, -
chrome/content/v_identity/vI_notificationBar.xml
ra26656 re11e2c 41 41 <field name="_blockingCanvas">null</field> 42 42 43 44 <property name="height" 45 onget="return this.height;"> 46 </property> 47 43 48 <property name="notificationsHidden" 44 49 onget="return this.getAttribute('notificationshidden') == 'true';">
Note: See TracChangeset
for help on using the changeset viewer.