From e7c04c6e6e22a90e591d1625a99c8ae2b0da1e9f Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 25 Sep 2013 19:40:47 +0800 Subject: [PATCH] small add question fix for survey module. --- .../survey/app/assets/javascripts/survey.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/vendor/built_in_modules/survey/app/assets/javascripts/survey.js b/vendor/built_in_modules/survey/app/assets/javascripts/survey.js index d21c192c1..97f8f7b3b 100644 --- a/vendor/built_in_modules/survey/app/assets/javascripts/survey.js +++ b/vendor/built_in_modules/survey/app/assets/javascripts/survey.js @@ -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