mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
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:
parent
86ddc1d43b
commit
1ec19967c8
2 changed files with 13 additions and 11 deletions
|
|
@ -130,7 +130,6 @@
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin);
|
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin);
|
||||||
$colorset = $skin_info->colorset;
|
$colorset = $skin_info->colorset;
|
||||||
|
|
||||||
Context::set('colorset', $colorset);
|
Context::set('colorset', $colorset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,22 +9,25 @@ function getEditorSkinColorList(skin_name,selected_colorset,type,testid){
|
||||||
function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
|
function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
|
||||||
var selectbox = null;
|
var selectbox = null;
|
||||||
jQuery(function($){
|
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('');
|
selectbox.html('');
|
||||||
|
|
||||||
if(params.type == 'document'){
|
if(params.type == 'document'){
|
||||||
$("select[name=sel_editor_colorset]").css('display','none');
|
$("select[name=sel_editor_colorset]").hide()
|
||||||
$("select[name=sel_editor_colorset]").removeAttr('name');
|
.removeAttr('name');
|
||||||
selectbox.attr('name','sel_editor_colorset');
|
selectbox.attr('name','sel_editor_colorset');
|
||||||
}else{
|
}else{
|
||||||
$("select[name=sel_comment_editor_colorset]").css('display','none');
|
$("select[name=sel_comment_editor_colorset]").hide()
|
||||||
$("select[name=sel_comment_editor_colorset]").removeAttr('name');
|
.removeAttr('name');
|
||||||
selectbox.attr('name','sel_comment_editor_colorset');
|
selectbox.attr('name','sel_comment_editor_colorset');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret_obj['error'] == 0 && ret_obj.colorset){
|
if(ret_obj['error'] == 0 && ret_obj.colorset){
|
||||||
var it = new Array();
|
var it = new Array();
|
||||||
|
|
||||||
var items = ret_obj['colorset']['item'];
|
var items = ret_obj['colorset']['item'];
|
||||||
if(typeof(items[0]) == 'undefined'){
|
if(typeof(items[0]) == 'undefined'){
|
||||||
it[0] = items;
|
it[0] = items;
|
||||||
|
|
@ -35,10 +38,10 @@ function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
|
||||||
for(var i=0;i<it.length;i++){
|
for(var i=0;i<it.length;i++){
|
||||||
selectbox.append($('<option value="'+it[i].name+'" >'+it[i].title+'</option>'));
|
selectbox.append($('<option value="'+it[i].name+'" >'+it[i].title+'</option>'));
|
||||||
}
|
}
|
||||||
selectbox.css('display','');
|
selectbox.show();
|
||||||
}else{
|
}else{
|
||||||
selectbox.css('display','none');
|
selectbox.hide();
|
||||||
selectbox.innerHTML="";
|
selectbox.html('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue