From 546b76eeeab7d2100f01ffccd0f7284982641795 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 25 Jul 2012 08:43:03 -0400 Subject: [PATCH] minor changes --- lib/client/viewer.js | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/lib/client/viewer.js b/lib/client/viewer.js index f8141cdf..58ab50ef 100644 --- a/lib/client/viewer.js +++ b/lib/client/viewer.js @@ -6,32 +6,27 @@ CloudCommander.Viewer = {getByClass : function(pClass){ return document.getElementsByClassName(pClass); }}; CloudCommander.Viewer.FancyBox = { - load: function(){ - - var lInit_f = (function(pParent){ - return function(){ - $(".fancybox").fancybox({ - openEffect : 'none', - closeEffect : 'none', - overlay : { - opacity: 0.1, - css : { - 'background-color' : '#fff' - } + init: (function(){ + $(".fancybox").fancybox({ + openEffect : 'none', + closeEffect : 'none', + helpers : { + overlay : { + opacity: 0.1, + css : { + 'background-color' : '#fff' } - }); - - pParent.set(); - }; - }); - + } + } + }); + }), + load: function(){ CloudCommander.cssLoad({ src : 'http://fancyapps.com/fancybox/source/jquery.fancybox.css' }); CloudCommander.jsload( - 'http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js', - lInit_f(this)); + 'http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js'); }, set: function(){ @@ -55,6 +50,8 @@ CloudCommander.Viewer.FancyBox = { (lA[i].className = 'fancybox') && (lA[i].rel = 'gallery'); } + + this.init(); }catch(pError){ console.log(pError); }