Skip to content

Commit be45de1

Browse files
authored
Merge pull request #12 from HSG-Library/develop
Release v2022.06.07
2 parents b309969 + d378897 commit be45de1

File tree

73 files changed

+612
-584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+612
-584
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { slspIllSigninOrderAlertModule } from './slsp-ill-signin-order-alert/slsp-ill-signin-order-alert.module';
1+
import { slspIllSigninOrderAlertModule } from './slsp-ill-signin-order-alert/slsp-ill-signin-order-alert.module'
22

33
export const hsgHowovpAfterModule = angular
44
.module('hsgHowovpAfterModule', [])
55
.component('almaHowovpAfter', {
66
bindings: { parentCtrl: '<' },
77
template: `<slsp-ill-signin-order-alert-component after-ctrl="$ctrl"></slsp-ill-signin-order-alert-component>`
8-
});
8+
})
99

10-
hsgHowovpAfterModule.requires.push(slspIllSigninOrderAlertModule.name);
10+
hsgHowovpAfterModule.requires.push(slspIllSigninOrderAlertModule.name)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
export class slspIllSigninOrderAlertController {
22

33
constructor() {
4-
this.vm = this.afterCtrl;
4+
this.vm = this.afterCtrl
55
}
66

77
getAlert() {
8-
var ga = this.vm.parentCtrl.almaHowToGetitService.reqAlert._htmlMsg;
9-
var myEl2 = angular.element(document.querySelector('primo-explore'));
8+
var ga = this.vm.parentCtrl.almaHowToGetitService.reqAlert._htmlMsg
9+
var myEl2 = angular.element(document.querySelector('primo-explore'))
1010

1111
if (ga.length > 0) {
12-
return myEl2.addClass('alert');
12+
return myEl2.addClass('alert')
1313
}
1414
else {
15-
return myEl2.removeClass('alert');
15+
return myEl2.removeClass('alert')
1616
}
1717
}
1818
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div style="display:none">{{$ctrl.getAlert()}}</div>
1+
<div style="display:none">{{$ctrl.getAlert()}}</div>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { slspIllSigninOrderAlertController } from './slsp-ill-signin-order-alert.controller.js';
2-
import { slspIllSigninOrderAlertHtml } from './slsp-ill-signin-order-alert.html';
1+
import { slspIllSigninOrderAlertController } from './slsp-ill-signin-order-alert.controller.js'
2+
import { slspIllSigninOrderAlertHtml } from './slsp-ill-signin-order-alert.html'
33

44
export const slspIllSigninOrderAlertModule = angular
55
.module('slspIllSigninOrderAlertModule', [])
@@ -8,4 +8,4 @@ export const slspIllSigninOrderAlertModule = angular
88
bindings: { afterCtrl: '<' },
99
controller: 'slspIllSigninOrderAlertController',
1010
template: slspIllSigninOrderAlertHtml
11-
});
11+
})
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { slspArchivesHtgiModule } from './slsp-archives-htgi/slsp-archives-htgi.module';
1+
import { slspArchivesHtgiModule } from './slsp-archives-htgi/slsp-archives-htgi.module'
22

33
export const hsgHtgiSvcAfterModule = angular
44
.module('hsgHtgiSvcAfterModule', [])
@@ -7,6 +7,6 @@ export const hsgHtgiSvcAfterModule = angular
77
template: `
88
<slsp-archives-htgi-component after-ctrl="$ctrl"></slsp-archives-htgi-component>
99
`
10-
});
10+
})
1111

12-
hsgHtgiSvcAfterModule.requires.push(slspArchivesHtgiModule.name);
12+
hsgHtgiSvcAfterModule.requires.push(slspArchivesHtgiModule.name)
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
export class slspArchivesHtgiController {
22

33
constructor() {
4-
this.parentCtrl = this.afterCtrl.parentCtrl;
4+
this.parentCtrl = this.afterCtrl.parentCtrl
55
}
66

77
$onInit() {
8-
console.log('archives yo');
98
if (!this.parentCtrl.item.pnx.display.source || this.parentCtrl.item.pnx.display.source.length === 0) {
10-
return;
9+
return
1110
}
12-
this.source = this.parentCtrl.item.pnx.display.source[0];
11+
this.source = this.parentCtrl.item.pnx.display.source[0]
1312
// CMI STAR sources
1413
if (this.source === 'ETH_MaxFrischArchiv' || this.source === 'ETH_ThomasMannArchiv') {
1514
// hide content of htgi section
16-
let section = document.getElementById('full-view-container');
17-
section.classList.add('slsp-archives-hide');
15+
let section = document.getElementById('full-view-container')
16+
section.classList.add('slsp-archives-hide')
1817

1918
// get guid of CMIStar
20-
let sourceid = this.parentCtrl.item.pnx.control.originalsourceid[0];
21-
let guid = sourceid.substring(sourceid.lastIndexOf(':') + 1);
19+
let sourceid = this.parentCtrl.item.pnx.control.originalsourceid[0]
20+
let guid = sourceid.substring(sourceid.lastIndexOf(':') + 1)
2221

2322
// different sources: concat url
2423
if (this.source === 'ETH_ThomasMannArchiv') {
25-
this.url = 'http://www.online.tma.ethz.ch/home/#/content/' + guid;
24+
this.url = 'http://www.online.tma.ethz.ch/home/#/content/' + guid
2625
// only for test
2726
//this.label = 'Detailed information in Thomas Mann-Archiv Online (metadata only)';
2827
}
2928
else if (this.source === 'ETH_MaxFrischArchiv') {
30-
this.url = 'http://maxfrischarchiv-online.ethz.ch/home/#/content/' + guid;
29+
this.url = 'http://maxfrischarchiv-online.ethz.ch/home/#/content/' + guid
3130
// only for test
3231
//this.label = 'Request via Max Frisch-Archiv Online';
3332
}
3433
}
3534
}
36-
}
35+
}

