Fix stack overflow in ruleset

This commit is contained in:
JuanCarlos 2019-07-25 16:37:31 +02:00 committed by Jesús Ángel
parent 0c9d8c54f5
commit 3797a66e6b
2 changed files with 8 additions and 6 deletions

View File

@ -58,7 +58,7 @@ export class FilesController {
this.$scope.$applyAsync();
});
this.$scope.closeEditingFile = () => {
this.$scope.closeEditingFile = (flag = false) => {
this.$scope.editingFile = false;
this.$scope.editorReadOnly = false;
this.$scope.fetchedXML = null;
@ -69,7 +69,7 @@ export class FilesController {
});
this.$scope.mctrl.currentRule = null;
}
this.$scope.mctrl.setRulesTab(this.$scope.mctrl.globalRulesetTab);
this.$scope.mctrl.setRulesTab(this.$scope.mctrl.globalRulesetTab, flag);
this.$scope.goBack = false;
}
this.search();
@ -142,8 +142,8 @@ export class FilesController {
this.$scope.$applyAsync();
});
this.$scope.$on('closeRulesetFile', () => {
this.$scope.closeEditingFile();
this.$scope.$on('closeRulesetFile', (ev) => {
this.$scope.closeEditingFile(true);
this.$scope.$applyAsync();
});

View File

@ -286,11 +286,13 @@ export class ManagementController {
* This set the rules tab
* @param {String} tab
*/
setRulesTab(tab) {
setRulesTab(tab, flag) {
this.rulesetTab = tab;
this.globalRulesetTab = this.rulesetTab;
this.managingFiles = false;
this.breadCrumbBack();
if (!flag) {
this.breadCrumbBack();
}
}
switchFilesSubTab(flag, showFile) {