mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fixed bug with opening images (f3, enter, left, right, f3)
This commit is contained in:
parent
94d718a39c
commit
eabe0b66c3
1 changed files with 28 additions and 21 deletions
|
|
@ -6,27 +6,34 @@ CloudCommander.Viewer = {getByClass : function(pClass){
|
|||
return document.getElementsByClassName(pClass);
|
||||
}};
|
||||
CloudCommander.Viewer.FancyBox = {
|
||||
config: {
|
||||
beforeShow : (function(){
|
||||
/* function return configureation
|
||||
* for FancyBox open and
|
||||
* onclick (it shoud be
|
||||
* different objects)
|
||||
*/
|
||||
getConfig: (function(){
|
||||
return{
|
||||
beforeShow : (function(){
|
||||
CloudCommander.keyBinded = false;
|
||||
}),
|
||||
beforeClose: (function(){
|
||||
CloudCommander.keyBinded = true;
|
||||
}),
|
||||
|
||||
openEffect : 'none',
|
||||
closeEffect : 'none',
|
||||
|
||||
helpers : {
|
||||
overlay : {
|
||||
opacity: 0.1,
|
||||
css : {
|
||||
'background-color' : '#fff'
|
||||
}),
|
||||
beforeClose: (function(){
|
||||
CloudCommander.keyBinded = true;
|
||||
}),
|
||||
|
||||
openEffect : 'none',
|
||||
closeEffect : 'none',
|
||||
|
||||
helpers : {
|
||||
overlay : {
|
||||
opacity: 0.1,
|
||||
css : {
|
||||
'background-color' : '#fff'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
padding : 0
|
||||
},
|
||||
},
|
||||
padding : 0
|
||||
};
|
||||
}),
|
||||
load: function(){
|
||||
var ljsLoad_f = function(){
|
||||
CloudCommander.jsload(
|
||||
|
|
@ -61,7 +68,7 @@ CloudCommander.Viewer.FancyBox = {
|
|||
(lA[i].rel = 'gallery');
|
||||
}
|
||||
|
||||
$('.fancybox').fancybox(this.config);
|
||||
$('.fancybox').fancybox(this.getConfig());
|
||||
}catch(pError){
|
||||
console.log(pError);
|
||||
}
|
||||
|
|
@ -89,7 +96,7 @@ CloudCommander.Viewer.Keys = (function(){
|
|||
|
||||
var lA = lCurrent.getElementsByClassName('fancybox');
|
||||
|
||||
var lConfig = pParent.FancyBox.config;
|
||||
var lConfig = pParent.FancyBox.getConfig();
|
||||
|
||||
lA.length &&
|
||||
$.fancybox.open({ href : lA[0].href },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue