refactor(view) rm rmKeys

This commit is contained in:
coderaiser 2014-04-24 04:32:22 -04:00
parent eaa8b5c184
commit 879baf636e
2 changed files with 11 additions and 9 deletions

View file

@ -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);

View file

@ -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);