diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 9d18cf357..c933f2870 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -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'; diff --git a/common/js/common.js b/common/js/common.js index 914642f92..b9c8060d8 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -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 = ""; +} diff --git a/common/tpl/css/popup.css b/common/tpl/css/popup.css new file mode 100644 index 000000000..b9abf669f --- /dev/null +++ b/common/tpl/css/popup.css @@ -0,0 +1,4 @@ +body { + margin:0px; + padding:0px; +} diff --git a/common/tpl/images/blank.gif b/common/tpl/images/blank.gif new file mode 100644 index 000000000..35d42e808 Binary files /dev/null and b/common/tpl/images/blank.gif differ diff --git a/common/tpl/popup_layout.html b/common/tpl/popup_layout.html new file mode 100644 index 000000000..94c0817c3 --- /dev/null +++ b/common/tpl/popup_layout.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/modules/layout/conf/module.xml b/modules/layout/conf/module.xml index df1f174fa..c65d76b60 100644 --- a/modules/layout/conf/module.xml +++ b/modules/layout/conf/module.xml @@ -2,8 +2,10 @@ + + diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index 991813b31..542694395 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -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); + } } ?> diff --git a/modules/layout/layout.view.php b/modules/layout/layout.view.php index 6a0c5ba4f..1951240b4 100644 --- a/modules/layout/layout.view.php +++ b/modules/layout/layout.view.php @@ -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 레이아웃 목록을 보여줌 diff --git a/modules/layout/tpl.admin/js/admin.js b/modules/layout/tpl.admin/js/admin.js index 6661a8a2d..0f33ac201 100644 --- a/modules/layout/tpl.admin/js/admin.js +++ b/modules/layout/tpl.admin/js/admin.js @@ -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; diff --git a/modules/layout/tpl.admin/layout_menu_info.html b/modules/layout/tpl.admin/layout_menu_info.html new file mode 100644 index 000000000..1923ff671 --- /dev/null +++ b/modules/layout/tpl.admin/layout_menu_info.html @@ -0,0 +1,15 @@ +afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+afsdlfkjsdfklsadjfsdlakfjsdfkaha
+111111111111111111111111111111111111111111111111111111a