skin setup panel

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12385 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
nagoon97 2012-12-12 05:37:47 +00:00
parent 163c1c0e64
commit 65d7f1e2d1

View file

@ -2563,6 +2563,7 @@ jQuery(function($){
sLayoutTitle : sLayoutTitle, sLayoutTitle : sLayoutTitle,
sSkinName : sSkinName, sSkinName : sSkinName,
sSkinTitle : sSkinTitle, sSkinTitle : sSkinTitle,
sTmpSkinName : "",
htData : {} htData : {}
}; };
@ -3453,8 +3454,8 @@ jQuery(function($){
$ChkBox.removeAttr('checked'); $ChkBox.removeAttr('checked');
} }
//updateSkinListDisplayStatus();
$('#skin .list').show(); $('#skin .list').show();
//updateSkinListDisplayStatus();
}); });
$('#skin').on('hide', function(ev){ $('#skin').on('hide', function(ev){
if(this !== ev.target){ if(this !== ev.target){
@ -3477,22 +3478,21 @@ jQuery(function($){
$ChkBox = $('#skin ._chkUseDefault'); $ChkBox = $('#skin ._chkUseDefault');
var htDesign = $._xeAdminVar.htSelectedMenuDesign; var htDesign = $._xeAdminVar.htSelectedMenuDesign;
if($ChkBox.is(':visible') && $ChkBox.attr('checked')){ if($ChkBox.is(':visible') && $ChkBox.attr('checked')){
htDesign.sTmpSkinName = htDesign.sSkinName;
htDesign.sSkinName = ""; htDesign.sSkinName = "";
htDesign.sSkinTitle = ""; htDesign.sSkinTitle = "";
$('#skin .list').addClass('disabled'); $('#skin .list').addClass('disabled');
$ChkBox.parent().css('fontWeight','bold'); $ChkBox.parent().css('fontWeight','bold');
//$('#skin .list').hide();
//.//
updateSelectedDesign(htDesign); updateSelectedDesign(htDesign);
}else{ }else{
$('#skin .list').removeClass('disabled'); $('#skin .list').removeClass('disabled');
$ChkBox.parent().css('fontWeight','normal'); $ChkBox.parent().css('fontWeight','normal');
//$('#skin .list').show(); $('#skin .list .selected').click();
} }
} }
// sType: "P", "M" (PC/Mobile) // sType: "P", "M" (PC/Mobile)
@ -3533,9 +3533,10 @@ jQuery(function($){
//console.log(htDesign.sSkinName); //console.log(htDesign.sSkinName);
// if nothing is selected, select the first one. // if nothing is selected, select the first one.
sTmpName = htDesign.sSkinName || htDesign.sTmpSkinName; sTmpName = htDesign.sTmpSkinName || sName;
if(sTmpName == ""){ //console.log(22, sTmpName);
htDesign.sSkinName = sName; if(!htDesign.sSkinName){
htDesign.sSkinName = sTmpName;
} }
htInfo = htData.skin_info_list[sName]; htInfo = htData.skin_info_list[sName];
@ -3544,7 +3545,10 @@ jQuery(function($){
htInfo.sTitle = htInfo.title; htInfo.sTitle = htInfo.title;
sSelected = ""; sSelected = "";
//console.log(33, sTmpName, sName, htDesign.sSkinName, htInfo.sName);
if(htDesign.sSkinName == htInfo.sName){ if(htDesign.sSkinName == htInfo.sName){
//htDesign.sTmpSkinName = "";
sSelectedSkinName = htInfo.sName; sSelectedSkinName = htInfo.sName;
sSelectedSkinTitle = htInfo.sTitle; sSelectedSkinTitle = htInfo.sTitle;
sSelected = "selected"; sSelected = "selected";
@ -3557,6 +3561,8 @@ jQuery(function($){
SkinName : htInfo.sName SkinName : htInfo.sName
}).data('SkinName', htInfo.sName).data('SkinTitle', htInfo.sTitle)); }).data('SkinName', htInfo.sName).data('SkinTitle', htInfo.sTitle));
} }
//console.log(sSelectedSkinName);
$List.find('.selected input').attr('checked', 'checked'); $List.find('.selected input').attr('checked', 'checked');
//console.log(sSelectedSrl); //console.log(sSelectedSrl);
@ -3564,6 +3570,8 @@ jQuery(function($){
htDesign.sSkinTitle = sSelectedSkinTitle; htDesign.sSkinTitle = sSelectedSkinTitle;
htDesign.htSkinData = {}; htDesign.htSkinData = {};
updateSelectedDesign(htDesign); updateSelectedDesign(htDesign);
updateSkinListDisplayStatus();
}); });
} }
$('#skin').on('click', 'button._btnScreenshot', function(){ $('#skin').on('click', 'button._btnScreenshot', function(){