- improved "image gallery" initialization on landing page - added navigation to /setup page - updated "blueImpGallery" (fixed some bugs after jQuery 3.0 upgrade) 1.15.2 -> 2.21.3 - updated "blueImpGalleryBootstrap" (fixed some bugs after jQuery 3.0 upgrade) 3.1.1 -> 3.4.2
55 lines
1.5 KiB
JavaScript
55 lines
1.5 KiB
JavaScript
/**
|
|
* Main setupPage application
|
|
*/
|
|
|
|
define([
|
|
'jquery',
|
|
'app/init',
|
|
'app/util'
|
|
], function($, Init, Util) {
|
|
'use strict';
|
|
|
|
var config = {
|
|
splashOverlayClass: 'pf-splash' // class for "splash" overlay
|
|
};
|
|
|
|
/**
|
|
* set page observer
|
|
*/
|
|
var setPageObserver = function(){
|
|
var body = $('body');
|
|
|
|
// collapse ---------------------------------------
|
|
body.find('[data-toggle="collapse"]').css({cursor: 'pointer'}).on('click', function(){
|
|
$(this).find('.pf-animate-rotate').toggleClass('right');
|
|
});
|
|
|
|
// buttons ----------------------------------------
|
|
// exclude "download" && "navigation" buttons
|
|
body.find('.btn').not('.navbar-fixed-bottom .btn').not('[href^="?export"]').on('click', function(e){
|
|
$('.' + config.splashOverlayClass).showSplashOverlay();
|
|
});
|
|
|
|
// tooltips ---------------------------------------
|
|
body.initTooltips();
|
|
|
|
// change url (remove logout parameter)
|
|
if (history.pushState) {
|
|
history.pushState({}, '', location.protocol + '//' + location.host + location.pathname);
|
|
}
|
|
};
|
|
|
|
/**
|
|
* main init "setup" page
|
|
*/
|
|
$(function(){
|
|
|
|
// show app information in browser console --------
|
|
Util.showVersionInfo();
|
|
|
|
// hide splash loading animation ------------------
|
|
$('.' + config.splashOverlayClass).hideSplashOverlay();
|
|
|
|
setPageObserver();
|
|
});
|
|
}); |