feature(dom) Notify click: add focus

This commit is contained in:
coderaiser 2013-11-15 10:31:54 +00:00
parent 18671806ad
commit ad4e3cc645

View file

@ -655,12 +655,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
}, window);
this.send = function(msg) {
var notify, granted = Notify.check();
var notify,
focus = window.focus.bind(window),
granted = Notify.check();
if (granted && Show)
if (granted && Show) {
notify = new Notification(msg, {
icon: '/img/favicon/favicon-notify.png',
});
Events.addClick(focus, notify);
}
};
this.check = function () {