123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- angular.module('app')
- .controller('pkguidsEditController', ['$scope', '$stateParams', 'pkguidsBusiness', 'editControllerBuilder',
- function ($scope, $stateParams, pkguidsBusiness, editControllerBuilder) {
-
- $scope.business = pkguidsBusiness;
- $scope.itemType = 'pkguids';
- editControllerBuilder.create($scope, $stateParams);
-
-
- $scope.setupExitConfirm();
-
- $scope.init($stateParams);
-
- // $scope.pkguid = null;
- // $scope.defaultPkguid = {
- // id: null,
- // someText: "Test.",
- // someInt: 42
- // };
- //
- // $scope.busy = luBusyBusiness.reset();
- // $scope.appUtils = AppUtilsBusiness;
- //
- // $scope.setTitle = function()
- // {
- // if ($scope.pkguid.id != null) {
- // AppUtilsBusiness.setTitle(AppUtilsBusiness.tr('pkguid.edit.title', {text: $scope.pkguid.someText}));
- // AppUtilsBusiness.setToolbarTitle(AppUtilsBusiness.tr('pkguid.edit.toolbarTitle', {text: $scope.pkguid.someText}));
- // }
- // };
- //
- // $scope.submit = function () {
- // if ($scope.pkguid.id == null) {
- // pkGuidBusiness.addDbo($scope.pkguid, 'pkguid.edit').then(function (data) {
- // $scope.pkguid = data;
- // $state.go('pkguid_edit', {pkguid: $scope.pkguid, id: $scope.pkguid.id});
- // }, function (error) {});
- // }
- // else {
- // pkGuidBusiness.editSingleByIdDbo($scope.pkguid.id, $scope.pkguid, 'pkguid.edit').then(function (data) {
- // $scope.pkguid = data;
- // $scope.setTitle();
- // }, function (error) {});
- // }
- // };
- //
- // $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.edit').then(function(data)
- // {
- // $state.go('pkguid');
- // }, function(error) {});
- // }, function () {});
- // };
- //
- //
- // if ($state.params != null) {
- // if ($state.params.pkguid != null) {
- // $scope.pkguid = $state.params.pkguid;
- // $scope.setTitle();
- // }
- // else if ($state.params.id != null) {
- // pkGuidBusiness.getSingleById($state.params.id, 'pkguid.edit').then(function(data)
- // {
- // $scope.pkguid = data;
- // $scope.setTitle();
- // }, function (error) {
- // $scope.pkguid = null;
- // $scope.setTitle();
- // });
- // }
- // else {
- // $scope.pkguid = angular.copy($scope.defaultPkguid);
- // $scope.setTitle();
- // }
- // }
- // else {
- // $scope.pkguid = angular.copy($scope.defaultPkguid);
- // $scope.setTitle();
- // }
-
- }]);
|