mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Issue 2380: Admin UI Refactoring - Advanced - Layouts
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11610 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2d4b235146
commit
b8eb83cd94
16 changed files with 219 additions and 1313 deletions
|
|
@ -891,6 +891,29 @@ $('.filebox')
|
|||
|
||||
$.exec_json('module.getFileBoxListHtml', {'page': '1'}, on_complete);
|
||||
});
|
||||
// Details toggle in admin table
|
||||
var simpleBtn = $('.x .dsTg .__simple');
|
||||
var detailBtn = $('.x .dsTg .__detail');
|
||||
var tdTitle = $('.x .dsTg td.title');
|
||||
tdTitle.each(function(){
|
||||
var $t = $(this)
|
||||
if($t.find('p.update').length==0){
|
||||
$t.addClass('tg').find('>*:not(:first-child)').hide();
|
||||
} else {
|
||||
$t.addClass('up');
|
||||
}
|
||||
});
|
||||
var details = $('.x .dsTg td.tg>*:not(:first-child)');
|
||||
simpleBtn.click(function(){
|
||||
details.slideUp(200);
|
||||
detailBtn.removeClass('x_active');
|
||||
simpleBtn.addClass('x_active');
|
||||
});
|
||||
detailBtn.click(function(){
|
||||
details.slideDown(200);
|
||||
detailBtn.addClass('x_active');
|
||||
simpleBtn.removeClass('x_active');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
941
modules/admin/tpl/js/admin.min.js
vendored
941
modules/admin/tpl/js/admin.min.js
vendored
|
|
@ -1,910 +1,31 @@
|
|||
/* NHN (developers@xpressengine.com) */
|
||||
jQuery(function($){
|
||||
// iSO mobile device toolbar remove
|
||||
window.top.scrollTo(0,0);
|
||||
// Skip to content
|
||||
$('.x .skipNav>a').click(function(){
|
||||
$($(this).attr('href')).attr('tabindex','0').css('outline','0').focus();
|
||||
});
|
||||
// TARGET toggle
|
||||
$(document.body).on('click', '.x [data-toggle]', function(){
|
||||
var $this = $(this);
|
||||
var $target = $($this.attr('data-toggle'));
|
||||
$target.toggle();
|
||||
if($target.is(':visible') && !$target.find('a,input,button,textarea,select').length){
|
||||
$target.attr('tabindex','0').focus();
|
||||
} else if($target.is(':visible') && $target.find('a,input,button,textarea,select').length) {
|
||||
$target.find('a,input,button,textarea,select').eq(0).focus();
|
||||
} else {
|
||||
$this.focus();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
// TARGET show
|
||||
$(document.body).on('click', '.x [data-show]', function(){
|
||||
$($(this).attr('data-show')).show().attr('tabindex','0').focus();
|
||||
return false;
|
||||
});
|
||||
// TARGET hide
|
||||
$(document.body).on('click', '.x [data-hide]', function(){
|
||||
var $this = $(this);
|
||||
$($this.attr('data-hide')).hide();
|
||||
$this.focus();
|
||||
return false;
|
||||
});
|
||||
// Tab Navigation
|
||||
$('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();
|
||||
$('.x .x_nav-tabs').find('>li>a[href^="#"]').click(function(){
|
||||
var $this = $(this);
|
||||
$this.parent('li').addClass('x_active').siblings().removeClass('x_active');
|
||||
$this.closest('.x_nav-tabs').next('.x_tab-content').find($this.attr('href')).addClass('x_active').show().siblings().removeClass('x_active').hide();
|
||||
return false;
|
||||
});
|
||||
// GNB Height 100%
|
||||
var $xBody = $('.x>.body');
|
||||
var $xContent = $xBody.find('>.content');
|
||||
var $xGnb = $xBody.find('>.gnb');
|
||||
var $xGnb_li = $xGnb.find('>ul>li');
|
||||
$(window).resize(function(){
|
||||
setTimeout(function(){
|
||||
if($(window).width() <= 980 || $(window).width() > 1240){
|
||||
$xBody.removeClass('wide');
|
||||
} else {
|
||||
$xBody.addClass('wide');
|
||||
}
|
||||
}, 100);
|
||||
}).resize();
|
||||
// GNB Click toggle
|
||||
$xGnb_li.find('ul').prev('a')
|
||||
.bind('click focus', function(){
|
||||
var $this = $(this);
|
||||
// Submenu toggle
|
||||
$xGnb_li.not($this.parent('li')).removeClass('open');
|
||||
$(this).parent('li').toggleClass('open');
|
||||
$xGnb.trigger('mouseenter'); // GNB Hover
|
||||
return false;
|
||||
});
|
||||
// GNB Hover toggle
|
||||
function contentBugFix(){ // Chrome browser rendering bug fix
|
||||
$xContent.width('99.99%');
|
||||
setTimeout(function(){
|
||||
$xContent.removeAttr('style');
|
||||
}, 0);
|
||||
}
|
||||
$xGnb
|
||||
.mouseenter(function(){ // Mouseenter
|
||||
if($(window).width() >= 980){
|
||||
$xBody.removeClass('wide');
|
||||
contentBugFix();
|
||||
}
|
||||
})
|
||||
.mouseleave(function(){ // Mouseleave
|
||||
if($(window).width() >= 980 && $(window).width() < 1240){
|
||||
$xBody.addClass('wide');
|
||||
contentBugFix();
|
||||
}
|
||||
});
|
||||
// GNB Mobile Toggle
|
||||
$xGnb.find('>a[href="#gnbNav"]').click(function(){
|
||||
$(this).parent('.gnb').toggleClass('open');
|
||||
return false;
|
||||
});
|
||||
// GNB Close
|
||||
$xGnb
|
||||
.prepend('<button type="button" class="close before" />')
|
||||
.append('<button type="button" class="close after" />');
|
||||
$xGnb.find('>.close').focus(function(){
|
||||
$xBody.addClass('wide');
|
||||
contentBugFix();
|
||||
});
|
||||
// Check All
|
||||
$('.x th>input[type="checkbox"]')
|
||||
.change(function() {
|
||||
var $this = $(this), name = $this.data('name');
|
||||
|
||||
$this.closest('table')
|
||||
.find('input:checkbox')
|
||||
.filter(function(){
|
||||
var $this = $(this);
|
||||
return !$this.prop('disabled') && (($this.attr('name') == name) || ($this.data('name') == name));
|
||||
})
|
||||
.prop('checked', $this.prop('checked'))
|
||||
.end()
|
||||
.end()
|
||||
.trigger('update.checkbox', [name, this.checked]);
|
||||
});
|
||||
// Pagination
|
||||
$(document.body).on('click', '.x .x_pagination .x_disabled, .x .x_pagination .x_active', function(){
|
||||
return false;
|
||||
});
|
||||
// Section Toggle
|
||||
$('.x .section>h1').append('<button type="button" class="snToggle x_icon-chevron-up">Toggle this section</button>');
|
||||
$('.x .section>h1>.snToggle').click(function(){
|
||||
var $this = $(this);
|
||||
var $section = $this.closest('.section');
|
||||
if(!$section.hasClass('collapse')){
|
||||
$section.addClass('collapse').children('h1:first').siblings().hide();
|
||||
$this.removeClass('x_icon-chevron-up').addClass('x_icon-chevron-down');
|
||||
} else {
|
||||
$section.removeClass('collapse').children('h1:first').siblings().show();
|
||||
$this.removeClass('x_icon-chevron-down').addClass('x_icon-chevron-up');
|
||||
}
|
||||
});
|
||||
// Alert Closer
|
||||
var $xAlert = $('.x .x_alert');
|
||||
$xAlert.prepend('<button type="button" class="x_close">×</button>');
|
||||
$xAlert.children('.x_close').click(function(){
|
||||
$(this).parent('.x_alert').hide();
|
||||
});
|
||||
// Desabled Buttons
|
||||
$('.x .x_btn').click(function(){
|
||||
if($(this).hasClass('x_disabled')){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
// Vertical Rule Style
|
||||
$('.x i').each(function(){
|
||||
var $this = $(this);
|
||||
if($this.text() == '|'){
|
||||
$this.addClass('vr');
|
||||
}
|
||||
});
|
||||
});
|
||||
// Modal Window
|
||||
jQuery(function($){
|
||||
|
||||
var ESC = 27;
|
||||
$.fn.xeModalWindow = function(){
|
||||
this
|
||||
.not('.xe-modal-window')
|
||||
.addClass('xe-modal-window')
|
||||
.each(function(){
|
||||
$( $(this).attr('href') ).addClass('x').hide();
|
||||
})
|
||||
.click(function(){
|
||||
var $this = $(this), $modal, $btnClose, disabled;
|
||||
|
||||
// get and initialize modal window
|
||||
$modal = $( $this.attr('href') );
|
||||
|
||||
if($modal.data('state') == 'showing') {
|
||||
$this.trigger('close.mw');
|
||||
} else {
|
||||
$this.trigger('open.mw');
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
.bind('open.mw', function(){
|
||||
var $this = $(this), $modal, $btnClose, disabled, before_event, duration;
|
||||
|
||||
$modal = $( $this.attr('href') );
|
||||
if(!$modal.parent('body').length) {
|
||||
$btnClose = $('<button type="button" class="x_close">×</button>');
|
||||
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw') });
|
||||
$modal.find('[data-hide]').click(function(){ $modal.data('anchor').trigger('close.mw') });
|
||||
$('body').append('<div class="x_modal-backdrop"></div>').append($modal); // append background
|
||||
$modal.prepend($btnClose); // prepend close button
|
||||
}
|
||||
|
||||
// set the related anchor
|
||||
$modal.data('anchor', $this);
|
||||
|
||||
// before event trigger
|
||||
before_event = $.Event('before-open.mw');
|
||||
$this.trigger(before_event);
|
||||
|
||||
// is event canceled?
|
||||
if(before_event.isDefaultPrevented()) return false;
|
||||
|
||||
// get modal window
|
||||
$modal = $( $this.attr('href') );
|
||||
|
||||
// get duration
|
||||
duration = $this.data('duration') || 'fast';
|
||||
|
||||
// set state : showing
|
||||
$modal.data('state', 'showing');
|
||||
|
||||
// workaroud for IE6
|
||||
$('html,body').addClass('modalContainer');
|
||||
|
||||
// after event trigger
|
||||
function after(){ $this.trigger('after-open.mw') };
|
||||
|
||||
$(document).bind('keydown.mw', function(event){
|
||||
if(event.which == ESC) {
|
||||
$this.trigger('close.mw');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$modal
|
||||
.fadeIn(duration, after)
|
||||
.find('button.x_close:first').focus();
|
||||
$('.x_modal-backdrop').show();
|
||||
})
|
||||
.bind('close.mw', function(){
|
||||
var $this = $(this), before_event, $modal, duration;
|
||||
|
||||
// before event trigger
|
||||
before_event = $.Event('before-close.mw');
|
||||
$this.trigger(before_event);
|
||||
|
||||
// is event canceled?
|
||||
if(before_event.isDefaultPrevented()) return false;
|
||||
|
||||
// get modal window
|
||||
$modal = $( $this.attr('href') );
|
||||
|
||||
// get duration
|
||||
duration = $this.data('duration') || 'fast';
|
||||
|
||||
// set state : hiding
|
||||
$modal.data('state', 'hiding');
|
||||
|
||||
// workaroud for IE6
|
||||
$('html,body').removeClass('modalContainer');
|
||||
|
||||
// after event trigger
|
||||
function after(){ $this.trigger('after-close.mw') };
|
||||
|
||||
$modal.fadeOut(duration, after);
|
||||
$('.x_modal-backdrop').hide();
|
||||
$this.focus();
|
||||
});
|
||||
};
|
||||
$('a.modalAnchor').xeModalWindow();
|
||||
$('div.x_modal').addClass('x').hide();
|
||||
|
||||
});
|
||||
|
||||
// Content Toggler
|
||||
jQuery(function($){
|
||||
|
||||
var dont_close_this_time = false;
|
||||
var ESC = 27;
|
||||
|
||||
$.fn.xeContentToggler = function(){
|
||||
this
|
||||
.not('.xe-content-toggler')
|
||||
.addClass('xe-content-toggler')
|
||||
.each(function(){
|
||||
var $anchor = $(this); $layer = $($anchor.attr('href'));
|
||||
|
||||
$layer.hide()
|
||||
.not('.xe-toggling-content')
|
||||
.addClass('xe-toggling-content')
|
||||
.mousedown(function(event){ dont_close_this_time = true })
|
||||
.focusout(function(event){
|
||||
setTimeout(function(){
|
||||
if(!dont_close_this_time && !$layer.find(':focus').length && $layer.data('state') == 'showing') $anchor.trigger('close.tc');
|
||||
dont_close_this_time = false;
|
||||
}, 1);
|
||||
});
|
||||
})
|
||||
.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';
|
||||
|
||||
// set state : showing
|
||||
$layer.data('state', 'showing');
|
||||
|
||||
// before event trigger
|
||||
$this.trigger('before-open.tc');
|
||||
|
||||
dont_close_this_time = false;
|
||||
|
||||
// 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) {
|
||||
if(event.type == 'keydown' && event.which != ESC) return true;
|
||||
if(event.type == 'mousedown') {
|
||||
var $t = $(event.target);
|
||||
if($t.is('html,.tgAnchor,.tgContent') || $layer.has($t).length) return true;
|
||||
}
|
||||
}
|
||||
|
||||
$this.trigger('close.tc');
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
// triggering after
|
||||
function trigger_after(){ $this.trigger('after-open.tc') }
|
||||
|
||||
switch(effect) {
|
||||
case 'slide':
|
||||
$layer.slideDown(duration, trigger_after);
|
||||
break;
|
||||
case 'slide-h':
|
||||
var w = $layer.css({'overflow-x':'',width:''}).width();
|
||||
$layer
|
||||
.show()
|
||||
.css({'overflow-x':'hidden',width:'0px'})
|
||||
.animate({width:w}, duration, function(){ $layer.css({'overflow-x':'',width:''}); trigger_after(); });
|
||||
break;
|
||||
case 'fade':
|
||||
$layer.fadeIn(duration, trigger_after);
|
||||
break;
|
||||
default:
|
||||
$layer.show();
|
||||
$this.trigger('after-open.tc');
|
||||
}
|
||||
})
|
||||
.bind('close.tc', function(){
|
||||
var $this = $(this), $layer, effect, duration;
|
||||
|
||||
// unbind document's event handlers
|
||||
$(document).unbind('mousedown.tc keydown.tc');
|
||||
|
||||
// get content container
|
||||
$layer = $( $this.attr('href') );
|
||||
|
||||
// get effeect
|
||||
effect = $this.data('effect');
|
||||
|
||||
// get duration
|
||||
duration = $this.data('duration') || 'fast';
|
||||
|
||||
// set state : hiding
|
||||
$layer.data('state', 'hiding');
|
||||
|
||||
// before event trigger
|
||||
$this.trigger('before-close.tc');
|
||||
|
||||
// triggering after
|
||||
function trigger_after(){ $this.trigger('after-close.tc') };
|
||||
|
||||
// close this layer
|
||||
switch(effect) {
|
||||
case 'slide':
|
||||
$layer.slideUp(duration, trigger_after);
|
||||
break;
|
||||
case 'slide-h':
|
||||
$layer.animate({width:0}, duration, function(){ $layer.hide(); trigger_after(); });
|
||||
break;
|
||||
case 'fade':
|
||||
$layer.fadeOut(duration, trigger_after);
|
||||
break;
|
||||
default:
|
||||
$layer.hide();
|
||||
$this.trigger('after-close.tc');
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
$('a.tgAnchor').xeContentToggler();
|
||||
|
||||
});
|
||||
|
||||
// Module finder
|
||||
jQuery(function($){
|
||||
|
||||
$.fn.xeModuleFinder = function(){
|
||||
this
|
||||
.not('.xe-module-finder')
|
||||
.addClass('xe-module-finder')
|
||||
.find('a.tgAnchor.findsite')
|
||||
.bind('before-open.tc', function(){
|
||||
var $this, $ul, val;
|
||||
|
||||
$this = $(this);
|
||||
$ul = $($this.attr('href')).find('>ul');
|
||||
val = $this.prev('input:text').val();
|
||||
|
||||
function on_complete(data) {
|
||||
var $li, list = data.site_list, i, c;
|
||||
|
||||
$ul.empty();
|
||||
$this.closest('.modulefinder').find('.moduleList,.moduleIdList').attr('disabled','disabled');
|
||||
|
||||
if(data.error || !$.isArray(list)) {
|
||||
$this.trigger('close.tc');
|
||||
return;
|
||||
}
|
||||
|
||||
for(i=0,c=list.length; i < c; i++) {
|
||||
$li = $('<li />').appendTo($ul);
|
||||
$('<button type="button" />').text(list[i].domain).data('site_srl', list[i].site_srl).appendTo($li);
|
||||
}
|
||||
};
|
||||
|
||||
$.exec_json('admin.getSiteAllList', {domain:val}, on_complete);
|
||||
})
|
||||
.end()
|
||||
.find('.tgContent.suggestion')
|
||||
.delegate('button','click',function(){
|
||||
var $this, $finder;
|
||||
|
||||
$this = $(this);
|
||||
$finder = $this.closest('.modulefinder');
|
||||
|
||||
function on_complete(data) {
|
||||
var $mod_select, list = data.module_list, x;
|
||||
|
||||
if(data.error || !list) return;
|
||||
|
||||
$mod_select = $finder.find('.moduleList').data('module_list', list).removeAttr('disabled').empty();
|
||||
for(x in list) {
|
||||
if(!list.hasOwnProperty(x)) continue;
|
||||
$('<option />').attr('value', x).text(list[x].title).appendTo($mod_select);
|
||||
}
|
||||
$mod_select.prop('selectedIndex', 0).change().focus();
|
||||
|
||||
if(!$mod_select.is(':visible')) {
|
||||
$mod_select
|
||||
.slideDown(100, function(){
|
||||
$finder.find('.moduleIdList:not(:visible)').slideDown(100).trigger('show');
|
||||
})
|
||||
.trigger('show');
|
||||
}
|
||||
};
|
||||
|
||||
$finder.find('a.tgAnchor.findsite').trigger('close.tc');
|
||||
|
||||
$.exec_json('module.procModuleAdminGetList', {site_srl:$this.data('site_srl')}, on_complete);
|
||||
})
|
||||
.end()
|
||||
.find('.moduleList,.moduleIdList').hide().end()
|
||||
.find('.moduleList')
|
||||
.change(function(){
|
||||
var $this, $mid_select, val, list;
|
||||
|
||||
$this = $(this);
|
||||
val = $this.val();
|
||||
list = $this.data('module_list');
|
||||
|
||||
if(!list[val]) return;
|
||||
|
||||
list = list[val].list;
|
||||
$mid_select = $this.closest('.modulefinder').find('.moduleIdList').removeAttr('disabled').empty();
|
||||
|
||||
for(var x in list) {
|
||||
if(!list.hasOwnProperty(x)) continue;
|
||||
$('<option />').attr('value', list[x].module_srl).text(list[x].browser_title).appendTo($mid_select);
|
||||
}
|
||||
$mid_select.prop('selectedIndex', 0).change();
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
$('.modulefinder').xeModuleFinder();
|
||||
|
||||
});
|
||||
|
||||
// Module Search : A New Version Of Module Finder
|
||||
jQuery(function($){
|
||||
|
||||
_xeModuleSearch = function(){
|
||||
var t = this;
|
||||
var $t = $(this);
|
||||
|
||||
var $moduleSearchWindow = $t.find(".moduleSearchWindow");
|
||||
|
||||
var $siteListDiv = $moduleSearchWindow.find('.siteList');
|
||||
var $moduleTypeListDiv = $moduleSearchWindow.find('.moduleTypeList');
|
||||
var $moduleInstanceListDiv = $moduleSearchWindow.find('.moduleInstanceList');
|
||||
|
||||
var $siteList = $siteListDiv.find('UL');
|
||||
var $moduleTypeList = $moduleTypeListDiv.find('UL');
|
||||
var $moduleInstanceList = $moduleInstanceListDiv.find('SELECT');
|
||||
|
||||
var $siteListSearchInput = $moduleSearchWindow.find('INPUT.siteListSearchInput');
|
||||
var aSiteListData;
|
||||
|
||||
var MAX_LIST_HEIGHT = 280;
|
||||
|
||||
function setListSize($UL, nHeight){
|
||||
var nWidth, $div;
|
||||
$UL.find('li div').width('');
|
||||
$UL.css('height', '');
|
||||
$UL.css('overflow-y', '');
|
||||
if($UL.height() > nHeight){
|
||||
$div = $UL.find('li div');
|
||||
$div.width($div.width()-20+'px');
|
||||
$UL.css('height', nHeight+'px');
|
||||
$UL.css('overflow-y', 'auto');
|
||||
}
|
||||
}
|
||||
|
||||
function setSiteList(sFilter){
|
||||
var sDomain;
|
||||
var rxFilter = new RegExp(sFilter, "ig");
|
||||
var list = aSiteListData;
|
||||
|
||||
$siteList.empty();
|
||||
|
||||
for(i=0,c=list.length; i < c; i++) {
|
||||
sDomain = list[i].domain;
|
||||
if(sFilter){
|
||||
if(!sDomain.match(rxFilter)) continue;
|
||||
sDomain = sDomain.replace(rxFilter, function(sKeyword){
|
||||
return '<span class="highlight">'+sKeyword+'</span>';
|
||||
});
|
||||
}
|
||||
|
||||
$li = $('<li />').appendTo($siteList);
|
||||
$('<a>').attr('href', '#').html(
|
||||
'<div>' + sDomain + '</div>' +
|
||||
'<span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>'
|
||||
).data('site_srl', list[i].site_srl).appendTo($li);
|
||||
}
|
||||
|
||||
setListSize($siteList, MAX_LIST_HEIGHT - $siteListSearchInput.parent("DIV").height());
|
||||
}
|
||||
|
||||
$siteListSearchInput.keyup(function(){
|
||||
setSiteList($siteListSearchInput.val());
|
||||
});
|
||||
|
||||
if(typeof console == 'undefined'){
|
||||
console={log:function(){}};
|
||||
}
|
||||
|
||||
$t
|
||||
.not('.xe-module-search')
|
||||
.addClass('xe-module-search')
|
||||
.find('a.tgAnchor.moduleSearch')
|
||||
.bind('before-open.tc', function(){
|
||||
var $this;
|
||||
|
||||
$this = $(this);
|
||||
|
||||
function on_complete(data) {
|
||||
var $li, list = data.site_list, i, c;
|
||||
|
||||
if(data.error || !$.isArray(list)) {
|
||||
$this.trigger('close.tc');
|
||||
return;
|
||||
}
|
||||
|
||||
aSiteListData = list;
|
||||
|
||||
setSiteList($siteListSearchInput.val());
|
||||
|
||||
$siteListSearchInput.focus();
|
||||
};
|
||||
|
||||
$siteList.empty();
|
||||
$moduleInstanceList.empty();
|
||||
$moduleTypeListDiv.hide();
|
||||
$moduleInstanceListDiv.hide();
|
||||
$.exec_json('admin.getSiteAllList', {domain:""}, on_complete);
|
||||
})
|
||||
.end()
|
||||
.find('.tgContent .siteListUL')
|
||||
.delegate('a','click',function(oEvent){
|
||||
var $this, $finder;
|
||||
|
||||
$this = $(this);
|
||||
$finder = $this.closest('.modulefinder');
|
||||
|
||||
function on_complete(data) {
|
||||
|
||||
var list = data.module_list, x;
|
||||
|
||||
if(data.error || !list) return;
|
||||
|
||||
for(x in list) {
|
||||
if(!list.hasOwnProperty(x)) continue;
|
||||
$li = $('<li />').appendTo($moduleTypeList);
|
||||
$('<a>').attr('href', '#').html(
|
||||
'<div>'+list[x].title+'</div>' +
|
||||
'<span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>'
|
||||
).data('moduleInstanceList', list[x].list).appendTo($li);
|
||||
//$('<option />').attr('value', x).text(list[x].title).appendTo($mod_select);
|
||||
}
|
||||
|
||||
$moduleSearchWindow.find('.moduleTypeList').show();
|
||||
setListSize($moduleTypeList, MAX_LIST_HEIGHT);
|
||||
|
||||
$siteList.find('li').removeClass('on');
|
||||
$this.parent('li').addClass('on');
|
||||
};
|
||||
|
||||
//$finder.find('a.tgAnchor.findsite').trigger('close.tc');
|
||||
$moduleTypeList.empty();
|
||||
$moduleInstanceListDiv.hide();
|
||||
|
||||
$.exec_json('module.procModuleAdminGetList', {site_srl:$this.data('site_srl')}, on_complete);
|
||||
|
||||
oEvent.preventDefault();
|
||||
})
|
||||
.end()
|
||||
//.find('.moduleList,.moduleIdList').hide().end()
|
||||
.find('.moduleTypeListUL')
|
||||
.delegate('a', 'click', function(oEvent){
|
||||
|
||||
var $this, $mid_select, val, list;
|
||||
|
||||
$this = $(this);
|
||||
list = $this.data('moduleInstanceList');
|
||||
if(!list) return;
|
||||
|
||||
t.sSelectedModuleType = $this.text();
|
||||
$moduleInstanceList.empty();
|
||||
|
||||
for(var x in list) {
|
||||
if(!list.hasOwnProperty(x)) continue;
|
||||
|
||||
$li = $('<option />').html(list[x].browser_title).appendTo($moduleInstanceList).val(list[x].module_srl).data('mid', list[x].module_srl)
|
||||
.data('module_srl', list[x].module_srl).data('layout_srl', list[x].layout_srl).data('browser_title', list[x].browser_title);
|
||||
}
|
||||
|
||||
$moduleInstanceListDiv.show();
|
||||
setListSize($moduleInstanceList, MAX_LIST_HEIGHT);
|
||||
|
||||
$moduleTypeList.find('li').removeClass('on');
|
||||
$this.parent('li').addClass('on');
|
||||
|
||||
oEvent.preventDefault();
|
||||
})
|
||||
.end()
|
||||
.find('.moduleSearch_ok').click(function(oEvent){
|
||||
var aSelected = [];
|
||||
$t.find('.moduleInstanceListSelect option:selected').each(function(){
|
||||
aSelected.push({
|
||||
'type' : t.sSelectedModuleType,
|
||||
'module_srl' : $(this).data('module_srl'),
|
||||
'layout_srl' : $(this).data('layout_srl'),
|
||||
'browser_title' : $(this).data('browser_title')
|
||||
});
|
||||
});
|
||||
|
||||
$t.trigger('moduleSelect', [aSelected]);
|
||||
$('.tgAnchor.moduleSearch').trigger('close.tc');
|
||||
|
||||
oEvent.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.xeModuleSearch = function(){
|
||||
$(this).each(_xeModuleSearch);
|
||||
};
|
||||
|
||||
$('.moduleSearch').xeModuleSearch();
|
||||
});
|
||||
|
||||
// Sortable table
|
||||
jQuery(function($){
|
||||
|
||||
var
|
||||
dragging = false,
|
||||
$holder = $('<tr class="placeholder"><td> </td></tr>');
|
||||
|
||||
$.fn.xeSortableTable = function(){
|
||||
this
|
||||
.not('.xe-sortable-table')
|
||||
.addClass('xe-sortable-table')
|
||||
.delegate('button.dragBtn', 'mousedown.st', function(event){
|
||||
var $this, $tr, $table, $th, height, width, offset, position, offsets, i, dropzone, cols, ofspar;
|
||||
|
||||
if(event.which != 1) return;
|
||||
|
||||
$this = $(this);
|
||||
$tr = $this.closest('tr');
|
||||
$table = $this.closest('table');
|
||||
ofspar = $table.get(0).offsetParent;
|
||||
height = $tr.height();
|
||||
width = $tr.width();
|
||||
|
||||
// before event trigger
|
||||
before_event = $.Event('before-drag.st');
|
||||
$table.trigger(before_event);
|
||||
|
||||
// is event canceled?
|
||||
if(before_event.isDefaultPrevented()) return false;
|
||||
|
||||
position = {x:event.pageX, y:event.pageY};
|
||||
offset = getOffset($tr.get(0), ofspar);
|
||||
|
||||
$clone = $tr.attr('target', true).clone(true).appendTo($table);
|
||||
|
||||
// get colspan
|
||||
cols = ($th=$table.find('thead th')).length;
|
||||
$th.filter('[colspan]').attr('colspan', function(idx,attr){ cols += attr - 1; });
|
||||
$holder.find('td').attr('colspan', cols);
|
||||
|
||||
// get offsets of all list-item elements
|
||||
offsets = [];
|
||||
$table.find('tbody>tr:not([target],.sticky,:hidden)').each(function() {
|
||||
var $this = $(this), o;
|
||||
|
||||
o = getOffset(this, ofspar);
|
||||
offsets.push({top:o.top, bottom:o.top+$this.height(), $item:$this});
|
||||
});
|
||||
|
||||
$clone
|
||||
.addClass('draggable')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
opacity : .6,
|
||||
width : width,
|
||||
height : height,
|
||||
left : offset.left,
|
||||
top : offset.top,
|
||||
zIndex : 100
|
||||
});
|
||||
|
||||
// Set a place holder
|
||||
$holder
|
||||
.css({
|
||||
position:'absolute',
|
||||
opacity : .6,
|
||||
width : width,
|
||||
height : '10px',
|
||||
left : offset.left,
|
||||
top : offset.top,
|
||||
backgroundColor : '#bbb',
|
||||
overflow: 'hidden',
|
||||
zIndex : 99
|
||||
})
|
||||
.appendTo($table);
|
||||
|
||||
$tr.css('opacity', .6);
|
||||
|
||||
$(document)
|
||||
.unbind('mousedown.st mouseup.st')
|
||||
.bind('mousemove.st', function(event) {
|
||||
var diff, nTop, item, i, c, o;
|
||||
|
||||
dropzone = null;
|
||||
|
||||
diff = {x:position.x-event.pageX, y:position.y-event.pageY};
|
||||
nTop = offset.top - diff.y;
|
||||
|
||||
for(i=0,c=offsets.length; i < c; i++) {
|
||||
o = offsets[i];
|
||||
if( (i && o.top > nTop) || ((i < c-1) && o.bottom < nTop)) continue;
|
||||
|
||||
dropzone = {element:o.$item};
|
||||
if(o.top > nTop - 12) {
|
||||
dropzone.state = 'before';
|
||||
$holder.css('top', o.top-5);
|
||||
} else {
|
||||
dropzone.state = 'after';
|
||||
$holder.css('top', o.bottom-5);
|
||||
}
|
||||
}
|
||||
|
||||
$clone.css({top:nTop});
|
||||
})
|
||||
.bind('mouseup.st', function(event) {
|
||||
var $dropzone;
|
||||
|
||||
dragging = false;
|
||||
|
||||
$(document).unbind('mousemove.st mouseup.st');
|
||||
$tr.removeAttr('target').css('opacity', '');
|
||||
$clone.remove();
|
||||
$holder.remove();
|
||||
|
||||
if(!dropzone) return;
|
||||
$dropzone = $(dropzone.element);
|
||||
|
||||
// use the clone for animation
|
||||
$dropzone[dropzone.state]($tr);
|
||||
|
||||
$table.trigger('after-drag.st');
|
||||
});
|
||||
})
|
||||
|
||||
return this;
|
||||
};
|
||||
$('table.sortable').xeSortableTable();
|
||||
|
||||
// filebox
|
||||
jQuery(function($){
|
||||
|
||||
$('.filebox')
|
||||
.bind('before-open.mw', function(){
|
||||
var $this, $list, $parentObj;
|
||||
var anchor;
|
||||
|
||||
$this = $(this);
|
||||
anchor = $this.attr('href');
|
||||
|
||||
$list = $(anchor).find('.filebox_list');
|
||||
|
||||
function on_complete(data){
|
||||
$list.html(data.html);
|
||||
|
||||
$list.find('.select')
|
||||
.bind('click', function(event){
|
||||
var selectedImages = $('input.select_checkbox:checked');
|
||||
if(selectedImages.length == 0) {
|
||||
var selectedImgSrc = $(this).closest('tr').find('img.filebox_item').attr('src');
|
||||
if(!selectedImgSrc){
|
||||
alert("None selected!");
|
||||
}else{
|
||||
$this.trigger('filebox.selected', [selectedImgSrc]);
|
||||
$this.trigger('close.mw');
|
||||
}
|
||||
}else {
|
||||
$this.trigger('filebox.selected', [selectedImages]);
|
||||
$this.trigger('close.mw');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$list.find('.x_pagination')
|
||||
.find('a')
|
||||
.filter(function(){
|
||||
if ($(this).data('toggle')) return false;
|
||||
if ($(this).parent().hasClass('x_disabled')) return false;
|
||||
if ($(this).parent().hasClass('x_active')) return false;
|
||||
return true;
|
||||
})
|
||||
.bind('click', function(){
|
||||
var page = $(this).attr('page');
|
||||
|
||||
$.exec_json('module.getFileBoxListHtml', {'page': page}, on_complete);
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#goToFileBox')
|
||||
.find('button')
|
||||
.bind('click', function(){
|
||||
var page = $(this).prev('input').val();
|
||||
|
||||
$.exec_json('module.getFileBoxListHtml', {'page': page}, on_complete);
|
||||
return false;
|
||||
});
|
||||
|
||||
$list.closest('.x_modal-body').scrollTop(0);
|
||||
}
|
||||
|
||||
$.exec_json('module.getFileBoxListHtml', {'page': '1'}, on_complete);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function getOffset(elem, offsetParent) {
|
||||
var top = 0, left = 0;
|
||||
|
||||
while(elem && elem != offsetParent) {
|
||||
top += elem.offsetTop;
|
||||
left += elem.offsetLeft;
|
||||
|
||||
elem = elem.offsetParent;
|
||||
}
|
||||
|
||||
return {top:top, left:left};
|
||||
}
|
||||
|
||||
});
|
||||
jQuery(function(a){function e(){b.width("99.99%");setTimeout(function(){b.removeAttr("style")},0)}window.top.scrollTo(0,0);a(".x .skipNav>a").click(function(){a(a(this).attr("href")).attr("tabindex","0").css("outline","0").focus()});a(document.body).on("click",".x [data-toggle]",function(){var b=a(this),d=a(b.attr("data-toggle"));d.toggle();d.is(":visible")&&!d.find("a,input,button,textarea,select").length?d.attr("tabindex","0").focus():d.is(":visible")&&d.find("a,input,button,textarea,select").length?
|
||||
d.find("a,input,button,textarea,select").eq(0).focus():b.focus();return!1});a(document.body).on("click",".x [data-show]",function(){a(a(this).attr("data-show")).show().attr("tabindex","0").focus();return!1});a(document.body).on("click",".x [data-hide]",function(){var b=a(this);a(b.attr("data-hide")).hide();b.focus();return!1});a('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();a(".x .x_nav-tabs").find('>li>a[href^="#"]').click(function(){var b=a(this);b.parent("li").addClass("x_active").siblings().removeClass("x_active");
|
||||
b.closest(".x_nav-tabs").next(".x_tab-content").find(b.attr("href")).addClass("x_active").show().siblings().removeClass("x_active").hide();return!1});var d=a(".x>.body"),b=d.find(">.content"),f=d.find(">.gnb"),g=f.find(">ul>li");a(window).resize(function(){setTimeout(function(){980>=a(window).width()||1240<a(window).width()?d.removeClass("wide"):d.addClass("wide")},100)}).resize();g.find("ul").prev("a").bind("click focus",function(){var b=a(this);g.not(b.parent("li")).removeClass("open");a(this).parent("li").toggleClass("open");
|
||||
f.trigger("mouseenter");return!1});f.mouseenter(function(){980<=a(window).width()&&(d.removeClass("wide"),e())}).mouseleave(function(){980<=a(window).width()&&1240>a(window).width()&&(d.addClass("wide"),e())});f.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");return!1});f.prepend('<button type="button" class="close before" />').append('<button type="button" class="close after" />');f.find(">.close").focus(function(){d.addClass("wide");e()});a('.x th>input[type="checkbox"]').change(function(){var b=
|
||||
a(this),d=b.data("name");b.closest("table").find("input:checkbox").filter(function(){var b=a(this);return!b.prop("disabled")&&(b.attr("name")==d||b.data("name")==d)}).prop("checked",b.prop("checked")).end().end().trigger("update.checkbox",[d,this.checked])});a(document.body).on("click",".x .x_pagination .x_disabled, .x .x_pagination .x_active",function(){return!1});a(".x .section>h1").append('<button type="button" class="snToggle x_icon-chevron-up">Toggle this section</button>');a(".x .section>h1>.snToggle").click(function(){var b=
|
||||
a(this),d=b.closest(".section");d.hasClass("collapse")?(d.removeClass("collapse").children("h1:first").siblings().show(),b.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(d.addClass("collapse").children("h1:first").siblings().hide(),b.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"))});var h=a(".x .x_alert");h.prepend('<button type="button" class="x_close">×</button>');h.children(".x_close").click(function(){a(this).parent(".x_alert").hide()});a(".x .x_btn").click(function(){if(a(this).hasClass("x_disabled"))return!1});
|
||||
a(".x i").each(function(){var b=a(this);"|"==b.text()&&b.addClass("vr")})});
|
||||
jQuery(function(a){a.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){a(a(this).attr("href")).addClass("x").hide()}).click(function(){var e=a(this);"showing"==a(e.attr("href")).data("state")?e.trigger("close.mw"):e.trigger("open.mw");return!1}).bind("open.mw",function(){var e=a(this),d,b;d=a(e.attr("href"));d.parent("body").length||(b=a('<button type="button" class="x_close">×</button>'),b.click(function(){d.data("anchor").trigger("close.mw")}),
|
||||
d.find("[data-hide]").click(function(){d.data("anchor").trigger("close.mw")}),a("body").append('<div class="x_modal-backdrop"></div>').append(d),d.prepend(b));d.data("anchor",e);b=a.Event("before-open.mw");e.trigger(b);if(b.isDefaultPrevented())return!1;d=a(e.attr("href"));b=e.data("duration")||"fast";d.data("state","showing");a("html,body").addClass("modalContainer");a(document).bind("keydown.mw",function(a){if(27==a.which)return e.trigger("close.mw"),!1});d.fadeIn(b,function(){e.trigger("after-open.mw")}).find("button.x_close:first").focus();
|
||||
a(".x_modal-backdrop").show()}).bind("close.mw",function(){var e=a(this),d,b;d=a.Event("before-close.mw");e.trigger(d);if(d.isDefaultPrevented())return!1;d=a(e.attr("href"));b=e.data("duration")||"fast";d.data("state","hiding");a("html,body").removeClass("modalContainer");d.fadeOut(b,function(){e.trigger("after-close.mw")});a(".x_modal-backdrop").hide();e.focus()})};a("a.modalAnchor").xeModalWindow();a("div.x_modal").addClass("x").hide()});
|
||||
jQuery(function(a){var e=!1;a.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var d=a(this);$layer=a(d.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){e=!0}).focusout(function(){setTimeout(function(){!e&&(!$layer.find(":focus").length&&"showing"==$layer.data("state"))&&d.trigger("close.tc");e=!1},1)})}).click(function(){var d=a(this),b;b=a(d.attr("href"));b.data("anchor",d);"showing"==
|
||||
b.data("state")?d.trigger("close.tc"):d.trigger("open.tc");return!1}).bind("open.tc",function(){function d(){b.trigger("after-open.tc")}var b=a(this),f,g,h;f=a(b.attr("href"));g=b.data("effect");h=b.data("duration")||"fast";f.data("state","showing");b.trigger("before-open.tc");e=!1;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(d){if(d&&("keydown"==d.type&&27!=d.which||"mousedown"==d.type&&(d=a(d.target),d.is("html,.tgAnchor,.tgContent")||f.has(d).length)))return!0;
|
||||
b.trigger("close.tc");return!1});switch(g){case "slide":f.slideDown(h,d);break;case "slide-h":g=f.css({"overflow-x":"",width:""}).width();f.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:g},h,function(){f.css({"overflow-x":"",width:""});d()});break;case "fade":f.fadeIn(h,d);break;default:f.show(),b.trigger("after-open.tc")}}).bind("close.tc",function(){function d(){b.trigger("after-close.tc")}var b=a(this),f,e,h;a(document).unbind("mousedown.tc keydown.tc");f=a(b.attr("href"));e=b.data("effect");
|
||||
h=b.data("duration")||"fast";f.data("state","hiding");b.trigger("before-close.tc");switch(e){case "slide":f.slideUp(h,d);break;case "slide-h":f.animate({width:0},h,function(){f.hide();d()});break;case "fade":f.fadeOut(h,d);break;default:f.hide(),b.trigger("after-close.tc")}});return this};a("a.tgAnchor").xeContentToggler()});
|
||||
jQuery(function(a){a.fn.xeModuleFinder=function(){this.not(".xe-module-finder").addClass("xe-module-finder").find("a.tgAnchor.findsite").bind("before-open.tc",function(){var e,d,b;e=a(this);d=a(e.attr("href")).find(">ul");b=e.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:b},function(b){var g=b.site_list,h,j;d.empty();e.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(b.error||!a.isArray(g))e.trigger("close.tc");else{h=0;for(j=g.length;h<
|
||||
j;h++)b=a("<li />").appendTo(d),a('<button type="button" />').text(g[h].domain).data("site_srl",g[h].site_srl).appendTo(b)}})}).end().find(".tgContent.suggestion").delegate("button","click",function(){var e,d;e=a(this);d=e.closest(".modulefinder");d.find("a.tgAnchor.findsite").trigger("close.tc");a.exec_json("module.procModuleAdminGetList",{site_srl:e.data("site_srl")},function(b){var e=b.module_list,g;if(!b.error&&e){b=d.find(".moduleList").data("module_list",e).removeAttr("disabled").empty();for(g in e)e.hasOwnProperty(g)&&
|
||||
a("<option />").attr("value",g).text(e[g].title).appendTo(b);b.prop("selectedIndex",0).change().focus();b.is(":visible")||b.slideDown(100,function(){d.find(".moduleIdList:not(:visible)").slideDown(100).trigger("show")}).trigger("show")}})}).end().find(".moduleList,.moduleIdList").hide().end().find(".moduleList").change(function(){var e,d,b;e=a(this);d=e.val();b=e.data("module_list");if(b[d]){b=b[d].list;e=e.closest(".modulefinder").find(".moduleIdList").removeAttr("disabled").empty();for(var f in b)b.hasOwnProperty(f)&&
|
||||
a("<option />").attr("value",b[f].module_srl).text(b[f].browser_title).appendTo(e);e.prop("selectedIndex",0).change()}});return this};a(".modulefinder").xeModuleFinder()});
|
||||
jQuery(function(a){_xeModuleSearch=function(){function e(a,b){var d;a.find("li div").width("");a.css("height","");a.css("overflow-y","");a.height()>b&&(d=a.find("li div"),d.width(d.width()-20+"px"),a.css("height",b+"px"),a.css("overflow-y","auto"))}function d(b){var d,f=RegExp(b,"ig"),g=q;k.empty();i=0;for(c=g.length;i<c;i++){d=g[i].domain;if(b){if(!d.match(f))continue;d=d.replace(f,function(a){return'<span class="highlight">'+a+"</span>"})}$li=a("<li />").appendTo(k);a("<a>").attr("href","#").html("<div>"+
|
||||
d+'</div><span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>').data("site_srl",g[i].site_srl).appendTo($li)}e(k,r-m.parent("DIV").height())}var b=this,f=a(this),g=f.find(".moduleSearchWindow"),h=g.find(".siteList"),j=g.find(".moduleTypeList"),p=g.find(".moduleInstanceList"),k=h.find("UL"),n=j.find("UL"),l=p.find("SELECT"),m=g.find("INPUT.siteListSearchInput"),q,r=280;m.keyup(function(){d(m.val())});"undefined"==typeof console&&(console={log:function(){}});
|
||||
f.not(".xe-module-search").addClass("xe-module-search").find("a.tgAnchor.moduleSearch").bind("before-open.tc",function(){var b;b=a(this);k.empty();l.empty();j.hide();p.hide();a.exec_json("admin.getSiteAllList",{domain:""},function(e){var f=e.site_list;e.error||!a.isArray(f)?b.trigger("close.tc"):(q=f,d(m.val()),m.focus())})}).end().find(".tgContent .siteListUL").delegate("a","click",function(b){var d;d=a(this);d.closest(".modulefinder");n.empty();p.hide();a.exec_json("module.procModuleAdminGetList",
|
||||
{site_srl:d.data("site_srl")},function(b){var f=b.module_list,h;if(!b.error&&f){for(h in f)f.hasOwnProperty(h)&&($li=a("<li />").appendTo(n),a("<a>").attr("href","#").html("<div>"+f[h].title+'</div><span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>').data("moduleInstanceList",f[h].list).appendTo($li));g.find(".moduleTypeList").show();e(n,r);k.find("li").removeClass("on");d.parent("li").addClass("on")}});b.preventDefault()}).end().find(".moduleTypeListUL").delegate("a",
|
||||
"click",function(d){var f,g;f=a(this);if(g=f.data("moduleInstanceList")){b.sSelectedModuleType=f.text();l.empty();for(var h in g)g.hasOwnProperty(h)&&($li=a("<option />").html(g[h].browser_title).appendTo(l).val(g[h].module_srl).data("mid",g[h].module_srl).data("module_srl",g[h].module_srl).data("layout_srl",g[h].layout_srl).data("browser_title",g[h].browser_title));p.show();e(l,r);n.find("li").removeClass("on");f.parent("li").addClass("on");d.preventDefault()}}).end().find(".moduleSearch_ok").click(function(d){var e=
|
||||
[];f.find(".moduleInstanceListSelect option:selected").each(function(){e.push({type:b.sSelectedModuleType,module_srl:a(this).data("module_srl"),layout_srl:a(this).data("layout_srl"),browser_title:a(this).data("browser_title")})});f.trigger("moduleSelect",[e]);a(".tgAnchor.moduleSearch").trigger("close.tc");d.preventDefault()});return this};a.fn.xeModuleSearch=function(){a(this).each(_xeModuleSearch)};a(".moduleSearch").xeModuleSearch()});
|
||||
jQuery(function(a){function e(b,a){for(var d=0,e=0;b&&b!=a;)d+=b.offsetTop,e+=b.offsetLeft,b=b.offsetParent;return{top:d,left:e}}var d=a('<tr class="placeholder"><td> </td></tr>');a.fn.xeSortableTable=function(){this.not(".xe-sortable-table").addClass("xe-sortable-table").delegate("button.dragBtn","mousedown.st",function(b){var f,g,h,j,p,k,n,l,m,q;if(1==b.which){g=a(this);h=g.closest("tr");j=g.closest("table");q=j.get(0).offsetParent;g=h.height();p=h.width();before_event=a.Event("before-drag.st");
|
||||
j.trigger(before_event);if(before_event.isDefaultPrevented())return!1;f=b.pageY;k=e(h.get(0),q);$clone=h.attr("target",!0).clone(!0).appendTo(j);m=(b=j.find("thead th")).length;b.filter("[colspan]").attr("colspan",function(b,a){m+=a-1});d.find("td").attr("colspan",m);n=[];j.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),d;d=e(this,q);n.push({top:d.top,bottom:d.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:p,height:g,
|
||||
left:k.left,top:k.top,zIndex:100});d.css({position:"absolute",opacity:0.6,width:p,height:"10px",left:k.left,top:k.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(j);h.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(b){var a,e,g;l=null;b=k.top-(f-b.pageY);a=0;for(e=n.length;a<e;a++)g=n[a],a&&g.top>b||a<e-1&&g.bottom<b||(l={element:g.$item},g.top>b-12?(l.state="before",d.css("top",g.top-5)):(l.state="after",d.css("top",g.bottom-5)));$clone.css({top:b})}).bind("mouseup.st",
|
||||
function(){var b;a(document).unbind("mousemove.st mouseup.st");h.removeAttr("target").css("opacity","");$clone.remove();d.remove();l&&(b=a(l.element),b[l.state](h),j.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable();jQuery(function(b){b(".filebox").bind("before-open.mw",function(){function a(f){e.html(f.html);e.find(".select").bind("click",function(){var a=b("input.select_checkbox:checked");0==a.length?(a=b(this).closest("tr").find("img.filebox_item").attr("src"))?
|
||||
(d.trigger("filebox.selected",[a]),d.trigger("close.mw")):alert("None selected!"):(d.trigger("filebox.selected",[a]),d.trigger("close.mw"));return!1});e.find(".x_pagination").find("a").filter(function(){return b(this).data("toggle")||b(this).parent().hasClass("x_disabled")||b(this).parent().hasClass("x_active")?!1:!0}).bind("click",function(){var d=b(this).attr("page");b.exec_json("module.getFileBoxListHtml",{page:d},a);return!1});b("#goToFileBox").find("button").bind("click",function(){var d=b(this).prev("input").val();
|
||||
b.exec_json("module.getFileBoxListHtml",{page:d},a);return!1});e.closest(".x_modal-body").scrollTop(0)}var d,e,f;d=b(this);f=d.attr("href");e=b(f).find(".filebox_list");b.exec_json("module.getFileBoxListHtml",{page:"1"},a)});var a=b(".x .dsTg .__simple"),d=b(".x .dsTg .__detail");b(".x .dsTg td.title").each(function(){var a=b(this);0==a.find("p.update").length?a.addClass("tg").find(">*:not(:first-child)").hide():a.addClass("up")});var e=b(".x .dsTg td.tg>*:not(:first-child)");a.click(function(){e.slideUp(200);
|
||||
d.removeClass("x_active");a.addClass("x_active")});d.click(function(){e.slideDown(200);d.addClass("x_active");a.removeClass("x_active")})})});
|
||||
|
|
|
|||
|
|
@ -1079,4 +1079,7 @@
|
|||
<value xml:lang="ko"><![CDATA[복사할 Layout이 지정되어 있지 않습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Target layout is not assigned]]></value>
|
||||
</item>
|
||||
<item name="msg_at_least_one_layout">
|
||||
<value xml:lang="ko"><![CDATA[해당 레이아웃의 마지막 한개 레이아웃은 삭제할 수 없습니다.]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -229,9 +229,19 @@
|
|||
* @param int $layout_srl
|
||||
* @return Object
|
||||
**/
|
||||
function deleteLayout($layout_srl) {
|
||||
function deleteLayout($layout_srl, $force = FALSE) {
|
||||
$oLayoutModel = &getModel('layout');
|
||||
|
||||
if(!$force)
|
||||
{
|
||||
$layoutInfo = $oLayoutModel->getLayout($layout_srl);
|
||||
$layoutList = $oLayoutModel->getLayoutInstanceList($layoutInfo->site_srl, $layoutInfo->layout_type, $layoutInfo->layout, array('layout_srl'));
|
||||
if(count($layoutList) <= 1)
|
||||
{
|
||||
return new Object(-1, 'msg_at_least_one_layout');
|
||||
}
|
||||
}
|
||||
|
||||
$path = $oLayoutModel->getUserLayoutPath($layout_srl);
|
||||
FileHandler::removeDir($path);
|
||||
|
||||
|
|
|
|||
|
|
@ -240,38 +240,6 @@
|
|||
$this->setTemplateFile('layout_modify');
|
||||
}
|
||||
|
||||
/**
|
||||
* The first page of the layout admin
|
||||
* @deprecated
|
||||
* @return void|Object (void : success, Object : fail)
|
||||
**/
|
||||
function dispLayoutAdminContent() {
|
||||
$path = Context::get('path');
|
||||
if (!$path) return $this->stop('msg_invalid_request');
|
||||
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$columnList = array('layout_srl', 'layout', 'module_srl', 'title', 'regdate');
|
||||
$layout_list = $oLayoutModel->getLayoutList(0, 'P', $columnList);
|
||||
Context::set('layout_list', $layout_list);
|
||||
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* The first page of the mobile layout admin
|
||||
* @deprecated
|
||||
* @return void
|
||||
**/
|
||||
function dispLayoutAdminMobileContent() {
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$columnList = array('layout_srl', 'layout', 'module_srl', 'title', 'regdate');
|
||||
$layout_list = $oLayoutModel->getLayoutList(0, 'M', $columnList);
|
||||
Context::set('layout_list', $layout_list);
|
||||
|
||||
$this->setTemplateFile('mindex');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit layout codes
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -122,28 +122,48 @@
|
|||
{
|
||||
foreach($_downloadedList as $dLayoutInfo)
|
||||
{
|
||||
$downloadedList[] = $dLayoutInfo->layout;
|
||||
$downloadedList[$dLayoutInfo->layout] = $dLayoutInfo->layout;
|
||||
$titleList[$dLayoutInfo->layout] = $dLayoutInfo->title;
|
||||
}
|
||||
}
|
||||
|
||||
// Get downloaded name list have no instance
|
||||
$noInstanceList = array_diff($downloadedList, $instanceList);
|
||||
foreach($noInstanceList as $layoutName)
|
||||
if($layout)
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layoutName;
|
||||
$insertArgs->title = $titleList[$layoutName];
|
||||
$insertArgs->layout_type = $layoutType;
|
||||
if(!count($instanceList) && $downloadedList[$layout])
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layout;
|
||||
$insertArgs->title = $titleList[$layout];
|
||||
$insertArgs->layout_type = $layoutType;
|
||||
|
||||
$oLayoutAdminController = getAdminController('layout');
|
||||
$oLayoutAdminController->insertLayout($insertArgs);
|
||||
$oLayoutAdminController = getAdminController('layout');
|
||||
$oLayoutAdminController->insertLayout($insertArgs);
|
||||
$isCreateInstance = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get downloaded name list have no instance
|
||||
$noInstanceList = array_diff($downloadedList, $instanceList);
|
||||
foreach($noInstanceList as $layoutName)
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layoutName;
|
||||
$insertArgs->title = $titleList[$layoutName];
|
||||
$insertArgs->layout_type = $layoutType;
|
||||
|
||||
$oLayoutAdminController = getAdminController('layout');
|
||||
$oLayoutAdminController->insertLayout($insertArgs);
|
||||
$isCreateInstance = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// If create layout instance, reload instance list
|
||||
if(count($noInstanceList))
|
||||
if($isCreateInstance)
|
||||
{
|
||||
$output = executeQueryArray('layout.getLayoutList', $args, $columnList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
<div class="aboutFaceOff">
|
||||
<h3>{$lang->about_faceoff['title']}</h3>
|
||||
<p>{$lang->about_faceoff['description']}</p>
|
||||
<img src="./images/faceoff.gif" border="0" />
|
||||
<p>{$lang->about_faceoff['layout']}</p>
|
||||
<p>{$lang->about_faceoff['setting']}</p>
|
||||
<p>{$lang->about_faceoff['hotkey']}</p>
|
||||
<p>{$lang->about_faceoff['attribute']}</p>
|
||||
</div>
|
||||
|
|
@ -1,40 +1,49 @@
|
|||
<script>
|
||||
var addLang = '{$lang->cmd_insert}';
|
||||
</script>
|
||||
<load target="js/layout_admin.js" usecdn="true" />
|
||||
<h1 class="h1">{$lang->cmd_layout_copy}</h1>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
|
||||
<div class="x_modal" id="__layout_copy">
|
||||
<div class="x_modal-header">
|
||||
<h3>{$lang->cmd_layout_copy}</h3>
|
||||
</div>
|
||||
<div class="x_modal-body">
|
||||
<form action="./" method="post">
|
||||
<input type="hidden" name="layout" value="{$layout->layout}" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminCopyLayout" />
|
||||
<input type="hidden" name="layout_srl" value="{$layout->layout_srl}" />
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row">{$lang->layout_name}</th>
|
||||
<td>{$layout->title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->title}</th>
|
||||
<td>{$layout->layout_title}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0" id="inputTable">
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->title}<div></th>
|
||||
<th scope="col"><div>{$lang->cmd_insert}</div></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" name="title[]" size="50" /></td>
|
||||
<td><span class="btn"><input type="button" value="{$lang->cmd_insert}" onclick="addLayoutCopyInputbox()" /></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="x_modal-footer">
|
||||
<button type="button" class="x_btn x_pull-left" data-hide="#__layout_copy">{$lang->cmd_close}</button>
|
||||
<span class="x_btn-group x_pull-right">
|
||||
<button type="submit" class="x_btn">{$lang->cmd_insert}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<form action="./" method="post">
|
||||
<input type="hidden" name="layout" value="{$layout->layout}" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminCopyLayout" />
|
||||
<input type="hidden" name="layout_srl" value="{$layout->layout_srl}" />
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row">{$lang->layout_name}</th>
|
||||
<td>{$layout->title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->title}</th>
|
||||
<td>{$layout->layout_title}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0" id="inputTable">
|
||||
<tr>
|
||||
<th scope="col"><div>{$lang->title}<div></th>
|
||||
<th scope="col"><div>{$lang->cmd_insert}</div></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" name="title[]" size="50" /></td>
|
||||
<td><span class="btn"><input type="button" value="{$lang->cmd_insert}" onclick="addLayoutCopyInputbox()" /></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
<!--#include("header.html")-->
|
||||
<!-- 레이아웃의 목록 -->
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="halfwide">{$lang->layout_name}</th>
|
||||
<th scope="col">{$lang->version}</th>
|
||||
<th scope="col">{$lang->author}</th>
|
||||
<th scope="col">{$lang->menu_count}</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->path}</th>
|
||||
<th scope="col">{$lang->cmd_make}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($layout_list as $key => $val)-->
|
||||
|
||||
<!--// 레이아웃 정보 파일(conf/info.xml)가 있는 경우-->
|
||||
<!--@if($val->title)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<th rowspan="2"> <a href="{getUrl('','module','layout','act','dispLayoutAdminInfo','selected_layout',$val->layout)}" onclick="popopen(this.href,'layout_info');return false" class="blue">{$val->title}</a> <br />
|
||||
({$val->layout}) </th>
|
||||
<td>{$val->version}</td>
|
||||
<td>
|
||||
<!--@foreach($val->author as $author)-->
|
||||
<!--@if($author->homepage)--><a href="{$author->homepage}" onclick="window.open(this.href);return false;"><!--@end-->{$author->name}<!--@if($author->homepage)--></a><!--@end-->
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
<td>{$val->menu_count}</td>
|
||||
<td>{zdate($val->date, 'Y-m-d')}</td>
|
||||
<td>{$val->path}</td>
|
||||
<td><a href="{getUrl('act','dispLayoutAdminInsert','layout',$val->layout)}">{$lang->cmd_make}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" >
|
||||
{nl2br(trim($val->description))}
|
||||
</td>
|
||||
</tr>
|
||||
<!--// 레이아웃 정보 파일(conf/info.xml)이 없는 경우 -->
|
||||
<!--@else-->
|
||||
<tr>
|
||||
<td colspan="6">{$val->layout}</td>
|
||||
<td class="tahoma">{$val->path}</td>
|
||||
<td class="tahoma blue"><a href="{getUrl('act','dispLayoutAdminInsert','layout',$val->layout)}">{$lang->cmd_make}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<!--#include("header.html")-->
|
||||
|
||||
<!-- 레이아웃의 목록 -->
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="halfwide">{$lang->layout_name}</th>
|
||||
<th scope="col">{$lang->version}</th>
|
||||
<th scope="col">{$lang->author}</th>
|
||||
<th scope="col">{$lang->menu_count}</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->path}</th>
|
||||
<th scope="col">{$lang->cmd_make}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($layout_list as $key => $val)-->
|
||||
|
||||
<!--// 레이아웃 정보 파일(conf/info.xml)가 있는 경우-->
|
||||
<!--@if($val->title)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<th rowspan="2"> <a href="{getUrl('','module','layout','act','dispLayoutAdminInfo','selected_layout',$val->layout)}" onclick="popopen(this.href,'layout_info');return false" class="blue">{$val->title}</a> <br />
|
||||
({$val->layout}) </th>
|
||||
<td>{$val->version}</td>
|
||||
<td>
|
||||
<!--@foreach($val->author as $author)-->
|
||||
<!--@if($author->homepage)--><a href="{$author->homepage}" onclick="window.open(this.href);return false;"><!--@end-->{$author->name}<!--@if($author->homepage)--></a><!--@end-->
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
<td>{$val->menu_count}</td>
|
||||
<td>{zdate($val->date, 'Y-m-d')}</td>
|
||||
<td>{$val->path}</td>
|
||||
<td><a href="{getUrl('act','dispLayoutAdminInsert','layout',$val->layout,'layout_type','M')}">{$lang->cmd_make}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" >
|
||||
{nl2br(trim($val->description))}
|
||||
</td>
|
||||
</tr>
|
||||
<!--// 레이아웃 정보 파일(conf/info.xml)이 없는 경우 -->
|
||||
<!--@else-->
|
||||
<tr>
|
||||
<td colspan="6">{$val->layout}</td>
|
||||
<td class="tahoma">{$val->path}</td>
|
||||
<td class="tahoma blue"><a href="{getUrl('act','dispLayoutAdminInsert','layout',$val->layout,'layout_type','M')}">{$lang->cmd_make}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -2,14 +2,19 @@
|
|||
#faceoff_migration_info img { border: 1px solid #ccc; padding: 5px; }
|
||||
</style>
|
||||
|
||||
<h1 class="h1">{$lang->installed_layout}</h1>
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->installed_layout}</h1>
|
||||
</div>
|
||||
|
||||
<div cond="$layout == 'faceoff'" class="message error">
|
||||
<div cond="$layout == 'faceoff'" class="x_alert x_alert-block">
|
||||
<p>{$lang->faceoff_migration[0]}</p>
|
||||
<p><a href="#faceoff_migration_info" class="modalAnchor">{$lang->faceoff_migration[1]}</a></p>
|
||||
</div>
|
||||
<div cond="$layout == 'faceoff'" id="faceoff_migration_info" class="modal">
|
||||
<div class="fg">
|
||||
<div cond="$layout == 'faceoff'" id="faceoff_migration_info" class="x_modal">
|
||||
<div class="x_modal-header">
|
||||
<h3>{$lang->faceoff_migration[1]}<h3>
|
||||
</div>
|
||||
<div class="x_modal-body">
|
||||
<ol>
|
||||
<li>
|
||||
<p>{$lang->faceoff_migration[2]}</p>
|
||||
|
|
@ -37,8 +42,11 @@
|
|||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="x_modal-footer">
|
||||
<button type="button" class="x_btn x_pull-left" data-hide="#faceoff_migration_info">{$lang->cmd_close}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
<!--%import("filter/delete_layout.xml")-->
|
||||
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<!-- 삭제를 위한 임시 form -->
|
||||
<form id="fo_layout" action="./" method="get" onsubmit="return procFilter(this, delete_layout)">
|
||||
<input type="hidden" name="layout_srl" value="" />
|
||||
</form>
|
||||
|
||||
<!-- 목록 -->
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->no}</th>
|
||||
<th scope="col">{$lang->layout}</th>
|
||||
<th scope="col">{$lang->title}</th>
|
||||
<th scope="col">{$lang->regdate}</th>
|
||||
<th scope="col" colspan="3"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($layout_list as $no => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<td>{$no+1}</td>
|
||||
<td>
|
||||
{$val->layout}
|
||||
<!--@if($val->module_srl)-->
|
||||
(module)
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td >{$val->title}</td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td>
|
||||
<!--@if(!$val->module_srl)-->
|
||||
<a href="{getUrl('act','dispLayoutAdminModify','layout_srl',$val->layout_srl)}" title="{htmlspecialchars($lang->cmd_layout_management)}" class="buttonSet buttonSetting"><span>{$lang->cmd_layout_management}</span></a>
|
||||
<!--@else-->
|
||||
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td><a href="{getUrl('act','dispLayoutAdminEdit','layout_srl',$val->layout_srl)}" title="{htmlspecialchars($lang->cmd_layout_edit)}" class="buttonSet buttonLayoutEditor"><span>{$lang->cmd_layout_edit}</span></a></td>
|
||||
<td><a href="#" onclick="doDeleteLayout('{$val->layout_srl}');return false;" title="{htmlspecialchars($lang->cmd_delete)}" class="buttonSet buttonDelete"><span>{$lang->cmd_delete}</span></a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="{getUrl('act','dispLayoutAdminInsert','layout_srl','')}">{$lang->cmd_make}</a></span>
|
||||
</div>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<!--#include("header.html")-->
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="insertLayout" action="./" method="post">
|
||||
<input type="hidden" name="module" value="layout" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminInsert" />
|
||||
<input type="hidden" name="layout_type" value="{$layout_type}" />
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row">{$lang->layout_name}</th>
|
||||
<td>
|
||||
<select name="layout">
|
||||
<option value="faceoff">faceoff</option>
|
||||
|
||||
<optgroup label="{$lang->downloaded_list}">
|
||||
<!--@foreach($layout_list as $key => $val)-->
|
||||
<option value="{$val->layout}" <!--@if($layout == $val->layout)-->selected="selected"<!--@end-->> <!--@if($val->title)-->{$val->title} ({$val->layout})<!--@else-->{$val->layout}<!--@end--></option>
|
||||
<!--@end-->
|
||||
</optgroup>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->title}</th>
|
||||
<td>
|
||||
<input type="text" name="title" value="{$info->title}" />
|
||||
<p>{$lang->about_title}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_next}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -1,54 +1,56 @@
|
|||
<include target="header.html" />
|
||||
<div class="table even easyList dsTg">
|
||||
<include target="sub_tab.html" />
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>
|
||||
<span class="side"><button type="button" class="text"><span class="hide">{$lang->simple_view}</span><span class="show">{$lang->detail_view}</span></button></span>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->layout_name}</th>
|
||||
<th scope="col" class="nowr">{$lang->version}</th>
|
||||
<th scope="col" class="nowr">{$lang->author}</th>
|
||||
<th scope="col" class="nowr">{$lang->path}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<block loop="$layout_list => $key, $layout">
|
||||
<tr>
|
||||
<block cond="$layout->title">
|
||||
<td class="title">
|
||||
<p><a href="{getUrl('act', 'dispLayoutAdminInstanceList', 'type', $type, 'layout', $layout->layout)}">{$layout->title}</a></p>
|
||||
<p>{$layout->description}</p>
|
||||
<p cond="$layout->need_update == 'Y'" class="update">
|
||||
{$lang->msg_avail_easy_update} <a href="{$layout->update_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td class="nowr">{$layout->version}</td>
|
||||
<td class="nowr">
|
||||
<block loop="$layout->author => $author">
|
||||
<a cond="$author->homepage" href="{$author->homepage}" target="_blank">{$author->name}</a>
|
||||
<block cond="!$author->homepage">{$author->name}</block>
|
||||
</block>
|
||||
</td>
|
||||
<td class="nowr">{$layout->path}</td>
|
||||
<td class="nowr"><a cond="$layout->remove_url" href="{$layout->remove_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->cmd_delete}</a></td>
|
||||
</block>
|
||||
<block cond="!$layout->title">
|
||||
<td class="title">
|
||||
<p><a href="{getUrl('act', 'dispLayoutAdminInstanceList', 'type', $type, 'layout', $layout->layout)}">{$layout->layout}</a></p>
|
||||
<p cond="$layout->need_update == 'Y'" class="update">
|
||||
{$lang->msg_avail_easy_update} <a href="{$layout->update_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td class="nowr">-</td>
|
||||
<td class="nowr">-</td>
|
||||
<td class="nowr">{$layout->path}</td>
|
||||
<td class="nowr"><a cond="$layout->remove_url" href="{$layout->remove_url}&return_url={urlencodegetRequestUriByServerEnviroment()}">{$lang->cmd_delete}</a></td>
|
||||
</block>
|
||||
</tr>
|
||||
|
||||
<table class="x_table x_table-striped x_table-hover dsTg">
|
||||
<caption>
|
||||
<div class="x_pull-right x_btn-group">
|
||||
<button class="x_btn x_btn-mini x_active __simple">{$lang->simple_view}</button>
|
||||
<button class="x_btn x_btn-mini __detail">{$lang->detail_view}</button>
|
||||
</div>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->layout_name}</th>
|
||||
<th scope="col" class="nowr">{$lang->version}</th>
|
||||
<th scope="col" class="nowr">{$lang->author}</th>
|
||||
<th scope="col" class="nowr">{$lang->path}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<block loop="$layout_list => $key, $layout">
|
||||
<tr>
|
||||
<block cond="$layout->title">
|
||||
<td class="title">
|
||||
<p><a href="{getUrl('act', 'dispLayoutAdminInstanceList', 'type', $type, 'layout', $layout->layout)}">{$layout->title}</a></p>
|
||||
<p>{$layout->description}</p>
|
||||
<p cond="$layout->need_update == 'Y'" class="update">
|
||||
{$lang->msg_avail_easy_update} <a href="{$layout->update_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td class="nowr">{$layout->version}</td>
|
||||
<td class="nowr">
|
||||
<block loop="$layout->author => $author">
|
||||
<a cond="$author->homepage" href="{$author->homepage}" target="_blank">{$author->name}</a>
|
||||
<block cond="!$author->homepage">{$author->name}</block>
|
||||
</block>
|
||||
</td>
|
||||
<td class="nowr">{$layout->path}</td>
|
||||
<td class="nowr"><a cond="$layout->remove_url" class="x_btn x_btn-primary" href="{$layout->remove_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->cmd_delete}</a></td>
|
||||
</block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<block cond="!$layout->title">
|
||||
<td class="title">
|
||||
<p><a href="{getUrl('act', 'dispLayoutAdminInstanceList', 'type', $type, 'layout', $layout->layout)}">{$layout->layout}</a></p>
|
||||
<p cond="$layout->need_update == 'Y'" class="update">
|
||||
{$lang->msg_avail_easy_update} <a href="{$layout->update_url}&return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td class="nowr">-</td>
|
||||
<td class="nowr">-</td>
|
||||
<td class="nowr">{$layout->path}</td>
|
||||
<td class="nowr"><a cond="$layout->remove_url" class="x_btn x_btn-primary" href="{$layout->remove_url}&return_url={urlencodegetRequestUriByServerEnviroment()}">{$lang->cmd_delete}</a></td>
|
||||
</block>
|
||||
</tr>
|
||||
</block>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
<!--%import("filter/delete_layout.xml")-->
|
||||
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<!-- 삭제를 위한 임시 form -->
|
||||
<form id="fo_layout" action="./" method="get" onsubmit="return procFilter(this, delete_layout)">
|
||||
<input type="hidden" name="layout_srl" value="" />
|
||||
</form>
|
||||
|
||||
<!-- 목록 -->
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->no}</th>
|
||||
<th scope="col">{$lang->layout}</th>
|
||||
<th scope="col">{$lang->title}</th>
|
||||
<th scope="col">{$lang->regdate}</th>
|
||||
<th scope="col" colspan="3"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($layout_list as $no => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<td>{$no+1}</td>
|
||||
<td>
|
||||
{$val->layout}
|
||||
<!--@if($val->module_srl)-->
|
||||
(module)
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td >{$val->title}</td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td>
|
||||
<!--@if(!$val->module_srl)-->
|
||||
<a href="{getUrl('act','dispLayoutAdminModify','layout_srl',$val->layout_srl)}" title="{htmlspecialchars($lang->cmd_layout_management)}" class="buttonSet buttonSetting"><span>{$lang->cmd_layout_management}</span></a>
|
||||
<!--@else-->
|
||||
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td><a href="{getUrl('act','dispLayoutAdminEdit','layout_srl',$val->layout_srl)}" title="{htmlspecialchars($lang->cmd_layout_edit)}" class="buttonSet buttonLayoutEditor"><span>{$lang->cmd_layout_edit}</span></a></td>
|
||||
<td><a href="#" onclick="doDeleteLayout('{$val->layout_srl}');return false;" title="{htmlspecialchars($lang->cmd_delete)}" class="buttonSet buttonDelete"><span>{$lang->cmd_delete}</span></a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="{getUrl('act','dispLayoutAdminInsert','layout_srl','','layout_type','M')}">{$lang->cmd_make}</a></span>
|
||||
</div>
|
||||
|
|
@ -1,14 +1,8 @@
|
|||
<div class="cnb">
|
||||
<a cond="$type == 'M'" href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'P')}">PC({$pcLayoutCount})</a>
|
||||
<block cond="$type != 'M'">PC({$pcLayoutCount})</block>
|
||||
|
|
||||
<a cond="$type != 'M'" href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'M')}">Mobile({$mobileLayoutCount})</a>
|
||||
<block cond="$type == 'M'">Mobile({$mobileLayoutCount})</block>
|
||||
</div>
|
||||
<div class="cnb">
|
||||
<a cond="$act != 'dispLayoutAdminAllInstanceList'" href="{getUrl('act', 'dispLayoutAdminAllInstanceList', 'layout_srl', '')}">{$lang->instance_layout}</a>
|
||||
<block cond="$act == 'dispLayoutAdminAllInstanceList'">{$lang->instance_layout}</block>
|
||||
|
|
||||
<a cond="$act != 'dispLayoutAdminInstalledList'" href="{getUrl('act', 'dispLayoutAdminInstalledList')}">{$lang->installed_layout}</a>
|
||||
<block cond="$act == 'dispLayoutAdminInstalledList'">{$lang->installed_layout}</block>
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"|cond="$type != 'M'"><a href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'P')}">PC({$pcLayoutCount})</a></li>
|
||||
<li class="x_active"|cond="$type == 'M'"><a href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'M')}">Mobile({$mobileLayoutCount})</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<a class="active"|cond="$act == 'dispLayoutAdminAllInstanceList'" href="{getUrl('act', 'dispLayoutAdminAllInstanceList', 'layout_srl', '')}">{$lang->instance_layout}</a> <i>|</i>
|
||||
<a class="active"|cond="$act == 'dispLayoutAdminInstalledList'" href="{getUrl('act', 'dispLayoutAdminInstalledList')}">{$lang->installed_layout}</a>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue