mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
fix(contact) window could not be closed
This commit is contained in:
parent
c60c87fef6
commit
3b546f92ac
1 changed files with 12 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ var CloudCmd, Util, DOM, olark;
|
|||
|
||||
function ContactProto(callback) {
|
||||
var Contact = this,
|
||||
Events = DOM.Events,
|
||||
Images = DOM.Images,
|
||||
Key = CloudCmd.Key,
|
||||
Inited = false,
|
||||
|
|
@ -22,11 +23,12 @@ var CloudCmd, Util, DOM, olark;
|
|||
|
||||
olark('api.box.onExpand', Contact.show);
|
||||
olark('api.box.onShow', Contact.show);
|
||||
olark('api.box.onHide', Contact.hide);
|
||||
olark('api.box.onShrink', Contact.hide);
|
||||
|
||||
Util.exec(callback);
|
||||
});
|
||||
|
||||
Events.addKey(onKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +52,15 @@ var CloudCmd, Util, DOM, olark;
|
|||
|
||||
function hide() {
|
||||
Key.setBind();
|
||||
olark('api.box.hide');
|
||||
}
|
||||
|
||||
function onKey(event) {
|
||||
var keyCode = event.keyCode,
|
||||
ESC = Key.ESC;
|
||||
|
||||
if (keyCode === ESC)
|
||||
hide();
|
||||
}
|
||||
|
||||
init(callback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue