small add question fix for survey module.
This commit is contained in:
parent
1d0ea6718f
commit
5332162646
|
@ -25,12 +25,12 @@ function setData(l, length, optionsI, className) {
|
||||||
_className: className,
|
_className: className,
|
||||||
_destroy: [id+l+"_destroy", name+l+"][_destroy]"],
|
_destroy: [id+l+"_destroy", name+l+"][_destroy]"],
|
||||||
_sequence : [id+l+"_sequence",name+l+"][sequence]",length-1],
|
_sequence : [id+l+"_sequence",name+l+"][sequence]",length-1],
|
||||||
_title_translations: [id+l+"_title_translations", name+l+"][title_translations]", "questions_title_"+l],
|
_title_translations: [id+l+"_title_translations", name+l+"][title_translations]", "questions_title_"+l,{"en":"","zh_tw":""}],
|
||||||
_description_translations: [id+l+"_description_translations", name+l+"][description_translations]", "questions_depiction_"+l],
|
_description_translations: [id+l+"_description_translations", name+l+"][description_translations]", "questions_depiction_"+l,{"en":"","zh_tw":""}],
|
||||||
_type: [id+l+"_type", name+l+"][type]"],
|
_type: [id+l+"_type", name+l+"][type]"],
|
||||||
_is_required: [id+l+"_is_required", name+l+"][is_required]",false],
|
_is_required: [id+l+"_is_required", name+l+"][is_required]",false],
|
||||||
_option: [id+optionID, name+optionName, "attributes_"+l+"_options_"+optionsI+"_"],
|
_option: [id+optionID, name+optionName, "attributes_"+l+"_options_"+optionsI+"_",{"en":"","zh_tw":""}],
|
||||||
_radiogroups: [id+radiogroupsID, name+radiogroupsName, "attributes_"+l+"_radiogroups_"+optionsI+"_"],
|
_radiogroups: [id+radiogroupsID, name+radiogroupsName, "attributes_"+l+"_radiogroups_"+optionsI+"_",{"en":"","zh_tw":""}],
|
||||||
_custom_option: [id+l+"_custom_option", name+l+"][custom_option]",false]
|
_custom_option: [id+l+"_custom_option", name+l+"][custom_option]",false]
|
||||||
};
|
};
|
||||||
return data;
|
return data;
|
||||||
|
@ -99,7 +99,6 @@ function inputAppendLength(element, length) {
|
||||||
function editQuestion (dataArray){
|
function editQuestion (dataArray){
|
||||||
var l = $('.questions > .attributes').length || 0;
|
var l = $('.questions > .attributes').length || 0;
|
||||||
$.each(dataArray,function ( i, d ) {
|
$.each(dataArray,function ( i, d ) {
|
||||||
console.log(d)
|
|
||||||
$('#template-survery').tmpl(setEditData(l, $('.questions > .attributes').length + 1, d)).appendTo($('.questions'));
|
$('#template-survery').tmpl(setEditData(l, $('.questions > .attributes').length + 1, d)).appendTo($('.questions'));
|
||||||
checkQuestionsLength();
|
checkQuestionsLength();
|
||||||
textareaResizable(); // from textarea-lang-btn.js
|
textareaResizable(); // from textarea-lang-btn.js
|
||||||
|
|
Reference in New Issue