Files
mozo-backend/app/assets/javascripts/supplier/app/controllers/tables_index_controller.js.coffee
T

15 lines
465 B
CoffeeScript

App.TablesIndexController = Ember.ArrayController.extend
tables: (-> @get('model').sortBy('casted_number')).property('model.@each.number')
actions:
editTable: (table)->
@modal 'edit_table',
model: table
ok: ->
table.save()
close: ->
table.rollback()
destroyTable: (table)->
@send 'confirm',
title: t('table.destroy.modal.title', number: table.get('number'))
ok: -> table.destroy()