var CloudCmd, Util, DOM, CloudFunc, $; (function(CloudCmd, Util, DOM, CloudFunc){ 'use strict'; CloudCmd.View = new ViewProto(CloudCmd, Util, DOM, CloudFunc); function ViewProto(CloudCmd, Util, DOM, CloudFunc){ var Key = CloudCmd.Key, Images = DOM.Images, View = this, Config = { beforeShow : function(){ Images.hideLoad(); Key.unsetBind(); }, afterShow : function(){ var lEditor = DOM.getById('View'); if(lEditor) lEditor.focus(); }, beforeClose : Key.setBind, openEffect : 'none', closeEffect : 'none', autoSize : false, height : window.innerHeight, helpers : { overlay : { css : { 'background' : 'rgba(255, 255, 255, 0.1)' } } }, padding : 0 }; this.init = function(pCallBack){ Util.loadOnLoad([ pCallBack || Util.retExec(View.show, null), load, DOM.jqueryLoad ]); DOM.Events.addKey(listener); DOM.setButtonKey('f3', view); delete View.init; }; /** * function shows FancyBox */ this.show = function(pData){ var lPath; if(pData) $.fancybox(pData, Config); else { lPath = CloudFunc.FS + DOM.getCurrentPath(); if( Util.checkExtension(lPath, ['png','jpg', 'gif','ico']) ) { $.fancybox.open({ href : lPath }, Config); } else DOM.getCurrentData(function(pParams){ $.fancybox('