mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +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
|
|
@ -2256,11 +2256,27 @@ jQuery(function($){
|
|||
|
||||
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>
|
||||
/*
|
||||
$t
|
||||
|
|
@ -2287,7 +2303,9 @@ jQuery(function($){
|
|||
}
|
||||
|
||||
//bMultiSelect = //data-multiple
|
||||
|
||||
|
||||
$.xeMenuSelectorVar.$container = $.xeMsgBox.$msgBox;
|
||||
|
||||
$.xeMsgBox.confirmDialog({
|
||||
sTitle : xe.msg_select_menu,
|
||||
|
||||
|
|
@ -2323,10 +2341,12 @@ jQuery(function($){
|
|||
function onSiteAllListCompleted(htRes){
|
||||
var aSiteList = htRes.site_list;
|
||||
|
||||
$container = $('.x_modal._common .tree');
|
||||
//$container = $('.x_modal._common .tree');
|
||||
$container = $.xeMenuSelectorVar.$container.find('.tree');
|
||||
|
||||
// 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;
|
||||
if(nLen <= 1){
|
||||
|
|
@ -2402,6 +2422,7 @@ jQuery(function($){
|
|||
$('.moduleTrigger').xeMenuSearch();
|
||||
|
||||
});
|
||||
|
||||
//----------------menu selector end
|
||||
|
||||
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="act" value="procDocumentManageCheckedDocument" />
|
||||
<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')}" />
|
||||
<div class="x_modal-header">
|
||||
<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">
|
||||
<h1>{$lang->msg_select_menu}</h1>
|
||||
<p>{$lang->selected_document_move}</p>
|
||||
<div class="tree">
|
||||
<!-- Tree Here -->
|
||||
<div class="tree _menuSelector">
|
||||
<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>
|
||||
</section>
|
||||
</div>
|
||||
|
|
@ -177,7 +178,23 @@ jQuery(function($){
|
|||
if(thisValue == 'trash' || thisValue == 'delete' || thisValue == 'cancelDeclare'){
|
||||
$modalBody.removeClass('showTree');
|
||||
} else if(thisValue == 'move' || thisValue == 'copy') {
|
||||
$.xeShowMenuSelectorIn($('._menuSelector'));
|
||||
|
||||
$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="act" value="procDocumentManageCheckedDocument" />
|
||||
<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)" />
|
||||
<div class="x_modal-header">
|
||||
<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>
|
||||
<h1>{$lang->msg_select_menu}</h1>
|
||||
<p>{$lang->selected_document_move}</p>
|
||||
<div class="tree">
|
||||
<!-- Tree Here -->
|
||||
<div class="tree _menuSelector">
|
||||
<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>
|
||||
</section>
|
||||
</div>
|
||||
|
|
@ -188,7 +189,23 @@ jQuery(function($){
|
|||
if(thisValue == 'trash' || thisValue == 'delete'){
|
||||
$modalBody.removeClass('showTree');
|
||||
} else if(thisValue == 'move' || thisValue == 'copy') {
|
||||
$.xeShowMenuSelectorIn($('._menuSelector'));
|
||||
|
||||
$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