small add question fix for survey module.

This commit is contained in:
Harry Bomrah 2013-09-25 19:40:47 +08:00 committed by saurabhbhatia
parent 1d0ea6718f
commit 5332162646
1 changed files with 4 additions and 5 deletions

View File

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