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.

pkguids.controller.js 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. angular.module('app')
  2. .controller('pkguidsController', ['$scope', '$stateParams', 'pkguidsBusiness', 'listControllerBuilder',
  3. function($scope, $stateParams, pkguidsBusiness, listControllerBuilder) {
  4. $scope.business = pkguidsBusiness;
  5. $scope.itemType = 'pkguids';
  6. $scope.defaultOrder = 'someText';
  7. listControllerBuilder.create($scope, $stateParams);
  8. $scope.getAddItem = function()
  9. {
  10. return {
  11. someText: $scope.query.filter
  12. };
  13. };
  14. $scope.init();
  15. // $scope.selected = [];
  16. //
  17. // $scope.query = {
  18. // order: 'someText',
  19. // filter: '',
  20. // limit: 5,
  21. // page: 1
  22. // };
  23. //
  24. // $scope.busy = luBusyBusiness.reset();
  25. // $scope.appUtils = AppUtilsBusiness;
  26. //
  27. // $scope.isFilterShown = false;
  28. // $scope.pkGuids = null;
  29. //
  30. // $scope.showFilter = function(show) {
  31. // $scope.isFilterShown = show;
  32. // if (!$scope.isFilterShown) {
  33. // if ($scope.query.filter != '') {
  34. // $scope.query.filter = '';
  35. // $scope.getPkGuids();
  36. // }
  37. // }
  38. // };
  39. //
  40. // $scope.askRemoveOne = function (pkguid) {
  41. // var confirm = $mdDialog.confirm()
  42. // .title(AppUtilsBusiness.tr('common.confirmDelete'))
  43. // .textContent(AppUtilsBusiness.tr('pkguid.deleteOne', {text: pkguid.someText}))
  44. // .ok(AppUtilsBusiness.tr('common.delete'))
  45. // .cancel(AppUtilsBusiness.tr('common.cancel'));
  46. // $mdDialog.show(confirm).then(function() {
  47. // pkGuidBusiness.deleteDbo(pkguid.id, 'pkguid.table').then(function(data)
  48. // {
  49. // $scope.getPkGuids();
  50. // }, function(error) {});
  51. // }, function () {});
  52. // };
  53. //
  54. // $scope.askRemoveSelected = function () {
  55. // var confirm = $mdDialog.confirm()
  56. // .title(AppUtilsBusiness.tr('common.confirmDelete'))
  57. // .textContent(AppUtilsBusiness.tr('pkguid.deleteMultiple', {count: $scope.selected.length}))
  58. // .ok(AppUtilsBusiness.tr('common.delete'))
  59. // .cancel(AppUtilsBusiness.tr('common.cancel'));
  60. // $mdDialog.show(confirm).then(function() {
  61. // $scope.removeFirstSelected();
  62. //
  63. // }, function () {});
  64. // };
  65. //
  66. // $scope.removeFirstSelected = function() {
  67. // if ($scope.selected.length == 0) {
  68. // $scope.getPkGuids();
  69. // }
  70. // else {
  71. // pkGuidBusiness.deleteDbo($scope.selected[0].id, 'pkguid.table')
  72. // .then(function(data)
  73. // {
  74. // $scope.selected = $scope.selected.splice(1);
  75. // $scope.removeFirstSelected();
  76. // }, function(error) {});
  77. // }
  78. // };
  79. //
  80. // $scope.getPkGuids = function()
  81. // {
  82. // $scope.selected = [];
  83. // var orderBy = AppUtilsBusiness.convertOrderBy($scope.query.order);
  84. // pkGuidBusiness.getMultiple(orderBy, $scope.query.filter, $scope.query.page - 1, $scope.query.limit, 'pkguid.table').then(function(data)
  85. // {
  86. // $scope.pkGuids = data;
  87. // }, function(error)
  88. // {
  89. // $scope.pkGuids = null;
  90. // });
  91. // };
  92. //
  93. //
  94. //
  95. // $scope.getPkGuids();
  96. }]);