diff --git a/module/webapp/js/common.js b/module/webapp/js/common.js index ec481da61c..6034ebc59d 100644 --- a/module/webapp/js/common.js +++ b/module/webapp/js/common.js @@ -64,10 +64,10 @@ $(function() }}); } - if($('a.webapp').length) $("a.webapp").modalTrigger({width:700, type:'iframe'}); - if($('a.apiapp').length) $("a.apiapp").modalTrigger({width:700, type:'iframe'}); - $('.runapp.popup').modalTrigger({width:700, type:'iframe'}); - $('.runapp:not(.popup)').modalTrigger({size:'fullscreen', type:'iframe', cssClass:'app-inside'}); + $("a.webapp").modalTrigger({width:700, type:'iframe', icon: 'th-large'}); + $("a.apiapp").modalTrigger({width:700, type:'iframe', icon: 'th-large'}); + $('.runapp.popup').modalTrigger({type:'iframe', icon: 'th-large', waittime: 1000}); + $('.runapp:not(.popup)').modalTrigger({size:'fullscreen', type:'iframe', cssClass:'app-inside', waittime: 1000}); setSize($('#target').val()); $('#target').change(function(){setSize($(this).val())}); diff --git a/module/webapp/view/obtain.html.php b/module/webapp/view/obtain.html.php index 1900ea35af..d2102308d8 100644 --- a/module/webapp/view/obtain.html.php +++ b/module/webapp/view/obtain.html.php @@ -77,7 +77,7 @@ -

show();?>

+
show();?>
webapp->errorOccurs;?>
webapp->errorGetExtensions;?>
diff --git a/www/js/my.full.js b/www/js/my.full.js index c0e9bdd3c2..58a96fced9 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -901,6 +901,7 @@ function setModal() name: 'modalIframe', cssClass: '', headerless: false, + waittime: 0, center: true } @@ -938,58 +939,81 @@ function setModal() { dialog.addClass(options.cssClass); } + + if(options.waittime > 0) + { + options.waitingFuc = setTimeout(function(){showModal(options, modal, modalBody);}, options.waittime ); + } + var frame = document.getElementById(options.name); frame.onload = frame.onreadystatechange = function() { - if (this.readyState && this.readyState != 'complete') return; + + if(this.readyState && this.readyState != 'complete') return; + if(!modal.hasClass('modal-loading')) return; if(!modal.data('first')) modal.addClass('modal-loading'); - modalBody.css('height', options.height - modal.find('.modal-header').outerHeight()); - - try + if(options.waittime > 0) { - var $frame = $(window.frames[options.name].document); - if($frame.find('#titlebar').length) + clearTimeout(options.waitingFuc); + } + showModal(options, modal, modalBody); + } + modal.modal('show'); + } + + function showModal(options, modal, modalBody) + { + modalBody.css('height', options.height - modal.find('.modal-header').outerHeight()); + try + { + var $frame = $(window.frames[options.name].document); + if($frame.find('#titlebar').length) + { + modal.addClass('with-titlebar'); + if(options.size == 'fullscreen') { - modal.addClass('with-titlebar'); - if(options.size == 'fullscreen') - { - modalBody.css('height', options.height); - } + modalBody.css('height', options.height); } - if(options.height == 'auto') + } + if(options.height == 'auto') + { + var $framebody = $frame.find('body'); + setTimeout(function() { - var $framebody = $frame.find('body'); - setTimeout(function() + var fbH = $framebody.addClass('body-modal').outerHeight(); + if(typeof fbH == 'object') fbH = $framebody.height(); + modalBody.css('height', fbH); + if(options.center) dialog.css('margin-top', Math.max(0, (modal.height() - dialog.height())/3)); + modal.removeClass('modal-loading'); + if(modal.data('first')) modal.data('first', false); + }, 100); + + if(navigator.userAgent.indexOf("MSIE 8.0") < 0) + { + $framebody.resize(function() { var fbH = $framebody.addClass('body-modal').outerHeight(); if(typeof fbH == 'object') fbH = $framebody.height(); modalBody.css('height', fbH); - if(options.center) dialog.css('margin-top', Math.max(0, (modal.height() - dialog.height())/3)); - modal.removeClass('modal-loading'); - if(modal.data('first')) modal.data('first', false); - }, 100); - - if(navigator.userAgent.indexOf("MSIE 8.0") < 0) - { - $framebody.resize(function() - { - var fbH = $framebody.addClass('body-modal').outerHeight(); - if(typeof fbH == 'object') fbH = $framebody.height(); - modalBody.css('height', fbH); - }); - } - } - - var iframe$ = window.frames[options.name].$; - if(iframe$) - { - iframe$.extend({'closeModal': $.closeModal}); + }); } } - catch(e){modal.removeClass('modal-loading');} + else + { + modal.removeClass('modal-loading'); + } + + var iframe$ = window.frames[options.name].$; + if(iframe$) + { + iframe$.extend({'closeModal': $.closeModal}); + } + } + catch(e) + { + modal.removeClass('modal-loading'); } - modal.modal('show'); } function initModalFrame(setting) diff --git a/www/theme/default/style.css b/www/theme/default/style.css index 4fec8d17b0..05e3adb65e 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -588,6 +588,7 @@ body {font-size: 13px; color:#141414;padding-bottom: 40px;} .modal-dialog.fullscreen {width: 100% !important; height: 100% !important; margin: 0; border: none !important;} .modal-dialog.fullscreen .modal-body iframe {height: 100%} +.modal-loading {overflow: hidden;} .modal-loading .modal-dialog {margin-top: -100%!important;} .loader {display: none} .modal-loading .loader{position: absolute; display: block; text-align: center; font-size: 56px; color: #fff; top: 35%; width: 100%} @@ -611,26 +612,26 @@ body {font-size: 13px; color:#141414;padding-bottom: 40px;} #debugPanel {display: none} /* === Responsive === */ -@media (max-width: 1199px) -{ /* laptop */ +@media (max-width: 1199px) /* laptop */ +{ #mainmenu .nav > li > a {padding: 7px 14px} } -@media (max-width: 991px) -{ /* taplet */ +@media (max-width: 991px) /* taplet */ +{ #mainmenu .nav > li > a {padding: 7px 12px} #searchbox {width: 150px;} #typeSelector .btn, #objectSwitcher .btn{padding-left: 5px;} #modulemenu .nav > li > a {padding: 0 5px;} } -@media (max-width: 767px) -{ /* phone */ +@media (max-width: 767px) /* phone */ +{ #mainmenu .nav > li > a {padding: 5px 9px; font-size: 14px} #mainmenu .nav > li > a > span {display: none} #searchbox {width: 120px;} #featurebar .nav {float: none} #featurebar .nav > li > a {padding: 0 2px; font-size: 13px} } -@media (max-width: 600px) -{ /* small phone */ +@media (max-width: 600px) /* small phone */ +{ #searchbox {display: none} }