diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee index 37cd19d46..33bfe06c4 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -704,6 +704,14 @@ class App.ControllerForm extends App.Controller else if attribute.tag is 'radio' item = $( App.view('generic/radio')( attribute: attribute ) ) + # richtext + else if attribute.tag is 'richtext' + item = $( App.view('generic/richtext')( attribute: attribute ) ) + item.ce( + mode: attribute.type + maxlength: attribute.maxlength + ) + # textarea else if attribute.tag is 'textarea' fileUploaderId = 'file-uploader-' + new Date().getTime() + '-' + Math.floor( Math.random() * 99999 ) diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee index e59537424..f49f276e4 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee @@ -272,7 +272,7 @@ class App.TicketCreate extends App.Controller # show text module UI @textModule = new App.WidgetTextModule( - el: @el.find('form').find('textarea') + el: @el.find('[data-name="body"]') ) new Sidebar( @@ -391,7 +391,7 @@ class App.TicketCreate extends App.Controller type: 'success', msg: App.i18n.translateInline( 'Ticket %s created!', @number ), link: "#ticket/zoom/#{@id}" - timeout: 12000, + timeout: 4000, # close ticket create task App.TaskManager.remove( ui.task_key ) diff --git a/app/assets/javascripts/app/views/generic/richtext.jst.eco b/app/assets/javascripts/app/views/generic/richtext.jst.eco new file mode 100644 index 000000000..e9aca481d --- /dev/null +++ b/app/assets/javascripts/app/views/generic/richtext.jst.eco @@ -0,0 +1 @@ +