js/modules/alma-htgi-svc-after/slsp-archives-htgi/slsp-archives-htgi.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
</div>
3434
</div>
3535
</div>
36-
<slsp-htgi-svc-after parent-ctrl="$parent.$ctrl"></slsp-htgi-svc-after>
36+
<slsp-htgi-svc-after parent-ctrl="$parent.$ctrl"></slsp-htgi-svc-after>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { slspArchivesHtgiController } from './slsp-archives-htgi.controller';
2-
import { slspArchivesHtgiHtml } from './slsp-archives-htgi.html';
1+
import { slspArchivesHtgiController } from './slsp-archives-htgi.controller'
2+
import { slspArchivesHtgiHtml } from './slsp-archives-htgi.html'
33

44
export const slspArchivesHtgiModule = angular
55
.module('slspArchivesHtgiModule', [])
@@ -8,4 +8,4 @@ export const slspArchivesHtgiModule = angular
88
bindings: { afterCtrl: '<' },
99
controller: 'slspArchivesHtgiController',
1010
template: slspArchivesHtgiHtml
11-
});
11+
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const hsgAlertMessageConfig = {
22
messageUrl: 'https://prod-102.westeurope.logic.azure.com:443/workflows/9eabdf07638d4af5b9608f6a7ba8eaae/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=op9aSvmJ_-GlOhHbN8sOsUOZ5CPC3h_-SMi4Tz07HO4'
3-
}
3+
}

js/modules/hsg-alert-message/hsg-alert-message.controller.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,51 @@
22
export class hsgAlertMessageController {
33

44
constructor($http, $sce, hsgTranslatorService, hsgAlertMessageConfig) {
5-
this.$http = $http;
6-
this.$sce = $sce;
7-
this.translator = hsgTranslatorService;
8-
this.config = hsgAlertMessageConfig;
5+
this.$http = $http
6+
this.$sce = $sce
7+
this.translator = hsgTranslatorService
8+
this.config = hsgAlertMessageConfig
99
this.showMessage = false
10-
this.showMessageClass = 'unisg-alert-hidden';
11-
this.message = '';
12-
this.htmlMessage;
13-
this.fetchMessage();
10+
this.showMessageClass = 'unisg-alert-hidden'
11+
this.message = ''
12+
this.htmlMessage
13+
this.fetchMessage()
1414
}
1515

1616
fetchMessage() {
17-
let url = this.config.messageUrl;
17+
let url = this.config.messageUrl
1818
let requestBody = {
1919
lang: this.translator.getLang()
2020
}
21-
let that = this;
21+
let that = this
2222
this.$http.post(
2323
url,
2424
requestBody
2525
).then(
2626
function (successResponse) {
27-
that.showMessage = false;
28-
that.message = successResponse.data;
27+
that.showMessage = false
28+
that.message = successResponse.data
2929
if (that.message && !/^\s+$/.test(that.message)) {
30-
that.htmlMessage = that.renderHtml(that.message);
31-
that.showMessage = true;
32-
that.showMessageClass = 'unisg-alert-voila';
33-
return;
30+
that.htmlMessage = that.renderHtml(that.message)
31+
that.showMessage = true
32+
that.showMessageClass = 'unisg-alert-voila'
33+
return
3434
}
35-
that.showMessage = false;
36-
that.showMessageClass = 'unisg-alert-hidden';
35+
that.showMessage = false
36+
that.showMessageClass = 'unisg-alert-hidden'
3737
},
3838
function (errorResponse) {
39-
that.showMessage = false;
40-
let code = errorResponse.data.error.code;
41-
let errorMessage = errorResponse.data.error.message;
42-
throw new Error("Could not retrieve hsg alert message from '" + url + "'. Error: '" + code + "', '" + errorMessage + "'");
39+
that.showMessage = false
40+
let code = errorResponse.data.error.code
41+
let errorMessage = errorResponse.data.error.message
42+
throw new Error("Could not retrieve hsg alert message from '" + url + "'. Error: '" + code + "', '" + errorMessage + "'")
4343
}
44-
);
44+
)
4545
}
4646

4747
renderHtml(value) {
48-
return this.$sce.trustAsHtml(value);
48+
return this.$sce.trustAsHtml(value)
4949
};
5050
}
5151

52-
hsgAlertMessageController.$inject = ['$http', '$sce', 'hsgTranslatorService', 'hsgAlertMessageConfig'];
52+
hsgAlertMessageController.$inject = ['$http', '$sce', 'hsgTranslatorService', 'hsgAlertMessageConfig']

0 commit comments

Comments
 (0)