mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-01-22 15:08:12 -05:00
Parse source when switching states from switch profile. Fix #765.
This commit is contained in:
parent
497d5de8ce
commit
56d1e8c4d6
@ -395,6 +395,11 @@ angular.module('omega').controller 'SwitchProfileCtrl', ($scope, $rootScope,
|
||||
$scope.loadRules = true
|
||||
omegaTarget.state(stateEditorKey, {editSource: $scope.editSource})
|
||||
|
||||
$rootScope.$on '$stateChangeStart', (event, _, __, fromState) ->
|
||||
if $scope.editSource and $scope.source.touched
|
||||
sourceValid = parseSource()
|
||||
event.preventDefault() unless sourceValid
|
||||
|
||||
$scope.$on 'omegaApplyOptions', (event) ->
|
||||
if $scope.attached?.ruleList and not $scope.attached.sourceUrl
|
||||
$scope.attachedRuleListError = undefined
|
||||
|
Loading…
Reference in New Issue
Block a user