mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
issue 70 document, comment, trackback module UI change.
But not finished yet git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8639 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5385ebb524
commit
9acd474c52
37 changed files with 1125 additions and 830 deletions
|
|
@ -3,8 +3,8 @@
|
|||
<div class="header">
|
||||
<h1><a href="{getUrl('','module','admin')}"><img src="img/xe.h1.png" width="33" height="32" alt="XE" /> Super Admin</a></h1>
|
||||
<div class="siteTool">
|
||||
<a href="#moveSiteList" class="layerAnchor">Move to Site</a>
|
||||
<div class="layer portlet" id="moveSiteList">
|
||||
<a href="#moveSiteList" class="i tgAnchor" data-effect="slide" data-duration="100">Move to Site</a>
|
||||
<div class="layer portlet tgContent" id="moveSiteList">
|
||||
<h2 class="h2">Move to Site</h2>
|
||||
<ul class="lined">
|
||||
<li>XpressEngine - <a href="#">http://xe.xpressengine.net/</a></li>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<ul>
|
||||
<li><a href="#">정찬명</a></li>
|
||||
<li><a href="{getUrl('module','admin','act','procAdminLogout')}">Log-out</a></li>
|
||||
<li><a href="#language" class="tgSlide">Language</a>
|
||||
<li><a href="#language" class="tgAnchor" data-effect="slide" data-duration="100">Language</a>
|
||||
<ul class="tgContent" id="language">
|
||||
<!--@foreach($lang_supported as $key => $val)-->
|
||||
<li><a href="#" onclick="doChangeLangType('{$key}'); return false;">{$val}</a></li>
|
||||
|
|
|
|||
|
|
@ -1,614 +1,407 @@
|
|||
/* NHN (developers@xpressengine.com) */
|
||||
jQuery(function($){
|
||||
// Label Overlapping
|
||||
var overlapLabel = $('.form li').find('>:text,>:password,>textarea').prev('label');
|
||||
var overlapInput = overlapLabel.next(':text,:password,textarea');
|
||||
overlapLabel.css({'position':'absolute','top':'15px','left':'5px'}).parent().css('position','relative');
|
||||
overlapInput
|
||||
// Overlapping label
|
||||
$('.form li').find('>input:text,>input:password,>textarea')
|
||||
.prev('label')
|
||||
.css({position:'absolute',top:'15px',left:'5px'})
|
||||
.next()
|
||||
.focus(function(){
|
||||
$(this).prev(overlapLabel).css('visibility','hidden');
|
||||
var $label = $(this).prev().stop().animate({opacity:0, left:'25px'},'fast',function(){ $label.css('visibility','hide') });
|
||||
})
|
||||
.blur(function(){
|
||||
if($(this).val() == ''){
|
||||
$(this).prev(overlapLabel).css('visibility','visible');
|
||||
} else {
|
||||
$(this).prev(overlapLabel).css('visibility','hidden');
|
||||
var $this = $(this), $label;
|
||||
if($.trim($this.val()) == '') {
|
||||
$label = $this.prev().stop().css('visibility','visible').animate({opacity:1, left:'5px'},'fast');
|
||||
}
|
||||
})
|
||||
.end()
|
||||
.parent()
|
||||
.css('position', 'relative');
|
||||
|
||||
// Make selected checkbox elements bold
|
||||
var $rc_label = $('input:radio+label,input:checkbox+label'), $input_rc = $rc_label.prev('input');
|
||||
$input_rc
|
||||
.change(function(){
|
||||
if($(this).val() == ''){
|
||||
$(this).prev(overlapLabel).css('visibility','visible');
|
||||
} else {
|
||||
$(this).prev(overlapLabel).css('visibility','hidden');
|
||||
}
|
||||
var name = $(this).attr('name');
|
||||
$input_rc
|
||||
.filter('[name="'+name+'"]:not(:checked)')
|
||||
.next('label').css('font-weight', 'normal').end()
|
||||
.end()
|
||||
.next('label').css('font-weight', 'bold').end();
|
||||
})
|
||||
.blur();
|
||||
// Checked
|
||||
var inputRC = $('input[type=radio], input[type=checkbox]');
|
||||
inputRC.change(function(){
|
||||
var myName = $(this).attr('name');
|
||||
inputRC.filter('[name='+myName+']').not(':checked').next('label').css('fontWeight','normal');
|
||||
$(this).filter(':checked').next('label').css('fontWeight','bold');
|
||||
.change();
|
||||
|
||||
// Toogle checkbox all
|
||||
$('.form th>:checkbox')
|
||||
.change(function() {
|
||||
var $this = $(this), self = this, name;
|
||||
|
||||
name = $this.data('target');
|
||||
$this.closest('table').find('input:checkbox')
|
||||
.filter(function(){ return (this.name == name) })
|
||||
.prop('checked', $this.prop('checked'))
|
||||
.filter(function(){ return (this.parentNode.nodeName != 'TH') })
|
||||
.change();
|
||||
});
|
||||
inputRC.change();
|
||||
// Check All
|
||||
var formThCheck = $('.form th>:checkbox');
|
||||
formThCheck.change(function(){
|
||||
var formTdCheck = $(this).parents('table').find('td>:checkbox');
|
||||
if($(this).is(':checked')){
|
||||
formTdCheck.attr('checked','checked').change();
|
||||
} else {
|
||||
formTdCheck.removeAttr('checked').change();
|
||||
}
|
||||
});
|
||||
formThCheck.change();
|
||||
|
||||
// Global Navigation Bar
|
||||
var gnb = $('div.gnb');
|
||||
var gnb_i = gnb.find('>ul>li');
|
||||
var gnb_a = gnb_i.find('>a');
|
||||
gnb.removeClass('jx');
|
||||
gnb_i.find('>ul').hide();
|
||||
gnb.find('>ul>li[class=active]').find('>ul').show();
|
||||
function gnbToggle(event){
|
||||
var t = $(this);
|
||||
gnb_i.removeClass('active');
|
||||
if (t.next('ul').is(':hidden')) {
|
||||
gnb_i.find('>ul').slideUp(100);
|
||||
t.next('ul').slideDown(100);
|
||||
t.parent('li').addClass('active');
|
||||
} else if (t.next('ul').is(':visible')){
|
||||
t.next('ul').show();
|
||||
t.parent('li').addClass('active');
|
||||
} else if (!t.next('ul').langth) {
|
||||
gnb_i.find('>ul').slideUp(100);
|
||||
t.parent('li').removeClass('active');
|
||||
};
|
||||
}
|
||||
gnb_a.focus(gnbToggle).click(gnbToggle);
|
||||
gnb_a.mouseover(function(){
|
||||
if($(document).width()>640){
|
||||
$(this).click();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
gnb.mouseleave(function(){
|
||||
if($(document).width()>640){
|
||||
gnbToggle();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
gnb.find('li:last-child>a, li:last-child>ul>li:last-child>a').blur(gnbToggle);
|
||||
// Lined Tab Navigation
|
||||
var tab_line = $('div.tab.line');
|
||||
var tab_line_i = tab_line.find('>ul>li');
|
||||
var tab_line_ii = tab_line.find('>ul>li>ul>li');
|
||||
tab_line.removeClass('jx');
|
||||
if($(document).width()<=640){
|
||||
tab_line.addClass('jx');
|
||||
}
|
||||
$(window).resize(function(){
|
||||
if($(document).width()<=640){
|
||||
tab_line.addClass('jx');
|
||||
} else {
|
||||
tab_line.removeClass('jx');
|
||||
}
|
||||
});
|
||||
tab_line_i.find('>ul').hide();
|
||||
tab_line_i.find('>ul>li[class=active]').parents('li').attr('class','active');
|
||||
tab_line.find('>ul>li[class=active]').find('>ul').show();
|
||||
function lineTabMenuToggle(event){
|
||||
if (!tab_line.hasClass('jx')){
|
||||
var t = $(this);
|
||||
tab_line_i.find('>ul').hide();
|
||||
t.next('ul').show();
|
||||
tab_line_i.removeClass('active');
|
||||
t.parent('li').addClass('active');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function lineTabSubMenuActive(){
|
||||
tab_line_ii.removeClass('active');
|
||||
$(this).parent(tab_line_ii).addClass('active');
|
||||
return false;
|
||||
};
|
||||
tab_line_i.find('>a[href=#]').click(lineTabMenuToggle).focus(lineTabMenuToggle);
|
||||
tab_line_ii.find('>a[href=#]').click(lineTabSubMenuActive).focus(lineTabSubMenuActive);
|
||||
// Faced Tab Navigation
|
||||
var tab_face = $('div.tab.face');
|
||||
var tab_face_i = tab_face.find('>ul>li');
|
||||
var tab_face_ii = tab_face.find('>ul>li>ul>li');
|
||||
tab_face.removeClass('jx');
|
||||
if($(document).width()<=640){
|
||||
tab_face.addClass('jx');
|
||||
}
|
||||
$(window).resize(function(){
|
||||
if($(document).width()<=640){
|
||||
tab_face.addClass('jx');
|
||||
} else {
|
||||
tab_face.removeClass('jx');
|
||||
}
|
||||
});
|
||||
tab_face_i.find('>ul').hide();
|
||||
tab_face_i.find('>ul>li[class=active]').parents('li').attr('class','active');
|
||||
tab_face.find('>ul>li[class=active]').find('>ul').show();
|
||||
function faceTabMenuToggle(event){
|
||||
if (!tab_face.hasClass('jx')){
|
||||
var t = $(this);
|
||||
tab_face_i.find('>ul').hide();
|
||||
t.next('ul').show();
|
||||
tab_face_i.removeClass('active');
|
||||
t.parent('li').addClass('active');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function faceTabSubMenuActive(){
|
||||
tab_face_ii.removeClass('active');
|
||||
$(this).parent(tab_face_ii).addClass('active');
|
||||
return false;
|
||||
};
|
||||
tab_face_i.find('>a[href=#]').click(faceTabMenuToggle).focus(faceTabMenuToggle);
|
||||
tab_face_ii.find('>a[href=#]').click(faceTabSubMenuActive).focus(faceTabSubMenuActive);
|
||||
// List Tab Navigation
|
||||
var tab_list = $('div.tab.list');
|
||||
var tab_list_i = tab_list.find('>ul>li');
|
||||
tab_list.removeClass('jx');
|
||||
if($(document).width()<=640){
|
||||
tab_list.addClass('jx');
|
||||
}
|
||||
$(window).resize(function(){
|
||||
if($(document).width()<=640){
|
||||
tab_list.addClass('jx');
|
||||
tab_list.css('height','auto');
|
||||
} else {
|
||||
tab_list.removeClass('jx');
|
||||
tab_list.css('height', tab_list.find('>ul>li.active>ul').height()+40);
|
||||
}
|
||||
});
|
||||
tab_list_i.find('>ul').hide();
|
||||
tab_list.find('>ul>li[class=active]').find('>ul').show();
|
||||
if (!tab_list.hasClass('jx')){
|
||||
tab_list.css('height', tab_list.find('>ul>li.active>ul').height()+40);
|
||||
} else {
|
||||
tab_list.css('height','auto');
|
||||
}
|
||||
function listTabMenuToggle(event){
|
||||
if (!tab_list.hasClass('jx')){
|
||||
var t = $(this);
|
||||
tab_list_i.find('>ul').hide();
|
||||
t.next('ul').show();
|
||||
tab_list_i.removeClass('active');
|
||||
t.parent('li').addClass('active');
|
||||
tab_list.css('height', t.next('ul').height()+40);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
tab_list_i.find('>a[href=#]').click(listTabMenuToggle).focus(listTabMenuToggle);
|
||||
// Vertical Navigation
|
||||
var vNav = $('div.vNav');
|
||||
var vNav_i = vNav.find('>ul>li');
|
||||
var vNav_ii = vNav.find('>ul>li>ul>li');
|
||||
vNav_i.find('>ul').hide();
|
||||
vNav.find('>ul>li>ul>li[class=active]').parents('li').attr('class','active');
|
||||
vNav.find('>ul>li[class=active]').find('>ul').show();
|
||||
function vNavToggle(event){
|
||||
var t = $(this);
|
||||
if (t.next('ul').is(':hidden')) {
|
||||
vNav_i.find('>ul').slideUp(100);
|
||||
t.next('ul').slideDown(100);
|
||||
} else if (t.next('ul').is(':visible')){
|
||||
t.next('ul').show();
|
||||
} else if (!t.next('ul').langth) {
|
||||
vNav_i.find('>ul').slideUp(100);
|
||||
}
|
||||
vNav_i.removeClass('active');
|
||||
t.parent('li').addClass('active');
|
||||
return false;
|
||||
}
|
||||
vNav_i.find('>a[href=#]').click(vNavToggle).focus(vNavToggle);
|
||||
function vNavActive(){
|
||||
vNav_ii.removeClass('active');
|
||||
$(this).parent(vNav_ii).addClass('active');
|
||||
return false;
|
||||
};
|
||||
vNav_ii.find('>a[href=#]').click(vNavActive).focus(vNavActive);
|
||||
vNav.find('>ul>li>ul').prev('a').append('<span class="i"></span>');
|
||||
// Tree Navigation
|
||||
var tNav = $('.tNav');
|
||||
var tNavPlus = '<button type="button" class="tNavToggle plus">+</button>';
|
||||
var tNavMinus = '<button type="button" class="tNavToggle minus">-</button>';
|
||||
tNav.find('li>ul').css('display','none');
|
||||
tNav.find('ul>li:last-child').addClass('last');
|
||||
tNav.find('li>ul:hidden').parent('li').prepend(tNavPlus);
|
||||
tNav.find('li>ul:visible').parent('li').prepend(tNavMinus);
|
||||
tNav.find('li.active').addClass('open').parents('li').addClass('open');
|
||||
tNav.find('li.open').parents('li').addClass('open');
|
||||
tNav.find('li.open>.tNavToggle').text('-').removeClass('plus').addClass('minus');
|
||||
tNav.find('li.open>ul').slideDown(100);
|
||||
$('.tNav .tNavToggle').click(function(){
|
||||
t = $(this);
|
||||
t.parent('li').toggleClass('open');
|
||||
if(t.parent('li').hasClass('open')){
|
||||
t.text('-').removeClass('plus').addClass('minus');
|
||||
t.parent('li').find('>ul').slideDown(100);
|
||||
} else {
|
||||
t.text('+').removeClass('minus').addClass('plus');
|
||||
t.parent('li').find('>ul').slideUp(100);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('.tNav a[href=#]').click(function(){
|
||||
t = $(this);
|
||||
t.parent('li').toggleClass('open');
|
||||
if(t.parent('li').hasClass('open')){
|
||||
t.prev('button.tNavToggle').text('-').removeClass('plus').addClass('minus');
|
||||
t.parent('li').find('>ul').slideDown(100);
|
||||
} else {
|
||||
t.prev('button.tNavToggle').text('+').removeClass('minus').addClass('plus');
|
||||
t.parent('li').find('>ul').slideUp(100);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
// Frequently Asked Question
|
||||
var article = $('.faq>.faqBody>.article');
|
||||
article.addClass('hide');
|
||||
article.find('.a').hide();
|
||||
article.eq(0).removeClass('hide');
|
||||
article.eq(0).find('.a').show();
|
||||
$('.faq>.faqBody>.article>.q>a').click(function(){
|
||||
var myArticle = $(this).parents('.article:first');
|
||||
if(myArticle.hasClass('hide')){
|
||||
article.addClass('hide').removeClass('show');
|
||||
article.find('.a').slideUp(100);
|
||||
myArticle.removeClass('hide').addClass('show');
|
||||
myArticle.find('.a').slideDown(100);
|
||||
} else {
|
||||
myArticle.removeClass('show').addClass('hide');
|
||||
myArticle.find('.a').slideUp(100);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('.faq>.faqHeader>.showAll').click(function(){
|
||||
var hidden = $('.faq>.faqBody>.article.hide').length;
|
||||
if(hidden > 0){
|
||||
article.removeClass('hide').addClass('show');
|
||||
article.find('.a').slideDown(100);
|
||||
} else {
|
||||
article.removeClass('show').addClass('hide');
|
||||
article.find('.a').slideUp(100);
|
||||
}
|
||||
});
|
||||
// Layer
|
||||
var layerAnchor = $('.layerAnchor[href^=#]');
|
||||
var layer = $('.layer');
|
||||
var layerCloseHtml = '<button type="button" class="layerClose" title="Close this layer">X</button>';
|
||||
var layerBlurHtml = '<button type="button" class="layerBlur"></button>';
|
||||
layer.hide().prepend(layerCloseHtml);
|
||||
var layerClose = $('.layerClose');
|
||||
layerClose.eq(0).clone().appendTo(layer);
|
||||
layer.prepend(layerBlurHtml);
|
||||
var layerBlur = $('.layerBlur');
|
||||
layerBlur.eq(0).clone().appendTo(layer);
|
||||
layerAnchor
|
||||
var $menuitems = $('div.gnb')
|
||||
.removeClass('jx')
|
||||
.attr('role', 'navigation') // WAI-ARIA role
|
||||
.find('li')
|
||||
.attr('role', 'menuitem') // WAI-ARIA role
|
||||
.filter(':has(>ul)')
|
||||
.attr('aria-haspopup', 'true') // WAI-ARIA
|
||||
.find('>ul').hide().end()
|
||||
.mouseover(function(){
|
||||
var $this = $(this);
|
||||
if($this.css('float') == 'left') $this.find('>ul:hidden').prev('a').click();
|
||||
})
|
||||
.mouseleave(function(){
|
||||
var $this = $(this);
|
||||
if($this.css('float') == 'left') $this.find('>ul:visible').slideUp(100);
|
||||
})
|
||||
.find('>a')
|
||||
.focus(function(){ $(this).click() })
|
||||
.click(function(){
|
||||
$($(this).attr('href')).fadeToggle(200).find('>.layerClose:first').focus();
|
||||
$menuitems.removeClass('active');
|
||||
|
||||
$(this)
|
||||
.next('ul').slideToggle(100).end()
|
||||
.parent().addClass('active');
|
||||
|
||||
return false;
|
||||
})
|
||||
.keypress(function(){
|
||||
if(event.keyCode != 32) return true;
|
||||
$(this).click();
|
||||
return false;
|
||||
});
|
||||
function closeLayer() {
|
||||
var closeId = layer.filter(':visible').attr("id");
|
||||
if(closeId) layerAnchor.filter('[href="#'+closeId+'"]').focus();
|
||||
layer.fadeOut(200);
|
||||
.end()
|
||||
.end()
|
||||
.find('>a')
|
||||
.blur(function(){
|
||||
var anchor = this;
|
||||
setTimeout(function(){
|
||||
var $a = $(anchor), $ul = $a.closest('ul'), $focus = $ul.find('a:focus');
|
||||
|
||||
if(!$focus.length || $focus.closest('ul').parent('div.gnb').length) {
|
||||
if($ul.parent('div.gnb').length) $ul = $a.next('ul');
|
||||
$ul.filter(':visible').slideUp(100);
|
||||
}
|
||||
$(document).keydown(function(event){
|
||||
if(event.keyCode != 27) return true; // ESC
|
||||
return closeLayer();
|
||||
});
|
||||
$('.layerClose').click(closeLayer);
|
||||
$('.layerBlur').focusin(function(event){
|
||||
layerClose.click();
|
||||
});
|
||||
// Modal Window
|
||||
var htmlBody = $('html,body');
|
||||
var modalAnchor = $('.modalAnchor');
|
||||
var modal = $('.modal');
|
||||
var modalBg = modal.find('>.bg');
|
||||
var modalFg = modal.find('>.fg');
|
||||
var modalCloseHtml = '<button type="button" class="modalClose" title="Close this layer">X</button>';
|
||||
var modalBlurHtml = '<button type="button" class="modalBlur"></button>';
|
||||
modal
|
||||
}, 10);
|
||||
})
|
||||
.end()
|
||||
|
||||
// TODO: Modal Window
|
||||
// var htmlBody = $('html,body');
|
||||
// var modalAnchor = $('.modalAnchor');
|
||||
// var modal = $('.modal');
|
||||
// var modalBg = modal.find('>.bg');
|
||||
// var modalFg = modal.find('>.fg');
|
||||
// var modalCloseHtml = '<button type="button" class="modalClose" title="Close this layer">X</button>';
|
||||
// var modalBlurHtml = '<button type="button" class="modalBlur"></button>';
|
||||
// var docHeight = $(document).height();
|
||||
$('.modal')
|
||||
.hide()
|
||||
.appendTo('body')
|
||||
.height($(document).height())
|
||||
.prepend('<span class="bg"></span>')
|
||||
.append('<!--[if IE 6]><iframe class="ie6"></iframe><![endif]-->');
|
||||
modalFg
|
||||
.prepend(modalCloseHtml)
|
||||
.prepend(modalBlurHtml);
|
||||
var modalClose = $('.modalClose');
|
||||
var modalBlur = $('.modalBlur');
|
||||
modalClose.eq(0).clone().appendTo(modalFg);
|
||||
modalBlur.eq(0).clone().appendTo(modalFg);
|
||||
modalAnchor
|
||||
.click(function(){
|
||||
if(typeof document.body.style.maxHeight == "undefined"){
|
||||
htmlBody.css({'width':'100%','height':'100%'});
|
||||
}
|
||||
modal.fadeToggle(200).toggleClass('modalActive');
|
||||
modalFg.find('>.modalClose:first').focus();
|
||||
$(this).addClass('active');
|
||||
// modalFg
|
||||
// .prepend(modalCloseHtml)
|
||||
// .prepend(modalBlurHtml);
|
||||
// var modalClose = $('.modalClose');
|
||||
// var modalBlur = $('.modalBlur');
|
||||
// modalClose.eq(0).clone().appendTo(modalFg);
|
||||
// modalBlur.eq(0).clone().appendTo(modalFg);
|
||||
// modalAnchor
|
||||
// .click(function(){
|
||||
// if(typeof document.body.style.maxHeight == "undefined"){
|
||||
// htmlBody.css({'width':'100%','height':'100%'});
|
||||
// }
|
||||
// var myTarget = $($(this).attr('href'));
|
||||
// myTarget.fadeToggle(200).toggleClass('modalActive');
|
||||
// myTarget.find('>.fg>.modalClose:first').focus();
|
||||
// $(this).addClass('active');
|
||||
// })
|
||||
// .keypress(function(){
|
||||
// if(event.keyCode != 32) return true;
|
||||
// $(this).click();
|
||||
// return false;
|
||||
// });
|
||||
// function closeModal() {
|
||||
// if(typeof document.body.style.maxHeight == "undefined"){
|
||||
// htmlBody.removeAttr('style');
|
||||
// }
|
||||
// modal.fadeOut(200).removeClass('modalActive');
|
||||
// $('.modalAnchor.active').focus().removeClass('active');
|
||||
// return false;
|
||||
// }
|
||||
// $(document).keydown(function(event){
|
||||
// if(event.keyCode != 27) return true; // ESC
|
||||
// if(modal.find('.tgContent:visible').length == 0) return closeModal();
|
||||
// });
|
||||
// $('.modal>.bg, .modalClose, .modal .cancel').click(closeModal);
|
||||
// $('.modalBlur').focusin(function(event){
|
||||
// modalClose.click();
|
||||
// });
|
||||
|
||||
// pagination
|
||||
$('.pagination')
|
||||
.find('span.gotopage')
|
||||
.attr('id', function(idx){ return 'gotopage-'+(idx+1) })
|
||||
.hide()
|
||||
.end()
|
||||
.find('a[href="#gotopage"]')
|
||||
.each(function(idx){
|
||||
var id = '#gotopage-'+(idx+1);
|
||||
$(this).attr('href', id).after($(id));
|
||||
})
|
||||
.keypress(function(){
|
||||
if(event.keyCode != 32) return true;
|
||||
$(this).click();
|
||||
return false;
|
||||
});
|
||||
function closeModal() {
|
||||
if(typeof document.body.style.maxHeight == "undefined"){
|
||||
htmlBody.removeAttr('style');
|
||||
}
|
||||
modal.fadeOut(200).removeClass('modalActive');
|
||||
$('.modalAnchor.active').focus().removeClass('active');
|
||||
return false;
|
||||
}
|
||||
$(document).keydown(function(event){
|
||||
if(event.keyCode != 27) return true; // ESC
|
||||
if(modal.find('.tgContent:visible').length == 0) return closeModal();
|
||||
});
|
||||
$('.modal>.bg, .modalClose, .modal .cancel').click(closeModal);
|
||||
$('.modalBlur').focusin(function(event){
|
||||
modalClose.click();
|
||||
});
|
||||
// Toggle
|
||||
var tgContent = $('.tgContent');
|
||||
var tgBlurHtml = '<button type="button" class="tgBlur"></button>';
|
||||
tgContent.hide().prepend(tgBlurHtml).mouseleave(function(){closeTg()});
|
||||
var tgBlur = $('.tgBlur');
|
||||
tgBlur.eq(0).clone().appendTo(tgContent);
|
||||
function offsetToggle(){
|
||||
tgContent.filter(':visible').parent().css('position','relative');
|
||||
setTimeout(function(){
|
||||
tgContent.filter(':hidden').parent().css('position','');
|
||||
}, 300);
|
||||
}
|
||||
$('.tgSimple').click(function(){
|
||||
$($(this).attr('href')).toggle().find('a, input, button:not(.tgBlur), select, textarea').eq(0).focus();
|
||||
offsetToggle();
|
||||
return false;
|
||||
});
|
||||
$('.tgSlide').click(function(){
|
||||
$($(this).attr('href')).slideToggle(100).find('a, input, button:not(.tgBlur), select, textarea').eq(0).focus();
|
||||
offsetToggle();
|
||||
return false;
|
||||
});
|
||||
$('.tgFade').click(function(){
|
||||
$($(this).attr('href')).fadeToggle(200).find('a, input, button:not(.tgBlur), select, textarea').eq(0).focus();
|
||||
offsetToggle();
|
||||
return false;
|
||||
});
|
||||
$('.tgSimple, .tgSlide, .tgFade').keypress(function(){
|
||||
if(event.keyCode != 32) return true;
|
||||
$(this).click();
|
||||
return false;
|
||||
});
|
||||
function closeTg() {
|
||||
var closeId = tgContent.filter(':visible').attr('id');
|
||||
if(closeId) $('.tgSimple, .tgSlide, .tgFade').filter('[href="#'+closeId+'"]').focus();
|
||||
tgContent.prev('input').focus();
|
||||
tgContent.fadeOut(200);
|
||||
}
|
||||
$(document).keydown(function(event){
|
||||
if(event.keyCode != 27) return true; // ESC
|
||||
return closeTg();
|
||||
});
|
||||
$('.tgBlur').focusin(closeTg);
|
||||
// Portlet Action
|
||||
var action = $('.portlet .action');
|
||||
var action_li = action.parent('li');
|
||||
action.hide().css({'position':'absolute'});
|
||||
action_li.mouseleave(function(){
|
||||
action.fadeOut(100);
|
||||
return false;
|
||||
});
|
||||
action_li.mouseenter(function(){
|
||||
action_li.mouseleave();
|
||||
$(this).find('>.action').fadeIn(100);
|
||||
return false;
|
||||
});
|
||||
action_li.find('*:first-child').focusin(function(){
|
||||
$(this).parent('li').mouseenter();
|
||||
});
|
||||
// Waiting for server response
|
||||
var htmlBody = $('html,body');
|
||||
var wfsrAnchor = $('.wfsrAnchor');
|
||||
$('body').append('<div id="wfsr"><span class="bg"></span><div class="fg"><p>서버에 요청중입니다. 잠시만 기다려 주세요. <button type="button" class="reAction">다시시도</button> <button type="button" class="cancel">실행취소</button></p></div></div>');
|
||||
var wfsr = $('#wfsr');
|
||||
var wfsrBg = wfsr.find('>.bg');
|
||||
var wfsrFg = wfsr.find('>.fg');
|
||||
wfsr.hide();
|
||||
wfsr.append('<!--[if IE 6]><iframe class="ie6"></iframe><[endif]-->');
|
||||
wfsrAnchor.click(function(){
|
||||
htmlBody.css({'width':'100%','height':'100%'});
|
||||
wfsr.fadeToggle(200).addClass('wfsrActive');
|
||||
wfsrFg.find('.reAction:first').focus();
|
||||
$(this).addClass('active');
|
||||
});
|
||||
function closeWfsr() {
|
||||
htmlBody.removeAttr('style');
|
||||
wfsr.fadeOut(200).removeClass('wfsrActive');
|
||||
$('.wfsrAnchor.active').focus().removeClass('active');
|
||||
return false;
|
||||
}
|
||||
$(document).keydown(function(event){
|
||||
if(event.keyCode != 27) return true; // ESC
|
||||
closeWfsr();
|
||||
});
|
||||
$('#wfsr .reAction, #wfsr .cancel').click(closeWfsr);
|
||||
// Delete
|
||||
$('.delete').click(function(){
|
||||
confirm('Delete this(these)? Undo is impossible.');
|
||||
});
|
||||
// Section Collapse
|
||||
var h2 = $('.content:not(.dashboard) .h2:gt(0)');
|
||||
var h2AnchorHTML = '<button type="button" class="h2Anchor"></button>';
|
||||
h2
|
||||
.append(h2AnchorHTML)
|
||||
.each(function(){
|
||||
$(this).parent().children().not('.h2').hide();
|
||||
$(this).find('.h2Anchor')
|
||||
.text('Show')
|
||||
.click(function(){
|
||||
var t = $(this);
|
||||
t.parent('.h2').parent().children().not('.h2').slideToggle(200);
|
||||
setTimeout(function(event){
|
||||
if(t.parent('.h2').next().is(':visible')) {
|
||||
t.text('Hide');
|
||||
var $form, width, height, hidden, duration;
|
||||
console.log(this);
|
||||
|
||||
$form = $(this.getAttribute('href'));
|
||||
hidden = $form.is(':hidden');
|
||||
width = $form.show().width();
|
||||
height = $form.height();
|
||||
duration = 100;
|
||||
|
||||
$form.css('overflow', 'hidden').css('whiteSpace', 'nowrap');
|
||||
if(hidden) {
|
||||
$form
|
||||
.css('width', 0)
|
||||
.animate({width:width}, duration, function(){ $form.css({width:'',height:'',overflow:''}) })
|
||||
.find('input:text:first').focus();
|
||||
} else {
|
||||
t.text('Show');
|
||||
$form
|
||||
.css('width', width)
|
||||
.animate({width:0}, duration, function(){ $form.hide().css({width:'',height:'',overflow:''}) });
|
||||
|
||||
$(this).focus();
|
||||
}
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
// Site Map
|
||||
var siteMap = $('.siteMap');
|
||||
var siteItem = siteMap.find('li');
|
||||
siteItem
|
||||
.prepend('<button type="button" class="moveTo">Move to</button>')
|
||||
.append('<span class="vr"></span><span class="hr"></span>')
|
||||
.mouseover(function(){
|
||||
$(this).addClass('active');
|
||||
$('.vr').each(function(){
|
||||
var myHeight = $(this).parent('li').height();
|
||||
$(this).height(myHeight);
|
||||
});
|
||||
|
||||
return false;
|
||||
})
|
||||
.mouseout(function(){
|
||||
.end();
|
||||
|
||||
// TODO: Portlet Action
|
||||
// var action = $('.portlet .action');
|
||||
// var action_li = action.parent('li');
|
||||
// action.hide().css({'position':'absolute'});
|
||||
// action_li.mouseleave(function(){
|
||||
// action.fadeOut(100);
|
||||
// return false;
|
||||
// });
|
||||
// action_li.mouseenter(function(){
|
||||
// action_li.mouseleave();
|
||||
// $(this).find('>.action').fadeIn(100);
|
||||
// return false;
|
||||
// });
|
||||
// action_li.find('*:first-child').focusin(function(){
|
||||
// $(this).parent('li').mouseenter();
|
||||
// });
|
||||
|
||||
// TODO: Site Map
|
||||
// var siteMap = $('.siteMap');
|
||||
// var siteItem = siteMap.find('li');
|
||||
// siteItem
|
||||
// .prepend('<button type="button" class="moveTo">Move to</button>')
|
||||
// .append('<span class="vr"></span><span class="hr"></span>')
|
||||
// .mouseover(function(){
|
||||
// $(this).addClass('active');
|
||||
// $('.vr').each(function(){
|
||||
// var myHeight = $(this).parent('li').height();
|
||||
// $(this).height(myHeight);
|
||||
// });
|
||||
// return false;
|
||||
// })
|
||||
// .mouseout(function(){
|
||||
// $(this).removeClass('active');
|
||||
// })
|
||||
// .find('.moveTo+input').each(function(){
|
||||
// $(this).width(this.value.length+'em');
|
||||
// });
|
||||
// siteMap.find('.moveTo')
|
||||
// .focus(function(){
|
||||
// $(this).parent('li').mouseover();
|
||||
// })
|
||||
// .blur(function(){
|
||||
// $(this).mouseout();
|
||||
// });
|
||||
// siteMap.find('li:first-child').css('border','0');
|
||||
|
||||
// Toggle Contents
|
||||
$('a.tgAnchor')
|
||||
.click(function(){
|
||||
var $this = $(this), $layer;
|
||||
|
||||
// get content container
|
||||
$layer = $( $this.attr('href') );
|
||||
|
||||
// set anchor object
|
||||
$layer.data('anchor', $this);
|
||||
|
||||
if($layer.data('state') == 'showing') {
|
||||
$this.trigger('close.tc');
|
||||
} else {
|
||||
$this.trigger('open.tc');
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
.bind('open.tc', function(){
|
||||
var $this = $(this), $layer, effect, duration;
|
||||
|
||||
// get content container
|
||||
$layer = $( $this.attr('href') );
|
||||
|
||||
// get effeect
|
||||
effect = $this.data('effect');
|
||||
|
||||
// get duration
|
||||
duration = $this.data('duration') || 'fast';
|
||||
|
||||
// before event trigger
|
||||
$this.trigger('before-open.tc');
|
||||
|
||||
// set state : showing
|
||||
$layer.data('state', 'showing');
|
||||
|
||||
// When mouse button is down or when ESC key is pressed close this layer
|
||||
$(document)
|
||||
.unbind('mousedown.tc keydown.tc')
|
||||
.bind('mousedown.tc keydown.tc',
|
||||
function(event){
|
||||
if(event && (
|
||||
(event.type == 'keydown' && event.which != 27) || // '27' means ESC key
|
||||
(event.type == 'mousedown' && ($(event.target).is('.tgAnchor,.tgContent') || $layer.has(event.target)[0]))
|
||||
)) return true;
|
||||
|
||||
$this.trigger('close.tc');
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
switch(effect) {
|
||||
case 'slide':
|
||||
$layer.slideDown(duration, function(){ $this.trigger('after-open.tc') });
|
||||
break;
|
||||
case 'fade':
|
||||
$layer.fadeIn(duration, function(){ $this.trigger('after-open.tc') });
|
||||
break;
|
||||
default:
|
||||
$layer.show();
|
||||
$this.trigger('after-open.tc');
|
||||
}
|
||||
})
|
||||
.bind('close.tc', function(){
|
||||
var $this = $(this), $layer, effect, duration;
|
||||
|
||||
// get content container
|
||||
$layer = $( $this.attr('href') );
|
||||
|
||||
// get effeect
|
||||
effect = $this.data('effect');
|
||||
|
||||
// get duration
|
||||
duration = $this.data('duration') || 'fast';
|
||||
|
||||
// before event trigger
|
||||
$this.trigger('before-close.tc');
|
||||
|
||||
$(document).unbind('mousedown.tc keydown.tc');
|
||||
|
||||
// set state : hiding
|
||||
$layer.data('state', 'hiding');
|
||||
|
||||
// close this layer
|
||||
switch(effect) {
|
||||
case 'slide':
|
||||
$layer.slideUp(duration, function(){ $this.trigger('after-close.tc') });
|
||||
break;
|
||||
case 'fade':
|
||||
$layer.fadeOut(duration, function(){ $this.trigger('after-close.tc') });
|
||||
break;
|
||||
default:
|
||||
$layer.hide();
|
||||
$this.trigger('after-close.tc');
|
||||
}
|
||||
});
|
||||
$('.tgContent')
|
||||
.hide()
|
||||
.focusout(function(){
|
||||
var $this = $(this), $anchor = $this.data('anchor');
|
||||
setTimeout(function(){
|
||||
if(!$this.find(':focus').length) $anchor.trigger('close.tc');
|
||||
}, 1);
|
||||
})
|
||||
|
||||
// Popup list : 'Move to site' and 'Site map'
|
||||
$('.header>.siteTool>a.i')
|
||||
.bind('before-open.tc', function(){
|
||||
$(this)
|
||||
.addClass('active')
|
||||
.next('div.tgContent')
|
||||
.find('>.section:gt(0)').hide().end()
|
||||
.find('>.btnArea>button').show();
|
||||
})
|
||||
.bind('after-close.tc', function(){
|
||||
$(this).removeClass('active');
|
||||
})
|
||||
.find('.moveTo+input').each(function(){
|
||||
$(this).width(this.value.length+'em');
|
||||
.next('#siteMapList')
|
||||
.find('>.section:last')
|
||||
.after('<p class="btnArea"><button type="button">› more</button></p>')
|
||||
.find('+p>button')
|
||||
.click(function(){
|
||||
// Display all sections then hide this button
|
||||
$(this).hide().parent().prevAll('.section').show();
|
||||
});
|
||||
siteMap.find('.moveTo')
|
||||
.focus(function(){
|
||||
$(this).parent('li').mouseover();
|
||||
})
|
||||
.blur(function(){
|
||||
$(this).mouseout();
|
||||
});
|
||||
siteMap.find('li:first-child').css('border','0');
|
||||
// Site Map List(Layer)
|
||||
var siteMapList = $('#siteMapList');
|
||||
siteMapList.find('.portlet').hide().eq(0).show();
|
||||
siteMapList.append('<p class="btnArea"><button type="button">› more</button></p>');
|
||||
var siteMapMore = siteMapList.find('.btnArea>button');
|
||||
siteMapMore.click(function(){
|
||||
if(siteMapList.find('.portlet:visible').length <= 1){
|
||||
siteMapList.find('.portlet').slideDown(200);
|
||||
$(this).html('› less');
|
||||
} else {
|
||||
siteMapList.find('.portlet').eq(!0).slideUp(200);
|
||||
$(this).html('› more');
|
||||
}
|
||||
});
|
||||
// Mid Suggestion
|
||||
var midUrl = $('#midUrl');
|
||||
var midSuggestion = $('#midSuggestion');
|
||||
var findModule = $('#findModule');
|
||||
midSuggestion.css('position','absolute');
|
||||
midUrl.keypress(function(){
|
||||
$(this).next('.tgContent').fadeIn(200);
|
||||
midUrl.css('background','url(./img/preLoader16.gif) no-repeat 268px center');
|
||||
});
|
||||
midUrl.keyup(function(){
|
||||
midUrl.css('background','');
|
||||
});
|
||||
midSuggestion
|
||||
.find('li:first-child>button').css('fontWeight','bold').end()
|
||||
.find('li:gt(0)>button').click(function(){
|
||||
var myValue = $(this).text();
|
||||
midUrl.val(myValue);
|
||||
return closeTg();
|
||||
});
|
||||
findModule.find('td>button').click(function(){
|
||||
var myValue = $(this).parent('td').parent('tr').find('th:first a').eq(0).text();
|
||||
midUrl.val(myValue);
|
||||
return closeTg();
|
||||
});
|
||||
// Theme & Skin Preview
|
||||
$('.thumbPreview')
|
||||
.find('.thumb')
|
||||
.each(function(){
|
||||
if($(this).find('img').length==0 && $(this).text().length==0){
|
||||
$(this).text('Thumbnail does not exist');
|
||||
}
|
||||
$(this).click(function(){
|
||||
$(this).next(':radio').attr('checked','checked');
|
||||
$(this).parents('.thumbPreview').find(':radio').change();
|
||||
});
|
||||
});
|
||||
var themePreview = $('#theme>.thumbPreview');
|
||||
var skinPreview = $('#skin>.thumbPreview');
|
||||
function iCheck(){
|
||||
skinPreview.find('.i').removeClass('checked');
|
||||
skinPreview.find(':radio:checked').prev('.thumb').parent('.i').addClass('checked');
|
||||
themePreview.find('.i').removeClass('checked');
|
||||
themePreview.find(':radio:checked').prev('.thumb').parent('.i').addClass('checked');
|
||||
}
|
||||
iCheck();
|
||||
skinPreview.find(':radio').change(function(){
|
||||
themePreview.find('label').css('fontWeight','');
|
||||
themePreview.find(':radio:last').attr('checked','checked').next('label').css('fontWeight','bold');
|
||||
iCheck();
|
||||
});
|
||||
themePreview.find(':radio').change(function(){
|
||||
if($(this).is(':checked') && skinPreview.is(':hidden')){
|
||||
$('#skin').find('.h2Anchor').click();
|
||||
}
|
||||
iCheck();
|
||||
});
|
||||
// FTP Suggestion
|
||||
var ftp_path = $('#ftp_path');
|
||||
var ftpSuggestion = $('#ftpSuggestion');
|
||||
ftpSuggestion.css('position','absolute').find('.tgBlur').eq(0).remove();
|
||||
ftpSuggestion.find('li:not(:first-child)>button').click(function(){
|
||||
var setValue = ftp_path.val();
|
||||
var myValue = $(this).text();
|
||||
ftp_path.val(setValue+myValue);
|
||||
});
|
||||
// Sign Up Form
|
||||
var signUpForm = $('.signUpForm');
|
||||
signUpForm
|
||||
.find('li').each(function(){
|
||||
$(this).append('<span class="side"><button type="button" class="up">Up</button> <button type="button" class="down">Down</button></span>');
|
||||
}).end()
|
||||
.find('.btnArea>.side').remove().end()
|
||||
.find('.userItem>.side').each(function(){
|
||||
$(this).append('<button type="button" class="edit">Edit</button> <button type="button" class="delete">Delete</button>');
|
||||
});
|
||||
signUpForm.find('.up').click(function(){
|
||||
var myItem = $(this).parent('.side').parent('li');
|
||||
myItem.prev('li').before(myItem);
|
||||
myItem.css('background','#ffc');
|
||||
setTimeout(function(){
|
||||
myItem.css('background','#fff');
|
||||
}, 2000);
|
||||
});
|
||||
signUpForm.find('.down').click(function(){
|
||||
var myItem = $(this).parent('.side').parent('li');
|
||||
myItem.next('li').after(myItem);
|
||||
myItem.css('background','#ffc');
|
||||
setTimeout(function(){
|
||||
myItem.css('background','#fff');
|
||||
}, 2000);
|
||||
});
|
||||
signUpForm.find('.edit').click(function(){
|
||||
$('.modalAnchor').click();
|
||||
});
|
||||
});
|
||||
|
||||
// TODO : Suggestion
|
||||
// var suggestion = $('#suggestion');
|
||||
// var snTarget = suggestion.prev('input[type=text]');
|
||||
// suggestion.css('position','absolute');
|
||||
// snTarget.keypress(function(){
|
||||
// $(this).next('.tgContent').fadeIn(200);
|
||||
// snTarget.css('background','url(./img/preLoader16.gif) no-repeat 268px center');
|
||||
// });
|
||||
// snTarget.keyup(function(){
|
||||
// snTarget.css('background','');
|
||||
// });
|
||||
// suggestion
|
||||
// .find('li:first-child>button').css('fontWeight','bold').end()
|
||||
// .find('li:gt(0)>button').click(function(){
|
||||
// var myValue = $(this).text();
|
||||
// snTarget.val(myValue);
|
||||
// return closeTg();
|
||||
// });
|
||||
|
||||
// TODO: FTP Suggestion
|
||||
// var ftp_path = $('#ftp_path');
|
||||
// var ftpSuggestion = $('#ftpSuggestion');
|
||||
// ftpSuggestion.css('position','absolute').find('.tgBlur').eq(0).remove();
|
||||
// ftpSuggestion.find('li:not(:first-child)>button').click(function(){
|
||||
// var setValue = ftp_path.val();
|
||||
// var myValue = $(this).text();
|
||||
// ftp_path.val(setValue+myValue);
|
||||
// });
|
||||
|
||||
// TODO: Up-Down Dragable
|
||||
// var uDrag = $('.uDrag');
|
||||
// uDrag.find('>tr>td:first-child, >li').wrapInner('<div class="wrap"></div>');
|
||||
// var uDragWrap = $('.uDrag .wrap');
|
||||
// uDragWrap
|
||||
// .prepend('<button type="button" class="dragBtn">Up/Down</button>')
|
||||
// .each(function(){
|
||||
// var t = $(this);
|
||||
// var tHeight = t.parent().height();
|
||||
// if(t.parent().is('td')){
|
||||
// t.height(tHeight);
|
||||
// }
|
||||
// });
|
||||
// var uDragItem = $('.uDrag>tr, .uDrag>li');
|
||||
// uDragItem
|
||||
// .mouseenter(function(){
|
||||
// $(this).addClass('dragActive');
|
||||
// })
|
||||
// .mouseleave(function(){
|
||||
// $(this).removeClass('dragActive');
|
||||
// });
|
||||
});
|
||||
|
|
|
|||
|
|
@ -102,6 +102,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
function procCommentAdminAddCart()
|
||||
{
|
||||
$comment_srl = Context::get('comment_srl');
|
||||
$commentSrlList = explode(',', $comment_srl);
|
||||
|
||||
if(is_array($commentSrlList))
|
||||
{
|
||||
foreach($commentSrlList AS $key=>$value)
|
||||
{
|
||||
$_SESSION['comment_management'][$value] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief delete all comments of the specific module
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -28,14 +28,21 @@
|
|||
|
||||
// get a list by using comment->getCommentList.
|
||||
$oCommentModel = &getModel('comment');
|
||||
$columnList = array('comment_srl', 'document_srl', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress');
|
||||
$secretNameList = $oCommentModel->getSecretNameList();
|
||||
$columnList = array('comment_srl', 'document_srl', 'is_secret', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress');
|
||||
$output = $oCommentModel->getTotalCommentList($args, $columnList);
|
||||
|
||||
// get total comment count group by is_secret status
|
||||
$countOutput = $oCommentModel->getTotalCommentCount($args);
|
||||
|
||||
// set values in the return object of comment_model:: getTotalCommentList() in order to use a template.
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('comment_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('secret_name_list', $secretNameList);
|
||||
Context::set('countOutput', $countOutput);
|
||||
// set the template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('comment_list');
|
||||
|
|
|
|||
|
|
@ -628,5 +628,27 @@
|
|||
$oModuleController->insertModulePartConfig('comment',$srl,$comment_config);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get comment all list
|
||||
**/
|
||||
function procCommentGetList()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
// Taken from a list of selected sessions
|
||||
$flagList = $_SESSION['comment_management'];
|
||||
if(count($flagList)) {
|
||||
foreach($flagList as $key => $val) {
|
||||
if(!is_bool($val)) continue;
|
||||
$commentSrlList[] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
if(count($commentSrlList)) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$commentList = $oCommentModel->getComments($commentSrlList);
|
||||
}
|
||||
$this->add('comment_list', $commentList);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -396,5 +396,8 @@
|
|||
return;
|
||||
}
|
||||
|
||||
function isCarted() {
|
||||
return $_SESSION['comment_management'][$this->comment_srl];
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -372,6 +372,9 @@
|
|||
case 'ipaddress' :
|
||||
$args->s_ipaddress= $search_keyword;
|
||||
break;
|
||||
case 'is_secret' :
|
||||
$args->s_is_secret= $search_keyword;
|
||||
break;
|
||||
case 'member_srl' :
|
||||
$args->{"s_".$search_target} = (int)$search_keyword;
|
||||
break;
|
||||
|
|
@ -391,6 +394,68 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get all the comment count in time decending order(for administrators)
|
||||
**/
|
||||
function getTotalCommentCount($obj) {
|
||||
$query_id = 'comment.getTotalCommentCountByGroupStatus';
|
||||
// Variables
|
||||
$args->s_module_srl = $obj->module_srl;
|
||||
$args->exclude_module_srl = $obj->exclude_module_srl;
|
||||
// Search options
|
||||
$search_target = $obj->search_target?$obj->search_target:trim(Context::get('search_target'));
|
||||
$search_keyword = $obj->search_keyword?$obj->search_keyword:trim(Context::get('search_keyword'));
|
||||
if($search_target && $search_keyword) {
|
||||
switch($search_target) {
|
||||
case 'content' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_content = $search_keyword;
|
||||
break;
|
||||
case 'user_id' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_user_id = $search_keyword;
|
||||
$query_id = 'comment.getTotalCommentCountWithinMemberByGroupStatus';
|
||||
break;
|
||||
case 'user_name' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_user_name = $search_keyword;
|
||||
break;
|
||||
case 'nick_name' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_nick_name = $search_keyword;
|
||||
break;
|
||||
case 'email_address' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_email_address = $search_keyword;
|
||||
break;
|
||||
case 'homepage' :
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->s_homepage = $search_keyword;
|
||||
break;
|
||||
case 'regdate' :
|
||||
$args->s_regdate = $search_keyword;
|
||||
break;
|
||||
case 'last_update' :
|
||||
$args->s_last_upate = $search_keyword;
|
||||
break;
|
||||
case 'ipaddress' :
|
||||
$args->s_ipaddress= $search_keyword;
|
||||
break;
|
||||
case 'is_secret' :
|
||||
$args->s_is_secret= $search_keyword;
|
||||
break;
|
||||
case 'member_srl' :
|
||||
$args->{"s_".$search_target} = (int)$search_keyword;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$output = executeQueryArray($query_id, $args);
|
||||
// return when no result or error occurance
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return a configuration of comments for each module
|
||||
**/
|
||||
|
|
@ -438,5 +503,13 @@
|
|||
|
||||
$this->add('voted_member_list',$output->data);
|
||||
}
|
||||
|
||||
function getSecretNameList()
|
||||
{
|
||||
global $lang;
|
||||
if(!isset($lang->secret_name_list))
|
||||
return array('Y'=>'Secret', 'N'=>'Public');
|
||||
else return $lang->secret_name_list;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants />
|
||||
<permissions />
|
||||
<permissions>
|
||||
<permission action="procCommentAdminAddCart" target="manager" />
|
||||
<permission action="procCommentGetList" target="manager" />
|
||||
</permissions>
|
||||
<actions>
|
||||
<action name="getCommentMenu" type="model" standalone="true" />
|
||||
<action name="dispCommentAdminList" type="view" admin_index="true" standalone="true" menu_name="comment" menu_index="true" />
|
||||
|
|
@ -13,6 +16,8 @@
|
|||
<action name="procCommentInsertModuleConfig" type="controller" standalone="true" ruleset="insertCommentModuleConfig" />
|
||||
<action name="procCommentAdminDeleteChecked" type="controller" standalone="true" ruleset="deleteChecked" />
|
||||
<action name="procCommentAdminCancelDeclare" type="controller" standalone="true" />
|
||||
<action name="procCommentAdminAddCart" type="controller" standalone="true" />
|
||||
<action name="procCommentGetList" type="controller" standalone="true" />
|
||||
</actions>
|
||||
<menus>
|
||||
<menu name="comment">
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
'regdate' => 'Date',
|
||||
'last_update' => 'Last update',
|
||||
'ipaddress' => 'IP Address',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
'regdate' => 'Fecha del registro',
|
||||
'last_update' => 'Ultima actualización',
|
||||
'ipaddress' => 'Dirección IP',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
'regdate' => 'Jour',
|
||||
'last_update' => 'Mise à Jour',
|
||||
'ipaddress' => 'Adresse IP',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
'regdate' => '登録日',
|
||||
'last_update' => '最終更新日 ',
|
||||
'ipaddress' => 'IPアドレス',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
'regdate' => '등록일',
|
||||
'last_update' => '최근수정일 ',
|
||||
'ipaddress' => 'IP 주소',
|
||||
'is_secret' => '상태',
|
||||
);
|
||||
$lang->no_text_comment = '텍스트가 없는 댓글입니다.';
|
||||
$lang->secret_name_list = array('Y'=>'비밀', 'N'=>'공개');
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
'regdate' => 'Дата регистрации',
|
||||
'last_update' => 'Дата последнего обновления',
|
||||
'ipaddress' => 'IP-адрес',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
'regdate' => 'Tarih',
|
||||
'last_update' => 'Son Güncelleştirme',
|
||||
'ipaddress' => 'IP Adresi',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'Bu yorumda herhangi bir metin yok.';
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
'regdate' => 'Ngày',
|
||||
'last_update' => 'Cập nhật lần cuối',
|
||||
'ipaddress' => 'IP',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
'regdate' => '日期',
|
||||
'last_update' => '最后更新 ',
|
||||
'ipaddress' => 'IP 地址',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
'regdate' => '日期',
|
||||
'last_update' => '最後更新',
|
||||
'ipaddress' => 'IP位址',
|
||||
'is_secret' => 'Status',
|
||||
);
|
||||
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<query id="getTotalCommentList" action="select">
|
||||
<tables>
|
||||
<table name="comments" alias="comments" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="is_secret" />
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="s_module_srl" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" pipe="and" />
|
||||
<condition operation="equal" column="is_secret" var="s_is_secret" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="content" var="s_content" pipe="or" />
|
||||
<condition operation="like" column="user_name" var="s_user_name" pipe="or" />
|
||||
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="email_address" var="s_email_address" pipe="or" />
|
||||
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="equal" column="member_srl" var="s_member_srl" pipe="or" />
|
||||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_upate" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="is_secret" />
|
||||
</groups>
|
||||
</query>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<query id="getTotalCommentListWithinMember" action="select">
|
||||
<tables>
|
||||
<table name="comments" alias="comments" />
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="comments.is_secret" />
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="like" column="member.user_id" var="s_user_id" notnull="notnull" />
|
||||
<condition operation="equal" column="member.member_srl" var="comments.member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="comments.is_secret" var="s_is_secret" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="comments.content" var="s_content" />
|
||||
<condition operation="like" column="comments.user_name" var="s_user_name" pipe="or" />
|
||||
<condition operation="like" column="comments.nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="comments.email_address" var="s_email_address" pipe="or" />
|
||||
<condition operation="like" column="comments.homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like_prefix" column="comments.regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="comments.last_update" var="s_last_upate" pipe="or" />
|
||||
<condition operation="like_prefix" column="comments.ipaddress" var="s_ipaddress" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="comments.is_secret" />
|
||||
</groups>
|
||||
</query>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="s_module_srl" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" pipe="and" />
|
||||
<condition operation="equal" column="is_secret" var="s_is_secret" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="content" var="s_content" pipe="or" />
|
||||
<condition operation="like" column="user_name" var="s_user_name" pipe="or" />
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<conditions>
|
||||
<condition operation="like" column="member.user_id" var="s_user_id" notnull="notnull" />
|
||||
<condition operation="equal" column="member.member_srl" var="comments.member_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="comments.is_secret" var="s_is_secret" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="comments.content" var="s_content" />
|
||||
<condition operation="like" column="comments.user_name" var="s_user_name" pipe="or" />
|
||||
|
|
|
|||
|
|
@ -1,81 +1,145 @@
|
|||
<!--#include("./header.html")-->
|
||||
<!--%import("js/comment_admin.js")-->
|
||||
<div class="content" id="content">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="deleteChecked" id="fo_list" action="./" method="post" class="form">
|
||||
<input type="hidden" name="act" value="procCommentAdminDeleteChecked" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="is_trash" value="false" />
|
||||
<h1 class="h1">Comment</h1>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>All({number_format($total_count)}) <span class="side">All({number_format($total_count)})
|
||||
<!--@foreach($countOutput AS $key=>$value)-->
|
||||
| <a href="{getUrl('search_target','is_secret','search_keyword', $value->is_secret)}">{$secret_name_list[$value->is_secret]}({$value->count})</a>
|
||||
<!--@end-->
|
||||
</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text">{$lang->comment}</th>
|
||||
<th scope="col">{$lang->nick_name}</th>
|
||||
<th scope="col">{$lang->cmd_vote}(+/-)</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->ipaddress}</th>
|
||||
<th scope="col">{$lang->status}</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($comment_list as $no => $val)-->
|
||||
{@ $comment = cut_str(trim(htmlspecialchars(strip_tags($val->content))), 200, '...')}
|
||||
<tr>
|
||||
<td class="text"><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" onclick="window.open(this.href);return false;"><!--@if(strlen($comment))-->{$comment}<!--@else--><em style="font-style:italic;">{$lang->no_text_comment}</em><!--@end--></a></td>
|
||||
<td><span class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</span></td>
|
||||
<td>0/0</td>
|
||||
<td>{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
||||
<td><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||
<td><!--@if($val->isSecret())-->{$secret_name_list['Y']}<!--@else-->{$secret_name_list['N']}<!--@end--></td>
|
||||
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" onclick="addCart({$val->comment_srl})" <!--@if($val->isCarted())-->checked="checked"<!--@end--> /></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getCommentList();">선택한 댓글 관리...</a></span>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal" id="listManager">
|
||||
<form action="" class="fg form">
|
||||
<h2 class="h2">선택한 댓글 관리</h2>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>
|
||||
선택한 댓글 <strong>8</strong>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">Comment</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" checked="checked" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="title">The quick brown fox jumps over the lazy dog...</td>
|
||||
<td>홍길동</td>
|
||||
<td>Public</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title">The quick brown fox jumps over the lazy dog...</td>
|
||||
<td>홍길동</td>
|
||||
<td>Trash</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="q">선택한 댓글의 상태를 변경.</p>
|
||||
<p>
|
||||
<input type="radio" name="status" id="public" /> <label for="public">Public</label>
|
||||
<input type="radio" name="status" id="secret" /> <label for="secret">Secret</label>
|
||||
</p>
|
||||
<p class="q"><label for="message">저작자에게 쪽지를 발송해서 이 사실을 알립니다. 작성하지 않으면 발송하지 않습니다.</label></p>
|
||||
<p>
|
||||
<textarea cols="42" rows="3" 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="Trash" /></span>
|
||||
<span class="btn"><input type="submit" value="Delete" class="delete" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="search">
|
||||
<form action="./" class="pagination">
|
||||
<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}" />
|
||||
|
||||
<!-- 검색 -->
|
||||
<div class="fl">
|
||||
<a href="{getUrl('page', '')}" class="direction">« FIRST</a>
|
||||
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
|
||||
<a href="{getUrl('page', '')}">1</a>
|
||||
<a href="#goTo" class="tgSimple">...</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<input name="page" title="Go to Page" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
{@$last_page = $page_no}
|
||||
<strong cond="$page_no == $page">{$page_no}</strong>
|
||||
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<block cond="$last_page != $page_navigation->last_page">
|
||||
<a href="#goTo" class="tgSimple">...</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<input name="page" title="Go to Page" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST »</a>
|
||||
</form>
|
||||
<form action="./" method="get" class="adminSearch">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<fieldset>
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
|
||||
<span class="button blue"><input type="submit" value="{$lang->cmd_search}" /></span>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="button black"><span>{$lang->cmd_cancel}</span></a>
|
||||
</fieldset>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
<a href="{getUrl('','module',$module,'act',$act)}">{$lang->cmd_cancel}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--form id="fo_list" action="./" method="get" onsubmit="return procFilter(this, delete_checked)"-->
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="deleteChecked" id="fo_list" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procCommentAdminDeleteChecked" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="is_trash" value="false" />
|
||||
|
||||
<!-- 모듈 선택 -->
|
||||
<div class="fr">
|
||||
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_find_module}</span></a>
|
||||
<span class="button red"><input type="submit" name="delete" value="{$lang->cmd_delete_checked_comment}" onclick="this.form.is_trash.value=false" /></span>
|
||||
<span class="button red"><input type="submit" name="trash" value="{$lang->cmd_trash}" onclick="this.form.is_trash.value=true" /></span>
|
||||
</div>
|
||||
|
||||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="crossTable clear">
|
||||
<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->no}</div></th>
|
||||
<th scope="col"><div><input type="checkbox" onclick="XE.checkboxToggleAll(); return false;" /></div></th>
|
||||
<th scope="col" class="wide"><div>{$lang->comment}</div></th>
|
||||
<th scope="col"><div>{$lang->nick_name}</div></th>
|
||||
<th scope="col"><div>{$lang->date}</div></th>
|
||||
<th scope="col"><div>{$lang->ipaddress}</div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($comment_list as $no => $val)-->
|
||||
{@ $comment = cut_str(trim(htmlspecialchars(strip_tags($val->content))), 200, '...')}
|
||||
<tr>
|
||||
<td class="number center">{$no}</td>
|
||||
<td class="center"><input type="checkbox" name="cart[]" value="{$val->comment_srl}" /></td>
|
||||
<td class="left"><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" onclick="window.open(this.href);return false;"><!--@if(strlen($comment))-->{$comment}<!--@else--><em style="font-style:italic;">{$lang->no_text_comment}</em><!--@end--></a></td>
|
||||
<td class="nowrap"><span class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</span></td>
|
||||
<td class="date center nowrap">{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
||||
<td class="number left nowrap"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
<div class="pagination a1">
|
||||
<a href="{getUrl('page','','module_srl',$module_srl)}" class="prevEnd">{$lang->first_page}</a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<strong>{$page_no}</strong>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'module_srl',$module_srl)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl',$module_srl)}" class="nextEnd">{$lang->last_page}</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,3 +16,47 @@ function doCancelDeclare() {
|
|||
function insertSelectedModule(id, module_srl, mid, browser_title) {
|
||||
location.href = current_url.setQuery('module_srl',module_srl);
|
||||
}
|
||||
|
||||
function addCart(comment_srl) {
|
||||
var params = new Array();
|
||||
var response_tags = ['error','message'];
|
||||
var comment_srl = new Array();
|
||||
jQuery('#fo_list input[name=cart]:checked').each(function() {
|
||||
comment_srl[comment_srl.length] = jQuery(this).val();
|
||||
});
|
||||
params['comment_srl'] = comment_srl.join(',');
|
||||
|
||||
exec_xml('comment','procCommentAdminAddCart',params, completeAddCart, response_tags);
|
||||
}
|
||||
|
||||
function completeAddCart(ret_obj, response_tags)
|
||||
{
|
||||
}
|
||||
|
||||
function getCommentList()
|
||||
{
|
||||
var params = new Array();
|
||||
var response_tags = ['error','message', 'comment_list'];
|
||||
|
||||
exec_xml('comment','procCommentGetList',params, completeGetCommentList, response_tags);
|
||||
}
|
||||
|
||||
function completeGetCommentList(ret_obj, response_tags)
|
||||
{
|
||||
var comment_list = ret_obj['comment_list']['item'];
|
||||
console.log(comment_list);
|
||||
/*var htmlListBuffer = '';
|
||||
var statusNameList = {"PUBLIC":"Public", "SECRET":"Secret", "PRIVATE":"Private", "TEMP":"Temp"};
|
||||
|
||||
for(var x in comment_list)
|
||||
{
|
||||
var objDocument = comment_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>' +
|
||||
'</tr>';
|
||||
}
|
||||
jQuery('#documentManageListTable>tbody').html(htmlListBuffer);*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
<action name="procDocumentMoveCategory" type="controller" standalone="true" />
|
||||
<action name="procDocumentMakeXmlFile" type="controller" standalone="true" />
|
||||
<action name="procDocumentTempSave" type="controller" standalone="true" />
|
||||
<action name="procDocumentGetList" type="controller" standalone="true" />
|
||||
|
||||
<action name="procDocumentAdminInsertAlias" type="controller" standalone="true" ruleset="insertAlias" />
|
||||
<action name="procDocumentAdminDeleteAlias" type="controller" standalone="true" ruleset="deleteAlias" />
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@
|
|||
$oDocumentModel = &getModel('document');
|
||||
$output = $oDocumentModel->getDocumentList($args);
|
||||
|
||||
// count eache status, not in trash...
|
||||
$countOutput = $oDocumentModel->getDocumentCountByGroupStatus($args);;
|
||||
|
||||
// get Status name list
|
||||
$statusNameList = $oDocumentModel->getStatusNameList();
|
||||
|
||||
|
|
@ -53,6 +56,7 @@
|
|||
Context::set('document_list', $output->data);
|
||||
Context::set('status_name_list', $statusNameList);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('countOutput', $countOutput);
|
||||
|
||||
// set a search option used in the template
|
||||
$count_search_option = count($this->search_option);
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,28 @@ class documentController extends document {
|
|||
$this->add('document_srl', $obj->document_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return Document List for exec_xml
|
||||
**/
|
||||
function procDocumentGetList()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
// Taken from a list of selected sessions
|
||||
$flagList = $_SESSION['document_management'];
|
||||
if(count($flagList)) {
|
||||
foreach($flagList as $key => $val) {
|
||||
if(!is_bool($val)) continue;
|
||||
$documentSrlList[] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
if(count($documentSrlList)) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$documentList = $oDocumentModel->getDocuments($documentSrlList, $this->grant->is_admin);
|
||||
}
|
||||
$this->add('document_list', $documentList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief for old version, comment allow status check.
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -515,6 +515,26 @@
|
|||
$total_count = $output->data->count;
|
||||
return (int)$total_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief module_srl the total number of documents that are bringing
|
||||
**/
|
||||
function getDocumentCountByGroupStatus($search_obj = NULL) {
|
||||
// Additional search options
|
||||
$args->module_srl = $search_obj->module_srl;
|
||||
$args->s_title = $search_obj->s_title;
|
||||
$args->s_content = $search_obj->s_content;
|
||||
$args->s_user_name = $search_obj->s_user_name;
|
||||
$args->s_member_srl = $search_obj->s_member_srl;
|
||||
$args->s_ipaddress = $search_obj->s_ipaddress;
|
||||
$args->s_regdate = $search_obj->s_regdate;
|
||||
$args->category_srl = $search_obj->category_srl;
|
||||
|
||||
$output = executeQuery('document.getDocumentCountByGroupStatus', $args);
|
||||
if(!$output->toBool()) return array();
|
||||
|
||||
return $output->data;
|
||||
}
|
||||
/**
|
||||
* @brief Import page of the document, module_srl Without throughout ..
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -7,14 +7,33 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="category_srl" var="category_srl" />
|
||||
<condition operation="equal" column="is_notice" var="s_is_notice" pipe="and" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" pipe="and" />
|
||||
<condition operation="in" column="status" var="statusList" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="title" var="s_title" />
|
||||
<condition operation="like" column="content" var="s_content" pipe="and" />
|
||||
<condition operation="like" column="user_name" var="s_user_name" pipe="and" />
|
||||
<condition operation="like" column="user_id" var="s_user_id" pipe="or" />
|
||||
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="email_address" var="s_email_addres" pipe="or" />
|
||||
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like" column="tags" var="s_tags" pipe="or" />
|
||||
<condition operation="equal" column="member_srl" var="s_member_srl" pipe="and" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="and" />
|
||||
<condition operation="more" column="readed_count" var="s_readed_count" pipe="or" />
|
||||
<condition operation="more" column="voted_count" var="s_voted_count" pipe="or" />
|
||||
<condition operation="more" column="comment_count" var="s_comment_count" pipe="or" />
|
||||
<condition operation="more" column="trackback_count" var="s_trackback_count" pipe="or" />
|
||||
<condition operation="more" column="uploaded_count" var="s_uploaded_count" pipe="or" />
|
||||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="and" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_update" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="and" />
|
||||
</group>
|
||||
<group pipe="and">
|
||||
<condition operation="more" column="last_update" var="start_date" pipe="and" />
|
||||
<condition operation="less" column="last_update" var="end_date" pipe="and" />
|
||||
</group>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
43
modules/document/queries/getDocumentCountByGroupStatus.xml
Normal file
43
modules/document/queries/getDocumentCountByGroupStatus.xml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<query id="getDocumentCountByGroupStatus" action="select">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="status" alias="status" />
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="category_srl" var="category_srl" />
|
||||
<condition operation="equal" column="is_notice" var="s_is_notice" pipe="and" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" pipe="and" />
|
||||
<condition operation="in" column="status" var="statusList" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="title" var="s_title" />
|
||||
<condition operation="like" column="content" var="s_content" pipe="and" />
|
||||
<condition operation="like" column="user_name" var="s_user_name" pipe="and" />
|
||||
<condition operation="like" column="user_id" var="s_user_id" pipe="or" />
|
||||
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="email_address" var="s_email_addres" pipe="or" />
|
||||
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like" column="tags" var="s_tags" pipe="or" />
|
||||
<condition operation="equal" column="member_srl" var="s_member_srl" pipe="and" />
|
||||
<condition operation="more" column="readed_count" var="s_readed_count" pipe="or" />
|
||||
<condition operation="more" column="voted_count" var="s_voted_count" pipe="or" />
|
||||
<condition operation="more" column="comment_count" var="s_comment_count" pipe="or" />
|
||||
<condition operation="more" column="trackback_count" var="s_trackback_count" pipe="or" />
|
||||
<condition operation="more" column="uploaded_count" var="s_uploaded_count" pipe="or" />
|
||||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="and" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_update" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="and" />
|
||||
</group>
|
||||
<group pipe="and">
|
||||
<condition operation="more" column="last_update" var="start_date" pipe="and" />
|
||||
<condition operation="less" column="last_update" var="end_date" pipe="and" />
|
||||
</group>
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="status" />
|
||||
</groups>
|
||||
</query>
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
<form id="fo_list" action="./" method="get">
|
||||
<!--%import("js/document_admin.js")-->
|
||||
<form id="fo_list" action="./" method="get" class="form">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<h1 class="h1">Document</h1>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>All({number_format($total_count)}) <span class="side">All({number_format($total_count)}) | <a href="#">Public(456)</a> | <a href="#">Secret(8)</a> | <a href="#">Private(9)</a> | <a href="#">Temp(12)</a> | <a href="#">Trash(4)</a></span></caption>
|
||||
<table width="100%" border="1" cellspacing="0" id="documentListTable">
|
||||
<caption>All({number_format($total_count)}) <span class="side">All({number_format($total_count)})
|
||||
<!--@foreach($countOutput AS $key=>$value)-->
|
||||
| <a href="#">{$status_name_list[$value->status]}({$value->count})</a>
|
||||
<!--@end-->
|
||||
</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->title}</th>
|
||||
|
|
@ -13,7 +18,7 @@
|
|||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->ipaddress}</th>
|
||||
<th scope="col">{$lang->status}</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" onclick="XE.checkboxToggleAll({ doClick:true }); return false;" /></th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -29,57 +34,35 @@
|
|||
<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($oDocument->isCarted())-->checked="checked"<!--@end--> /></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<td class="title"><a href="#" target="_blank">The quick brown fox jumps over the lazy dog.</a></td>
|
||||
<td><a href="#popup_menu_area">홍길동</a></td>
|
||||
<td>2</td>
|
||||
<td>1/-1</td>
|
||||
<td>2010-12-24 15:59</td>
|
||||
<td>123.456.789.0</td>
|
||||
<td>Trash</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor">선택한 글 관리...</a></span>
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getDocumentList();">선택한 글 관리...</a></span>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal" id="listManager">
|
||||
<form action="" class="fg form">
|
||||
<h2 class="h2">선택한 글 관리</h2>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<table width="100%" border="1" cellspacing="0" id="documentManageListTable">
|
||||
<caption>선택한 글 <strong>8</strong></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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" checked="checked" /></th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="title">The quick brown fox jumps over the lazy dog.</td>
|
||||
<td>홍길동</td>
|
||||
<td>Public</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title">The quick brown fox jumps over the lazy dog.</td>
|
||||
<td>홍길동</td>
|
||||
<td>Trash</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="q"><label for="midUrl">선택한 글을 다음 위치로 옮기거나 복사할 수 있습니다.</label></p>
|
||||
<div class="a">
|
||||
<input type="text" id="midUrl" />
|
||||
<span class="desc"><a href="#midSuggestion" class="tgFade">Find Module ID</a></span>
|
||||
<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>
|
||||
|
|
@ -103,33 +86,50 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="search">
|
||||
<form action="" class="pagination">
|
||||
<a href="#" class="direction">« FIRST</a>
|
||||
<a href="#" class="direction">‹ PREV</a>
|
||||
<strong>11</strong>
|
||||
<a href="#">12</a>
|
||||
<a href="#">13</a>
|
||||
<form action="./" class="pagination">
|
||||
<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}" />
|
||||
|
||||
<a href="{getUrl('page', '')}" class="direction">« FIRST</a>
|
||||
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
|
||||
<a href="{getUrl('page', '')}">1</a>
|
||||
<a href="#goTo" class="tgSimple">...</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<input title="Go to Page" />
|
||||
<button type="submit">GO</button>
|
||||
<input name="page" title="Go to Page" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
<a href="#">99</a>
|
||||
<a href="#" class="direction">NEXT ›</a>
|
||||
<a href="#" class="direction">LAST »</a>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
{@$last_page = $page_no}
|
||||
<strong cond="$page_no == $page">{$page_no}</strong>
|
||||
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<block cond="$last_page != $page_navigation->last_page">
|
||||
<a href="#goTo" class="tgSimple">...</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<input name="page" title="Go to Page" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST »</a>
|
||||
</form>
|
||||
<form action="">
|
||||
<select>
|
||||
<option>제목</option>
|
||||
<option>내용</option>
|
||||
<option>닉네임</option>
|
||||
<option>아이디</option>
|
||||
<option>사용자 이름</option>
|
||||
<option>공지사항</option>
|
||||
<option>IP 주소</option>
|
||||
<option>모듈 아이디</option>
|
||||
|
||||
<form action="./" method="get" class="adminSearch">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input title="Search" />
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="Search" />
|
||||
<a href="#">Cancel</a>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -147,3 +147,43 @@ function completeRestoreTrash(ret_obj) {
|
|||
alert(ret_obj['message']);
|
||||
location.href = current_url;
|
||||
}
|
||||
|
||||
function getDocumentList() {
|
||||
var params = new Array();
|
||||
var response_tags = ['error','message', 'document_list'];
|
||||
|
||||
exec_xml('document','procDocumentGetList',params, completeGetDocumentList, response_tags);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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>' +
|
||||
'</tr>';
|
||||
}
|
||||
jQuery('#documentManageListTable>tbody').html(htmlListBuffer);
|
||||
}
|
||||
|
||||
function getModuleList()
|
||||
{
|
||||
var params = new Array();
|
||||
var response_tags = ['error', 'message'];
|
||||
|
||||
exec_xml('document','procModuleAdminGetList',params, completeGetModuleList, response_tags);
|
||||
}
|
||||
|
||||
function completeGetModuleList(ret_obj, response_tags)
|
||||
{
|
||||
console.log(ret_obj['error']);
|
||||
console.log(ret_obj['message']);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
<action name="procModuleAdminModuleGrantSetup" type="controller" standalone="true" ruleset="insertModulesGrant" />
|
||||
<action name="procModuleAdminInsertLang" type="controller" standalone="true" />
|
||||
<action name="procModuleAdminDeleteLang" type="controller" standalone="true" />
|
||||
<action name="procModuleAdminGetList" type="controller" standalone="true" />
|
||||
|
||||
<action name="dispModuleChangeLang" type="mobile" />
|
||||
</actions>
|
||||
|
|
|
|||
|
|
@ -453,6 +453,50 @@
|
|||
$this->makeCacheDefinedLangCode($args->site_srl);
|
||||
}
|
||||
|
||||
function procModuleAdminGetList()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
// Variable setting for site keyword
|
||||
$site_keyword = Context::get('site_keyword');
|
||||
// If there is no site keyword, use as information of the current virtual site
|
||||
$args = null;
|
||||
$logged_info = Context::get('logged_info');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args->site_keyword = $site_keyword;
|
||||
|
||||
if($logged_info->is_admin == 'Y' && !$site_keyword) $args->site_srl = 0;
|
||||
else $args->site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
$args->sort_index1 = 'sites.domain';
|
||||
|
||||
// Get a list of modules at the site
|
||||
$output = executeQueryArray('module.getSiteModules', $args);
|
||||
$category_list = $mid_list = array();
|
||||
if(count($output->data)) {
|
||||
foreach($output->data as $key => $val) {
|
||||
/*$module = trim($val->module);
|
||||
if(!$module) continue;
|
||||
|
||||
$category = $val->category;
|
||||
$obj = null;
|
||||
$obj->module_srl = $val->module_srl;
|
||||
$obj->browser_title = $val->browser_title;
|
||||
$mid_list[$module]->list[$category][$val->mid] = $obj;*/
|
||||
}
|
||||
}
|
||||
|
||||
/*$selected_module = Context::get('selected_module');
|
||||
if(count($mid_list)) {
|
||||
foreach($mid_list as $module => $val) {
|
||||
if(!$selected_module) $selected_module = $module;
|
||||
$xml_info = $oModuleModel->getModuleInfoXml($module);
|
||||
$mid_list[$module]->title = $xml_info->title;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Save the file of user-defined language code
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<condition operation="equal" column="sites.site_srl" default="modules.site_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="modules.module" order="asc" />
|
||||
<index var="sort_index" default="modules.mid" order="asc" />
|
||||
<index var="sort_index1" default="modules.module" order="asc" />
|
||||
<index var="sort_index2" default="modules.mid" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<permissions />
|
||||
<actions>
|
||||
<action name="dispTrackbackSend" type="view" standalone="true" />
|
||||
<action name="dispTrackbackAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispTrackbackAdminList" type="view" admin_index="true" standalone="true" menu_name="trackback" menu_index="true" />
|
||||
|
||||
<action name="trackback" type="controller" standalone="true" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,103 +1,110 @@
|
|||
<!--%import("js/trackback_admin.js")-->
|
||||
|
||||
<h3 class="xeAdmin">{$lang->trackback} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<div class="content" id="content">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="./" method="post">
|
||||
<input type="hidden" name="act" value="procTrackbackAdminInsertConfig" />
|
||||
<table cellspacing="0" class="rowTable topGap">
|
||||
<tr class="row2">
|
||||
<th scope="col"><div>{$lang->enable_trackback}</div></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="enable_trackback" value="Y" size="3" <!--@if($config->enable_trackback=='Y')-->checked="checked"<!--@end-->/> {$lang->cmd_use}
|
||||
<p>{$lang->about_enable_trackback}</p>
|
||||
<form action="" class="form" class="form">
|
||||
<h1 class="h1">{$lang->trackback}</h1>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>
|
||||
All({number_format($total_count)})
|
||||
<span class="side"><span class="btn"><a href="#listManager" class="modalAnchor">선택한 엮인글 관리...</a></span></span>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text">{$lang->title}</th>
|
||||
<th scope="col">{$lang->blog_name}</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->ipaddress}IP</th>
|
||||
<th scope="col"><input type="checkbox" data-name="cart[]" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="text">{$lang->title}</th>
|
||||
<th scope="col">{$lang->blog_name}</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->ipaddress}IP</th>
|
||||
<th scope="col"><input type="checkbox" data-name="cart[]" title="Check All" /></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<!--@foreach($trackback_list as $no => $val)-->
|
||||
<tr>
|
||||
<td class="text">
|
||||
<a href="{getUrl('','document_srl',$val->document_srl)}#trackback_{$val->trackback_srl}" target="_blank">{htmlspecialchars($val->title)}</a>
|
||||
<p>{$val->excerpt}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th class="button"><span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<!-- 검색 -->
|
||||
<div class="fl">
|
||||
<form action="./" method="get" class="adminSearch">
|
||||
<td><a href="{$val->url}" target="_blank">{htmlspecialchars($val->blog_name)}</a></td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||
<td><input type="checkbox" name="cart[]" value="{$val->trackback_srl}" /></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor">선택한 엮인글 관리...</a></span>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal" id="listManager">
|
||||
<form ruleset="deleteChecked" id="fo_list" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procTrackbackAdminDeleteChecked" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<h2 class="h2">선택한 엮인글 관리</h2>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>
|
||||
선택한 엮인글 <strong>8</strong>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title"><span class="text">Trackback</span></th>
|
||||
<th scope="col">Site</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" checked="checked" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text"> <strong>The quick brown fox jumps over the lazy dog.</strong>
|
||||
<p>무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다...</p>
|
||||
</td>
|
||||
<td>나라디자인</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text"> <strong>The quick brown fox jumps over the lazy dog.</strong>
|
||||
<p>무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다...</p>
|
||||
</td>
|
||||
<td>행복한고니</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="Trash" /></span>
|
||||
<span class="btn"><input type="submit" value="Delete" class="delete" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="search">
|
||||
<!--page navigation-->
|
||||
<form action="">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
|
||||
<fieldset>
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="inputTypeText" />
|
||||
<span class="button blue"><input type="submit" value="{$lang->cmd_search}" /></span>
|
||||
<a href="{getUrl('','module',$module,'act',$act)}" class="button black"><span>{$lang->cmd_cancel}</span></a>
|
||||
</fieldset>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
<a href="{getUrl('','module',$module,'act',$act)}">{$lang->cmd_cancel}</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form ruleset="deleteChecked" id="fo_list" action="./" method="post">
|
||||
<input type="hidden" name="act" value="procTrackbackAdminDeleteChecked" />
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
|
||||
<!-- 모듈 선택 -->
|
||||
<div class="fr">
|
||||
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module','type','single')}" onclick="popopen(this.href,'ModuleSelect');return false;" class="button green"><span>{$lang->cmd_find_module}</span></a>
|
||||
<span class="button red"><input type="submit" value="{$lang->cmd_delete_checked_trackback}" /></span>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="rowTable clear">
|
||||
<caption>Total {number_format($total_count)}, Page {number_format($page)}/{number_format($total_page)}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->no}</div></th>
|
||||
<th scope="col"><div><input type="checkbox" onclick="XE.checkboxToggleAll(); return false;" /></div></th>
|
||||
<th scope="col"><div>{$lang->blog_name}</div></th>
|
||||
<th scope="col" class="wide"><div>{$lang->title}</div></th>
|
||||
<th scope="col"><div>{$lang->date}</div></th>
|
||||
<th scope="col"><div>{$lang->ipaddress}</div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($trackback_list as $no => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<td rowspan="2" class="center number" scope="col">{$no}</td>
|
||||
<td rowspan="2" class="center"><input type="checkbox" name="cart[]" value="{$val->trackback_srl}" /></td>
|
||||
<td rowspan="2"><div class="w200"><a href="{$val->url}" onclick="window.open(this.href); return false;">{htmlspecialchars($val->blog_name)}</a></div></td>
|
||||
<td ><a href="{getUrl('','document_srl',$val->document_srl)}#trackback_{$val->trackback_srl}" onclick="window.open(this.href);return false;">{htmlspecialchars($val->title)}</a></td>
|
||||
<td class="date center nowrap">{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td class="number left nowrap"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
{$val->excerpt}
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
<div class="pagination a1">
|
||||
<a href="{getUrl('page','','module_srl','')}" class="prevEnd">{$lang->first_page}</a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<strong>{$page_no}</strong>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="nextEnd">{$lang->last_page}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue