#18386578 #18532765 #18889382 팝업창 관련 이슈 정리

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7463 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2010-05-17 09:46:58 +00:00
parent 91da6eb39d
commit 2fa0272893
6 changed files with 40 additions and 54 deletions

4
common/css/popup.css Normal file
View file

@ -0,0 +1,4 @@
@charset "utf-8";
body { overflow:hidden; }
table.colTable { margin:0; }

View file

@ -523,57 +523,36 @@ function zbxe_folder_close(id) {
* 팝업의 내용에 맞게 크기를 늘리는 것은... 쉽게 되지는 않음.. . * 팝업의 내용에 맞게 크기를 늘리는 것은... 쉽게 되지는 않음.. .
* popup_layout 에서 window.onload 자동 요청됨. * popup_layout 에서 window.onload 자동 요청됨.
**/ **/
var _popupHeight = 0;
function setFixedPopupSize() { function setFixedPopupSize() {
var headerObj = jQuery('#popHeader'); var $ = jQuery;
var bodyObj = jQuery('#popBody'); var $header = $('#popHeader');
var $body = $('#popBody');
if(bodyObj.length) { if ($body.length) {
if(bodyObj.height() > 400) { if ($body.height() > 400) {
bodyObj.css({ overflowY:'scroll', overflowX:'hidden', height:400 }); $body.css({ overflow:'auto', overflowX:'hidden', height:400+'px' });
} }
} }
bodyObj.css({paddingRight:30}); var $win = $(window);
var $pc = $('#popup_content');
var w = Math.max($pc[0].offsetWidth, 600);
var h = $pc[0].offsetHeight;
var dw = $win.width();
var dh = $win.height();
var _w = 0, _h = 0;
var w = jQuery("#popup_content").width(); if (w != dw) _w = w - dw;
w = w< 600 ? 600 : w; if (h != dh) _h = h - dh;
var h = jQuery("#popup_content").height();
if(h != _popupHeight) { if (_w || _h) {
_popupHeight = h; window.resizeBy(_w, _h);
}
jQuery('div').each(function() { var ww = jQuery(this).width(); if(jQuery.inArray(this.id, ['waitingforserverresponse', 'fororiginalimagearea', 'fororiginalimageareabg']) == -1) { if(ww > w) w = ww; } }); if (!arguments.callee.executed) {
jQuery('table').each(function() { var ww = jQuery(this).width(); if(ww > w) w = ww; }); setTimeout(setFixedPopupSize, 300);
jQuery('form').each(function() { var ww = jQuery(this).width(); if(ww > w) w = ww; }); arguments.callee.executed = true;
}
jQuery("#popup_content").width(w);
jQuery("#popHeader").width(w);
jQuery("#popFooter").width(w);
window.resizeTo(w, h);
// 윈도우 OS에서는 브라우저별로 미세 조절이 필요
var moreW = 0;
if(navigator.userAgent.toLowerCase().indexOf('windows') > 0) {
if(jQuery.browser.opera) moreW += 9;
else if(jQuery.browser.msie) moreW += 10;
else if(jQuery.browser.mozilla) moreW += 8;
else if(jQuery.browser.safari) {
moreW += 4;
h -= 12;
}
}
var h1 = jQuery(window).height();
if(!/chrome/.test(navigator.userAgent.toLowerCase())) {
window.resizeBy(moreW, h-h1+5);
} else {
window.resizeBy(10,60);
}
window.scrollTo(0,0);
}
setTimeout(setFixedPopupSize, 300);
} }
/** /**

View file

@ -7,6 +7,6 @@
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
xAddEventListener(window, 'load', setFixedPopupSize); jQuery(window).load(setFixedPopupSize);
var _isPoped = true; var _isPoped = true;
</script> </script>

View file

@ -1,5 +1,7 @@
<!--%import("js/menu_admin.js")--> <!--%import("js/menu_admin.js")-->
<div id="popHeader" class="wide"> <!--%import("../../common/css/popup.css")-->
<div id="popHeader">
<h3 class="xeAdmin">{$lang->cmd_search_mid}</h3> <h3 class="xeAdmin">{$lang->cmd_search_mid}</h3>
</div> </div>

View file

@ -1,12 +1,13 @@
<!--%import("./filter/insert_lang.xml")--> <!--%import("./filter/insert_lang.xml")-->
<!--%import("./js/module_admin.js")--> <!--%import("./js/module_admin.js")-->
<!--%import("../../common/css/popup.css")-->
<div id="popHeader" class="wide"> <div id="popHeader">
<h3 class="xeAdmin">{$lang->lang_code}</h3> <h3 class="xeAdmin">{$lang->lang_code}</h3>
</div> </div>
<div id="popBody" style="width:700px;"> <div id="popBody">
<table cellspacing="0" class="colTable" style="width:700px;"> <table cellspacing="0" class="colTable">
<col width="50%"/> <col width="50%"/>
<col width="50%"/> <col width="50%"/>
<tr> <tr>
@ -60,5 +61,5 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
xAddEventListener(window,'load', doFillLangName); jQuery(function(){ doFillLangName() });
</script> </script>

View file

@ -1,6 +1,7 @@
<!--%import("./js/module_admin.js")--> <!--%import("./js/module_admin.js")-->
<!--%import("../../common/css/popup.css")-->
<div id="popHeader" class="wide"> <div id="popHeader">
<h3 class="xeAdmin">{$lang->module_selector}</h3> <h3 class="xeAdmin">{$lang->module_selector}</h3>
</div> </div>
@ -74,5 +75,4 @@
</tbody> </tbody>
</table> </table>
</form> </form>
</div> </div>