You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

commands.controller.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. angular.module('camotion')
  2. .controller('CommandsController', ['$scope', 'CommandsService',
  3. function($scope, CommandsService) {
  4. $scope.luTable = {
  5. columns: [
  6. {
  7. name: "Name",
  8. width: 3,
  9. getValue: function (item) {
  10. return item.Name;
  11. }
  12. },{
  13. name: "Description",
  14. width: 9,
  15. getValue: function (item) {
  16. return item.Description;
  17. }
  18. }
  19. ],
  20. getLoadPagePromise: function (page, perPage, query, promise) {
  21. return CommandsService.getAll({page: page, perPage: perPage, query: query}, promise);
  22. },
  23. canClick: function()
  24. {
  25. return true;
  26. },
  27. onItemClicked: function(command)
  28. {
  29. CommandsService.exec({command_id: command.Id});
  30. console.log(command);
  31. }
  32. };
  33. }]);