33 lines
921 B
CoffeeScript
33 lines
921 B
CoffeeScript
import Ember from 'ember'
|
|
import PagedArray from 'ember-cli-pagination/local/paged-array'
|
|
|
|
export default_filter = Ember.Object.create
|
|
name: ''
|
|
target_week: ''
|
|
target_date_gteq: moment()
|
|
target_date_lteq: null
|
|
s: 'name asc'
|
|
|
|
test_model = [
|
|
{name: 'Record1'}
|
|
]
|
|
export default Ember.Route.extend
|
|
queryParams:
|
|
q:
|
|
refreshModel: true
|
|
setupController: (controller, model) ->
|
|
controller.set 'filters', default_filter
|
|
controller.set 'option_buttons_options', [1, 'two']
|
|
@_super arguments...
|
|
|
|
model: (params) ->
|
|
#@store.findAll('epots/migration-window-planning')
|
|
otherParams = {q: default_filter.toProperties()}
|
|
result = PagedArray.create test_model, perPage: 7
|
|
result.setOtherParam = (param, q) ->
|
|
window.last_set_param ||= {}
|
|
window.last_set_param[param] = q # all is allowed for the purpose of testing and time conservation :devil:
|
|
result
|
|
test_model
|
|
|