issue 2528 update theme in a page (list of member).

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11510 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-09-25 12:28:28 +00:00
parent 786e179675
commit 0f90b77127
3 changed files with 182 additions and 274 deletions

View file

@ -113,16 +113,21 @@ jQuery(function($){
multilingual();
$mlCheck.change(multilingual);
// Check All
$('.x th>input[type="checkbox"]').change(function(){
var $this =$(this);
var $target = $this.closest('table').find('th>input[type="checkbox"], td>input[type="checkbox"]');
if($this.is(':checked')){
$target.attr('checked','checked');
} else {
$target.removeAttr('checked');
}
});
$('.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
$('.x .x_pagination .x_disabled, .x .x_pagination .x_active').click(function(){
return false;
@ -140,43 +145,112 @@ jQuery(function($){
$this.removeClass('x_icon-chevron-down').addClass('x_icon-chevron-up');
}
});
// Close Button
$('.x_close').click(function(){
$(this).parent().hide();
});
});
// Modal Window
var $modal = $('.x_modal');
if($modal.length >= 1){
$('body').append('<div class="x_modal-backdrop"></div>').append($modal); // append background
$modal.prepend('<button type="button" class="x_close">&times;</button>'); // prepend close button
}
// Set close button 'data-hide' attribute
$modal.children('.x_close').each(function(){
var $this = $(this);
$this.attr('data-hide', '#' + $this.parent().attr('id'));
});
// Modal Open
var $modalBack = $('.x_modal-backdrop');
$('.x a').click(function(){
var $target = $($(this).attr('href'));
if($target.hasClass('x_modal')){
$modalBack.show();
$target.show();
}
});
// Modal Close
function modalClose(){
$modal.hide();
$modalBack.hide();
}
$modalBack.click(modalClose); // $modalBack click
$(document).keydown(function(event){ // ESC keydown
if(event.keyCode != 27) return true;
return modalClose();
});
$('[data-hide]').click(function(){ // [data-hide] click
if($($(this).attr('data-hide')).hasClass('x_modal')){
modalClose();
}
});
});
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.parent('body').length) {
$btnClose = $('<button type="button" class="x_close">&times;</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);
if($modal.data('state') == 'showing') {
$this.trigger('close.mw');
} else {
$this.trigger('open.mw');
}
return false;
})
.bind('open.mw', function(){
var $this = $(this), before_event, $modal, duration;
// 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();
});

View file

