Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CDEK Development
transport-schema
Commits
ceb06269
Commit
ceb06269
authored
8 years ago
by
njrfhtd
Browse files
Options
Download
Email Patches
Plain Diff
viewSchema checkUnique prevent duplicate event in watcher: compare old vs new speeds
parent
13b98da0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TransportSchema_Front/app/viewSchema/viewSchema.js
+5
-3
TransportSchema_Front/app/viewSchema/viewSchema.js
with
5 additions
and
3 deletions
+5
-3
TransportSchema_Front/app/viewSchema/viewSchema.js
View file @
ceb06269
...
...
@@ -957,8 +957,10 @@ function ViewSchemaCtrl($scope, $http, $routeParams, $popover, $alert, $window,
}
vm
.
checkSpeedType
=
function
(
newValue
,
oldValue
)
{
if
(
vm
.
schema
.
speedTypes
.
output
.
length
>
0
)
{
vm
.
checkSchemaUnique
();
if
(
JSON
.
stringify
(
oldValue
)
!=
JSON
.
stringify
(
newValue
))
{
if
(
vm
.
schema
.
speedTypes
.
output
.
length
>
0
)
{
vm
.
checkSchemaUnique
();
}
}
}
...
...
@@ -1008,7 +1010,7 @@ function ViewSchemaCtrl($scope, $http, $routeParams, $popover, $alert, $window,
$scope
.
$watch
(
'
vm.schema.depBranch
'
,
vm
.
checkDepBranch
);
$scope
.
$watch
(
'
vm.schema.arrBranch
'
,
vm
.
checkArrBranch
);
//+++$scope.$watch('vm.schema.speedType', vm.checkSpeedType);
$scope
.
$watch
(
'
vm.schema.speedTypes.output
'
,
vm
.
checkSpeedType
);
$scope
.
$watch
Collection
(
'
vm.schema.speedTypes.output
'
,
vm
.
checkSpeedType
);
//
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help