Sha256: 75f34eac2a1335b41175970f8f28cbe675fc4211c1b114541aa4670f0e364fcb

Contents?: true

Size: 1.09 KB

Versions: 16

Compression:

Stored size: 1.09 KB

Contents

Dashboard.ProjectsTabController = Ember.ArrayController.extend Dashboard.SearchableBaseController, Dashboard.PaginableControllerMixin,
  baseRouteName: 'projects'

  defaultSearchFields:
    query: null
    manageable: true
    between_created_at:
      starts_at: null
      ends_at: null
    between_expires_at:
      starts_at: null
      ends_at: null
    between_online_date:
      starts_at: null
      ends_at: null

  actions:
    launch: (project)->
      if window.confirm(Ember.I18n.t('projects.index.actions.are_you_sure_to_launch'))
        @send('changeState', project, 'launch')

    changeState: (project, action)->
      projectUrl = Dashboard.ApplicationAdapter.prototype.buildURL('projects', project.id)

      $.ajax url: "#{projectUrl}/#{action}", type: 'PUT'

      @get('target').send('refresh')

    destroy: (project)->
      if window.confirm(Ember.I18n.t('words.are_you_sure_to_delete'))
        project.destroyRecord()

        @removeObjects(project)

Dashboard.ProjectsSearchController = Dashboard.ProjectsTabController.extend Dashboard.SearchableController,
  baseRouteName: 'projects'

Version data entries

16 entries across 16 versions & 1 rubygems

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