added loading of viewer thrue config.js

This commit is contained in:
coderaiser 2012-08-30 08:07:56 -04:00
parent 931d6637d7
commit 9ee70632ef
2 changed files with 26 additions and 9 deletions

View file

@ -4,10 +4,21 @@ var CloudCommander;
(function(){
"use strict";
CloudCommander.Config = {};
var cloudcmd = CloudCommander;
CloudCommander.Config.Keys = function(){
var Config = {};
Config.Show = (function(){
console.log('config showed');
});
Config.Keys = function(){
console.log('config.js loaded');
cloudcmd.Viewer(function(){
Config.Show();
});
};
cloudcmd.Config = Config;
})();

View file

@ -167,15 +167,21 @@ var CloudCommander, CloudFunc, $;
CloudCommander.Viewer.FancyBox.show = (function(pCurrentFile){
CloudCommander.Viewer.FancyBox.set();
var lA = Util.getByClass('fancybox', pCurrentFile)[0];
var lConfig = this.getConfig();
if(lA){
if(lA.rel)
$.fancybox.open({ href : lA.href },
lConfig);
else this.loadData(lA);
if(typeof pCurrentFile !== 'function'){
var lA = Util.getByClass('fancybox', pCurrentFile)[0];
if(lA){
if(lA.rel)
$.fancybox.open({ href : lA.href },
lConfig);
else this.loadData(lA);
}
}
else {
var lFunc_f = pCurrentFile;
lFunc_f();
}
Util.Images.hideLoad();