-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/VirtoCommerce/vc-module-order
- Loading branch information
Showing
3 changed files
with
18 additions
and
27 deletions.
There are no files selected for viewing
39 changes: 14 additions & 25 deletions
39
VirtoCommerce.OrderModule.Web/Scripts/blades/operation-comment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,21 @@ | ||
angular.module('virtoCommerce.orderModule') | ||
.controller('virtoCommerce.orderModule.orderOperationCommentDetail', ['$scope', 'platformWebApp.dialogService', function ($scope, dialogService) { | ||
|
||
function initializeBlade() { | ||
|
||
$scope.blade.origEntity = $scope.blade.currentEntity.comment; | ||
$scope.blade.isLoading = false; | ||
}; | ||
.controller('virtoCommerce.orderModule.orderOperationCommentDetail', ['$scope', function ($scope) { | ||
var blade = $scope.blade; | ||
|
||
function isDirty() { | ||
return $scope.blade.currentEntity.comment !== $scope.blade.origEntity; | ||
}; | ||
function initializeBlade() { | ||
blade.origEntity = blade.currentEntity; | ||
blade.currentEntity = angular.copy(blade.origEntity.comment); | ||
blade.isLoading = false; | ||
} | ||
|
||
$scope.setForm = function (form) { | ||
$scope.formScope = form; | ||
} | ||
$scope.cancelChanges = function () { $scope.bladeClose(); }; | ||
|
||
$scope.cancelChanges = function () { | ||
$scope.bladeClose(); | ||
} | ||
$scope.isValid = function () { return true; }; | ||
|
||
$scope.isValid = function () { | ||
return $scope.formScope && $scope.formScope.$valid; | ||
} | ||
$scope.saveChanges = function () { | ||
blade.origEntity.comment = blade.currentEntity; | ||
$scope.bladeClose(); | ||
}; | ||
|
||
$scope.saveChanges = function () { | ||
$scope.blade.origEntity = $scope.blade.currentEntity.comment; | ||
$scope.bladeClose(); | ||
}; | ||
|
||
initializeBlade(); | ||
initializeBlade(); | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters