From def8ddc63455543cdab82c6495e3f6b58ecaa7f7 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 21 Aug 2017 14:44:48 +0800 Subject: [PATCH] * finish task #3197. --- www/js/my.full.js | 72 +++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/www/js/my.full.js b/www/js/my.full.js index ed0ea9713a..f7beb4b2da 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -1153,45 +1153,49 @@ function setModal() try { var frame$ = window.frames[options.name].$; - if(frame$('#titlebar').length) + frame$(function() { - modal.addClass('with-titlebar'); - if(options.size == 'fullscreen') + if(frame$('#titlebar').length) { - modalBody.css('height', options.height); - } - } - if(options.height == 'auto') - { - var $framebody = frame$('body'); - setTimeout(function() - { - modal.removeClass('fade'); - var fbH = $framebody.addClass('body-modal').outerHeight(); - frame$('#titlebar > .heading a').each(function() + modal.addClass('with-titlebar'); + if(options.size == 'fullscreen') { - var $a = frame$(this); - $a.replaceWith("" + $a.text() + ""); - }); - if(typeof fbH == 'object') fbH = $framebody.height(); - modalBody.css('height', fbH); - ajustModalPosition(); - if(modal.data('first')) modal.data('first', false); - modal.removeClass('modal-loading').addClass('fade'); - }, 100); + modalBody.css('height', options.height); + } + } - $framebody.resize(function() + if(options.height == 'auto') { - var fbH = $framebody.outerHeight(); - if(typeof fbH == 'object') fbH = $framebody.height(); - modalBody.css('height', fbH); - ajustModalPosition(); - }); - } - else - { - modal.removeClass('modal-loading'); - } + var $framebody = frame$('body'); + setTimeout(function() + { + modal.removeClass('fade'); + var fbH = $framebody.addClass('body-modal').outerHeight(); + frame$('#titlebar > .heading a').each(function() + { + var $a = frame$(this); + $a.replaceWith("" + $a.text() + ""); + }); + if(typeof fbH == 'object') fbH = $framebody.height(); + modalBody.css('height', fbH); + ajustModalPosition(); + if(modal.data('first')) modal.data('first', false); + modal.removeClass('modal-loading').addClass('fade'); + }, 100); + + $framebody.resize(function() + { + var fbH = $framebody.outerHeight(); + if(typeof fbH == 'object') fbH = $framebody.height(); + modalBody.css('height', fbH); + ajustModalPosition(); + }); + } + else + { + modal.removeClass('modal-loading'); + } + }) if(frame$) {