PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
ecommerce
/
order
define([], function() { return function($scope, communication, popup_order,$dialog,$state,$uibModalStack) { $scope.gridInstance={}; $scope.add = function() { popup_order.open().result.then(function(data) { if($state.current.name =='ecommerce.order.order.view') $state.go('ecommerce.order.order'); $scope.gridInstance.instance.reloadData(); }, function() { if($state.current.name =='ecommerce.order.order.view') $state.go('ecommerce.order.order'); }); } communication.getList("orderStatus", {}, "ecommerce").then(function(json) { $scope.order_statuses = json; }); $scope.delete = function() { var rows = $scope.gridInstance.selections; if(rows.length > 0) { $dialog.confirm({ title:'', message:window.t('LBL_DELETE_ITEMS_CONFIRM_MESSAGE') }).result.then(function() { communication.api('deleteItems', {ids:rows},'ecommerce.order.order').then(function() { $scope.gridInstance.instance.reloadData(); }); }); } } $scope.RowButtonClickHandler = { edit : function(id) { var data = {id:id}; // communication.api('getFormData',{name:'order', id:id}).then(function(data) //{ popup_order.open( { data:data }).result.then(function(data) { if($state.current.name =='ecommerce.order.order.view') $state.go('ecommerce.order.order'); $scope.gridInstance.instance.reloadData(); }, function() { if($state.current.name =='ecommerce.order.order.view') $state.go('ecommerce.order.order'); }); //}) } }; var checkState = function() { if($state.current.name =='ecommerce.order.order.view') $scope.RowButtonClickHandler.edit($state.params.orderID); } checkState(); $scope.$on("$stateChangeSuccess", function(event, toState, toParams, fromState, fromParams) { checkState(); if(fromState.name =='ecommerce.order.order.view') $uibModalStack.dismissAll(1); }); } });
[+]
..
[-] status.js
[edit]
[-] order.js
[edit]
[-] payment_status.js
[edit]
[-] pm_paypal_express.js
[edit]
[-] cart.js
[edit]