mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-24 21:03:19 +09:00
#358 사용하지 않는 파일 제거 및 admin, menu 모듈의 js 정리
This commit is contained in:
parent
ab716fc7f1
commit
ecdfee25c1
16 changed files with 186 additions and 1303 deletions
|
|
@ -1,21 +1,21 @@
|
|||
/* NAVER (developers@xpressengine.com) */
|
||||
// install module
|
||||
function doInstallModule(module) {
|
||||
var params = new Array();
|
||||
params['module_name'] = module;
|
||||
exec_xml('install','procInstallAdminInstall',params, completeInstallModule);
|
||||
var params = [];
|
||||
params.module_name = module;
|
||||
exec_xml('install','procInstallAdminInstall',params, completeInstallModule);
|
||||
}
|
||||
|
||||
// upgrade module
|
||||
function doUpdateModule(module) {
|
||||
var params = new Array();
|
||||
params['module_name'] = module;
|
||||
exec_xml('install','procInstallAdminUpdate',params, completeInstallModule);
|
||||
var params = [];
|
||||
params.module_name = module;
|
||||
exec_xml('install','procInstallAdminUpdate',params, completeInstallModule);
|
||||
}
|
||||
|
||||
function completeInstallModule(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
location.reload();
|
||||
alert(ret_obj.message);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
|
|
@ -73,7 +73,8 @@ jQuery(function($){
|
|||
});
|
||||
});
|
||||
$('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();
|
||||
}
|
||||
};
|
||||
|
||||
$('.x .x_tabbable').xeTabbable();
|
||||
$(document.body).on('click', '.x .x_nav-tabs>li>a[href^="#"]', function(){
|
||||
var $this = $(this);
|
||||
|
|
@ -337,7 +338,7 @@ jQuery(function($){
|
|||
// Modal Window
|
||||
jQuery(function($){
|
||||
var ESC = 27;
|
||||
var xeModalStack = new Array();
|
||||
var xeModalStack = [];
|
||||
var xeModalInitailZIndex = 1040;
|
||||
|
||||
// modal backdrop
|
||||
|
|
@ -376,8 +377,8 @@ jQuery(function($){
|
|||
|
||||
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') });
|
||||
$btnClose.click(function(){ $modal.data('anchor').trigger('close.mw'); });
|
||||
$modal.find('[data-hide]').click(function(){ $modal.data('anchor').trigger('close.mw'); });
|
||||
$('body').append($modal);
|
||||
$modal.prepend($btnClose); // prepend close button
|
||||
}
|
||||
|
|
@ -399,7 +400,7 @@ jQuery(function($){
|
|||
$modal.data('state', 'showing');
|
||||
|
||||
// after event trigger
|
||||
function after(){ $this.trigger('after-open.mw') };
|
||||
function after(){ $this.trigger('after-open.mw'); }
|
||||
|
||||
$(document).bind('keydown.mw', function(event){
|
||||
if(event.which == ESC) {
|
||||
|
|
@ -448,7 +449,7 @@ jQuery(function($){
|
|||
$modal.data('state', 'hiding');
|
||||
|
||||
// after event trigger
|
||||
function after(){ $this.trigger('after-close.mw') };
|
||||
function after(){ $this.trigger('after-close.mw'); }
|
||||
|
||||
$modal.fadeOut(duration, after);
|
||||
$('body').css('overflow','auto');
|
||||
|
|
@ -487,7 +488,7 @@ jQuery(function($){
|
|||
$layer.hide()
|
||||
.not('.xe-toggling-content')
|
||||
.addClass('xe-toggling-content')
|
||||
.mousedown(function(event){ dont_close_this_time = true })
|
||||
.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');
|
||||
|
|
@ -552,7 +553,7 @@ jQuery(function($){
|
|||
);
|
||||
|
||||
// triggering after
|
||||
function trigger_after(){ $this.trigger('after-open.tc') }
|
||||
function trigger_after(){ $this.trigger('after-open.tc'); }
|
||||
|
||||
switch(effect) {
|
||||
case 'slide':
|
||||
|
|
@ -595,7 +596,7 @@ jQuery(function($){
|
|||
$this.trigger('before-close.tc');
|
||||
|
||||
// triggering after
|
||||
function trigger_after(){ $this.trigger('after-close.tc') };
|
||||
function trigger_after(){ $this.trigger('after-close.tc'); }
|
||||
|
||||
// close this layer
|
||||
switch(effect) {
|
||||
|
|
@ -649,7 +650,7 @@ jQuery(function($){
|
|||
$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);
|
||||
})
|
||||
|
|
@ -680,7 +681,7 @@ jQuery(function($){
|
|||
})
|
||||
.trigger('show');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
$finder.find('a.tgAnchor.findsite').trigger('close.tc');
|
||||
|
||||
|
|
@ -758,6 +759,7 @@ jQuery(function($){
|
|||
var sDomain;
|
||||
var rxFilter = new RegExp(sFilter, "ig");
|
||||
var list = aSiteListData;
|
||||
var replaceHighlight = function(sKeyword){ return '<span class="highlight">'+sKeyword+'</span>'; };
|
||||
|
||||
$siteList.empty();
|
||||
|
||||
|
|
@ -765,9 +767,8 @@ jQuery(function($){
|
|||
sDomain = list[i].domain;
|
||||
if(sFilter){
|
||||
if(!sDomain.match(rxFilter)) continue;
|
||||
sDomain = sDomain.replace(rxFilter, function(sKeyword){
|
||||
return '<span class="highlight">'+sKeyword+'</span>';
|
||||
});
|
||||
|
||||
sDomain = sDomain.replace(rxFilter, replaceHighlight);
|
||||
}
|
||||
|
||||
$li = $('<li />').appendTo($siteList);
|
||||
|
|
@ -814,7 +815,7 @@ jQuery(function($){
|
|||
setSiteList($siteFinder.val());
|
||||
|
||||
$siteFinder.focus();
|
||||
};
|
||||
}
|
||||
|
||||
$siteList.empty();
|
||||
$instanceList.empty();
|
||||
|
|
@ -849,7 +850,7 @@ jQuery(function($){
|
|||
|
||||
$siteList.find('li').removeClass('x_active');
|
||||
$this.parent('li').addClass('x_active');
|
||||
};
|
||||
}
|
||||
|
||||
$moduleList.empty();
|
||||
$instanceListDiv.hide();
|
||||
|
|
@ -948,7 +949,7 @@ jQuery(function($){
|
|||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
jQuery(function($){
|
||||
|
|
@ -969,7 +970,7 @@ jQuery(function($){
|
|||
}
|
||||
|
||||
return _hide.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
var _show = $.fn.show;
|
||||
$.fn.show = function(speed, easing, callback, htOpt) {
|
||||
|
|
@ -989,11 +990,10 @@ jQuery(function($){
|
|||
var $this = $(this);
|
||||
|
||||
// elem. display not yet... using setTimeout...
|
||||
setTimeout(function(){$this.trigger('after-show', [htOpt]) }, 0);
|
||||
setTimeout(function(){$this.trigger('after-show', [htOpt]); }, 0);
|
||||
|
||||
return rst;
|
||||
}
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
jQuery(function($){
|
||||
|
|
@ -1003,18 +1003,7 @@ jQuery(function($){
|
|||
//xe.cmd_cancel = "{$lang->cmd_cancel}";
|
||||
//xe.cmd_confirm = "{$lang->cmd_confirm}";
|
||||
var $msgBox = $.xeMsgBox.$msgBox = $("<section />").addClass("x_modal _common x").hide().css('z-index', 9999);
|
||||
$msgBox.html('<button type="button" class="x_close _cancel">×</button>\
|
||||
<div class="x_modal-header">\
|
||||
<h1 class="_title"></h1>\
|
||||
</div>\
|
||||
<div class="x_modal-body">\
|
||||
<div class="_text"></div>\
|
||||
</div>\
|
||||
<div class="x_modal-footer">\
|
||||
<button type="button" class="x_btn x_pull-left _cancel">'+xe.cmd_cancel+'</button>\
|
||||
<button type="submit" class="x_btn x_btn-inverse x_pull-right x_btn-primary _ok">'+xe.cmd_confirm+'</button>\
|
||||
</div>');
|
||||
|
||||
$msgBox.html('<button type="button" class="x_close _cancel">×</button> <div class="x_modal-header"> <h1 class="_title"></h1> </div> <div class="x_modal-body"> <div class="_text"></div> </div> <div class="x_modal-footer"> <button type="button" class="x_btn x_pull-left _cancel">'+xe.cmd_cancel+'</button> <button type="submit" class="x_btn x_btn-inverse x_pull-right x_btn-primary _ok">'+xe.cmd_confirm+'</button> </div> ');
|
||||
$("body").append($msgBox);
|
||||
$msgBox.find("._ok").click(function(){
|
||||
$.xeMsgBox.fnOnOK();
|
||||
|
|
@ -1119,13 +1108,13 @@ jQuery(function($){
|
|||
}
|
||||
|
||||
$msgBox.show();
|
||||
}
|
||||
};
|
||||
$.xeMsgBox.alertDialog = function(htOptions){
|
||||
htOptions = htOptions || {};
|
||||
htOptions.bAlert = true;
|
||||
|
||||
this.showMsgBox(htOptions);
|
||||
}
|
||||
};
|
||||
$.xeMsgBox.alert = function(sText){
|
||||
htOptions = {
|
||||
bAlert : true,
|
||||
|
|
@ -1135,13 +1124,13 @@ jQuery(function($){
|
|||
};
|
||||
|
||||
this.showMsgBox(htOptions);
|
||||
}
|
||||
};
|
||||
$.xeMsgBox.confirmDialog = function(htOptions){
|
||||
htOptions = htOptions || {};
|
||||
htOptions.bAlert = false;
|
||||
|
||||
this.showMsgBox(htOptions);
|
||||
}
|
||||
};
|
||||
|
||||
var $foggyLayer = $.xeMsgBox.$foggyLayer = $("<div />");
|
||||
$foggyLayer.css({
|
||||
|
|
@ -1168,16 +1157,16 @@ jQuery(function($){
|
|||
height: $(document).height()
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
$(window).resize($.xeMsgBox._resizeFoggy);
|
||||
$.xeMsgBox._resizeFoggy();
|
||||
|
||||
$.xeMsgBox._showFoggy = function(){
|
||||
$foggyLayer.show();
|
||||
}
|
||||
};
|
||||
$.xeMsgBox._hideFoggy = function(){
|
||||
$foggyLayer.hide();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
jQuery(function($){
|
||||
|
|
@ -1207,7 +1196,7 @@ jQuery(function($){
|
|||
height: $(document).height()
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
$(window).resize($.xeFoggy._resizeFoggy);
|
||||
$.xeFoggy._resizeFoggy();
|
||||
|
||||
|
|
@ -1222,10 +1211,10 @@ jQuery(function($){
|
|||
});
|
||||
}
|
||||
$foggyLayer.show();
|
||||
}
|
||||
};
|
||||
$.xeFoggy.hide = function(){
|
||||
$foggyLayer.hide();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// Sortable table
|
||||
|
|
@ -1280,7 +1269,7 @@ jQuery(function($){
|
|||
.addClass('draggable')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
opacity : .6,
|
||||
opacity : 0.6,
|
||||
width : width,
|
||||
height : height,
|
||||
left : offset.left,
|
||||
|
|
@ -1292,7 +1281,7 @@ jQuery(function($){
|
|||
$holder
|
||||
.css({
|
||||
position:'absolute',
|
||||
opacity : .6,
|
||||
opacity : 0.6,
|
||||
width : width,
|
||||
height : '10px',
|
||||
left : offset.left,
|
||||
|
|
@ -1303,7 +1292,7 @@ jQuery(function($){
|
|||
})
|
||||
.appendTo($table);
|
||||
|
||||
$tr.css('opacity', .6);
|
||||
$tr.css('opacity', 0.6);
|
||||
|
||||
$(document)
|
||||
.unbind('mousedown.st mouseup.st')
|
||||
|
|
@ -1349,7 +1338,7 @@ jQuery(function($){
|
|||
|
||||
$table.trigger('after-drag.st');
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
|
@ -1374,7 +1363,7 @@ jQuery(function($){
|
|||
$list.find('.select')
|
||||
.bind('click', function(event){
|
||||
var selectedImages = $('input.select_checkbox:checked');
|
||||
if(selectedImages.length == 0) {
|
||||
if(selectedImages.length === 0) {
|
||||
var selectedImgSrc = $(this).closest('tr').find('img.filebox_item').attr('src');
|
||||
if(!selectedImgSrc){
|
||||
alert("None selected!");
|
||||
|
|
@ -1423,8 +1412,8 @@ jQuery(function($){
|
|||
var detailBtn = $('.x .dsTg .__detail');
|
||||
var tdTitle = $('.x .dsTg td.title');
|
||||
tdTitle.each(function(){
|
||||
var $t = $(this)
|
||||
if($t.find('p.x_alert').length==0){
|
||||
var $t = $(this);
|
||||
if($t.find('p.x_alert').length === 0){
|
||||
$t.addClass('tg').find('>*:not(:first-child)').hide();
|
||||
}
|
||||
});
|
||||
|
|
@ -1838,7 +1827,7 @@ jQuery(function($){
|
|||
}, on_complete);
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// Apply Multilingual UI
|
||||
|
|
@ -1872,13 +1861,15 @@ jQuery(function($){
|
|||
function makeUI(){
|
||||
var $multilingualWindow = $('#g11n');
|
||||
var width = $this.width();
|
||||
var $displayInput;
|
||||
|
||||
if(t.tagName == 'TEXTAREA' || $this.data('type') == 'textarea'){
|
||||
var $displayInput = $('<textarea id="lang_' + id + '" class="lang_code" style="width:' + width + 'px" data-width="' + width + '">').data('lang-id', id);
|
||||
$displayInput = $('<textarea id="lang_' + id + '" class="lang_code" style="width:' + width + 'px" data-width="' + width + '">').data('lang-id', id);
|
||||
}else{
|
||||
var $displayInput = $('<input type="text" id="lang_' + id + '" class="lang_code" style="width:' + (width-28) + 'px" data-width="' + (width-28) + '">').data('lang-id', id);
|
||||
$displayInput = $('<input type="text" id="lang_' + id + '" class="lang_code" style="width:' + (width-28) + 'px" data-width="' + (width-28) + '">').data('lang-id', id);
|
||||
}
|
||||
$displayInput.attr('placeholder', $this.attr('placeholder'))
|
||||
$displayInput.attr('placeholder', $this.attr('placeholder'));
|
||||
|
||||
var $remover = $('<button type="button" class="x_add-on remover" title="' + xe.cmd_remove_multilingual_text + '"><i class="x_icon-remove"></i>' + xe.cmd_remove_multilingual_text + '</button>').data('lang-target', id);
|
||||
var $setter = $('<a href="#g11n" class="x_add-on modalAnchor" title="' + xe.cmd_set_multilingual_text + '"><i class="x_icon-globe"></i>' + xe.cmd_set_multilingual_text + '</a>').data('lang-target', id);
|
||||
|
||||
|
|
@ -1965,16 +1956,17 @@ jQuery(function($){
|
|||
function loadValue(){
|
||||
reset();
|
||||
var pattern = /^\$user_lang->/;
|
||||
|
||||
function on_complete2(data){
|
||||
if(!data || !data.langs) return;
|
||||
|
||||
var width = $displayInput.width();
|
||||
|
||||
$displayInput.closest('.g11n').addClass('active');
|
||||
$displayInput.val(data.langs[xe.current_lang]).attr('disabled', 'disabled').width(width - 44).data('active', true);
|
||||
}
|
||||
|
||||
if(pattern.test($displayInput.val())){
|
||||
function on_complete2(data){
|
||||
if(!data || !data.langs) return;
|
||||
|
||||
var width = $displayInput.width();
|
||||
|
||||
$displayInput.closest('.g11n').addClass('active');
|
||||
$displayInput.val(data.langs[xe.current_lang]).attr('disabled', 'disabled').width(width - 44).data('active', true);
|
||||
}
|
||||
|
||||
$.exec_json('module.getModuleAdminLangCode', {
|
||||
'name': $displayInput.val().replace('$user_lang->', ''),
|
||||
'mid': current_url.getQuery('mid')
|
||||
|
|
@ -2040,12 +2032,8 @@ jQuery(function($){
|
|||
//data-multiple
|
||||
$.xeMenuSelectorVar = {bMultiSelect: false};
|
||||
|
||||
$.template( "menuSelector_menuTree", '<ul>{{html Nodes}}</ul>' );
|
||||
$.template( "menuSelector_menuTreeNode", ' <li>\
|
||||
<a href="#" class="_nodeType_${NodeType} _menu_node _menu_url_${MenuUrl}" data-param=\'{ "sMenuId":"${MenuId}", "sMenuUrl":"${MenuUrl}", "sMenuTitle":"${MenuTitle}", "sType":"${MenuType}", "sModuleSrl":"${ModuleSrl}" }\'>${MenuTitle}</a>\
|
||||
{{html SubTree}}\
|
||||
</li>' );
|
||||
//data-param=\'{ "sMenuId":"${MenuId}", "sMenuUrl":"${MenuUrl}", "sMenuTitle":"${MenuTitle}" }\'
|
||||
$.template('menuSelector_menuTree', '<ul>{{html Nodes}}</ul>');
|
||||
$.template('menuSelector_menuTreeNode', '<li> <a href="#" class="_nodeType_${NodeType} _menu_node _menu_url_${MenuUrl}" data-param=\'{ "sMenuId":"${MenuId}", "sMenuUrl":"${MenuUrl}", "sMenuTitle":"${MenuTitle}", "sType":"${MenuType}", "sModuleSrl":"${ModuleSrl}" }\'>${MenuTitle}</a> {{html SubTree}} </li>'); //data-param=\'{ "sMenuId":"${MenuId}", "sMenuUrl":"${MenuUrl}", "sMenuTitle":"${MenuTitle}" }\'
|
||||
function onSiteMapReceived(htData){
|
||||
var $ = jQuery;
|
||||
|
||||
|
|
@ -2168,7 +2156,7 @@ jQuery(function($){
|
|||
htNodeInfo = {};
|
||||
|
||||
$.exec_json("menu.getMenuAdminSiteMap", params, onSiteMapReceived);
|
||||
}
|
||||
};
|
||||
|
||||
// return html
|
||||
function createTreeMarkup(aNode, sParentSrl, sMenuTree, sMenuTreeNode){
|
||||
|
|
@ -2177,13 +2165,11 @@ jQuery(function($){
|
|||
sMenuTree = sMenuTree || "menuSelector_menuTree";
|
||||
sMenuTreeNode = sMenuTreeNode || "menuSelector_menuTreeNode";
|
||||
|
||||
var $ = jQuery;
|
||||
|
||||
if(aNode.length == 0){
|
||||
if(aNode.length === 0){
|
||||
return "";
|
||||
}
|
||||
|
||||
var sActiveBtn, sNormalBtn, sHoverBtn, sExpand, sLink, aSubNodes, sNodeSrl, sOpenWindow, sParentSrl, nSelected, sText, sURL, sIsStartModule, aSubNode, sModuleType;
|
||||
var sActiveBtn, sNormalBtn, sHoverBtn, sExpand, sLink, aSubNodes, sNodeSrl, sOpenWindow, nSelected, sText, sURL, sIsStartModule, aSubNode, sModuleType;
|
||||
|
||||
// 1: Sitemap node, 2: Menu node
|
||||
var nNodeType;
|
||||
|
|
@ -2292,8 +2278,8 @@ jQuery(function($){
|
|||
|
||||
$.xeMenuSelectorVar.bMultiSelect = ""+$btn.data('multiple') == "true";
|
||||
//{sMenuId":"578", "sMenuUrl":"page_ANom60", "sMenuTitle":"wwww", "sType":"WIDGET" }
|
||||
$.xeMenuSelectorVar.aAllowedType = $.grep((""+($btn.data('allowedType') || "")).split(','), function(el){return el !== ""});
|
||||
$.xeMenuSelectorVar.aDisallowedType = $.grep((""+($btn.data('disallowedType') || "")).split(','), function(el){return el !== ""});
|
||||
$.xeMenuSelectorVar.aAllowedType = $.grep((""+($btn.data('allowedType') || '')).split(','), function(el){return el !== '';});
|
||||
$.xeMenuSelectorVar.aDisallowedType = $.grep((""+($btn.data('disallowedType') || '')).split(','), function(el){return el !== '';});
|
||||
$.xeMenuSelectorVar.aDisallowedType.push("_ROOT");
|
||||
$.xeMenuSelectorVar.aDisallowedType.push("_SHORTCUT");
|
||||
|
||||
|
|
@ -2305,22 +2291,22 @@ jQuery(function($){
|
|||
});
|
||||
|
||||
$.exec_json('admin.getSiteAllList', {domain:""}, onSiteAllListCompleted);
|
||||
}
|
||||
};
|
||||
function xeMenuSearch(ev){
|
||||
var $btn = $(ev.target);
|
||||
$.xeMenuSelectorVar.bMultiSelect = ""+$btn.data('multiple') == "true";
|
||||
//{sMenuId":"578", "sMenuUrl":"page_ANom60", "sMenuTitle":"wwww", "sType":"WIDGET" }
|
||||
$.xeMenuSelectorVar.aAllowedType = $.grep((""+($btn.data('allowedType') || "")).split(','), function(el){return el !== ""});
|
||||
$.xeMenuSelectorVar.aDisallowedType = $.grep((""+($btn.data('disallowedType') || "")).split(','), function(el){return el !== ""});
|
||||
$.xeMenuSelectorVar.aAllowedType = $.grep((""+($btn.data('allowedType') || '')).split(','), function(el){return el !== '';});
|
||||
$.xeMenuSelectorVar.aDisallowedType = $.grep((""+($btn.data('disallowedType') || '')).split(','), function(el){return el !== '';});
|
||||
$.xeMenuSelectorVar.aDisallowedType.push("_ROOT");
|
||||
$.xeMenuSelectorVar.aDisallowedType.push("_SHORTCUT");
|
||||
|
||||
if($.inArray("page", $.xeMenuSelectorVar.aAllowedType) > -1){
|
||||
$.xeMenuSelectorVar.aAllowedType.push("ARTICLE", "WIDGET", "OUTSIDE");
|
||||
if($.inArray('page', $.xeMenuSelectorVar.aAllowedType) > -1){
|
||||
$.xeMenuSelectorVar.aAllowedType.push('ARTICLE', 'WIDGET', 'OUTSIDE');
|
||||
}
|
||||
|
||||
if($.inArray("page", $.xeMenuSelectorVar.aDisallowedType) > -1){
|
||||
$.xeMenuSelectorVar.aDisallowedType.push("ARTICLE", "WIDGET", "OUTSIDE");
|
||||
if($.inArray('page', $.xeMenuSelectorVar.aDisallowedType) > -1){
|
||||
$.xeMenuSelectorVar.aDisallowedType.push('ARTICLE', 'WIDGET', 'OUTSIDE');
|
||||
}
|
||||
|
||||
//bMultiSelect = //data-multiple
|
||||
|
|
@ -2424,7 +2410,7 @@ jQuery(function($){
|
|||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
$msgBox = $('.x_modal._common');
|
||||
$msgBox.on('change', '.site_selector', function(ev){
|
||||
|
|
@ -2451,7 +2437,7 @@ jQuery(function($){
|
|||
try {
|
||||
window.alert = function(){
|
||||
return $.xeMsgBox.alert.apply($.xeMsgBox, arguments);
|
||||
}
|
||||
};
|
||||
setTimeout(function(){$('div.message.info').fadeOut(1000);}, 2500);
|
||||
}catch(e){}
|
||||
});
|
||||
|
|
|
|||
4
modules/admin/tpl/js/admin.min.js
vendored
4
modules/admin/tpl/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -3,111 +3,114 @@ jQuery(function($){
|
|||
$('#sitefind_addBtn').css('display','');
|
||||
});
|
||||
});
|
||||
|
||||
function setStartModule(){
|
||||
var target_module = jQuery('.moduleIdList option:selected').text();
|
||||
var index_module_srl = jQuery('.moduleIdList').val();
|
||||
var index_module_srl = jQuery('.moduleIdList').val();
|
||||
jQuery('#_target_module').val(target_module);
|
||||
jQuery('#index_module_srl').val(index_module_srl);
|
||||
jQuery('.moduleList,.moduleIdList, .site_keyword_search, #sitefind_addBtn').css('display','none');
|
||||
}
|
||||
|
||||
function viewSiteSearch(){
|
||||
jQuery(".site_keyword_search").css("display","");
|
||||
jQuery(".site_keyword_search").css("display","");
|
||||
}
|
||||
|
||||
function getFTPList(pwd)
|
||||
{
|
||||
var form = jQuery("#ftp_form").get(0);
|
||||
if(typeof(pwd) != 'undefined')
|
||||
{
|
||||
form.ftp_root_path.value = pwd;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!form.ftp_root_path.value && typeof(form.sftp) != 'undefined' && form.sftp.checked)
|
||||
{
|
||||
form.ftp_root_path.value = xe_root;
|
||||
}
|
||||
var form = jQuery("#ftp_form").get(0);
|
||||
if(typeof(pwd) != 'undefined')
|
||||
{
|
||||
form.ftp_root_path.value = pwd;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!form.ftp_root_path.value && typeof(form.sftp) != 'undefined' && form.sftp.checked)
|
||||
{
|
||||
form.ftp_root_path.value = xe_root;
|
||||
}
|
||||
else
|
||||
{
|
||||
form.ftp_root_path.value = "/";
|
||||
}
|
||||
}
|
||||
{
|
||||
form.ftp_root_path.value = "/";
|
||||
}
|
||||
}
|
||||
|
||||
var params= new Array();
|
||||
var params = [];
|
||||
//ftp_pasv not used
|
||||
params['ftp_user'] = jQuery("#ftp_user").val();
|
||||
params['ftp_password'] =jQuery("#ftp_password").val();
|
||||
params['ftp_host'] = jQuery("#ftp_host").val();
|
||||
params['ftp_port'] = jQuery("#ftp_port").val();
|
||||
params['ftp_root_path'] = jQuery("#ftp_root_path").val();
|
||||
params['sftp'] = jQuery("input[name=sftp]:checked").val();
|
||||
params.ftp_user = jQuery("#ftp_user").val();
|
||||
params.ftp_password =jQuery("#ftp_password").val();
|
||||
params.ftp_host = jQuery("#ftp_host").val();
|
||||
params.ftp_port = jQuery("#ftp_port").val();
|
||||
params.ftp_root_path = jQuery("#ftp_root_path").val();
|
||||
params.sftp = jQuery("input[name=sftp]:checked").val();
|
||||
|
||||
exec_xml('admin', 'getAdminFTPList', params, completeGetFtpInfo, ['list', 'error', 'message'], params, form);
|
||||
exec_xml('admin', 'getAdminFTPList', params, completeGetFtpInfo, ['list', 'error', 'message'], params, form);
|
||||
}
|
||||
|
||||
function removeFTPInfo()
|
||||
{
|
||||
var params = {};
|
||||
exec_xml('install', 'procInstallAdminRemoveFTPInfo', params, filterAlertMessage, ['error', 'message'], params);
|
||||
var params = {};
|
||||
exec_xml('install', 'procInstallAdminRemoveFTPInfo', params, filterAlertMessage, ['error', 'message'], params);
|
||||
}
|
||||
|
||||
function completeGetFtpInfo(ret_obj)
|
||||
{
|
||||
if(ret_obj['error'] != 0)
|
||||
{
|
||||
alert(ret_obj['error']);
|
||||
alert(ret_obj['message']);
|
||||
return;
|
||||
}
|
||||
var e = jQuery("#ftpSuggestion").empty();
|
||||
if(ret_obj.error !== 0)
|
||||
{
|
||||
alert(ret_obj.error);
|
||||
alert(ret_obj.message);
|
||||
return;
|
||||
}
|
||||
var e = jQuery("#ftpSuggestion").empty();
|
||||
|
||||
var list = "";
|
||||
if(!jQuery.isArray(ret_obj['list']['item']))
|
||||
{
|
||||
ret_obj['list']['item'] = [ret_obj['list']['item']];
|
||||
}
|
||||
var list = "";
|
||||
if(!jQuery.isArray(ret_obj.list.item))
|
||||
{
|
||||
ret_obj.list.item = [ret_obj.list.item];
|
||||
}
|
||||
|
||||
pwd = jQuery("#ftp_form").get(0).ftp_root_path.value;
|
||||
if(pwd != "/")
|
||||
{
|
||||
arr = pwd.split("/");
|
||||
arr.pop();
|
||||
arr.pop();
|
||||
arr.push("");
|
||||
target = arr.join("/");
|
||||
list = list + "<li><button type='button' onclick=\"getFTPList('"+target+"')\">../</button></li>";
|
||||
}
|
||||
pwd = jQuery("#ftp_form").get(0).ftp_root_path.value;
|
||||
if(pwd != "/")
|
||||
{
|
||||
arr = pwd.split("/");
|
||||
arr.pop();
|
||||
arr.pop();
|
||||
arr.push("");
|
||||
target = arr.join("/");
|
||||
list = list + "<li><button type='button' onclick=\"getFTPList('"+target+"')\">../</button></li>";
|
||||
}
|
||||
|
||||
for(var i=0;i<ret_obj['list']['item'].length;i++)
|
||||
{
|
||||
var v = ret_obj['list']['item'][i];
|
||||
if(v == "../")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if( v == "./")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
list = list + "<li><button type='button' onclick=\"getFTPList('"+pwd+v+"')\">"+v+"</button></li>";
|
||||
}
|
||||
}
|
||||
list = "<ul>"+list+"</ul>";
|
||||
e.append(jQuery(list));
|
||||
for(var i=0;i<ret_obj.list.item.length;i++)
|
||||
{
|
||||
var v = ret_obj.list.item[i];
|
||||
if(v == "../")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if( v == "./")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
list = list + "<li><button type='button' onclick=\"getFTPList('"+pwd+v+"')\">"+v+"</button></li>";
|
||||
}
|
||||
}
|
||||
list = "<ul>"+list+"</ul>";
|
||||
e.append(jQuery(list));
|
||||
}
|
||||
|
||||
var icon = null;
|
||||
function deleteIcon(iconname){
|
||||
var params = new Array();
|
||||
params['iconname'] = iconname;
|
||||
var params = [];
|
||||
params.iconname = iconname;
|
||||
exec_xml('admin', 'procAdminRemoveIcons', params, iconDeleteMessage, ['error', 'message'], params);
|
||||
icon = iconname;
|
||||
}
|
||||
function iconDeleteMessage(ret_obj){
|
||||
alert(ret_obj['message']);
|
||||
alert(ret_obj.message);
|
||||
|
||||
if (ret_obj['error'] == '0')
|
||||
if (ret_obj.error == '0')
|
||||
{
|
||||
if (icon == 'favicon.ico'){
|
||||
jQuery('.faviconPreview img').attr('src', 'modules/admin/tpl/img/faviconSample.png');
|
||||
|
|
@ -118,17 +121,17 @@ function iconDeleteMessage(ret_obj){
|
|||
}
|
||||
function doRecompileCacheFile() {
|
||||
if (!confirm(xe.lang.confirm_run)) return;
|
||||
var params = new Array();
|
||||
var params = [];
|
||||
exec_xml("admin","procAdminRecompileCacheFile", params, completeCacheMessage);
|
||||
}
|
||||
function completeCacheMessage(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
alert(ret_obj.message);
|
||||
}
|
||||
|
||||
function doResetAdminMenu() {
|
||||
if (!confirm(xe.lang.confirm_reset_admin_menu)) return;
|
||||
var params = new Array();
|
||||
params['menu_srl'] = admin_menu_srl;
|
||||
var params = [];
|
||||
params.menu_srl = admin_menu_srl;
|
||||
exec_xml("admin","procAdminMenuReset", params, completeResetAdminMenu);
|
||||
}
|
||||
function completeResetAdminMenu(ret_obj) {
|
||||
|
|
|
|||
2
modules/admin/tpl/js/config.min.js
vendored
2
modules/admin/tpl/js/config.min.js
vendored
|
|
@ -1 +1 @@
|
|||
function setStartModule(){var a=jQuery(".moduleIdList option:selected").text(),b=jQuery(".moduleIdList").val();jQuery("#_target_module").val(a),jQuery("#index_module_srl").val(b),jQuery(".moduleList,.moduleIdList, .site_keyword_search, #sitefind_addBtn").css("display","none")}function viewSiteSearch(){jQuery(".site_keyword_search").css("display","")}function getFTPList(a){var b=jQuery("#ftp_form").get(0);b.ftp_root_path.value="undefined"!=typeof a?a:!b.ftp_root_path.value&&"undefined"!=typeof b.sftp&&b.sftp.checked?xe_root:"/";var c=new Array;c.ftp_user=jQuery("#ftp_user").val(),c.ftp_password=jQuery("#ftp_password").val(),c.ftp_host=jQuery("#ftp_host").val(),c.ftp_port=jQuery("#ftp_port").val(),c.ftp_root_path=jQuery("#ftp_root_path").val(),c.sftp=jQuery("input[name=sftp]:checked").val(),exec_xml("admin","getAdminFTPList",c,completeGetFtpInfo,["list","error","message"],c,b)}function removeFTPInfo(){var a={};exec_xml("install","procInstallAdminRemoveFTPInfo",a,filterAlertMessage,["error","message"],a)}function completeGetFtpInfo(a){if(0!=a.error)return alert(a.error),alert(a.message),void 0;var b=jQuery("#ftpSuggestion").empty(),c="";jQuery.isArray(a.list.item)||(a.list.item=[a.list.item]),pwd=jQuery("#ftp_form").get(0).ftp_root_path.value,"/"!=pwd&&(arr=pwd.split("/"),arr.pop(),arr.pop(),arr.push(""),target=arr.join("/"),c=c+"<li><button type='button' onclick=\"getFTPList('"+target+"')\">../</button></li>");for(var d=0;d<a.list.item.length;d++){var e=a.list.item[d];"../"!=e&&"./"!=e&&(c=c+"<li><button type='button' onclick=\"getFTPList('"+pwd+e+"')\">"+e+"</button></li>")}c="<ul>"+c+"</ul>",b.append(jQuery(c))}function deleteIcon(a){var b=new Array;b.iconname=a,exec_xml("admin","procAdminRemoveIcons",b,iconDeleteMessage,["error","message"],b),icon=a}function iconDeleteMessage(a){alert(a.message),"0"==a.error&&("favicon.ico"==icon?jQuery(".faviconPreview img").attr("src","modules/admin/tpl/img/faviconSample.png"):"mobicon.png"==icon&&jQuery(".mobiconPreview img").attr("src","modules/admin/tpl/img/mobiconSample.png"))}function doRecompileCacheFile(){if(confirm(xe.lang.confirm_run)){var a=new Array;exec_xml("admin","procAdminRecompileCacheFile",a,completeCacheMessage)}}function completeCacheMessage(a){alert(a.message)}function doResetAdminMenu(){if(confirm(xe.lang.confirm_reset_admin_menu)){var a=new Array;a.menu_srl=admin_menu_srl,exec_xml("admin","procAdminMenuReset",a,completeResetAdminMenu)}}function completeResetAdminMenu(){document.location.reload()}jQuery(function(a){a(".tgContent ul").bind("click",function(){a("#sitefind_addBtn").css("display","")})});var icon=null;
|
||||
function setStartModule(){var a=jQuery(".moduleIdList option:selected").text(),b=jQuery(".moduleIdList").val();jQuery("#_target_module").val(a),jQuery("#index_module_srl").val(b),jQuery(".moduleList,.moduleIdList, .site_keyword_search, #sitefind_addBtn").css("display","none")}function viewSiteSearch(){jQuery(".site_keyword_search").css("display","")}function getFTPList(a){var b=jQuery("#ftp_form").get(0);b.ftp_root_path.value="undefined"!=typeof a?a:!b.ftp_root_path.value&&"undefined"!=typeof b.sftp&&b.sftp.checked?xe_root:"/";var c=[];c.ftp_user=jQuery("#ftp_user").val(),c.ftp_password=jQuery("#ftp_password").val(),c.ftp_host=jQuery("#ftp_host").val(),c.ftp_port=jQuery("#ftp_port").val(),c.ftp_root_path=jQuery("#ftp_root_path").val(),c.sftp=jQuery("input[name=sftp]:checked").val(),exec_xml("admin","getAdminFTPList",c,completeGetFtpInfo,["list","error","message"],c,b)}function removeFTPInfo(){var a={};exec_xml("install","procInstallAdminRemoveFTPInfo",a,filterAlertMessage,["error","message"],a)}function completeGetFtpInfo(a){if(0!==a.error)return alert(a.error),alert(a.message),void 0;var b=jQuery("#ftpSuggestion").empty(),c="";jQuery.isArray(a.list.item)||(a.list.item=[a.list.item]),pwd=jQuery("#ftp_form").get(0).ftp_root_path.value,"/"!=pwd&&(arr=pwd.split("/"),arr.pop(),arr.pop(),arr.push(""),target=arr.join("/"),c=c+"<li><button type='button' onclick=\"getFTPList('"+target+"')\">../</button></li>");for(var d=0;d<a.list.item.length;d++){var e=a.list.item[d];"../"!=e&&"./"!=e&&(c=c+"<li><button type='button' onclick=\"getFTPList('"+pwd+e+"')\">"+e+"</button></li>")}c="<ul>"+c+"</ul>",b.append(jQuery(c))}function deleteIcon(a){var b=[];b.iconname=a,exec_xml("admin","procAdminRemoveIcons",b,iconDeleteMessage,["error","message"],b),icon=a}function iconDeleteMessage(a){alert(a.message),"0"==a.error&&("favicon.ico"==icon?jQuery(".faviconPreview img").attr("src","modules/admin/tpl/img/faviconSample.png"):"mobicon.png"==icon&&jQuery(".mobiconPreview img").attr("src","modules/admin/tpl/img/mobiconSample.png"))}function doRecompileCacheFile(){if(confirm(xe.lang.confirm_run)){var a=[];exec_xml("admin","procAdminRecompileCacheFile",a,completeCacheMessage)}}function completeCacheMessage(a){alert(a.message)}function doResetAdminMenu(){if(confirm(xe.lang.confirm_reset_admin_menu)){var a=[];a.menu_srl=admin_menu_srl,exec_xml("admin","procAdminMenuReset",a,completeResetAdminMenu)}}function completeResetAdminMenu(){document.location.reload()}jQuery(function(a){a(".tgContent ul").bind("click",function(){a("#sitefind_addBtn").css("display","")})});var icon=null;
|
||||
|
|
@ -9,8 +9,8 @@ jQuery(function($){
|
|||
editForm.find('input[name=parent_srl]').val(parentSrl);
|
||||
if(!menuList)
|
||||
{
|
||||
var params = new Array();
|
||||
var response_tags = new Array('menuList');
|
||||
var params = [];
|
||||
var response_tags = ['menuList'];
|
||||
exec_xml("menu","procMenuAdminAllActList", params, completeGetActList, response_tags);
|
||||
}
|
||||
});
|
||||
|
|
@ -22,7 +22,7 @@ jQuery(function($){
|
|||
moduleList = obj.menuList;
|
||||
if(moduleList)
|
||||
{
|
||||
var menuNameList = $('#menuNameList');
|
||||
var menuNameList = $('#menuNameList');
|
||||
for(var x in moduleList)
|
||||
{
|
||||
var menuList = moduleList[x];
|
||||
|
|
@ -63,12 +63,9 @@ $('form.adminMap')
|
|||
} else {
|
||||
$pkey.val('0');
|
||||
}
|
||||
})
|
||||
|
||||
var
|
||||
dragging = false,
|
||||
$holder = $('<li class="placeholder">');
|
||||
});
|
||||
|
||||
var dragging = false, $holder = $('<li class="placeholder">');
|
||||
$('form.adminMap>ul')
|
||||
.delegate('li:not(.placeholder,.parent)', {
|
||||
'mousedown.st' : function(event) {
|
||||
|
|
@ -109,7 +106,7 @@ $('form.adminMap>ul')
|
|||
.addClass('draggable')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
opacity : .6,
|
||||
opacity : 0.6,
|
||||
width : width,
|
||||
height : height,
|
||||
left : offset.left,
|
||||
|
|
@ -122,7 +119,7 @@ $('form.adminMap>ul')
|
|||
$holder
|
||||
.css({
|
||||
position:'absolute',
|
||||
opacity : .6,
|
||||
opacity : 0.6,
|
||||
width : width,
|
||||
height : '10px',
|
||||
left : offset.left,
|
||||
|
|
@ -131,7 +128,7 @@ $('form.adminMap>ul')
|
|||
})
|
||||
.appendTo($ul.eq(0));
|
||||
|
||||
$this.css('opacity', .6);
|
||||
$this.css('opacity', 0.6);
|
||||
|
||||
$(document)
|
||||
.unbind('mousemove.st mouseup.st')
|
||||
|
|
@ -142,7 +139,7 @@ $('form.adminMap>ul')
|
|||
|
||||
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(o.top > nTop || o.bottom < nTop) continue;
|
||||
|
|
@ -187,8 +184,8 @@ $('form.adminMap>ul')
|
|||
$dropzone[dropzone.state]($this.hide());
|
||||
}
|
||||
|
||||
$this.slideDown(100, function(){ $this.removeClass('active') });
|
||||
$li.slideUp(100, function(){ var $par = $li.parent(); $li.remove(); if(!$par.children('li').length) $par.remove() });
|
||||
$this.slideDown(100, function(){ $this.removeClass('active'); });
|
||||
$li.slideUp(100, function(){ var $par = $li.parent(); $li.remove(); if(!$par.children('li').length) $par.remove(); });
|
||||
|
||||
// trigger 'dropped.st' event
|
||||
$this.trigger('dropped.st');
|
||||
|
|
|
|||
2
modules/admin/tpl/js/menu_setup.min.js
vendored
2
modules/admin/tpl/js/menu_setup.min.js
vendored
|
|
@ -1 +1 @@
|
|||
jQuery(function(a){function b(b){var c;if(moduleList=b.menuList){var d=a("#menuNameList");for(var e in moduleList){var f=moduleList[e];c=a('<optgroup label="'+e+'" />').appendTo(d);for(var g in f)c.append('<option value="'+e+":"+g+'">'+f[g].title+"</option>")}}}var c,d,e=a("#editForm"),f=a("#listForm");a("a._add").click(function(){if(d=a(this).parent().prevAll("._item_key").val(),e.find("input[name=parent_srl]").val(d),!c){var f=new Array,g=new Array("menuList");exec_xml("menu","procMenuAdminAllActList",f,b,g)}}),a("a._parent_delete").click(function(){var b=a(this).parent().prevAll("._parent_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()}),a("a._child_delete").click(function(){var b=a(this).parents("li").find("._item_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()})}),jQuery(function(a){function b(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}a("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var b,c,d=a(this);b=d.find(">input._parent_key"),c=!!d.parent("ul").parent("li").length,c?b.val(d.parent("ul").parent("li").find(">input._item_key").val()):b.val("0")});var c=!1,d=a('<li class="placeholder">');a("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(e){var f,g,h,i,j,k,l,m,n,o;if(!a(e.target).is("a,input,label,textarea")&&1==e.which){for(c=!0,f=a(this),j=f.height(),i=f.width(),g=f.parentsUntil(".adminMap").filter("ul"),h=g.eq(-1),l={x:e.pageX,y:e.pageY},k=b(this,h.get(0)),$clone=f.clone(!0).attr("target",!0),n=g.length-1;n;n--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();return m=[],h.find("li").each(function(){if(f[0]===this||f.has(this).length)return!0;var c=b(this,h.get(0));m.push({top:c.top,bottom:c.top+32,$item:a(this)})}),$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:.6,width:i,height:j,left:k.left,top:k.top,zIndex:100}).appendTo(h.eq(0)),d.css({position:"absolute",opacity:.6,width:i,height:"10px",left:k.left,top:k.top,zIndex:99}).appendTo(h.eq(0)),f.css("opacity",.6),a(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f,g;for(o=null,b={x:l.x-a.pageX,y:l.y-a.pageY},c=k.top-b.y,e=0,f=m.length;f>e;e++)g=m[e],g.top>c||g.bottom<c||(o={element:g.$item},g.$item.hasClass("parent")?(o.state="prepend",d.css("top",g.bottom-5)):g.top>c-12?(o.state="before",d.css("top",g.top-5)):(o.state="after",d.css("top",g.bottom-5)));$clone.css({top:c})}).bind("mouseup.st",function(){var b,e;c=!1,a(document).unbind("mousemove.st mouseup.st"),f.css("opacity",""),$clone.remove(),d.remove(),e=a("<li />").height(f.height()),o&&(b=a(o.element),f.before(e),"prepend"==o.state?(b.find(">ul").length||b.find(">.side").after("<ul>"),b.find(">ul").prepend(f.hide())):b[o.state](f.hide()),f.slideDown(100,function(){f.removeClass("active")}),e.slideUp(100,function(){var a=e.parent();e.remove(),a.children("li").length||a.remove()}),f.trigger("dropped.st"))}),!1}},"mouseover.st":function(){return c||a(this).addClass("active"),!1},"mouseout.st":function(){return c||a(this).removeClass("active"),!1}}).find("li li").prepend('<button type="button" class="moveTo">Move to</button>').end().end(),a('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",opacity:.7}).appendTo("body")});
|
||||
jQuery(function(a){function b(b){var c;if(moduleList=b.menuList){var d=a("#menuNameList");for(var e in moduleList){var f=moduleList[e];c=a('<optgroup label="'+e+'" />').appendTo(d);for(var g in f)c.append('<option value="'+e+":"+g+'">'+f[g].title+"</option>")}}}var c,d,e=a("#editForm"),f=a("#listForm");a("a._add").click(function(){if(d=a(this).parent().prevAll("._item_key").val(),e.find("input[name=parent_srl]").val(d),!c){var f=[],g=["menuList"];exec_xml("menu","procMenuAdminAllActList",f,b,g)}}),a("a._parent_delete").click(function(){var b=a(this).parent().prevAll("._parent_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()}),a("a._child_delete").click(function(){var b=a(this).parents("li").find("._item_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()})}),jQuery(function(a){function b(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}a("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var b,c,d=a(this);b=d.find(">input._parent_key"),c=!!d.parent("ul").parent("li").length,c?b.val(d.parent("ul").parent("li").find(">input._item_key").val()):b.val("0")});var c=!1,d=a('<li class="placeholder">');a("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(e){var f,g,h,i,j,k,l,m,n,o;if(!a(e.target).is("a,input,label,textarea")&&1==e.which){for(c=!0,f=a(this),j=f.height(),i=f.width(),g=f.parentsUntil(".adminMap").filter("ul"),h=g.eq(-1),l={x:e.pageX,y:e.pageY},k=b(this,h.get(0)),$clone=f.clone(!0).attr("target",!0),n=g.length-1;n;n--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();return m=[],h.find("li").each(function(){if(f[0]===this||f.has(this).length)return!0;var c=b(this,h.get(0));m.push({top:c.top,bottom:c.top+32,$item:a(this)})}),$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:.6,width:i,height:j,left:k.left,top:k.top,zIndex:100}).appendTo(h.eq(0)),d.css({position:"absolute",opacity:.6,width:i,height:"10px",left:k.left,top:k.top,zIndex:99}).appendTo(h.eq(0)),f.css("opacity",.6),a(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f,g;for(o=null,b={x:l.x-a.pageX,y:l.y-a.pageY},c=k.top-b.y,e=0,f=m.length;f>e;e++)g=m[e],g.top>c||g.bottom<c||(o={element:g.$item},g.$item.hasClass("parent")?(o.state="prepend",d.css("top",g.bottom-5)):g.top>c-12?(o.state="before",d.css("top",g.top-5)):(o.state="after",d.css("top",g.bottom-5)));$clone.css({top:c})}).bind("mouseup.st",function(){var b,e;c=!1,a(document).unbind("mousemove.st mouseup.st"),f.css("opacity",""),$clone.remove(),d.remove(),e=a("<li />").height(f.height()),o&&(b=a(o.element),f.before(e),"prepend"==o.state?(b.find(">ul").length||b.find(">.side").after("<ul>"),b.find(">ul").prepend(f.hide())):b[o.state](f.hide()),f.slideDown(100,function(){f.removeClass("active")}),e.slideUp(100,function(){var a=e.parent();e.remove(),a.children("li").length||a.remove()}),f.trigger("dropped.st"))}),!1}},"mouseover.st":function(){return c||a(this).addClass("active"),!1},"mouseout.st":function(){return c||a(this).removeClass("active"),!1}}).find("li li").prepend('<button type="button" class="moveTo">Move to</button>').end().end(),a('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",opacity:.7}).appendTo("body")});
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[option]
|
||||
use_closure_compiler=true
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
/* NAVER (developers@xpressengine.com) */
|
||||
jQuery(function($){
|
||||
|
||||
var
|
||||
dragging = false,
|
||||
$holder = $('<li class="placeholder">');
|
||||
|
||||
$('form.siteMap')
|
||||
.delegate('li:not(.placeholder)', {
|
||||
'mousedown.st' : function(event) {
|
||||
var $this, $uls, $ul, width, height, offset, position, offsets, i, dropzone, wrapper='';
|
||||
|
||||
if($(event.target).is('a,input,label,textarea') || event.which != 1) return;
|
||||
|
||||
dragging = true;
|
||||
|
||||
$this = $(this);
|
||||
height = $this.height();
|
||||
width = $this.width();
|
||||
$uls = $this.parentsUntil('.siteMap').filter('ul');
|
||||
$ul = $uls.eq(-1);
|
||||
|
||||
$ul.css('position', 'relative');
|
||||
|
||||
position = {x:event.pageX, y:event.pageY};
|
||||
offset = getOffset(this, $ul.get(0));
|
||||
|
||||
$clone = $this.clone(true).attr('target', true);
|
||||
|
||||
for(i=$uls.length-1; i; i--) {
|
||||
$clone = $clone.wrap('<li><ul /></li>').parent().parent();
|
||||
}
|
||||
|
||||
// get offsets of all list-item elements
|
||||
offsets = [];
|
||||
$ul.find('li').each(function(idx) {
|
||||
if($this[0] === this || $this.has(this).length) return true;
|
||||
|
||||
var o = getOffset(this, $ul.get(0));
|
||||
offsets.push({top:o.top, bottom:o.top+32, item:this});
|
||||
});
|
||||
|
||||
// Remove unnecessary elements from the clone, set class name and styles.
|
||||
// Append it to the list
|
||||
$clone
|
||||
.find('.side,input').remove().end()
|
||||
.addClass('draggable')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
opacity : .6,
|
||||
width : width,
|
||||
height : height,
|
||||
left : offset.left,
|
||||
top : offset.top,
|
||||
zIndex : 100
|
||||
})
|
||||
.appendTo($ul.eq(0));
|
||||
|
||||
// Set a place holder
|
||||
$holder
|
||||
.css({
|
||||
position:'absolute',
|
||||
opacity : .6,
|
||||
width : width,
|
||||
height : '5px',
|
||||
left : offset.left,
|
||||
top : offset.top,
|
||||
zIndex :99
|
||||
})
|
||||
.appendTo($ul.eq(0));
|
||||
|
||||
$this.css('opacity', .6);
|
||||
|
||||
$(document)
|
||||
.unbind('mousemove.st mouseup.st')
|
||||
.bind('mousemove.st', function(event) {
|
||||
var diff, nTop, item, i, c, o, t;
|
||||
|
||||
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++) {
|
||||
t = nTop;
|
||||
o = offsets[i];
|
||||
|
||||
if(i == 0 && t < o.top) t = o.top;
|
||||
if(i == c-1 && t > o.bottom) t = o.bottom;
|
||||
|
||||
if(o.top <= t && o.bottom >= t) {
|
||||
dropzone = {element:o.item, state:setHolder(o,t)};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$clone.css({top:nTop});
|
||||
})
|
||||
.bind('mouseup.st', function(event) {
|
||||
var $dropzone, $li;
|
||||
|
||||
dragging = false;
|
||||
|
||||
$(document).unbind('mousemove.st mouseup.st');
|
||||
$this.css('opacity', '');
|
||||
$clone.remove();
|
||||
$holder.remove();
|
||||
|
||||
// dummy list item for animation
|
||||
$li = $('<li />').height($this.height());
|
||||
|
||||
if(!dropzone) return;
|
||||
$dropzone = $(dropzone.element);
|
||||
|
||||
$this.before($li);
|
||||
|
||||
if(dropzone.state == 'prepend') {
|
||||
if(!$dropzone.find('>ul').length) $dropzone.find('>.side').after('<ul>');
|
||||
$dropzone.find('>ul').prepend($this.hide());
|
||||
} else {
|
||||
$dropzone[dropzone.state]($this.hide());
|
||||
}
|
||||
|
||||
$this.slideDown(100, function(){ $this.removeClass('active') });
|
||||
$li.slideUp(100, function(){ var $par = $li.parent(); $li.remove(); if(!$par.children('li').length) $par.remove() });
|
||||
|
||||
// trigger 'dropped.st' event
|
||||
$this.trigger('dropped.st');
|
||||
});
|
||||
|
||||
return false;
|
||||
},
|
||||
'mouseover.st' : function() {
|
||||
if(!dragging) $(this).addClass('active');
|
||||
return false;
|
||||
},
|
||||
'mouseout.st' : function() {
|
||||
if(!dragging) $(this).removeClass('active');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.find('li')
|
||||
.prepend('<button type="button" class="moveTo">Move to</button>')
|
||||
.append('<span class="vr"></span><span class="hr"></span>')
|
||||
.find('input:text')
|
||||
.focus(function(){
|
||||
var $this = $(this), $label = $this.prev('label'), $par = $this.parent();
|
||||
|
||||
$this.width($par.width() - (parseInt($par.css('text-indent'))||0) - $this.next('.side').width() - 60).css('opacity', '');
|
||||
$label.hide();
|
||||
})
|
||||
.blur(function(){
|
||||
var $this = $(this), $label = $this.prev('label'), val = $this.val();
|
||||
|
||||
$this.width(0).css('opacity', 0);
|
||||
$label.removeClass('no-text').empty().text(val).show();
|
||||
if(!val) $label.addClass('no-text').text('---');
|
||||
})
|
||||
.each(function(i,input){
|
||||
var $this = $(this), id='sitemap-id-'+i;
|
||||
|
||||
$this
|
||||
.attr('id', id)
|
||||
.css({width:0,opacity:0,overflow:'hidden'})
|
||||
.before('<label />')
|
||||
.prev('label')
|
||||
.attr('for', id)
|
||||
.text($this.val());
|
||||
})
|
||||
.end()
|
||||
.end()
|
||||
|
||||
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};
|
||||
}
|
||||
|
||||
function setHolder(info, yPos) {
|
||||
if(Math.abs(info.top-yPos) <= 3) {
|
||||
$holder.css({top:info.top-3,height:'5px'});
|
||||
return 'before';
|
||||
} else if(Math.abs(info.bottom-yPos) <= 3) {
|
||||
$holder.css({top:info.bottom-3,height:'5px'});
|
||||
return 'after';
|
||||
} else {
|
||||
$holder.css({top:info.top+3,height:'27px'});
|
||||
return 'prepend';
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
1
modules/admin/tpl/js/sitemap.min.js
vendored
1
modules/admin/tpl/js/sitemap.min.js
vendored
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(a){function b(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}function c(a,b){return Math.abs(a.top-b)<=3?(e.css({top:a.top-3,height:"5px"}),"before"):Math.abs(a.bottom-b)<=3?(e.css({top:a.bottom-3,height:"5px"}),"after"):(e.css({top:a.top+3,height:"27px"}),"prepend")}var d=!1,e=a('<li class="placeholder">');a("form.siteMap").delegate("li:not(.placeholder)",{"mousedown.st":function(f){var g,h,i,j,k,l,m,n,o,p;if(!a(f.target).is("a,input,label,textarea")&&1==f.which){for(d=!0,g=a(this),k=g.height(),j=g.width(),h=g.parentsUntil(".siteMap").filter("ul"),i=h.eq(-1),i.css("position","relative"),m={x:f.pageX,y:f.pageY},l=b(this,i.get(0)),$clone=g.clone(!0).attr("target",!0),o=h.length-1;o;o--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();return n=[],i.find("li").each(function(){if(g[0]===this||g.has(this).length)return!0;var a=b(this,i.get(0));n.push({top:a.top,bottom:a.top+32,item:this})}),$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:.6,width:j,height:k,left:l.left,top:l.top,zIndex:100}).appendTo(i.eq(0)),e.css({position:"absolute",opacity:.6,width:j,height:"5px",left:l.left,top:l.top,zIndex:99}).appendTo(i.eq(0)),g.css("opacity",.6),a(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,d,e,f,g,h;for(p=null,b={x:m.x-a.pageX,y:m.y-a.pageY},d=l.top-b.y,e=0,f=n.length;f>e;e++)if(h=d,g=n[e],0==e&&h<g.top&&(h=g.top),e==f-1&&h>g.bottom&&(h=g.bottom),g.top<=h&&g.bottom>=h){p={element:g.item,state:c(g,h)};break}$clone.css({top:d})}).bind("mouseup.st",function(){var b,c;d=!1,a(document).unbind("mousemove.st mouseup.st"),g.css("opacity",""),$clone.remove(),e.remove(),c=a("<li />").height(g.height()),p&&(b=a(p.element),g.before(c),"prepend"==p.state?(b.find(">ul").length||b.find(">.side").after("<ul>"),b.find(">ul").prepend(g.hide())):b[p.state](g.hide()),g.slideDown(100,function(){g.removeClass("active")}),c.slideUp(100,function(){var a=c.parent();c.remove(),a.children("li").length||a.remove()}),g.trigger("dropped.st"))}),!1}},"mouseover.st":function(){return d||a(this).addClass("active"),!1},"mouseout.st":function(){return d||a(this).removeClass("active"),!1}}).find("li").prepend('<button type="button" class="moveTo">Move to</button>').append('<span class="vr"></span><span class="hr"></span>').find("input:text").focus(function(){var b=a(this),c=b.prev("label"),d=b.parent();b.width(d.width()-(parseInt(d.css("text-indent"))||0)-b.next(".side").width()-60).css("opacity",""),c.hide()}).blur(function(){var b=a(this),c=b.prev("label"),d=b.val();b.width(0).css("opacity",0),c.removeClass("no-text").empty().text(d).show(),d||c.addClass("no-text").text("---")}).each(function(b){var c=a(this),d="sitemap-id-"+b;c.attr("id",d).css({width:0,opacity:0,overflow:"hidden"}).before("<label />").prev("label").attr("for",d).text(c.val())}).end().end()});
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
jQuery(function($){
|
||||
|
||||
$('#theme,#skin')
|
||||
// 'show all' button
|
||||
.find('button.showAll')
|
||||
.text('Show All')
|
||||
.click(function(){
|
||||
var $this = $(this), $thumbarea = $('#skin').find('>.thumbPreview');
|
||||
|
||||
if($this.toggleClass('hideAll').hasClass('hideAll')) {
|
||||
$this.text('Hide All');
|
||||
$thumbarea.children('li')
|
||||
.addClass('active')
|
||||
.removeClass('highlight')
|
||||
.eq(0).addClass('highlight').end()
|
||||
.find('>ul.a:not(.selected)').show();
|
||||
} else {
|
||||
$this.text('Show All');
|
||||
$thumbarea.children('li')
|
||||
.removeClass('active highlight')
|
||||
.find('>ul.a:not(.selected)').hide();
|
||||
}
|
||||
})
|
||||
.end()
|
||||
// all thumbnail area
|
||||
.find('>.thumbPreview')
|
||||
.removeClass('jx')
|
||||
// thumbnail list
|
||||
.find('ul.a')
|
||||
.hide()
|
||||
.before('<ul class="a selected"></ul>')
|
||||
.prev('ul.a')
|
||||
.each(function(){
|
||||
var $this = $(this);
|
||||
|
||||
$this
|
||||
.delegate('span.thumb', 'click', function(){
|
||||
$(this).closest('.a').nextAll('a.prevToggle:first').trigger('toggle.tp');
|
||||
return false;
|
||||
})
|
||||
.append($this.next('.a').find('>li.noDirection:first'));
|
||||
})
|
||||
.end()
|
||||
.after('<a href="#toggle-tp" class="prevToggle">Show</a>')
|
||||
.next('a.prevToggle')
|
||||
.bind('toggle.tp', function(){
|
||||
var $list = $(this).prev('.a'), $items, duration = 100;
|
||||
|
||||
$items = $list.closest('.thumbPreview').children('li').removeClass('highlight').end();
|
||||
|
||||
if($list.parent().toggleClass('active').hasClass('active')) {
|
||||
$list.slideDown(duration).closest('li').addClass('highlight');
|
||||
} else {
|
||||
$list.slideUp(duration);
|
||||
}
|
||||
})
|
||||
.click(function(){ $(this).trigger('toggle.tp'); return false; })
|
||||
.end()
|
||||
// thumbnail act as a label for a radio button
|
||||
.find('span.thumb')
|
||||
.attr('role', 'radio') // WAI-ARIA role
|
||||
.click(function(){
|
||||
$(this).next('input:radio').prop('checked', true).change();
|
||||
})
|
||||
.end()
|
||||
.find('> .i > label').attr('title', function(){ return $(this).text() }).end()
|
||||
.find('input:radio')
|
||||
.bind('redraw', function(){
|
||||
var $this = $(this), $big = $this.closest('.a').prev('.a'), val = $this.val();
|
||||
|
||||
// skip following actions if this checkbox was selected just before
|
||||
if(val == $big.find('>li:eq(1)').data('value')) return;
|
||||
|
||||
$big.find('>li:not(.noDirection)').remove();
|
||||
|
||||
if(!val) { // select none
|
||||
$big.children('li.noDirection').show();
|
||||
} else {
|
||||
$this.closest('li').clone()
|
||||
.find('input:radio').remove().end()
|
||||
.find('label')
|
||||
.wrapInner('<strong>')
|
||||
.find('>strong')
|
||||
.text(function(){ return $(this).attr('title') })
|
||||
.unwrap()
|
||||
.end()
|
||||
.end()
|
||||
.appendTo($big);
|
||||
|
||||
$big.find('>li.noDirection').hide();
|
||||
}
|
||||
})
|
||||
.change(function(){
|
||||
var $this = $(this);
|
||||
|
||||
$this.trigger('redraw');
|
||||
|
||||
// reselect theme
|
||||
if($this.attr('name') != 'themeItem') {
|
||||
$('#theme').trigger('select-theme');
|
||||
}
|
||||
})
|
||||
.filter(':checked').change().end()
|
||||
.filter('[name="themeItem"]')
|
||||
.change(function(){
|
||||
var $this = $(this), themes, thm, $radios, name;
|
||||
|
||||
themes = $('#theme').data('themes') || {};
|
||||
thm = themes[$this.val()];
|
||||
|
||||
if(!thm) return;
|
||||
|
||||
$radios = $('#skin').find('.i > input:radio').filter('[value=""]').prop('checked', true).end();
|
||||
|
||||
for(var x in thm) {
|
||||
if(!thm.hasOwnProperty(x)) continue;
|
||||
|
||||
name = (x == 'layout')?x:x+'-skin';
|
||||
|
||||
if(thm[x]) $radios.filter('[name="'+name+'"][value="'+thm[x]+'"]').prop('checked', true);
|
||||
}
|
||||
|
||||
$radios.filter(':checked').trigger('redraw');
|
||||
})
|
||||
.end()
|
||||
|
||||
$('#theme')
|
||||
.bind('select-theme', function(){
|
||||
var $this = $(this), themes, $radios, form, selection, sel_obj={}, sel_str, name;
|
||||
|
||||
themes = $this.data('themes') || {};
|
||||
$radios = $('#skin').find('.i > input:radio');
|
||||
selection = $radios.filter(':checked[value!=""]').get();
|
||||
form = $radios.get(0).form;
|
||||
|
||||
for(var i=0,c=selection.length; i < c; i++) {
|
||||
name = selection[i].name.match(/^layout|(\w+)-skin$/);
|
||||
sel_obj[name[1]||name[0]] = selection[i].value;
|
||||
}
|
||||
|
||||
function obj2str(obj){
|
||||
var s = '';
|
||||
for(var x in obj) {
|
||||
if(!obj.hasOwnProperty(x)) continue;
|
||||
if(x != 'layout' && !form.elements[x+'-skin']) continue;
|
||||
s += x+'\t'+obj[x]+'\n';
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
sel_str = obj2str(sel_obj);
|
||||
|
||||
// no matched theme => this theme is user-defined
|
||||
for(var thm in themes) {
|
||||
if(!themes.hasOwnProperty(thm)) continue;
|
||||
if(sel_str == obj2str(themes[thm])) {
|
||||
$this.find('input:radio[name="themeItem"][value="'+thm+'"]').prop('checked', true).change();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this.find('input:radio[name="themeItem"][value="user_define"]').prop('checked', true).change();
|
||||
});
|
||||
|
||||
});
|
||||
1
modules/admin/tpl/js/theme.min.js
vendored
1
modules/admin/tpl/js/theme.min.js
vendored
|
|
@ -1 +0,0 @@
|
|||
jQuery(function(a){a("#theme,#skin").find("button.showAll").text("Show All").click(function(){var b=a(this),c=a("#skin").find(">.thumbPreview");b.toggleClass("hideAll").hasClass("hideAll")?(b.text("Hide All"),c.children("li").addClass("active").removeClass("highlight").eq(0).addClass("highlight").end().find(">ul.a:not(.selected)").show()):(b.text("Show All"),c.children("li").removeClass("active highlight").find(">ul.a:not(.selected)").hide())}).end().find(">.thumbPreview").removeClass("jx").find("ul.a").hide().before('<ul class="a selected"></ul>').prev("ul.a").each(function(){var b=a(this);b.delegate("span.thumb","click",function(){return a(this).closest(".a").nextAll("a.prevToggle:first").trigger("toggle.tp"),!1}).append(b.next(".a").find(">li.noDirection:first"))}).end().after('<a href="#toggle-tp" class="prevToggle">Show</a>').next("a.prevToggle").bind("toggle.tp",function(){var b,c=a(this).prev(".a"),d=100;b=c.closest(".thumbPreview").children("li").removeClass("highlight").end(),c.parent().toggleClass("active").hasClass("active")?c.slideDown(d).closest("li").addClass("highlight"):c.slideUp(d)}).click(function(){return a(this).trigger("toggle.tp"),!1}).end().find("span.thumb").attr("role","radio").click(function(){a(this).next("input:radio").prop("checked",!0).change()}).end().find("> .i > label").attr("title",function(){return a(this).text()}).end().find("input:radio").bind("redraw",function(){var b=a(this),c=b.closest(".a").prev(".a"),d=b.val();d!=c.find(">li:eq(1)").data("value")&&(c.find(">li:not(.noDirection)").remove(),d?(b.closest("li").clone().find("input:radio").remove().end().find("label").wrapInner("<strong>").find(">strong").text(function(){return a(this).attr("title")}).unwrap().end().end().appendTo(c),c.find(">li.noDirection").hide()):c.children("li.noDirection").show())}).change(function(){var b=a(this);b.trigger("redraw"),"themeItem"!=b.attr("name")&&a("#theme").trigger("select-theme")}).filter(":checked").change().end().filter('[name="themeItem"]').change(function(){var b,c,d,e,f=a(this);if(b=a("#theme").data("themes")||{},c=b[f.val()]){d=a("#skin").find(".i > input:radio").filter('[value=""]').prop("checked",!0).end();for(var g in c)c.hasOwnProperty(g)&&(e="layout"==g?g:g+"-skin",c[g]&&d.filter('[name="'+e+'"][value="'+c[g]+'"]').prop("checked",!0));d.filter(":checked").trigger("redraw")}}).end(),a("#theme").bind("select-theme",function(){function b(a){var b="";for(var c in a)a.hasOwnProperty(c)&&("layout"==c||e.elements[c+"-skin"])&&(b+=c+" "+a[c]+"\n");return b}var c,d,e,f,g,h,i=a(this),j={};c=i.data("themes")||{},d=a("#skin").find(".i > input:radio"),f=d.filter(':checked[value!=""]').get(),e=d.get(0).form;for(var k=0,l=f.length;l>k;k++)h=f[k].name.match(/^layout|(\w+)-skin$/),j[h[1]||h[0]]=f[k].value;g=b(j);for(var m in c)if(c.hasOwnProperty(m)&&g==b(c[m]))return i.find('input:radio[name="themeItem"][value="'+m+'"]').prop("checked",!0).change(),void 0;i.find('input:radio[name="themeItem"][value="user_define"]').prop("checked",!0).change()})});
|
||||
Loading…
Add table
Add a link
Reference in a new issue