@ -1,182 +1,9 @@
/* 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
$('.x [data-toggle]').click(function(){
$($(this).attr('data-toggle')).toggle();
return false;
});
// TARGET show
$('.x [data-show]').click(function(){
$($(this).attr('data-show')).show();
return false;
});
// TARGET hide
$('.x [data-hide]').click(function(){
$($(this).attr('data-hide')).hide();
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();
});
// Multilingual
var $mlCheck = $('.x .multilingual>label>input[type="checkbox"]');
function multilingual(){
$mlCheck.each(function(event){
var $this = $(this);
var $label = $this.parent('label'); // Checkbox label
var $input = $label.siblings('input[type="text"]:first');
var $select = $label.siblings('select:first');
var $fieldset = $this.closest('.multilingual').siblings('.multilingual_item:first'); // Multilingual list
if($this.is(':checked')){
$input.hide();
$select.show();
$label.addClass('checked');
$fieldset.show();
} else {
$input.show();
$select.hide();
$label.removeClass('checked');
$fieldset.hide();
}
});
}
multilingual();
$mlCheck.change(multilingual);
// Check All
$('.x th>input[type="checkbox"]').change(function(){
var $this =$(this);
var $target = $this.closest('table').find('th>input[type="checkbox"], td>input[type="checkbox"]');
if($this.is(':checked')){
$target.attr('checked','checked');
} else {
$target.removeAttr('checked');
}
});
// Pagination
$('.x .x_pagination .x_disabled, .x .x_pagination .x_active').click(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');
}
});
// Close Button
$('.x_close').click(function(){
$(this).parent().hide();
});
// Modal Window
var $modal = $('.x_modal');
if($modal.length >= 1){
$('body').append('<div class="x_modal-backdrop"></div>').append($modal); // append background
$modal.prepend('<button type="button" class="x_close">&times;</button>'); // prepend close button
}
// Set close button 'data-hide' attribute
$modal.children('.x_close').each(function(){
var $this = $(this);
$this.attr('data-hide', '#' + $this.parent().attr('id'));
});
// Modal Open
var $modalBack = $('.x_modal-backdrop');
$('.x a').click(function(){
var $target = $($(this).attr('href'));
if($target.hasClass('x_modal')){
$modalBack.show();
$target.show();
}
});
// Modal Close
function modalClose(){
$modal.hide();
$modalBack.hide();
}
$modalBack.click(modalClose); // $modalBack click
$(document).keydown(function(event){ // ESC keydown
if(event.keyCode != 27) return true;
return modalClose();
});
$('[data-hide]').click(function(){ // [data-hide] click
if($($(this).attr('data-hide')).hasClass('x_modal')){
modalClose();
}
});
});
jQuery(function(a){function c(){f.width("99.99%");setTimeout(function(){f.removeAttr("style")},0)}function b(){g.each(function(){var b=a(this),c=b.parent("label"),d=c.siblings('input[type="text"]:first'),e=c.siblings("select:first"),f=b.closest(".multilingual").siblings(".multilingual_item:first");b.is(":checked")?(d.hide(),e.show(),c.addClass("checked"),f.show()):(d.show(),e.hide(),c.removeClass("checked"),f.hide())})}window.top.scrollTo(0,0);a(".x .skipNav>a").click(function(){a(a(this).attr("href")).attr("tabindex",
"0").css("outline","0").focus()});a(".x [data-toggle]").click(function(){a(a(this).attr("data-toggle")).toggle();return!1});a(".x [data-show]").click(function(){a(a(this).attr("data-show")).show();return!1});a(".x [data-hide]").click(function(){a(a(this).attr("data-hide")).hide();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"),f=d.find(">.content"),e=d.find(">.gnb"),h=e.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();h.find("ul").prev("a").bind("click focus",function(){var b=a(this);h.not(b.parent("li")).removeClass("open");a(this).parent("li").toggleClass("open");e.trigger("mouseenter");return!1});e.mouseenter(function(){980<=a(window).width()&&(d.removeClass("wide"),
c())}).mouseleave(function(){980<=a(window).width()&&1240>a(window).width()&&(d.addClass("wide"),c())});e.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");return!1});e.prepend('<button type="button" class="close before" />').append('<button type="button" class="close after" />');e.find(">.close").focus(function(){d.addClass("wide");c()});var g=a('.x .multilingual>label>input[type="checkbox"]');b();g.change(b);a('.x th>input[type="checkbox"]').change(function(){var b=
a(this),c=b.data("name");b.closest("table").find("input:checkbox").filter(function(){var b=a(this);return!b.prop("disabled")&&(b.attr("name")==c||b.data("name")==c)}).prop("checked",b.prop("checked")).end().end().trigger("update.checkbox",[c,this.checked])});a(".x .x_pagination .x_disabled, .x .x_pagination .x_active").click(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),c=b.closest(".section");c.hasClass("collapse")?(c.removeClass("collapse").children("h1:first").siblings().show(),b.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(c.addClass("collapse").children("h1:first").siblings().hide(),b.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"))})});
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 c=a(this),b,d;b=a(c.attr("href"));b.parent("body").length||(d=a('<button type="button" class="x_close">&times;</button>'),d.click(function(){b.data("anchor").trigger("close.mw")}),b.find("[data-hide]").click(function(){b.data("anchor").trigger("close.mw")}),a("body").append('<div class="x_modal-backdrop"></div>').append(b),
b.prepend(d));b.data("anchor",c);"showing"==b.data("state")?c.trigger("close.mw"):c.trigger("open.mw");return!1}).bind("open.mw",function(){var c=a(this),b,d;b=a.Event("before-open.mw");c.trigger(b);if(b.isDefaultPrevented())return!1;b=a(c.attr("href"));d=c.data("duration")||"fast";b.data("state","showing");a("html,body").addClass("modalContainer");a(document).bind("keydown.mw",function(a){if(27==a.which)return c.trigger("close.mw"),!1});b.fadeIn(d,function(){c.trigger("after-open.mw")}).find("button.x_close:first").focus();
a(".x_modal-backdrop").show()}).bind("close.mw",function(){var c=a(this),b,d;b=a.Event("before-close.mw");c.trigger(b);if(b.isDefaultPrevented())return!1;b=a(c.attr("href"));d=c.data("duration")||"fast";b.data("state","hiding");a("html,body").removeClass("modalContainer");b.fadeOut(d,function(){c.trigger("after-close.mw")});a(".x_modal-backdrop").hide();c.focus()})};a("a.modalAnchor").xeModalWindow();a("div.x_modal").addClass("x").hide()});

View file

@ -7,8 +7,10 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form action="" class="form" method="post">
<h1 class="h1">{$lang->user_list}</h1>
<div class="table even">
<div class="x_page-header">
<h1>{$lang->user_list}</h1>
</div>
<div>
<div class="cnb">
<a href="{getUrl('filter_type', '', 'page', '')}" class="active"|cond="$filter_type==''">{$lang->cmd_show_all_member}</a>
|
@ -18,14 +20,14 @@
|
<a href="{getUrl('filter_type', 'disable', 'page', '')}" class="active"|cond="$filter_type==disable">{$lang->denied}</a>
</div>
<table width="100%" border="1" cellspacing="0" class="_memberList">
<caption>
{$filter_type_title}({$total_count})
<span class="side">
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert')}">{$lang->cmd_make}</a></span>
<span class="btn"><a href="#listManager" class="modalAnchor _member">{$lang->cmd_selected_user_manage}...</a></span>
</span>
</caption>
<div class="x_clearfix" style="margin-bottom:-48px">
<div class="x_pull-right">
<a class="x_btn x_btn-inverse" href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert')}">{$lang->cmd_make}</a>
<a href="#listManager" class="modalAnchor _member x_btn">{$lang->cmd_selected_user_manage}...</a>
</div>
</div>
<table class="_memberList x_table x_table-striped x_table-hover">
<caption>{$filter_type_title}({$total_count})</caption>
<thead>
<tr>
<th scope="col" class="nowr">{$lang->email}</th>
@ -83,21 +85,23 @@
</tbody>
</table>
</div>
<div class="btnArea">
<span class="side">
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert')}">{$lang->cmd_make}</a></span>
<span class="btn"><a href="#listManager" class="modalAnchor _member">{$lang->cmd_selected_user_manage}...</a></span>
</span>
<div class="x_clearfix">
<div class="x_pull-right">
<a class="x_btn x_btn-inverse" href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInsert')}">{$lang->cmd_make}</a>
<a href="#listManager" class="modalAnchor _member x_btn">{$lang->cmd_selected_user_manage}...</a>
</div>
</div>
</form>
<div class="modal" id="listManager">
<div class="x_modal" id="listManager">
<form action="./" ruleset="updateSeletecdMemberInfo" class="fg form" method="post">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="act" value="procMemberAdminSelectedMemberManage" />
<input type="hidden" name="success_return_url" value="{getUrl('act', $act)}" />
<h2 class="h2">{$lang->cmd_selected_user_manage}</h2>
<div class="table even">
<table width="100%" border="1" cellspacing="0">
<div class="x_modal-header">
<h3>{$lang->cmd_selected_user_manage}</h3>
</div>
<div class="x_modal-body">
<table class="x_table x_table-striped x_table-hover">
<thead>
<tr>
<th scope="col">{$lang->email_address}</th>
@ -109,25 +113,28 @@
<tbody id="popupBody">
</tbody>
</table>
<p>{$lang->status}</p>
<p id="status">
<label class="x_inline" ><input type="radio" name="denied" id="approval" value="N" > {$lang->approval}</label>
<label class="x_inline" ><input type="radio" name="denied" id="deny" value="Y" > {$lang->denied}</label>
</p>
<p>{$lang->member_group}</p>
<p>
<!--@foreach($group_list as $key=>$val)-->
<label for="g{$val->group_srl}" class="x_inline"><input type="checkbox" name="groups[]" id="g{$val->group_srl}" value="{$val->group_srl}"/> {$val->title}</label>
<!--@end-->
</p>
<p><label for="message">{$lang->about_send_message}</label></p>
<p>
<textarea rows="5" cols="42" id="message" style="width:98%" name="message" ></textarea>
</p>
</div>
<p class="q">{$lang->status}</p>
<p>
<input type="radio" name="denied" id="approval" value="N" > <label for="approval">{$lang->approval}</label>
<input type="radio" name="denied" id="deny" value="Y" > <label for="deny">{$lang->denied}</label>
</p>
<p class="q">{$lang->member_group}</p>
<p>
<!--@foreach($group_list as $key=>$val)-->
<input type="checkbox" name="groups[]" id="g{$val->group_srl}" value="{$val->group_srl}"/> <label for="g{$val->group_srl}">{$val->title}</label>
<!--@end-->
</p>
<p class="q"><label for="message">{$lang->about_send_message}</label></p>
<p>
<textarea rows="8" cols="42" id="message" style="width:98%" name="message" ></textarea>
</p>
<div class="btnArea">
<span class="btn"><button type="submit" name="type" value="modify">{$lang->cmd_modify}...</button></span>
<span class="btn"><button type="submit" name="type" value="delete">{$lang->cmd_delete}</button></span>
<div class="x_modal-footer">
<button type="button" class="x_btn x_pull-left" data-hide="#listManager">{$lang->cmd_close}</button>
<span class="x_btn-group x_pull-right">
<button type="submit" name="type" value="modify" class="x_btn">{$lang->cmd_modify}...</button>
<button type="submit" name="type" value="delete" class="x_btn x_btn-danger">{$lang->cmd_delete}</button>
</span>
</div>
</form>
</div>
@ -169,22 +176,22 @@
<button type="submit">Go</button>
</span>
</form>
<form action="" method="post">
<form action="" method="post" class="search center x_input-append">
<input type="hidden" name="module" value="{$module}" />
<select name="selected_group_srl">
<select name="selected_group_srl" style="width:auto;margin-right:4px">
<option value="0">그룹 전체</option>
<!--@foreach($group_list as $key => $val)-->
<option value="{$val->group_srl}" <!--@if($selected_group_srl==$val->group_srl)-->selected="selected"<!--@end-->>{$val->title}</option>
<!--@end-->
</select>
<select name="search_target">
<select name="search_target" style="width:auto;margin-right:4px">
<option value="">{$lang->search_target}</option>
{@$lang->search_target_list = array_merge($lang->search_target_list, $usedIdentifiers)}
<option value="{$key}" loop="$lang->search_target_list=>$key,$val" selected="selected"|cond="$search_target==$key">{$val}</option>
</select>
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
<input type="submit" value="{$lang->cmd_search}" />
<a href="{getUrl('search_target', '', 'search_keyword', '')}">{$lang->cmd_cancel}</a>
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword)}" style="width:140px">
<button class="x_btn x_btn-inverse" type="submit">{$lang->cmd_search}</button>
<a class="x_btn" href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminList', 'page', $page)}">{$lang->cmd_cancel}</a>
</form>
</div>
<script>