app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb in locomotivecms-3.1.0.rc1 vs app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb in locomotivecms-3.1.0.rc2

- old
+ new

@@ -31,21 +31,19 @@ showToolbarDialogsOnSelection: false @editor.on 'load', @register_editor_events render_views: -> - that = @ - setTimeout( - -> - that.views = [ - that.build_and_render_view(Locomotive.Views.Inputs.Rte.LinkView), - that.build_and_render_view(Locomotive.Views.Inputs.Rte.FileView), - that.build_and_render_view(Locomotive.Views.Inputs.Rte.ImageView), - that.build_and_render_view(Locomotive.Views.Inputs.Rte.TableView), - that.build_and_render_view(Locomotive.Views.Inputs.Rte.EditTableView) - ] - , 200) + @editor.on 'load', => + @views = [ + @build_and_render_view(Locomotive.Views.Inputs.Rte.LinkView), + @build_and_render_view(Locomotive.Views.Inputs.Rte.FileView), + @build_and_render_view(Locomotive.Views.Inputs.Rte.ImageView), + @build_and_render_view(Locomotive.Views.Inputs.Rte.TableView), + @build_and_render_view(Locomotive.Views.Inputs.Rte.EditTableView) + ] + console.log '[RTE] all views created and rendered' expand: (event) -> event.stopPropagation() & event.preventDefault() $(@el).parents('.simple_form').toggleClass('rte-expanded') @@ -89,10 +87,9 @@ @editor.on 'change', @on_content_change @editor.on 'aftercommand:composer', @on_content_change on_content_change: -> - console.log 'modified' PubSub.publish 'inputs.text_changed', view: @ content: @editor.getValue() highlight: (event) ->