Sha256: e3f06056b1c90f4b25e3427352cc5912685d7d845ac0af11e258cde4f107b1ff

Contents?: true

Size: 761 Bytes

Versions: 7

Compression:

Stored size: 761 Bytes

Contents

Locomotive.Views.Inputs.Rte ||= {}

class Locomotive.Views.Inputs.Rte.EditTableView extends Backbone.View

  initialize: ->
    _.bindAll(@, 'hide')

    @$link    = @$('a[data-wysihtml5-hiddentools=table]')
    @$content = @$link.next('.table-dialog-content')
    @editor   = @options.editor

  render: ->
    @create_popover()
    @attach_events()

  create_popover: ->
    @$link.popover
      placement:  'bottom'
      content:    @$content.html()
      html:       true
      title:      undefined

  attach_events: ->
    @editor.on 'tableunselect:composer', @hide

  detach_events: ->
    @editor.stopObserving 'tableselect:composer', @hide

  hide: ->
    @$link.popover('hide')

  remove: ->
    @$link.popover('destroy')
    @$('.popover').remove()

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
locomotivecms-3.0.1 app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee
locomotivecms-3.0.0 app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee
locomotivecms-3.0.0.rc7 app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee
locomotivecms-3.0.0.rc6 app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee
locomotivecms-3.0.0.rc5 app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee
locomotivecms-3.0.0.rc4 app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee
locomotivecms-3.0.0.rc3 app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee