summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-05-02 11:06:50 +0200
committerAleksander Machniak <alec@alec.pl>2014-05-02 11:06:50 +0200
commitf923d4bac1493e57306f696b227df22145c3f278 (patch)
tree3158c18085a8a359c1fb372fc5601650713b92cd /program/js/common.js
parent378efddbbe776cdfd9be8c5904afeb4eecf33291 (diff)
Small code improvements
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js7
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;
};