forked from metadata101/dcat-ap1.1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditorController.js.patch
executable file
·37 lines (34 loc) · 1.8 KB
/
EditorController.js.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git web-ui/src/main/resources/catalog/js/edit/EditorController.js web-ui/src/main/resources/catalog/js/edit/EditorController.js
index 08945644a3..da87ca2d0d 100644
--- web-ui/src/main/resources/catalog/js/edit/EditorController.js
+++ web-ui/src/main/resources/catalog/js/edit/EditorController.js
@@ -241,6 +241,7 @@
displayAttributes: $location.search()['displayAttributes'] === 'true',
displayTooltips: $location.search()['displayTooltips'] === 'true',
displayTooltipsMode: $location.search()['displayTooltipsMode'] || '',
+ displaySections: ($location.search()['displaySections'] || 'true') === 'true',
compileScope: $scope,
formScope: $scope.$new(),
sessionStartTime: moment(),
@@ -274,6 +275,9 @@
+ gnCurrentEdit.displayTooltipsMode ;
}
+ editorFormUrl += '&displaySections='
+ + (gnCurrentEdit.displaySections === true ? 'true' : 'false');
+
gnEditor.load(editorFormUrl).then(function() {
// $scope.onFormLoad();
// Once the editor form is loaded, then
@@ -389,6 +393,14 @@
gnUtilityService.scrollTo();
}
+ // If switching between default and advanced view (or the opposite)
+ // Stay on the current tab (Dataset/Distribution)
+ if ($('#currTab')[0].value === 'defaultDistribution' && tabIdentifier === 'advancedDataset') {
+ tabIdentifier = 'advancedDistribution';
+ } else if ($('#currTab')[0].value === 'advancedDistribution' && tabIdentifier === 'defaultDataset') {
+ tabIdentifier = 'defaultDistribution';
+ }
+
$('#currTab')[0].value = tabIdentifier;
$('#flat')[0].value = mode === 'flat';