issue 1605 fixed editor colorset list.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10338 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-03-06 07:18:14 +00:00
parent 86ddc1d43b
commit 1ec19967c8
2 changed files with 13 additions and 11 deletions

View file

@ -130,7 +130,6 @@
$oModuleModel = &getModel('module');
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin);
$colorset = $skin_info->colorset;
Context::set('colorset', $colorset);
}

View file

@ -9,22 +9,25 @@ function getEditorSkinColorList(skin_name,selected_colorset,type,testid){
function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
var selectbox = null;
jQuery(function($){
selectbox = jQuery("#"+params.testid).next('label').next('select');
if(params.testid){
selectbox = $("#"+params.testid).next('label').next('select');
}else{
selectbox = (params.type == 'document') ? $('select[name=sel_editor_colorset]') : $('select[name=sel_comment_editor_colorset]');
}
selectbox.html('');
if(params.type == 'document'){
$("select[name=sel_editor_colorset]").css('display','none');
$("select[name=sel_editor_colorset]").removeAttr('name');
$("select[name=sel_editor_colorset]").hide()
.removeAttr('name');
selectbox.attr('name','sel_editor_colorset');
}else{
$("select[name=sel_comment_editor_colorset]").css('display','none');
$("select[name=sel_comment_editor_colorset]").removeAttr('name');
$("select[name=sel_comment_editor_colorset]").hide()
.removeAttr('name');
selectbox.attr('name','sel_comment_editor_colorset');
}
if(ret_obj['error'] == 0 && ret_obj.colorset){
var it = new Array();
var items = ret_obj['colorset']['item'];
if(typeof(items[0]) == 'undefined'){
it[0] = items;
@ -35,10 +38,10 @@ function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
for(var i=0;i<it.length;i++){
selectbox.append($('<option value="'+it[i].name+'" >'+it[i].title+'</option>'));
}
selectbox.css('display','');
selectbox.show();
}else{
selectbox.css('display','none');
selectbox.innerHTML="";
selectbox.hide();
selectbox.html('');
}
});
}