diff --git a/rfe-9198-root_import_survey_default-answer-edit.wgpkg b/rfe-9198-root_import_survey_default-answer-edit.wgpkg new file mode 100644 index 000000000..5e32dd3a3 Binary files /dev/null and b/rfe-9198-root_import_survey_default-answer-edit.wgpkg differ diff --git a/rfe-9198-root_import_survey_default-question-edit.wgpkg b/rfe-9198-root_import_survey_default-question-edit.wgpkg new file mode 100644 index 000000000..19086d8a6 Binary files /dev/null and b/rfe-9198-root_import_survey_default-question-edit.wgpkg differ diff --git a/rfe-9198-root_import_survey_default-section-edit.wgpkg b/rfe-9198-root_import_survey_default-section-edit.wgpkg new file mode 100644 index 000000000..09c5c616b Binary files /dev/null and b/rfe-9198-root_import_survey_default-section-edit.wgpkg differ diff --git a/www/extras/wobject/Survey/editsurvey/object.js b/www/extras/wobject/Survey/editsurvey/object.js index cf67d07d1..7d9b9d583 100644 --- a/www/extras/wobject/Survey/editsurvey/object.js +++ b/www/extras/wobject/Survey/editsurvey/object.js @@ -8,8 +8,15 @@ Survey.ObjectTemplate = new function(){ document.getElementById('edit').innerHTML = html; + var myTextarea; + + var handleSubmit = function(){ + myTextarea.saveHTML(); + this.submit(); + } + var butts = [ - { text:"Submit", handler:function(){this.submit();}, isDefault:true }, + { text:"Submit", handler:handleSubmit, isDefault:true }, { text:"Copy", handler:function(){document.getElementById('copy').value = 1; this.submit();}}, { text:"Cancel", handler:function(){this.cancel();}}, { text:"Delete", handler:function(){document.getElementById('delete').value = 1; this.submit();}} @@ -26,6 +33,24 @@ Survey.ObjectTemplate = new function(){ form.callback = Survey.Comm.callback; form.render(); + + var textareaId = type+'Text'; + var textarea = YAHOO.util.Dom.get(textareaId); + var height = YAHOO.util.Dom.getStyle(textarea,'height'); + if (height == ''){ + height = '300px'; + } + var width = YAHOO.util.Dom.getStyle(textarea,'width'); + if (width == ''){ + width = '500px'; + } + myTextarea = new YAHOO.widget.SimpleEditor(textareaId, { + height: height, + width: width, + dompath: false //Turns on the bar at the bottom + }); + myTextarea.render(); + form.show(); } }();