mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
issue 70 file module UX changed
document module develope for document management git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8679 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
99d36039e9
commit
aadeda4f55
23 changed files with 444 additions and 261 deletions
|
|
@ -1,4 +1,7 @@
|
|||
<!--%import("js/document_admin.js")-->
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form id="fo_list" action="./" method="get" class="form">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<h1 class="h1">Document</h1>
|
||||
|
|
@ -42,7 +45,9 @@
|
|||
</div>
|
||||
</form>
|
||||
<div class="modal" id="listManager">
|
||||
<form action="" class="fg form">
|
||||
<form action="./" method="post" class="fg form" id="manageForm">
|
||||
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
||||
<input type="hidden" name="type" value="" />
|
||||
<h2 class="h2">선택한 글 관리</h2>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0" id="documentManageListTable">
|
||||
|
|
@ -52,36 +57,41 @@
|
|||
<th scope="col" class="title">Title</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="q"><label for="midUrl">선택한 글을 다음 위치로 옮기거나 복사할 수 있습니다.</label></p>
|
||||
<p class="q"><label for="site">선택한 글을 다음 위치로 옮기거나 복사할 수 있습니다.</label></p>
|
||||
<div class="a">
|
||||
<input type="text" id="midUrl" />
|
||||
<span class="desc"><a href="#midSuggestion" class="tgFade" onclick="getModuleList();">Find Module ID</a></span>
|
||||
<div id="midSuggestion" class="tgContent">
|
||||
<ul>
|
||||
<li><button type="button">SiteID.ModuleID.Category</button></li>
|
||||
<li><button type="button">naradesign.freeBoard</button></li>
|
||||
<li><button type="button">naradesign.userForum.technique</button></li>
|
||||
<li><button type="button">mygony.freeBoard</button></li>
|
||||
<li><button type="button">mygony.userForum.technique</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="text" name="site_keyword" id="site" />
|
||||
<span class="desc"><a href="#suggestion" class="tgAnchor" onclick="getModuleList();">사이트 찾기</a></span>
|
||||
<p>
|
||||
<select style="width:290px" name="target_module" id="module_list">
|
||||
<option>모듈을 선택하세요.</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<select style="width:290px" name="module_srl" id="mid_list">
|
||||
<option>모듈 아이디를 선택하세요.</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<select id="target_category" name="target_category" style="width:290px">
|
||||
<option>분류를 선택하세요.</option>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
<p class="q"><label for="message">저작자에게 쪽지를 발송해서 이 사실을 알립니다. 작성하지 않으면 발송하지 않습니다.</label></p>
|
||||
<p>
|
||||
<textarea cols="42" rows="3" id="message" style="width:98%"></textarea>
|
||||
<textarea cols="42" rows="3" name="message_content" id="message" style="width:98%"></textarea>
|
||||
</p>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="Move" /></span>
|
||||
<span class="btn"><input type="submit" value="Copy" /></span>
|
||||
<span class="btn"><input type="submit" value="Trash" /></span>
|
||||
<span class="btn"><input type="submit" value="Delete" class="delete" /></span>
|
||||
<button type="submit" name="type" value="trash">{$lang->cmd_trash}</button>
|
||||
<button type="submit" name="type" value="delete">{$lang->cmd_delete}</button>
|
||||
<button type="submit" name="type" value="move">{$lang->cmd_move}</button>
|
||||
<button type="submit" name="type" value="copy">{$lang->cmd_copy}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,46 +28,6 @@ function completeManageDocument(ret_obj) {
|
|||
window.close();
|
||||
}
|
||||
|
||||
/* 선택된 모듈의 카테고리 목록을 가져오는 함수 */
|
||||
function doGetCategoryFromModule(module_srl) {
|
||||
var params = new Array();
|
||||
params['module_srl'] = module_srl;
|
||||
|
||||
var response_tags = ['error','message','categories'];
|
||||
|
||||
exec_xml('document','getDocumentCategories',params, completeGetCategoryFromModules, response_tags);
|
||||
}
|
||||
|
||||
function completeGetCategoryFromModules(ret_obj, response_tags) {
|
||||
var obj = jQuery('#target_category').get(0);
|
||||
var length = obj.options.length;
|
||||
for(var i=0;i<length;i++) obj.remove(0);
|
||||
|
||||
var categories = ret_obj['categories'];
|
||||
if(!categories) return;
|
||||
|
||||
var depth_str = '-';
|
||||
for(var i=0; i < 5; i++) depth_str += depth_str;
|
||||
|
||||
var category_list = categories.split("\n");
|
||||
for(var i=0;i<category_list.length;i++) {
|
||||
var item = category_list[i];
|
||||
|
||||
var pos = item.indexOf(',');
|
||||
var category_srl = item.substr(0,pos);
|
||||
|
||||
var item = item.substr(pos+1, item.length);
|
||||
var pos = item.indexOf(',');
|
||||
var depth = item.substr(0,pos);
|
||||
|
||||
var category_title = item.substr(pos+1,item.length);
|
||||
if(!category_srl || !category_title) continue;
|
||||
|
||||
if (depth > 0) category_title = depth_str.substr(0, depth) + ' ' + category_title;
|
||||
var opt = new Option(category_title, category_srl, false, false);
|
||||
obj.options[obj.options.length] = opt;
|
||||
}
|
||||
}
|
||||
|
||||
function doCancelDeclare() {
|
||||
var document_srl = [];
|
||||
|
|
@ -157,33 +117,119 @@ function getDocumentList() {
|
|||
|
||||
function completeGetDocumentList(ret_obj, response_tags)
|
||||
{
|
||||
var document_list = ret_obj['document_list']['item'];
|
||||
var htmlListBuffer = '';
|
||||
var statusNameList = {"PUBLIC":"Public", "SECRET":"Secret", "PRIVATE":"Private", "TEMP":"Temp"};
|
||||
|
||||
for(var x in document_list)
|
||||
if(ret_obj['document_list'] == null)
|
||||
{
|
||||
var objDocument = document_list[x];
|
||||
htmlListBuffer += '<tr>' +
|
||||
'<td class="title">'+ objDocument.variables.title +'</td>' +
|
||||
'<td>'+ objDocument.variables.nick_name +'</td>' +
|
||||
'<td>'+ statusNameList[objDocument.variables.status] +'</td>' +
|
||||
'<td><input type="checkbox" /></td>' +
|
||||
htmlListBuffer = '<tr>' +
|
||||
'<td colspan="3" style="text-align:center;">'+ret_obj['message']+'</td>' +
|
||||
'</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
var document_list = ret_obj['document_list']['item'];
|
||||
if(!jQuery.isArray(document_list)) document_list = [document_list];
|
||||
for(var x in document_list)
|
||||
{
|
||||
var objDocument = document_list[x];
|
||||
htmlListBuffer += '<tr>' +
|
||||
'<td class="title">'+ objDocument.variables.title +'</td>' +
|
||||
'<td>'+ objDocument.variables.nick_name +'</td>' +
|
||||
'<td>'+ statusNameList[objDocument.variables.status] +'</td>' +
|
||||
'</tr>'+
|
||||
'<input type="hidden" name="cart[]" value="'+objDocument.document_srl+'" />';
|
||||
}
|
||||
}
|
||||
jQuery('#documentManageListTable>tbody').html(htmlListBuffer);
|
||||
}
|
||||
|
||||
function getModuleList()
|
||||
{
|
||||
var params = new Array();
|
||||
var response_tags = ['error', 'message'];
|
||||
var response_tags = ['error', 'message', 'module_list'];
|
||||
var formObj = jQuery("#manageForm").get(0);
|
||||
|
||||
exec_xml('document','procModuleAdminGetList',params, completeGetModuleList, response_tags);
|
||||
params['site_keyword'] = formObj.site_keyword.value;
|
||||
|
||||
exec_xml('module','procModuleAdminGetList',params, completeGetModuleList, response_tags);
|
||||
}
|
||||
|
||||
var module_list = '';
|
||||
function completeGetModuleList(ret_obj, response_tags)
|
||||
{
|
||||
console.log(ret_obj['error']);
|
||||
console.log(ret_obj['message']);
|
||||
var formObj = jQuery("#manageForm").get(0);
|
||||
module_list = ret_obj['module_list'];
|
||||
var htmlListBuffer = '';
|
||||
|
||||
for(var x in module_list)
|
||||
{
|
||||
if(x == 'page') continue;
|
||||
var moduleObject = module_list[x];
|
||||
htmlListBuffer += '<option value="'+x+'">'+moduleObject.title+'</option>';
|
||||
}
|
||||
jQuery('#module_list').html(htmlListBuffer);
|
||||
makeMidList(jQuery('#module_list').val());
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
$('#module_list').bind('change', function(e){
|
||||
makeMidList($('#module_list').val());
|
||||
});
|
||||
$('#mid_list').bind('change', function(e){
|
||||
doGetCategoryFromModule($('#mid_list').val());
|
||||
});
|
||||
});
|
||||
|
||||
function makeMidList(moduleName)
|
||||
{
|
||||
var mid_list = module_list[moduleName].list;
|
||||
var htmlListBuffer = '';
|
||||
for(var x in mid_list)
|
||||
{
|
||||
var moduleInstance = mid_list[x];
|
||||
htmlListBuffer += '<option value="'+moduleInstance.module_srl+'">'+x+'</option>';
|
||||
}
|
||||
jQuery('#mid_list').html(htmlListBuffer);
|
||||
doGetCategoryFromModule(jQuery('#mid_list').val());
|
||||
}
|
||||
|
||||
/* 선택된 모듈의 카테고리 목록을 가져오는 함수 */
|
||||
function doGetCategoryFromModule(module_srl) {
|
||||
var params = new Array();
|
||||
params['module_srl'] = module_srl;
|
||||
|
||||
var response_tags = ['error','message','categories'];
|
||||
|
||||
exec_xml('document','getDocumentCategories',params, completeGetCategoryFromModules, response_tags);
|
||||
}
|
||||
|
||||
function completeGetCategoryFromModules(ret_obj, response_tags) {
|
||||
var obj = jQuery('#target_category').get(0);
|
||||
var length = obj.options.length;
|
||||
for(var i=0;i<length;i++) obj.remove(0);
|
||||
|
||||
var categories = ret_obj['categories'];
|
||||
if(!categories) return;
|
||||
|
||||
var depth_str = '-';
|
||||
for(var i=0; i < 5; i++) depth_str += depth_str;
|
||||
|
||||
var category_list = categories.split("\n");
|
||||
for(var i=0;i<category_list.length;i++) {
|
||||
var item = category_list[i];
|
||||
|
||||
var pos = item.indexOf(',');
|
||||
var category_srl = item.substr(0,pos);
|
||||
|
||||
var item = item.substr(pos+1, item.length);
|
||||
var pos = item.indexOf(',');
|
||||
var depth = item.substr(0,pos);
|
||||
|
||||
var category_title = item.substr(pos+1,item.length);
|
||||
if(!category_srl || !category_title) continue;
|
||||
|
||||
if (depth > 0) category_title = depth_str.substr(0, depth) + ' ' + category_title;
|
||||
var opt = new Option(category_title, category_srl, false, false);
|
||||
obj.options[obj.options.length] = opt;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue