mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
added copy of fancybox for offline mode
This commit is contained in:
parent
eabe0b66c3
commit
5a574028ce
1 changed files with 25 additions and 6 deletions
|
|
@ -2,10 +2,15 @@ var CloudCommander, CloudFunc, $;
|
|||
/* object contains viewer FancyBox
|
||||
* https://github.com/fancyapps/fancyBox
|
||||
*/
|
||||
CloudCommander.Viewer = {getByClass : function(pClass){
|
||||
CloudCommander.Viewer = {
|
||||
dir : CloudCommander.LIBDIRCLIENT + 'viewer/',
|
||||
|
||||
getByClass : function(pClass){
|
||||
return document.getElementsByClassName(pClass);
|
||||
}};
|
||||
CloudCommander.Viewer.FancyBox = {
|
||||
}
|
||||
};
|
||||
CloudCommander.Viewer.FancyBox = {
|
||||
dir : CloudCommander.Viewer.dir + 'fancybox/',
|
||||
/* function return configureation
|
||||
* for FancyBox open and
|
||||
* onclick (it shoud be
|
||||
|
|
@ -36,15 +41,29 @@ CloudCommander.Viewer.FancyBox = {
|
|||
}),
|
||||
load: function(){
|
||||
var ljsLoad_f = function(){
|
||||
CloudCommander.jsload(
|
||||
'http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js');
|
||||
CloudCommander.jsload(
|
||||
'http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js',{
|
||||
onerror: (function(){
|
||||
CloudCommander.jsload(this.dir +
|
||||
'jquery.fancybox.pack.js');
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
CloudCommander.cssLoad({
|
||||
src : 'http://fancyapps.com/fancybox/source/jquery.fancybox.css',
|
||||
func : ljsLoad_f
|
||||
func : {
|
||||
onload: ljsLoad_f,
|
||||
onerror: (function(){
|
||||
CloudCommander.cssLoad({
|
||||
src : this.dir +'jquery.fancybox.css',
|
||||
func : ljsLoad_f
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
set: function(){
|
||||
if(this.getByClass('fancybox').length)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue