Added signature model.
This commit is contained in:
parent
0d20c7d413
commit
abe409ad94
1 changed files with 15 additions and 0 deletions
15
app/assets/javascripts/app/models/signature.js.coffee
Normal file
15
app/assets/javascripts/app/models/signature.js.coffee
Normal file
|
@ -0,0 +1,15 @@
|
|||
class App.Signature extends App.Model
|
||||
@configure 'Signature', 'name', 'body', 'note', 'active'
|
||||
@extend Spine.Model.Ajax
|
||||
@url: '/api/signatures'
|
||||
|
||||
@configure_attributes = [
|
||||
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false, 'class': 'span4' },
|
||||
{ name: 'body', display: 'Text', tag: 'textarea', limit: 250, 'null': true, 'class': 'span4' },
|
||||
{ name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, 'null': true, 'class': 'span4' },
|
||||
{ name: 'updated_at', display: 'Updated', type: 'time', readonly: 1 },
|
||||
{ name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', 'default': true, 'null': false, 'class': 'span4' },
|
||||
]
|
||||
@configure_overview = [
|
||||
'name',
|
||||
]
|
Loading…
Reference in a new issue