mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 12:32:14 +09:00
Menu Selector
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12569 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
126a697d9c
commit
4ab54bcda0
3 changed files with 66 additions and 11 deletions
|
|
@ -2257,10 +2257,26 @@ jQuery(function($){
|
||||||
return $.tmpl( sMenuTree, {Nodes:sResult} ).get()[0].outerHTML;
|
return $.tmpl( sMenuTree, {Nodes:sResult} ).get()[0].outerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
$.xeShowMenuSelectorIn = function($container){
|
||||||
|
$.xeMenuSelectorVar.$container = $container;
|
||||||
|
var $btn = $container;
|
||||||
|
|
||||||
|
$.xeMenuSelectorVar.bMultiSelect = ""+$btn.data('multiple') == "true";
|
||||||
|
//{sMenuId":"578", "sMenuUrl":"page_ANom60", "sMenuTitle":"wwww", "sType":"WIDGET" }
|
||||||
|
$.xeMenuSelectorVar.aAllowedType = $.grep((""+($btn.data('allowedType') || "")).split(','), function(el){return el !== ""});
|
||||||
|
$.xeMenuSelectorVar.aDisallowedType = $.grep((""+($btn.data('disallowedType') || "")).split(','), function(el){return el !== ""});
|
||||||
|
$.xeMenuSelectorVar.aDisallowedType.push("_ROOT");
|
||||||
|
$.xeMenuSelectorVar.aDisallowedType.push("_SHORTCUT");
|
||||||
|
|
||||||
jQuery(function($){
|
$container.not('._eventBound').addClass('_eventBound').on('change', '.site_selector', function(ev){
|
||||||
|
var sSiteSrl = $(this).val();
|
||||||
|
$.xeShowMenuSelector($container.find('.tree'), sSiteSrl);
|
||||||
|
|
||||||
|
$container.trigger('site_changed');
|
||||||
|
});
|
||||||
|
|
||||||
|
$.exec_json('admin.getSiteAllList', {domain:""}, onSiteAllListCompleted);
|
||||||
|
}
|
||||||
// <a class="x_btn moduleTrigger tgAnchor xe-content-toggler xe-module-search" href="#__module_searcher_0">찾기</a>
|
// <a class="x_btn moduleTrigger tgAnchor xe-content-toggler xe-module-search" href="#__module_searcher_0">찾기</a>
|
||||||
/*
|
/*
|
||||||
$t
|
$t
|
||||||
|
|
@ -2288,6 +2304,8 @@ jQuery(function($){
|
||||||
|
|
||||||
//bMultiSelect = //data-multiple
|
//bMultiSelect = //data-multiple
|
||||||
|
|
||||||
|
$.xeMenuSelectorVar.$container = $.xeMsgBox.$msgBox;
|
||||||
|
|
||||||
$.xeMsgBox.confirmDialog({
|
$.xeMsgBox.confirmDialog({
|
||||||
sTitle : xe.msg_select_menu,
|
sTitle : xe.msg_select_menu,
|
||||||
|
|
||||||
|
|
@ -2323,10 +2341,12 @@ jQuery(function($){
|
||||||
function onSiteAllListCompleted(htRes){
|
function onSiteAllListCompleted(htRes){
|
||||||
var aSiteList = htRes.site_list;
|
var aSiteList = htRes.site_list;
|
||||||
|
|
||||||
$container = $('.x_modal._common .tree');
|
//$container = $('.x_modal._common .tree');
|
||||||
|
$container = $.xeMenuSelectorVar.$container.find('.tree');
|
||||||
|
|
||||||
// show and fill in
|
// show and fill in
|
||||||
var $SiteSelector = $('.x_modal._common .site_selector');
|
//var $SiteSelector = $('.x_modal._common .site_selector');
|
||||||
|
var $SiteSelector = $.xeMenuSelectorVar.$container.find('.site_selector');
|
||||||
|
|
||||||
var nLen = aSiteList.length;
|
var nLen = aSiteList.length;
|
||||||
if(nLen <= 1){
|
if(nLen <= 1){
|
||||||
|
|
@ -2402,6 +2422,7 @@ jQuery(function($){
|
||||||
$('.moduleTrigger').xeMenuSearch();
|
$('.moduleTrigger').xeMenuSearch();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//----------------menu selector end
|
//----------------menu selector end
|
||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||||
<input type="hidden" name="module" value="document" />
|
<input type="hidden" name="module" value="document" />
|
||||||
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
||||||
<input type="hidden" name="type" value="" />
|
<input type="hidden" name="type" value="" />
|
||||||
|
<input type="hidden" name="module_srl" value="" />
|
||||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}" />
|
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}" />
|
||||||
<div class="x_modal-header">
|
<div class="x_modal-header">
|
||||||
<h3>{$lang->document_manager}: <span class="_sub"></span></h3>
|
<h3>{$lang->document_manager}: <span class="_sub"></span></h3>
|
||||||
|
|
@ -138,8 +139,8 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||||
<section class="moveTree">
|
<section class="moveTree">
|
||||||
<h1>{$lang->msg_select_menu}</h1>
|
<h1>{$lang->msg_select_menu}</h1>
|
||||||
<p>{$lang->selected_document_move}</p>
|
<p>{$lang->selected_document_move}</p>
|
||||||
<div class="tree">
|
<div class="tree _menuSelector">
|
||||||
<!-- Tree Here -->
|
<select class="site_selector" style="width:100%;display:none"></select><div class="tree" style="height:250px;overflow-y:scroll;border:1px solid #aaa"></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -177,7 +178,23 @@ jQuery(function($){
|
||||||
if(thisValue == 'trash' || thisValue == 'delete' || thisValue == 'cancelDeclare'){
|
if(thisValue == 'trash' || thisValue == 'delete' || thisValue == 'cancelDeclare'){
|
||||||
$modalBody.removeClass('showTree');
|
$modalBody.removeClass('showTree');
|
||||||
} else if(thisValue == 'move' || thisValue == 'copy') {
|
} else if(thisValue == 'move' || thisValue == 'copy') {
|
||||||
|
$.xeShowMenuSelectorIn($('._menuSelector'));
|
||||||
|
|
||||||
$modalBody.addClass('showTree');
|
$modalBody.addClass('showTree');
|
||||||
|
$tree = $('._menuSelector .tree');
|
||||||
|
$tree.bind('select_node.jstree', function(a,b){
|
||||||
|
var aSelected = [];
|
||||||
|
$tree.find('.jstree-clicked').each(function(idx, el){
|
||||||
|
var htParam = $.parseJSON($(this).attr('data-param'));
|
||||||
|
aSelected.push({browser_title: htParam.sMenuTitle, mid: htParam.sMenuUrl, module_srl: htParam.sModuleSrl, menu_id: htParam.sMenuId, type: htParam.sType});
|
||||||
|
//module_srl
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#manageForm input[name=module_srl]').val(aSelected[0].module_srl);
|
||||||
|
});
|
||||||
|
$('._menuSelector').bind('site_changed', function(){
|
||||||
|
$('#manageForm input[name=module_srl]').val('');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||||
<input type="hidden" name="module" value="document" />
|
<input type="hidden" name="module" value="document" />
|
||||||
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
||||||
<input type="hidden" name="type" value="" />
|
<input type="hidden" name="type" value="" />
|
||||||
|
<input type="hidden" name="module_srl" value="" />
|
||||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'is_secret', $is_secret, 'search_target', $search_target, 'search_keyword', $search_keyword)}" cond="!empty($search_target) && !empty($search_keyword)" />
|
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'is_secret', $is_secret, 'search_target', $search_target, 'search_keyword', $search_keyword)}" cond="!empty($search_target) && !empty($search_keyword)" />
|
||||||
<div class="x_modal-header">
|
<div class="x_modal-header">
|
||||||
<h3>{$lang->document_manager}: <span class="_sub"></span></h3>
|
<h3>{$lang->document_manager}: <span class="_sub"></span></h3>
|
||||||
|
|
@ -149,8 +150,8 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||||
<section class="moveTree" hidden>
|
<section class="moveTree" hidden>
|
||||||
<h1>{$lang->msg_select_menu}</h1>
|
<h1>{$lang->msg_select_menu}</h1>
|
||||||
<p>{$lang->selected_document_move}</p>
|
<p>{$lang->selected_document_move}</p>
|
||||||
<div class="tree">
|
<div class="tree _menuSelector">
|
||||||
<!-- Tree Here -->
|
<select class="site_selector" style="width:100%;display:none"></select><div class="tree" style="height:250px;overflow-y:scroll;border:1px solid #aaa"></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -188,7 +189,23 @@ jQuery(function($){
|
||||||
if(thisValue == 'trash' || thisValue == 'delete'){
|
if(thisValue == 'trash' || thisValue == 'delete'){
|
||||||
$modalBody.removeClass('showTree');
|
$modalBody.removeClass('showTree');
|
||||||
} else if(thisValue == 'move' || thisValue == 'copy') {
|
} else if(thisValue == 'move' || thisValue == 'copy') {
|
||||||
|
$.xeShowMenuSelectorIn($('._menuSelector'));
|
||||||
|
|
||||||
$modalBody.addClass('showTree');
|
$modalBody.addClass('showTree');
|
||||||
|
$tree = $('._menuSelector .tree');
|
||||||
|
$tree.bind('select_node.jstree', function(a,b){
|
||||||
|
var aSelected = [];
|
||||||
|
$tree.find('.jstree-clicked').each(function(idx, el){
|
||||||
|
var htParam = $.parseJSON($(this).attr('data-param'));
|
||||||
|
aSelected.push({browser_title: htParam.sMenuTitle, mid: htParam.sMenuUrl, module_srl: htParam.sModuleSrl, menu_id: htParam.sMenuId, type: htParam.sType});
|
||||||
|
//module_srl
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#manageForm input[name=module_srl]').val(aSelected[0].module_srl);
|
||||||
|
});
|
||||||
|
$('._menuSelector').bind('site_changed', function(){
|
||||||
|
$('#manageForm input[name=module_srl]').val('');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue