git-svn-id: http://xe-core.googlecode.com/svn/trunk@291 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-06 10:26:58 +00:00
parent 3eefc07577
commit 5b99985858
10 changed files with 110 additions and 8 deletions

View file

@ -99,6 +99,12 @@
// 현재 요청된 act가 있으면 $xml_info에서 type을 찾음, 없다면 기본 action을 이용
if(!$this->act || !$xml_info->action->{$this->act}) $this->act = $xml_info->default_index_act;
// act값이 지정이 안되어 있으면 오류 표시
if(!$this->act) {
$this->error = 'msg_module_is_not_exists';
return;
}
// 설정된 mid가 없을 경우 요청된 act의 standalone 여부 체크
if(!$this->mid && !$xml_info->action->{$this->act}->standalone) {
$this->error = 'msg_module_is_not_standalone';

View file

@ -112,3 +112,25 @@ function svc_folder_close(id) {
close_text_obj.style.display = "none";
folder_obj.style.display = "none";
}
// 팝업의 경우 내용에 맞춰 현 윈도우의 크기를 조절해줌 (모두 잘 되려나..)
function setFixedPopupSize() {
var popup_content = xGetElementById('popup_content');
var ruler1 = xGetElementById('resize_ruler_1');
var ruler2 = xGetElementById('resize_ruler_2');
var ruler_box_1 = xGetElementById("ruler_box_1");
var ruler_box_2 = xGetElementById("ruler_box_2");
if(!xIE4Up) {
var width = xWidth(ruler1);
var height = xHeight(ruler2)+22;
} else {
var width = xWidth(popup_content)+15;
var height = xHeight(popup_content)+50;
}
window.resizeTo(width, height);
ruler_box_1.style.visibility = "hidden";
ruler_box_2.style.visibility = "hidden";
popup_content.style.position = "";
}

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

@ -0,0 +1,4 @@
body {
margin:0px;
padding:0px;
}

BIN
common/tpl/images/blank.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

View file

@ -0,0 +1,18 @@
<!--%import("css/popup.css")-->
<!--#include("./common/tpl/common_header.html")-->
<div style="position:absolute;left:0px;top:0px;" id="popup_content">
{$content}
<div style="position:absolute;left:0px;top:0px;width:100%;height:1px;" id="ruler_box_1">
<img src="./images/blank.gif" width="100%" height="1" border="0" alt="for_resize_popup_window" id="resize_ruler_1" />
</div>
<div style="position:absolute;left:0px;top:0px;height:100%;width:1px;" id="ruler_box_2">
<img src="./images/blank.gif" width="1" height="100%" border="0" alt="for_resize_popup_window" id="resize_ruler_2" />
</div>
</div>
<script type="text/javascript">
xAddEventListener(window, 'load', setFixedPopupSize);
</script>
<!--#include("./common/tpl/common_footer.html")-->

View file

@ -2,8 +2,10 @@
<module>
<actions>
<action name="dispContent" type="view" admin_index="true" standalone="true" />
<action name="dispLayoutMenuInfo" type="view" standalone="true" />
<action name="dispInsertLayout" type="view" standalone="true" />
<action name="dispInsertLayout2" type="view" standalone="true" />
<action name="dispList" type="controller" standalone="true" />
<action name="getLayoutMenuSrl" type="model" standalone="true" />
</actions>
</module>

View file

@ -126,5 +126,18 @@
return $layout_info;
}
/**
* @brief 메뉴 구성을 하기 위해 메뉴 srl을 return
**/
function getLayoutMenuSrl() {
$menu_id = Context::get('menu_id');
$oDB = &DB::getInstance();
$menu_srl = $oDB->getNextSequence();
$this->add('menu_id', $menu_id);
$this->add('menu_srl', $menu_srl);
}
}
?>

View file

@ -49,6 +49,17 @@
$this->setTemplateFile('insert_layout2');
}
/**
* @brief 레이아웃 메뉴의 개별 정보 출력
**/
function dispLayoutMenuInfo() {
// 팝업이기 때문에 팝업용 레이아웃을 지정
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile('popup_layout');
$this->setTemplateFile('layout_menu_info');
}
/**
* @brief 레이아웃 목록을 보여줌

View file

@ -3,22 +3,33 @@ function doEditMenuInfo(sel_obj) {
var obj = sel_obj.options[idx];
if(typeof(obj)=='undefined'||!obj) return;
var value = obj.value;
var text = obj.text;
var menu_srl = obj.value;
var win = window.open("./?module=layout&act=dispLayoutMenuInfo&menu_srl="+menu_srl,"_LayoutMenu","toolbars=no,status=no,resizable=no,width=100,height=100");
win.focus();
}
function completeGetLayoutMenuSrl(ret_obj, response_tags) {
var menu_srl = ret_obj['menu_srl'];
var menu_id = ret_obj['menu_id'];
doEditInsertMenu(menu_id, menu_srl);
}
function doEditInsertMenu(menu_id, menu_srl) {
if(typeof(menu_srl)=='undefined'||!menu_srl) {
return;
}
var item_obj = xGetElementById('default_value_item_'+menu_id);
var listup_obj = xGetElementById('default_value_listup_'+menu_id);
var text = item_obj.value;
if(!text) return;
if(!text || !menu_srl) return;
if(typeof(menu_srl)=='undefined'||!menu_srl) {
var params = new Array();
params['text'] = text;
params['menu_id'] = menu_id;
var response_tags = new Array('error','message','menu_id','menu_srl');
exec_xml('layout', 'getLayoutMenuSrl', params, completeGetLayoutMenuSrl, response_tags);
return;
}
var opt = new Option(text, menu_srl, false, true);
listup_obj.options[listup_obj.length] = opt;

View file

@ -0,0 +1,15 @@
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
afsdlfkjsdfklsadjfsdlakfjsdfkaha<br />
111111111111111111111111111111111111111111111111111111a<br />