fixed bug with opening images (f3, enter, left, right, f3)

This commit is contained in:
coderaiser 2012-07-26 04:14:23 -04:00
parent 94d718a39c
commit eabe0b66c3

View file

@ -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 },