diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-05-02 11:06:50 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-05-02 11:06:50 +0200 |
commit | f923d4bac1493e57306f696b227df22145c3f278 (patch) | |
tree | 3158c18085a8a359c1fb372fc5601650713b92cd | |
parent | 378efddbbe776cdfd9be8c5904afeb4eecf33291 (diff) |
Small code improvements
-rw-r--r-- | program/js/common.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/program/js/common.js b/program/js/common.js index ff5f9b9bd..6b7d3240e 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -224,7 +224,7 @@ add_listener: function(p) p.element = document; if (!p.object._rc_events) - p.object._rc_events = []; + p.object._rc_events = {}; var key = p.event + '*' + p.method; if (!p.object._rc_events[key]) @@ -508,8 +508,8 @@ function rcube_mouse_is_over(ev, obj) var mouse = rcube_event.get_mouse_pos(ev), pos = $(obj).offset(); - return ((mouse.x >= pos.left) && (mouse.x < (pos.left + obj.offsetWidth)) && - (mouse.y >= pos.top) && (mouse.y < (pos.top + obj.offsetHeight))); + return (mouse.x >= pos.left) && (mouse.x < (pos.left + obj.offsetWidth)) && + (mouse.y >= pos.top) && (mouse.y < (pos.top + obj.offsetHeight)); }; @@ -521,6 +521,7 @@ function setCookie(name, value, expires, path, domain, secure) (path ? "; path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "; secure" : ""); + document.cookie = curCookie; }; |