Sha256: 2de1301797d911dbd6ce7734db48c5b58cabccfe60ba811de4ccd9c7b72d882b

Contents?: true

Size: 755 Bytes

Versions: 16

Compression:

Stored size: 755 Bytes

Contents

Dashboard.PressAssetsIndexController = Ember.ArrayController.extend Dashboard.PaginableControllerMixin,
  actions:
    destroy: (item)->
      if window.confirm(Ember.I18n.t('words.are_you_sure_to_delete'))
        item.destroyRecord()

        @removeObjects(item)

Dashboard.PressAssetsEditController = Ember.ObjectController.extend
  actions:
    save: ->
      press_asset = @get('model')

      press_asset.save()
        .then =>
          @transitionToRoute 'press_assets'
        .catch ->
          # must supply catch promise, otherwise Ember will throw a
          # 'backend rejected the commit' error.

    cancel: ->
      @transitionToRoute('press_assets')

Dashboard.PressAssetsNewController = Dashboard.PressAssetsEditController.extend()

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dune-dashboard-1.1.5 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.1.4 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.1.3 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.1.2 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.1.1 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.1.0 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.9 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.8 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.7 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.6 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.5 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.4 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.3 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.2 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.1 app/assets/javascripts/controllers/press_assets.coffee
dune-dashboard-1.0.0 app/assets/javascripts/controllers/press_assets.coffee