12345678910111213141516171819202122232425262728293031323334353637 |
- angular.module('camotion')
- .controller('CommandsController', ['$scope', 'CommandsService',
- function($scope, CommandsService) {
-
- $scope.luTable = {
- columns: [
- {
- name: "Name",
- width: 3,
- getValue: function (item) {
- return item.Name;
- }
- },{
- name: "Description",
- width: 9,
- getValue: function (item) {
- return item.Description;
- }
- }
- ],
-
- getLoadPagePromise: function (page, perPage, query, promise) {
- return CommandsService.getAll({page: page, perPage: perPage, query: query}, promise);
- },
-
- canClick: function()
- {
- return true;
- },
-
- onItemClicked: function(command)
- {
- CommandsService.exec({command_id: command.Id});
- console.log(command);
- }
- };
- }]);
|