Changeset e11e2c


Ignore:
Timestamp:
Aug 20, 2008, 6:37:22 PM (12 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
49dcdd
Parents:
a26656
Message:

changed and repaired for seamonkey 1.11.1

Location:
chrome/content/v_identity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_notificationBar.js

    ra26656 re11e2c  
    9797    clear : function() {
    9898        if (!vI_notificationBar.Obj_vINotification) return;
    99         // workaround, seems that my usage of notificationbox doesn't display multiple lines
    100         vI_notificationBar.Obj_vINotification.height = 0;
     99        if (vI_notificationBar.timer) window.clearTimeout(vI_notificationBar.timer);
     100        vI_notificationBar.timer = null;
    101101        vI_notificationBar.Obj_vINotification.removeAllNotifications(false);
    102102    },
     
    172172    },
    173173   
    174     hide : function() {
    175         vI_notificationBar.timer = null;
    176         vI_notificationBar.clear()
    177     },
    178    
    179174    setNote: function(note, prefstring, title) {
    180175        vI_notificationBar.clear();
     
    185180        // height will be cut off from messagepane (in 3pane window)
    186181        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;
    191185        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
    194187        if (tooBig) document.getElementById("vINotificationTextbox").setAttribute("class", "plain border")
    195188    },
     
    198191        if (!title) return;
    199192        vI_notificationBar.dump("** setTitle: " + title + "\n");
    200         var Obj_vvINotificationTitle = document.getElementById("vINotificationTitle");
    201         Obj_vvINotificationTitle.setAttribute("value", title);
    202         Obj_vvINotificationTitle.removeAttribute("hidden");
     193        var Obj_vINotificationTitle = document.getElementById("vINotificationTitle");
     194        Obj_vINotificationTitle.setAttribute("value", title);
     195        Obj_vINotificationTitle.removeAttribute("hidden");
    203196    },
    204197
     
    209202        if (!vI_notificationBar.Obj_vINotification) return;
    210203        if (!vI_notificationBar.versionOk) return;
    211         if (vI_notificationBar.timer) window.clearTimeout(vI_notificationBar.timer);
    212204        var oldNotification = vI_notificationBar.Obj_vINotification.currentNotification
    213205        var newLabel = (oldNotification)?oldNotification.label + note:note;
     
    218210
    219211        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,
    221213                vI_notificationBar.preferences.getIntPref("notification_timeout") * 1000);
    222214    },
  • chrome/content/v_identity/vI_notificationBar.xml

    ra26656 re11e2c  
    4141      <field name="_blockingCanvas">null</field>
    4242
     43     
     44      <property name="height"
     45        onget="return this.height;">
     46      </property>
     47     
    4348      <property name="notificationsHidden"
    4449                onget="return this.getAttribute('notificationshidden') == 'true';">
Note: See TracChangeset for help on using the changeset viewer.