update commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import Ember from 'ember'
|
||||
import layout from '../templates/components/ordered-filtered-table'
|
||||
|
||||
export default Ember.Component.extend
|
||||
layout: layout
|
||||
tagName: 'table'
|
||||
classNames: ['ui', 'compact', 'table']
|
||||
test_name: 'Oooo'
|
||||
@@ -7,6 +7,8 @@ import Ember from 'ember'
|
||||
# export default DunlopCan.extend
|
||||
# # allow all epots scoped model on read adpter permission
|
||||
# custom_compute: (permission, type, target, roles) ->
|
||||
# return true if 'manage-adapter-epots' in roles
|
||||
#
|
||||
# if permission is 'read' and type is 'model' and target.match(/^epots/)
|
||||
# return 'read-adapter-epots' in roles
|
||||
# false
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<thead>
|
||||
<tr>
|
||||
{{#each properties as |p|}}
|
||||
{{p.header}}
|
||||
{{/each}}
|
||||
</tr>
|
||||
<tr>
|
||||
{{#each properties as |p|}}
|
||||
{{p.filter}}
|
||||
{{/each}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each content as |record|}}
|
||||
<tr>
|
||||
{{#each properties as |p|}}
|
||||
{{p.display record=record}}
|
||||
{{/each}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
{{yield (hash
|
||||
property=(component "ordered-filtered-table/property" table=self)
|
||||
)}}
|
||||
@@ -0,0 +1 @@
|
||||
= yield
|
||||
@@ -0,0 +1,22 @@
|
||||
import PagedRemoteArray from 'ember-cli-pagination/remote/paged-remote-array'
|
||||
|
||||
export default PagedRemoteArray.extend
|
||||
a: 42
|
||||
#params: {}
|
||||
filters: {}
|
||||
init: ->
|
||||
query = @get('filters')?.toProperties() || {}
|
||||
@otherParams ||= {}
|
||||
@otherParams['q'] = query
|
||||
#@setOtherParam('q', query) # explicitly not, init does not trigger operational callbacks
|
||||
@_super arguments...
|
||||
reload: ->
|
||||
query = @get('filters')?.toProperties() || {}
|
||||
@set 'page', 1
|
||||
@set 'lastPage', null
|
||||
@setOtherParam('q', query)
|
||||
paramMapping:
|
||||
total_pages: 'total-pages'
|
||||
total_count: 'total-count'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user