mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 06:39:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@310 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6ebf9a84f3
commit
42bc6d7daa
10 changed files with 82 additions and 8 deletions
|
|
@ -10,6 +10,8 @@ function completeInsertLayoutMenu(ret_obj) {
|
|||
var xml_file = ret_obj['xml_file'];
|
||||
var menu_title = ret_obj['menu_title'];
|
||||
var menu_srl = ret_obj['menu_srl'];
|
||||
|
||||
if(!xml_file) return;
|
||||
loadTreeMenu(xml_file, menu_id, "menu_zone_"+menu_id, menu_title, doGetMenuInfo, menu_srl);
|
||||
|
||||
if(!menu_srl) {
|
||||
|
|
@ -31,25 +33,44 @@ function doGetMenuInfo(menu_id, obj) {
|
|||
var fo_obj = xGetElementById("fo_layout");
|
||||
var layout = fo_obj.layout.value;
|
||||
var node_srl = 0;
|
||||
var parent_srl = 0;
|
||||
if(typeof(obj.getAttribute)!="undefined") {
|
||||
node_srl = obj.getAttribute("node_srl");
|
||||
} else {
|
||||
node_srl = obj.node_srl;
|
||||
parent_srl = obj.parent_srl;
|
||||
}
|
||||
|
||||
var params = new Array();
|
||||
params["menu_id"] = menu_id;
|
||||
params["layout"] = layout;
|
||||
params["menu_srl"] = node_srl;
|
||||
params["parent_srl"] = parent_srl;
|
||||
|
||||
// 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다.
|
||||
var response_tags = new Array('error','message','menu_id', 'tpl');
|
||||
exec_xml('layout', 'getMenuTplInfo', params, completeGetMenuInfo, response_tags, params);
|
||||
}
|
||||
|
||||
/* 메뉴 목록 갱신 */
|
||||
function doReloadTreeMenu(menu_id) {
|
||||
var fo_obj = xGetElementById("fo_"+menu_id);
|
||||
if(!fo_obj) return;
|
||||
|
||||
var params = new Array();
|
||||
params["menu_id"] = menu_id;
|
||||
params["layout"] = fo_obj.layout.value;
|
||||
params["layout_srl"] = fo_obj.layout_srl.value;
|
||||
|
||||
// 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다.
|
||||
var response_tags = new Array('error','message','menu_id', 'xml_file', 'menu_title');
|
||||
exec_xml('layout', 'procMakeXmlFile', params, completeInsertLayoutMenu, response_tags, params);
|
||||
}
|
||||
|
||||
/* 빈 메뉴 추가시 사용 */
|
||||
function doInsertLayoutMenu(menu_id) {
|
||||
var params = {node_srl:0}
|
||||
function doInsertLayoutMenu(menu_id, parent_srl) {
|
||||
if(typeof(parent_srl)=='undefined') parent_srl = 0;
|
||||
var params = {node_srl:0, parent_srl:parent_srl}
|
||||
doGetMenuInfo(menu_id, params);
|
||||
deSelectNode();
|
||||
}
|
||||
|
|
@ -58,5 +79,6 @@ function doInsertLayoutMenu(menu_id) {
|
|||
function completeGetMenuInfo(ret_obj, response_tags) {
|
||||
var menu_id = ret_obj['menu_id'];
|
||||
var tpl = ret_obj['tpl'];
|
||||
xInnerHtml("menu_zone_info_"+menu_id, "");
|
||||
xInnerHtml("menu_zone_info_"+menu_id, tpl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
<input type="button" value="{$lang->cmd_insert}" onclick="doInsertLayoutMenu('{$val->id}');return false;" />
|
||||
<input type="button" value="{$lang->cmd_open_all}" onclick="openAllTreeMenu('{$val->id}');return false;" />
|
||||
<input type="button" value="{$lang->cmd_close_all}" onclick="closeAllTreeMenu('{$val->id}');return false;" />
|
||||
<input type="button" value="{$lang->cmd_remake_cache}" onclick="doReloadTreeMenu('{$val->id}');return false;" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<input type="hidden" name="menu_srl" value="{$menu_info->menu_srl}" />
|
||||
<input type="hidden" name="parent_srl" value="{$menu_info->parent_srl}" />
|
||||
|
||||
<table border="1" width="100%">
|
||||
<col width="100" />
|
||||
<col width="*" />
|
||||
|
|
@ -56,7 +58,8 @@
|
|||
<td colspan="2">
|
||||
<input type="submit" value="{$lang->cmd_submit}" />
|
||||
<!--@if($menu_info->name)-->
|
||||
<input type="button" value="{$lang->cmd_delete}" onclick="doDeleteLayoutMenu('{$menu_srl}','{$menu_info->menu_id}');return false"/>
|
||||
<input type="button" value="{$lang->cmd_make_child}" onclick="doInsertLayoutMenu('{$menu_info->menu_id}','{$menu_info->menu_srl}');return false" />
|
||||
<input type="button" value="{$lang->cmd_delete}" onclick="doDeleteLayoutMenu('{$menu_srl}','{$menu_info->menu_id}');return false" />
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue