app/assets/javascripts/locomotive/views/inputs/rte/table_view.js.coffee in locomotivecms-3.0.1 vs app/assets/javascripts/locomotive/views/inputs/rte/table_view.js.coffee in locomotivecms-3.1.0.rc1
- old
+ new
@@ -11,20 +11,22 @@
@$link = @$('a[data-wysihtml5-command=createTable]')
@editor = @options.editor
@$content = @$link.next('.table-dialog-content')
render: ->
+ return if @$link.size() == 0
+
@create_popover()
@attach_events()
@attach_editor()
create_popover: ->
@$content.show()
@$link.popover
- container: '.main'
- placement: 'left'
+ container: '.editable-elements'
+ placement: 'right'
content: @$content
html: true
trigger: 'manual'
template: '<div class="popover" role="tooltip"><div class="arrow"></div><form class="simple_form"><div class="popover-content"></div></form></div>'
@$link.data('bs.popover').setContent()
@@ -57,9 +59,12 @@
show: (state) ->
# console.log "[TableView] show (#{state})"
@$link.popover('toggle')
@$content.parents('form')[0].reset()
+
+ update: (state) ->
+ # do nothing
hide: ->
# console.log "[TableView] hide"
@$link.popover('hide')