mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
added fancybox config
This commit is contained in:
parent
33347354b9
commit
b83485906c
1 changed files with 20 additions and 16 deletions
|
|
@ -6,7 +6,21 @@ CloudCommander.Viewer = {getByClass : function(pClass){
|
|||
return document.getElementsByClassName(pClass);
|
||||
}};
|
||||
CloudCommander.Viewer.FancyBox = {
|
||||
load: function(){
|
||||
config: {
|
||||
beforeClose: (function(){
|
||||
CloudCommander.keyBinded = true;
|
||||
}),
|
||||
helpers : {
|
||||
overlay : {
|
||||
opacity: 0.1,
|
||||
css : {
|
||||
'background-color' : '#fff'
|
||||
}
|
||||
}
|
||||
},
|
||||
padding : 0
|
||||
},
|
||||
load: function(){
|
||||
var ljsLoad_f = function(){
|
||||
CloudCommander.jsload(
|
||||
'http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js');
|
||||
|
|
@ -37,7 +51,9 @@ CloudCommander.Viewer.FancyBox = {
|
|||
CloudFunc.checkExtension(lName,['png','jpg']) &&
|
||||
(lA[i].className = 'fancybox') &&
|
||||
(lA[i].rel = 'gallery');
|
||||
}
|
||||
}
|
||||
|
||||
$('.fancybox').fancybox(this.config);
|
||||
}catch(pError){
|
||||
console.log(pError);
|
||||
}
|
||||
|
|
@ -68,20 +84,8 @@ CloudCommander.Viewer.Keys = (function(){
|
|||
var lA = lCurrent.getElementsByClassName('fancybox');
|
||||
|
||||
lA.length &&
|
||||
$.fancybox.open({ href : lA[0].href },{
|
||||
beforeClose: (function(){
|
||||
CloudCommander.keyBinded = true;
|
||||
}),
|
||||
helpers : {
|
||||
overlay : {
|
||||
opacity: 0.1,
|
||||
css : {
|
||||
'background-color' : '#fff'
|
||||
}
|
||||
}
|
||||
},
|
||||
padding : 0
|
||||
});
|
||||
$.fancybox.open({ href : lA[0].href },
|
||||
pParent.FancyBox.config);
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue