mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
모듈 선택기능 추가 (위젯의 단일/다수 위젯 선택, 첵크된 게시글 이동/복사시) 사용되며 virtualSite외의 사이트들도 검색후 선택이 가능하도록 개선
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5298 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3345d21c4e
commit
906bb46d19
83 changed files with 970 additions and 543 deletions
|
|
@ -112,58 +112,6 @@
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 모듈 카테고리 목록을 구함
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
|
||||
// 모듈의 목록을 가져옴
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args->site_srl = $site_module_info->site_srl;
|
||||
$module_list = $oModuleModel->getMidList($args);
|
||||
|
||||
// 사이트 운영자가 아닌 경우
|
||||
if(!$oModuleModel->isSiteAdmin()) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$user_id = $logged_info->user_id;
|
||||
$group_list = $logged_info->group_list;
|
||||
|
||||
if($logged_info->is_admin != 'Y') {
|
||||
foreach($module_list as $key => $val) {
|
||||
$info = $oModuleModel->arrangeModuleInfo($val);
|
||||
|
||||
// 직접 최고 관리자로 지정이 안되어 있으면 그룹을 체크
|
||||
if(!in_array($user_id, $info->admin_id)) {
|
||||
|
||||
$is_granted = false;
|
||||
$manager_group = $info->grants['manager'];
|
||||
if(count($group_list) && count($manager_group)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
if(in_array($group_srl, $manager_group)) {
|
||||
$is_granted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$is_granted) unset($module_list[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 게시판만 뽑자
|
||||
foreach($module_list as $module_srl => $module) {
|
||||
if($module->module != 'board') unset($module_list[$module_srl]);
|
||||
}
|
||||
|
||||
// module_category와 module의 조합
|
||||
if($module_categories) {
|
||||
foreach($module_list as $module_srl => $module) {
|
||||
$module_categories[$module->module_category_srl]->list[$module_srl] = $module;
|
||||
}
|
||||
} else {
|
||||
$module_categories[0]->list = $module_list;
|
||||
}
|
||||
|
||||
|
||||
// 모듈 카테고리 목록과 모듈 목록의 조합
|
||||
if(count($module_list)>1) Context::set('module_list', $module_categories);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,22 +25,12 @@
|
|||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@if(count($document_list) && $module_list)-->
|
||||
<!--@if(count($document_list))-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->move_target_module}</div></th>
|
||||
<td>
|
||||
<select id="target_module" name="target_module" class="w400" onchange="doGetCategoryFromModule(this); return false;">
|
||||
<!--@foreach($module_list as $module_category_srl => $modules )-->
|
||||
<!--@if($modules->title)-->
|
||||
<option disabled="disabled">{$modules->title}</option>
|
||||
<!--@else-->
|
||||
<option disabled="disabled"> </option>
|
||||
<!--@end-->
|
||||
<!--@foreach($modules->list as $key => $val)-->
|
||||
<option value="{$val->module_srl}"> {$val->browser_title} ({$val->mid})</option>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="hidden" name="target_module" id="target_module" value="" />
|
||||
<input type="text" name="_target_module" id="_target_module" class="inputTypeText w300" value="" /><a href="{getUrl('','module','module','act','dispModuleAdminSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_select}</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@ function completeManageDocument(ret_obj) {
|
|||
}
|
||||
|
||||
/* 선택된 모듈의 카테고리 목록을 가져오는 함수 */
|
||||
function doGetCategoryFromModule(obj) {
|
||||
if(!obj) return;
|
||||
var module_srl = obj.options[obj.selectedIndex].value;
|
||||
|
||||
function doGetCategoryFromModule(module_srl) {
|
||||
var params = new Array();
|
||||
params['module_srl'] = module_srl;
|
||||
|
||||
|
|
@ -85,3 +82,11 @@ function doCancelDeclare() {
|
|||
function completeCancelDeclare(ret_obj) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
function insertSelectedModule(id, module_srl, mid, browser_title) {
|
||||
var obj= xGetElementById('_'+id);
|
||||
var sObj = xGetElementById(id);
|
||||
sObj.value = module_srl;
|
||||
obj.value = browser_title+' ('+mid+')';
|
||||
doGetCategoryFromModule(module_srl);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue