mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12447 201d5d3c-b55e-5fd7-737f-ddc643e51545
469 lines
17 KiB
HTML
469 lines
17 KiB
HTML
<script>
|
|
xe.lang.msg_empty_search_target = '{$lang->msg_empty_search_target}';
|
|
xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|
</script>
|
|
<load target="js/document_admin.js" usecdn="true" />
|
|
<div class="x_page-header">
|
|
<h1>{$lang->document} <a class="x_icon-question-sign" href="./help/index.html#UMAN_content_document" target="_blank">{$lang->help}</a></h1>
|
|
</div>
|
|
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
|
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
|
</div>
|
|
<form id="fo_list" action="./" method="get">
|
|
<input type="hidden" name="module" value="document" />
|
|
<input type="hidden" name="page" value="{$page}" />
|
|
<table id="documentListTable" class="x_table x_table-striped x_table-hover">
|
|
<caption>
|
|
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}" class="active"|cond="$search_keyword == ''">{$lang->all}<block cond="$search_keyword == ''">({number_format($total_count)})</block></a>
|
|
<i>|</i>
|
|
<a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'N')}" class="active"|cond="$search_target == 'is_secret' && $search_keyword == 'N'">{$status_name_list['PUBLIC']}<block cond="$search_target == 'is_secret' && $search_keyword == 'N'">({number_format($total_count)})</block></a>
|
|
<i>|</i>
|
|
<a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'Y')}" class="active"|cond="$search_target == 'is_secret' && $search_keyword == 'Y'">{$status_name_list['SECRET']}<block cond="$search_target == 'is_secret' && $search_keyword == 'Y'">({number_format($total_count)})</block></a>
|
|
<i>|</i>
|
|
<a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'temp')}" class="active"|cond="$search_target == 'is_secret' && $search_keyword == 'temp'">{$status_name_list['TEMP']}<block cond="$search_target == 'is_secret' && $search_keyword == 'temp'">({number_format($total_count)})</block></a>
|
|
<a class="x_icon-question-sign" href="./help/index.html#UMAN_faq_temp_document" target="_blank">{$lang->help}</a>
|
|
<i>|</i>
|
|
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}">{$lang->cmd_declared_list}</a>
|
|
<i cond="$search_target == 'ipaddress'">|</i>
|
|
<a href="{getUrl('search_target', 'ipaddress')}" class="active" cond="$search_target == 'ipaddress'">{$lang->ipaddress}:{$search_keyword}({number_format($total_count)})</a>
|
|
|
|
<div class="x_btn-group x_pull-right">
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="trash">{$lang->cmd_trash}</a>
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="delete">{$lang->cmd_delete}</a>
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="move">{$lang->cmd_move}</a>
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="copy">{$lang->cmd_copy}</a>
|
|
</div>
|
|
</caption>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="title">{$lang->title}</th>
|
|
<th scope="col" class="nowr">{$lang->writer}</th>
|
|
<th scope="col" class="nowr">{$lang->readed_count}</th>
|
|
<th scope="col" class="nowr">{$lang->cmd_vote}(+/-)</th>
|
|
<th scope="col" class="nowr">{$lang->date}</th>
|
|
<th scope="col" class="nowr">{$lang->ipaddress}</th>
|
|
<th scope="col" class="nowr">{$lang->status}</th>
|
|
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr loop="$document_list => $no, $oDocument">
|
|
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitle()))-->{$oDocument->getTitle()}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
|
|
<td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
|
|
<td class="nowr">{$oDocument->get('readed_count')}</td>
|
|
<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
|
|
<td class="nowr">{$oDocument->getRegdate("Y-m-d H:i")}</td>
|
|
<td class="nowr"><a href="{getUrl('search_target','ipaddress','search_keyword',$oDocument->get('ipaddress'))}">{$oDocument->get('ipaddress')}</a></td>
|
|
<td class="nowr">{$status_name_list[$oDocument->get('status')]}</td>
|
|
<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="x_clearfix">
|
|
<div class="x_btn-group x_pull-right">
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="trash">{$lang->cmd_trash}</a>
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="delete">{$lang->cmd_delete}</a>
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="move">{$lang->cmd_move}</a>
|
|
<a href="#manageForm" class="x_btn modalAnchor" data-value="copy">{$lang->cmd_copy}</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<form action="./" class="x_pagination x_pull-left" style="margin:-36px 0 0 0">
|
|
<input type="hidden" name="error_return_url" value="" />
|
|
<input type="hidden" name="module" value="{$module}" />
|
|
<input type="hidden" name="act" value="{$act}" />
|
|
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
|
|
<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />
|
|
<ul>
|
|
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">« {$lang->first_page}</a></li>
|
|
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
|
|
{@$isGoTo = true}
|
|
<li>
|
|
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
|
<span cond="$isGoTo" id="goTo" class="x_input-append">
|
|
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
|
|
<button type="submit" class="x_add-on">Go</button>
|
|
</span>
|
|
</li>
|
|
</block>
|
|
|
|
<!--@while($page_no = $page_navigation->getNextPage())-->
|
|
{@$last_page = $page_no}
|
|
<li class="x_active"|cond="$page_no == $page"><a href="{getUrl('page', $page_no)}">{$page_no}</a></li>
|
|
<!--@end-->
|
|
|
|
<block cond="$last_page != $page_navigation->last_page && $last_page + 1 != $page_navigation->last_page">
|
|
{@$isGoTo = true}
|
|
<li>
|
|
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">…</a>
|
|
<span cond="$isGoTo" id="goTo" class="x_input-append">
|
|
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
|
|
<button type="submit" class="x_add-on">Go</button>
|
|
</span>
|
|
</li>
|
|
</block>
|
|
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}" title="{$page_navigation->last_page}">{$lang->last_page} »</a></li>
|
|
</ul>
|
|
</form>
|
|
<form action="./" method="get" class="search center x_input-append x_clearfix">
|
|
<input type="hidden" name="module" value="{$module}" />
|
|
<input type="hidden" name="act" value="{$act}" />
|
|
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
|
<input type="hidden" name="error_return_url" value="" />
|
|
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
|
<!--@foreach($lang->search_target_list as $key => $val)-->
|
|
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
|
<!--@end-->
|
|
</select>
|
|
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword)}" title="{$lang->cmd_search}" required />
|
|
<button type="submit" class="x_btn x_btn-inverse">{$lang->cmd_search}</button>
|
|
<button class="x_btn" type="button">{$lang->cmd_cancel}</button>
|
|
</form>
|
|
<form action="./" method="post" class="x_modal" id="manageForm">
|
|
<input type="hidden" name="module" value="document" />
|
|
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
|
<input type="hidden" name="type" 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>
|
|
</div>
|
|
<div class="x_modal-body">
|
|
<table width="100%" id="documentManageListTable" class="x_table x_table-striped x_table-hover">
|
|
<caption>{$lang->selected_document} <strong id="selectedDocumentCount"></strong></caption>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="title">{$lang->title}</th>
|
|
<th scope="col" class="nowr">{$lang->writer}</th>
|
|
<th scope="col" class="nowr">{$lang->status}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
<div class="x_control-group _moveTarget" style="position:relative" hidden>
|
|
<label>{$lang->selected_document_move}</label>
|
|
<input type="text" name="module_srl" class="module_search" />
|
|
</div>
|
|
<div class="x_control-group" style="padding-right:14px">
|
|
<label for="message">{$lang->message_notice}</label>
|
|
<textarea rows="4" cols="42" name="message_content" id="message" style="width:100%"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="x_modal-footer">
|
|
<button type="submit" name="type" value="" class="x_btn x_btn-inverse x_pull-right">{$lang->cmd_confirm}</button>
|
|
<!-- value="trash|delete|move|copy" -->
|
|
</div>
|
|
</form>
|
|
<style>
|
|
.menu_selector {
|
|
position:absolute;
|
|
width:100%;
|
|
border:3px solid green;
|
|
top:100px;
|
|
z-index: 100;
|
|
}
|
|
.menu_selector ul {list-style-type:none; margin:0;}
|
|
.menu_selector .contents {
|
|
border:1px solid black;
|
|
background:white;
|
|
|
|
max-width:500px;
|
|
min-width:300px;
|
|
height:500px;
|
|
box-shadow:10px 10px 5px #888;
|
|
border-radius:5px;
|
|
margin-left:auto;
|
|
margin-right:auto;
|
|
margin-top:20px;
|
|
}
|
|
|
|
@media only screen and (max-width:1024px){
|
|
.menu_selector li {display:inline;}
|
|
.menu_selector .contents {margin-top:0;}
|
|
.menu_selector .contents {background:#afa;}
|
|
}
|
|
|
|
@media only screen and (max-width:800px){
|
|
.menu_selector li {display:inline;}
|
|
.menu_selector .contents {background:#aaf;}
|
|
}
|
|
</style>
|
|
<script>
|
|
jQuery._xeAdminVar = jQuery._xeAdminVar || {};
|
|
|
|
jQuery(function($){
|
|
var $container;
|
|
var aSelectedModules;
|
|
var htNodeInfo;
|
|
var fnOnSelect;
|
|
|
|
$.template( "menuSelector_menuTree", '<ul>{{html Nodes}}</ul>' );
|
|
$.template( "menuSelector_menuTreeNode", ' <li>\
|
|
<a href="#" class="_nodeType_${NodeType} _menu_url_${MenuUrl}" >${MenuTitle}</a>\
|
|
{{html SubTree}}\
|
|
</li>' );
|
|
//data-param=\'{ "sMenuId":"${MenuId}", "sMenuUrl":"${MenuUrl}", "sMenuTitle":"${MenuTitle}" }\'
|
|
function onSiteMapReceived(htData){
|
|
var $ = jQuery;
|
|
|
|
var aMenuList = htData.menuList;
|
|
|
|
var sTreeHtml = createTreeMarkup(aMenuList, 0, "menuSelector_menuTree", "menuSelector_menuTreeNode");
|
|
$container.html(sTreeHtml);
|
|
|
|
$container
|
|
.jstree({
|
|
"plugins" : ["themes","html_data","ui","crrm"],
|
|
|
|
"crrm" : {
|
|
"move" : {
|
|
"check_move" : function (m) {
|
|
var p = this._get_parent(m.o);
|
|
|
|
// root is not draggable
|
|
if(p === -1) return false;
|
|
|
|
// a menu cann't be dragged to a root position
|
|
p = this._get_parent(m.np);
|
|
if(!p) return false;
|
|
|
|
return true;
|
|
}
|
|
}
|
|
},
|
|
|
|
"core" : { }
|
|
})
|
|
.bind("loaded.jstree", function (event, data) {
|
|
data.inst.open_all();
|
|
|
|
var sRenameId = $._xeAdminVar.sRenameOnload;
|
|
$._xeAdminVar.sRenameOnload = null;
|
|
|
|
var sSelectOnload = $._xeAdminVar.sSelectOnload;
|
|
$._xeAdminVar.sSelectOnload = null;
|
|
|
|
if(sRenameId){
|
|
//console.log('renaming', sRenameId);
|
|
$("#siteMapTree").jstree("rename", $("#menu"+sRenameId));
|
|
$("#menu"+sRenameId)[0].scrollIntoView(true);
|
|
}
|
|
|
|
if(sSelectOnload){
|
|
//console.log('selecting', sSelectOnload);
|
|
var el = $("#menu"+sSelectOnload)[0];
|
|
|
|
if(el){
|
|
$("#siteMapTree").jstree("select_node", $(el));
|
|
el.scrollIntoView(true);
|
|
}
|
|
}
|
|
|
|
})
|
|
.bind("select_node.jstree", function(event, data){
|
|
//console.log(data);
|
|
//jstree-clicked
|
|
});
|
|
|
|
// disable sitemap labels and shortcuts.
|
|
$container.find('._nodeType_1, ._nodeType_3').parent('li').addClass('x_disabled');
|
|
|
|
/*
|
|
if(sSelectedModule){
|
|
$container.find('._menu_url_'+sSelectedModule).click();
|
|
}
|
|
*/
|
|
}
|
|
|
|
$.xeShowMenuSelector = function($container_param, fnOnSelect_param, aSelectedModules_param){
|
|
var $ = jQuery;
|
|
|
|
var params = {
|
|
menu_srl : 0
|
|
};
|
|
|
|
$container = $container_param;
|
|
aSelectedModules = aSelectedModules_param;
|
|
fnOnSelect = fnOnSelect_param;
|
|
htNodeInfo = {};
|
|
|
|
$.exec_json("menu.getMenuAdminSiteMap", params, onSiteMapReceived);
|
|
}
|
|
|
|
// return html
|
|
function createTreeMarkup(aNode, sParentSrl, sMenuTree, sMenuTreeNode){
|
|
var $ = jQuery;
|
|
|
|
sMenuTree = sMenuTree || "menuSelector_menuTree";
|
|
sMenuTreeNode = sMenuTreeNode || "menuSelector_menuTreeNode";
|
|
|
|
var $ = jQuery;
|
|
|
|
if(aNode.length == 0){
|
|
return "";
|
|
}
|
|
|
|
var sActiveBtn, sNormalBtn, sHoverBtn, sExpand, sLink, aSubNodes, sNodeSrl, sOpenWindow, sParentSrl, nSelected, sText, sURL, sIsStartModule, aSubNode, sModuleType;
|
|
|
|
// 1: Sitemap node, 2: Menu node
|
|
var nNodeType;
|
|
|
|
var sResult = "";
|
|
var sTargetPanel;
|
|
for(var i=0, nLen=aNode.length; i<nLen; i++){
|
|
aNode[i].sParentSrl = sParentSrl;
|
|
|
|
// Only sitemap node has menuSrl
|
|
if(aNode[i].menuSrl){
|
|
nNodeType = 1;
|
|
}else{
|
|
nNodeType = 2;
|
|
}
|
|
|
|
sURL = "";
|
|
switch(nNodeType){
|
|
case 1:
|
|
sText = aNode[i].title;
|
|
sNodeSrl = aNode[i].menuSrl;
|
|
|
|
aSubNode = aNode[i].menuItems.list;
|
|
|
|
sTargetPanel = "#propertiesRoot";
|
|
break;
|
|
|
|
case 2:
|
|
sText = aNode[i].text;
|
|
sLink = aNode[i].link;
|
|
sURL = aNode[i].url;
|
|
sNodeSrl = aNode[i].node_srl;
|
|
//sParentSrl = aNode[i].parent_srl;
|
|
|
|
sExpand = aNode[i].expand;
|
|
sOpenWindow = aNode[i].open_window;
|
|
|
|
nSelected = aNode[i].selected;
|
|
|
|
sActiveBtn = aNode[i].active_btn;
|
|
sNormalBtn = aNode[i].normal_btn;
|
|
sHoverBtn = aNode[i].hover_btn;
|
|
|
|
sIsStartModule = aNode[i].is_start_module;
|
|
|
|
aSubNode = aNode[i].list;
|
|
|
|
sModuleType = aNode[i].module_type;
|
|
sModule = aNode[i].module;
|
|
|
|
sTargetPanel = "#properties";
|
|
|
|
if(aNode[i].is_shortcut === "Y"){
|
|
sModuleType = "_SHORTCUT";
|
|
sURL = "";
|
|
aNode[i].bShortCut = true;
|
|
}else{
|
|
aNode[i].bShortCut = false;
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
}
|
|
|
|
htNodeInfo[sNodeSrl] = aNode[i];
|
|
htNodeInfo[sNodeSrl].aNode = aSubNode || [];
|
|
|
|
htNodeInfo[sNodeSrl].nNodeType = nNodeType;
|
|
htNodeInfo[sNodeSrl].sNodeSrl = sNodeSrl;
|
|
htNodeInfo[sNodeSrl].sText = sText;
|
|
htNodeInfo[sNodeSrl].sMenuNameKey = htNodeInfo[sNodeSrl].menu_name_key;
|
|
|
|
htNodeInfo[sNodeSrl].sModuleType = sModuleType;
|
|
|
|
sSubTree = "";
|
|
if(aSubNode && aSubNode.length>0){
|
|
sSubTree = createTreeMarkup(aSubNode, sNodeSrl, sMenuTree, sMenuTreeNode);
|
|
}
|
|
/*
|
|
if(sMenuType === "shortcut"){
|
|
sText = sText + " ${s}";
|
|
}
|
|
*/
|
|
var sTextWithIcons = sText;
|
|
if(sIsStartModule){
|
|
sTextWithIcons += " ${h}";
|
|
}
|
|
if(htNodeInfo[sNodeSrl].sModuleType === "_SHORTCUT"){
|
|
sTextWithIcons += " ${s}";
|
|
nNodeType = 3;
|
|
}
|
|
|
|
var $node = $.tmpl( sMenuTreeNode, {MenuTitleWithHome:sTextWithIcons,MenuTitle:sText,MenuId:sNodeSrl,MenuUrl:sURL,NodeType:nNodeType,SubTree:sSubTree,Target:sTargetPanel} )
|
|
.data('sMenuId', sNodeSrl).data('sMenuUrl', sURL).data('sMenuTitle', sText);
|
|
//data-param=\'{ "sMenuId":"${MenuId}", "sMenuUrl":"${MenuUrl}", "sMenuTitle":"${MenuTitle}" }\'
|
|
//console.log($node);
|
|
sResult += $node[0].outerHTML.replace("${h}", "<i class='x_icon-home' title='Home Page'>[HOME]</i>").replace("${s}", "<i class='x_icon-share' title='Shortcut'></i>");
|
|
}
|
|
|
|
return $.tmpl( sMenuTree, {Nodes:sResult} ).get()[0].outerHTML;
|
|
}
|
|
|
|
});
|
|
|
|
|
|
jQuery(function($){
|
|
$.xeMsgBox.confirmDialog({
|
|
sTitle : 'TITLE',
|
|
|
|
sText : '<div style="width:368px;height:300px;border:1px solid;overflow:scroll"><div class="tree"></div></div>',
|
|
|
|
bSmall: true,
|
|
|
|
bDanger: true,
|
|
|
|
fnOnOK : function(){
|
|
console.log($container.find('.jstree-clicked'));
|
|
|
|
$container.find('.jstree-clicked').each(function(idx, el){
|
|
console.log($(el).closest('li').data('sMenuId'));
|
|
});
|
|
}
|
|
});
|
|
|
|
$container = $('.x_modal._common .tree');
|
|
|
|
$.xeShowMenuSelector($container);
|
|
});
|
|
|
|
jQuery(function($){
|
|
// Modal anchor activation
|
|
var $docTable = $('#documentListTable');
|
|
$docTable.find(':checkbox').change(function(){
|
|
var $modalAnchor = $('a[data-value]');
|
|
if($docTable.find(':checked').length < 1){
|
|
$modalAnchor.removeAttr('href').addClass('x_disabled');
|
|
} else {
|
|
$modalAnchor.attr('href','#manageForm').removeClass('x_disabled');
|
|
}
|
|
}).change();
|
|
// Button action
|
|
$('a[data-value]').click(function(){
|
|
if($docTable.find(':checked').length < 1){
|
|
$('body').css('overflow','auto');
|
|
alert('{$lang->msg_not_selected_document}');
|
|
return false;
|
|
} else {
|
|
var $this = $(this);
|
|
var $moveTarget = $('._moveTarget');
|
|
var thisValue = $this.attr('data-value');
|
|
var thisText = $this.text();
|
|
getDocumentList();
|
|
$('#manageForm').find('.x_modal-header ._sub').text(thisText).end().find('[type="submit"]').val(thisValue).text(thisText);
|
|
if(thisValue == 'trash' || thisValue == 'delete'){
|
|
$moveTarget.hide().next().css('borderTopWidth','0');
|
|
} else {
|
|
$moveTarget.show().next().css('borderTopWidth','1px');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|