mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(view) rm rmKeys
This commit is contained in:
parent
eaa8b5c184
commit
879baf636e
2 changed files with 11 additions and 9 deletions
|
|
@ -32,7 +32,6 @@ var CloudCmd, Util, DOM, CloudFunc, Terminal;
|
|||
CloudCmd.Socket,
|
||||
/* rm view keys, it ruin terminal */
|
||||
function(callback) {
|
||||
CloudCmd.View.rmKeys(),
|
||||
Socket = CloudCmd.Socket;
|
||||
|
||||
Util.exec(callback);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,14 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
Element, TemplateAudio,
|
||||
Config = {
|
||||
beforeShow : function() {
|
||||
var $overlay = $('.fancybox-overlay'),
|
||||
$wrap = $('.fancybox-wrap'),
|
||||
children = $overlay.children(),
|
||||
length = children.length;
|
||||
|
||||
if (!length)
|
||||
$overlay.append($wrap);
|
||||
|
||||
Images.hide();
|
||||
Key.unsetBind();
|
||||
addOverLayClick();
|
||||
|
|
@ -34,6 +42,9 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
minHeight : 0,
|
||||
padding : 0,
|
||||
preload : 0,
|
||||
keys : null,
|
||||
mouseWheel : false,
|
||||
arrows : false,
|
||||
helpers : {
|
||||
overlay : {
|
||||
closeClick: false
|
||||
|
|
@ -43,14 +54,6 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
|
||||
View.show = show;
|
||||
View.hide = hide;
|
||||
View.rmKeys = rmKeys;
|
||||
|
||||
function rmKeys() {
|
||||
/* remove default key binding
|
||||
* which is ruin terminal
|
||||
*/
|
||||
$.fancybox.defaults.keys = null;
|
||||
}
|
||||
|
||||
function init() {
|
||||
var func = CallBack || Util.bind(show, null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue