Issue 963 fixed. Admin .h2 .h3 section collapse function.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10846 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-07-06 10:01:25 +00:00
parent 2165f59b04
commit 7f58148ac4
4 changed files with 12 additions and 17 deletions

View file

@ -1234,15 +1234,19 @@ jQuery(function($){
// Toggle Content
jQuery(function($){
$('.x .content:not(".dashboard") .h2').each(function(){
var $h2h3 = $('.x .content .h2, .x .content .h3').not('.portlet .h2, .modal .h2');
$h2h3.each(function(){
var $sTog = $('<button type="button" class="sTog" title="Open/Close"><i class="icon-chevron-up"></i></button>');
$(this).after($sTog);
$(this).append($sTog);
$sTog.click(function(){
var $t = $(this);
if($t.next().is(':hidden')){
$t.find('i').attr('class','icon-chevron-up').parent().next().slideDown(200).next('.btnArea').slideDown(200);
var $sTogObj = $t.parent().nextUntil('.h2, .h3');
if($t.parent().next().is(':hidden')){
$t.find('i').attr('class','icon-chevron-up');
$sTogObj.slideDown(200);
} else {
$t.find('i').attr('class','icon-chevron-down').parent().next().slideUp(200).next('.btnArea').slideUp(200);
$t.find('i').attr('class','icon-chevron-down');
$sTogObj.slideUp(200);
}
});
});