123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- angular.module('app')
- .controller('pkguidsController', ['$scope', '$stateParams', 'pkguidsBusiness', 'listControllerBuilder',
- function($scope, $stateParams, pkguidsBusiness, listControllerBuilder) {
-
- $scope.business = pkguidsBusiness;
- $scope.itemType = 'pkguids';
- $scope.defaultOrder = 'someText';
- listControllerBuilder.create($scope, $stateParams);
-
- $scope.getAddItem = function()
- {
- return {
- someText: $scope.query.filter
- };
- };
-
- $scope.init();
-
- // $scope.selected = [];
- //
- // $scope.query = {
- // order: 'someText',
- // filter: '',
- // limit: 5,
- // page: 1
- // };
- //
- // $scope.busy = luBusyBusiness.reset();
- // $scope.appUtils = AppUtilsBusiness;
- //
- // $scope.isFilterShown = false;
- // $scope.pkGuids = null;
- //
- // $scope.showFilter = function(show) {
- // $scope.isFilterShown = show;
- // if (!$scope.isFilterShown) {
- // if ($scope.query.filter != '') {
- // $scope.query.filter = '';
- // $scope.getPkGuids();
- // }
- // }
- // };
- //
- // $scope.askRemoveOne = function (pkguid) {
- // var confirm = $mdDialog.confirm()
- // .title(AppUtilsBusiness.tr('common.confirmDelete'))
- // .textContent(AppUtilsBusiness.tr('pkguid.deleteOne', {text: pkguid.someText}))
- // .ok(AppUtilsBusiness.tr('common.delete'))
- // .cancel(AppUtilsBusiness.tr('common.cancel'));
- // $mdDialog.show(confirm).then(function() {
- // pkGuidBusiness.deleteDbo(pkguid.id, 'pkguid.table').then(function(data)
- // {
- // $scope.getPkGuids();
- // }, function(error) {});
- // }, function () {});
- // };
- //
- // $scope.askRemoveSelected = function () {
- // var confirm = $mdDialog.confirm()
- // .title(AppUtilsBusiness.tr('common.confirmDelete'))
- // .textContent(AppUtilsBusiness.tr('pkguid.deleteMultiple', {count: $scope.selected.length}))
- // .ok(AppUtilsBusiness.tr('common.delete'))
- // .cancel(AppUtilsBusiness.tr('common.cancel'));
- // $mdDialog.show(confirm).then(function() {
- // $scope.removeFirstSelected();
- //
- // }, function () {});
- // };
- //
- // $scope.removeFirstSelected = function() {
- // if ($scope.selected.length == 0) {
- // $scope.getPkGuids();
- // }
- // else {
- // pkGuidBusiness.deleteDbo($scope.selected[0].id, 'pkguid.table')
- // .then(function(data)
- // {
- // $scope.selected = $scope.selected.splice(1);
- // $scope.removeFirstSelected();
- // }, function(error) {});
- // }
- // };
- //
- // $scope.getPkGuids = function()
- // {
- // $scope.selected = [];
- // var orderBy = AppUtilsBusiness.convertOrderBy($scope.query.order);
- // pkGuidBusiness.getMultiple(orderBy, $scope.query.filter, $scope.query.page - 1, $scope.query.limit, 'pkguid.table').then(function(data)
- // {
- // $scope.pkGuids = data;
- // }, function(error)
- // {
- // $scope.pkGuids = null;
- // });
- // };
- //
- //
- //
- // $scope.getPkGuids();
- }]);
|