mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
init bbox later
This commit is contained in:
parent
6d905be1f8
commit
2f45f419b1
|
|
@ -1374,4 +1374,16 @@ window.baguetteBox = (function () {
|
|||
};
|
||||
})();
|
||||
|
||||
|
||||
function init(){
|
||||
if(thegrid != undefined){
|
||||
thegrid.bagit();
|
||||
}
|
||||
else{
|
||||
console.log('loop');
|
||||
setTimeout(init, 100)
|
||||
}
|
||||
}
|
||||
init();
|
||||
|
||||
J_BBX = 2;
|
||||
|
|
|
|||
|
|
@ -272,8 +272,8 @@
|
|||
{%- if lang != "eng" %}
|
||||
<script src="{{ r }}/.cpr/w/tl/{{ lang }}.js?_={{ ts }}"></script>
|
||||
{%- endif %}
|
||||
<script src="{{ r }}/.cpr/w/baguettebox.js?_={{ ts }}"></script>
|
||||
<script src="{{ r }}/.cpr/w/browser.js?_={{ ts }}"></script>
|
||||
<script src="{{ r }}/.cpr/w/baguettebox.js?_={{ ts }}"></script>
|
||||
<script src="{{ r }}/.cpr/w/up2k.js?_={{ ts }}"></script>
|
||||
{%- if js %}
|
||||
<script src="{{ js }}_={{ ts }}"></script>
|
||||
|
|
@ -281,8 +281,8 @@
|
|||
<script>
|
||||
Date.now(); function jsldp(a, b) { 2 != window[a] && alert("FATAL ERROR: cannot load " + b + ".js due to unreliable network or broken reverse-proxy; try CTRL-SHIFT-R") }
|
||||
jsldp("J_UTL", "util");
|
||||
jsldp("J_BBX", "baguettebox");
|
||||
jsldp("J_BRW", "browser");
|
||||
jsldp("J_BBX", "baguettebox");
|
||||
jsldp("J_U2K", "up2k");
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -6061,7 +6061,7 @@ var showfile = (function () {
|
|||
})();
|
||||
|
||||
|
||||
var thegrid = (function () {
|
||||
window.thegrid = (function () {
|
||||
var lfiles = ebi('files'),
|
||||
gfiles = mknod('div', 'gfiles');
|
||||
|
||||
|
|
@ -6511,7 +6511,7 @@ var thegrid = (function () {
|
|||
}
|
||||
|
||||
r.dirty = false;
|
||||
r.bagit('#ggrid');
|
||||
//r.bagit('#ggrid');
|
||||
r.loadsel();
|
||||
aligngriditems();
|
||||
setTimeout(r.tippen, 20);
|
||||
|
|
@ -6530,12 +6530,15 @@ var thegrid = (function () {
|
|||
}
|
||||
|
||||
r.bagit = function (isrc) {
|
||||
console.log('init image viewer');
|
||||
if (!window.baguetteBox)
|
||||
return;
|
||||
|
||||
if (r.bbox)
|
||||
baguetteBox.destroy();
|
||||
|
||||
if(!isrc)
|
||||
isrc = thegrid.en ? '#ggrid' : '#files'
|
||||
var br = baguetteBox.run(isrc, {
|
||||
noScrollbars: true,
|
||||
duringHide: r.onhide,
|
||||
|
|
|
|||
Loading…
Reference in a new issue