Skip to content

Commit

Permalink
Merge pull request #35 from HSG-Library/develop
Browse files Browse the repository at this point in the history
Release v2013.12.21
  • Loading branch information
d22 authored Dec 21, 2023
2 parents 83562e6 + 9974699 commit 111afa2
Show file tree
Hide file tree
Showing 19 changed files with 445 additions and 135 deletions.
283 changes: 199 additions & 84 deletions css/00-central-package.css

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion css/hsg-report-broken-link.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@
/****** Report broken link *****/
/*******************************/

.hsg-report-broken-link-dialog {
width: 600px;
}

.hsg-report-broken-link-dialog .hsg-off-campus-info {
margin-top: 0;
margin-bottom: 0;
border-radius: 0;
}

.hsg-report-broken-link-dialog details summary {
cursor: pointer;
}

.hsg-broken-link-info-list {
word-break: break-word;
}

.hsg-broken-link-info-list dt {
font-weight: 600;
}
}
22 changes: 22 additions & 0 deletions css/hsg-resource-type-filterbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/***********************************/
/****** Resourcetype Filterbar *****/
/***********************************/

prm-resource-type-filter-bar div.container div.box button > div,
prm-resource-type-filter-bar div.container div.box button prm-icon {
color: #fff !important;
}

prm-resource-type-filter-bar div.container div.box button.selectedResourceTypeOption div,
prm-resource-type-filter-bar div.container div.box button.selectedResourceTypeOption prm-icon {
color: #111 !important;
}

prm-resource-type-filter-bar button.md-button.md-primoExplore-theme.md-ink-ripple:hover {
background-color: #fff !important;
}

prm-resource-type-filter-bar div.container div.box button>div:hover,
prm-resource-type-filter-bar div.container div.box button div:hover prm-icon {
color: #00802F !important;
}
2 changes: 1 addition & 1 deletion html/homepage/homepage_de.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="md-headline">Willkommen bei <b>HSGswisscovery</b></h1>
<ul>
<li>Recherchieren Sie in von der HSG-Bibliothek bereitgestellten Dokumenten
<li>Erweitern Sie Ihre Suche mit einem Klick auf &uuml;ber <a href="https://slsp.ch/libraries"
target="_blank">490 wissenschaftliche Bibliotheken</a> in der Schweiz</li>
target="_blank">500 wissenschaftliche Bibliotheken</a> in der Schweiz</li>
<li>Nutzen Sie lizenzierte E-Medien der HSG-Bibliothek und erhalten Sie Zugang zu frei
verf&uuml;gbaren Titeln</li>
<li>Bestellen Sie Dokumente der HSG-Bibliothek und von anderen Bibliotheken, direkt oder via
Expand Down
2 changes: 1 addition & 1 deletion html/homepage/homepage_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1 class="md-headline">Welcome to <b>HSGswisscovery</b></h1>
<ul>
<li>Search in the printed and electronic content provided by the HSG-Library
<li>With one click, expand your search to more than <a href="https://slsp.ch/libraries"
target="_blank">490 scientific libraries</a> in Switzerland
target="_blank">500 scientific libraries</a> in Switzerland
<li>Access e-media licensed by the HSG-Library as well as Open Access content
<li>Request books from the HSG-Library or other participating libraries, directly or via SLSP
courier</li>
Expand Down
2 changes: 2 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { hsgServicePhysicalBestOfferAfterModule } from './modules/prm-service-ph
import { hsgStackMapAfterModule } from './modules/prm-stack-map-after/hsg-stack-map-after.module'
import { hsgStandAloneLoginAfterModule } from './modules/prm-stand-alone-login-after/hsg-stand-alone-login-after.module'
import { hsgTabsAndScopesSelectorAfterModule } from './modules/prm-tabs-and-scopes-selector-after/hsg-tabs-and-scopes-selector-after.module'
import { hsgUnionCatalogLoginAfterModule } from './modules/prm-union-catalog-login-after/hsg-union-catalog-login-after.module'
import { hsgUserAreaExpandableAfterModule } from './modules/prm-user-area-expandable-after/hsg-user-ara-expandable-after.module'
import { hsgAlmaOtherUnitsAfterModule } from './modules/prm-alma-other-units-after/hsg-alma-other-units-after.module'
import { slspHttpInterceptPickupInformation } from './modules/slsp-http-intercept-pickup-information/slsp-http-intercept-pickup-information.module'
Expand Down Expand Up @@ -70,6 +71,7 @@ app.requires.push(hsgServicePhysicalBestOfferAfterModule.name)
app.requires.push(hsgStackMapAfterModule.name)
app.requires.push(hsgStandAloneLoginAfterModule.name)
app.requires.push(hsgTabsAndScopesSelectorAfterModule.name)
app.requires.push(hsgUnionCatalogLoginAfterModule.name)
app.requires.push(hsgUserAreaExpandableAfterModule.name)
app.requires.push(hsgAlmaOtherUnitsAfterModule.name)
app.requires.push(slspHttpInterceptPickupInformation.name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ export const hsgReportBrokenLinkConfig = {
en: 'Comment, problem description'
},
contactLabel: {
de: 'Kontakt-Email (für Unterstützung/Feedback zu ihrer Meldung)',
en: 'Contact-Email (for support/feedback regarding your report)'
de: 'Ihre Kontakt-Email (für Unterstützung/Feedback zu ihrer Meldung)',
en: 'Your Contact-Email (for support/feedback regarding your report)'
},
errorMessage: {
de: 'Fehler beim Senden des Reports.',
en: 'Error sending report.'
},
noContactMessage: {
de: 'Keine Email Adresse angegeben<br>(für Unterstützung/Feedback zu ihrer Meldung)',
en: 'No email address given<br>(for support/feedback regarding your report)'
},
okAnywayLabel: {
de: 'Trotzdem senden',
en: 'Send anyway'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class hsgReportBrokenLinkController {
fullscreen: this.$mdMedia('xs')
}

this.$mdDialog.show(dialogConfig)
this.mainDialog = this.$mdDialog.show(dialogConfig)
.then(function (dialogModel) { // send
that.info.comment = dialogModel.comment + " " || ''
if (dialogModel.contact) {
Expand Down Expand Up @@ -140,49 +140,56 @@ export class hsgReportBrokenLinkController {

getTemplate() {
return `
<md-dialog md-theme="primoExplore" aria-label="report broken link" ng-class="dialog.css" class="_md md-primoExplore-theme md-content-overflow md-transition-in" role="dialog">
<md-dialog md-theme="primoExplore" aria-label="report broken link" ng-class="dialog.css" class="_md md-primoExplore-theme md-content-overflow md-transition-in hsg-report-broken-link-dialog" role="dialog">
<hsg-off-campus-info-component class="hsg-broken-link-off-campus" after-ctrl=$ctrl></hsg-off-campus-info-component>
<form name="form">
<md-dialog-content class="md-dialog-content" role="document" tabindex="-1">
<h2 class="md-title">${this.translate('popupTitle')}</h2>
<div class="md-dialog-content-body">
<div>
<div flex="">
<md-input-container class="md-prompt-input-container md-primoExplore-theme">
<label style="font-weight: bold">${this.translate('commentLabel')}</label>
<md-icon md-svg-icon="primo-actions:citation" class="md-primoExplore-theme"></md-icon>
<input md-autofocus="true" ng-model="dialog.result.comment" placeholder="&#8230;">
</md-input-container>
<h2 class="md-title">${this.translate('popupTitle')}</h2>
<br>
<div class="md-dialog-content-body">
<div>
<div flex="">
<md-input-container class="md-prompt-input-container md-primoExplore-theme">
<label style="font-weight: bold">${this.translate('commentLabel')}</label>
<md-icon md-svg-icon="primo-actions:citation" class="md-primoExplore-theme"></md-icon>
<input md-autofocus="true" ng-model="dialog.result.comment" placeholder="&#8230;">
</md-input-container>
</div>
<div flex="">
<md-input-container class="md-prompt-input-container md-primoExplore-theme">
<label style="font-weight: bold">${this.translate('contactLabel')}</label>
<md-icon md-svg-icon="primo-actions:email" class="md-primoExplore-theme"></md-icon>
<input name="contact" type="email" ng-model="dialog.result.contact" placeholder="[email protected]">
</md-input-container>
</div>
</div>
<p>${this.translate('popupInfo')}</p>
<details>
<summary>Details</summary>
<dl class="hsg-broken-link-info-list">
<dt>Report Date</dt><dd>${this.info.reportDate}</dd>
<dt>Title</dt><dd>${this.info.title}</dd>
<dt>Creator</dt><dd>${this.info.creator}</dd>
<dt>Creation Date</dt><dd>${this.info.creationdate}</dd>
<dt>Type</dt><dd>${this.info.type}</dd>
<dt>MMS-ID</dt><dd>${this.info.mmsId}</dd>
<dt>Identifier</dt><dd>${this.info.identifier}</dd>
<dt>On Campus</dt><dd>${this.info.onCampus}</dd>
<dt>User Agent</dt><dd>${this.info.userAgent}</dd>
<dt>URL</dt><dd>${this.info.url}</dd>
</dl>
</details>
</div>
<div flex="">
<md-input-container class="md-prompt-input-container md-primoExplore-theme">
<label style="font-weight: bold">${this.translate('contactLabel')}</label>
<md-icon md-svg-icon="primo-actions:email" class="md-primoExplore-theme"></md-icon>
<input ng-model="dialog.result.contact" placeholder="[email protected]">
</md-input-container>
</div>
</div>
<p>${this.translate('popupInfo')}</p>
<dl class="hsg-broken-link-info-list">
<dt>Report Date</dt><dd>${this.info.reportDate}</dd>
<dt>Title</dt><dd>${this.info.title}</dd>
<dt>Creator</dt><dd>${this.info.creator}</dd>
<dt>Creation Date</dt><dd>${this.info.creationdate}</dd>
<dt>Type</dt><dd>${this.info.type}</dd>
<dt>MMS-ID</dt><dd>${this.info.mmsId}</dd>
<dt>Identifier</dt><dd>${this.info.identifier}</dd>
<dt>On Campus</dt><dd>${this.info.onCampus}</dd>
<dt>User Agent</dt><dd>${this.info.userAgent}</dd>
<dt>URL</dt><dd>${this.info.url}</dd>
</dl>
</div>
</md-dialog-content>
<md-dialog-actions>
<button class="md-primary md-cancel-button md-button md-primoExplore-theme md-ink-ripple" type="button" ng-click="dialog.abort()">
${this.translate('cancelLabel')}
</button>
<button class="md-primary md-confirm-button md-button md-ink-ripple md-primoExplore-theme" type="button" ng-click="dialog.hide()">
${this.translate('okLabel')}
</button>
<button class="md-primary md-cancel-button md-button md-primoExplore-theme md-ink-ripple" type="button" ng-click="dialog.abort()">
${this.translate('cancelLabel')}
</button>
<button class="md-primary md-confirm-button md-button md-ink-ripple md-primoExplore-theme" type="button" ng-click="dialog.hide()">
${this.translate('okLabel')}
</button>
</md-dialog-actions>
</from>
</md-dialog>
`
}
Expand All @@ -200,8 +207,10 @@ hsgReportBrokenLinkController.$inject = ['$mdDialog', '$mdMedia', '$http', 'hsgT

export class hsgReportBrokenLinkDialogController {

constructor($mdDialog) {
constructor($mdDialog, hsgTranslatorService, hsgReportBrokenLinkConfig) {
this.$mdDialog = $mdDialog
this.config = hsgReportBrokenLinkConfig
this.translator = hsgTranslatorService
this.result = {}
}

Expand All @@ -210,11 +219,41 @@ export class hsgReportBrokenLinkDialogController {
}

hide() {
return this.$mdDialog.hide(this.result)
if (this.result.contact) {
console.log(this.result)
return this.$mdDialog.hide(this.result)
} else {
let confirm = this.$mdDialog.confirm()
.htmlContent(this.translate('noContactMessage'))
.ok(this.translate('okAnywayLabel'))
.cancel(this.translate('cancelLabel'))
.multiple('true')
const that = this
this.$mdDialog.show(confirm).then(
//ok
function () {

console.log('that.result', that.result)
that.$mdDialog.hide(that.result)
console.log('ok!')
},
// cancel
function () {
console.log('cancel')
})
}
}

translate(key) {
if (!this.config) {
console.log("config missing")
return
}
return this.translator.getLabel(key, this.config)
}
}

hsgReportBrokenLinkDialogController.$inject = ['$mdDialog']
hsgReportBrokenLinkDialogController.$inject = ['$mdDialog', 'hsgTranslatorService', 'hsgReportBrokenLinkConfig']


class LinkInfo {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { hsgDisplayItemPolicyModule } from './hsg-display-item-policy/hsg-display-item-policy.module'
import { slspCugPolicyModule } from './slsp-cug-policy/slsp-cug-policy.module'

export const hsgLocationItemAfterModule = angular
.module('hsgLocationItemAfterModule', [])
.component('prmLocationItemAfter', {
.component('prmLocationItemAfter', {
bindings: { parentCtrl: '<' },
template: `
<hsg-display-item-policy-component after-ctrl="$ctrl"></hsg-display-item-policy-component>
<slsp-cug-policy-component after-ctrl="$ctrl"></slsp-cug-policy-component>
`
})

hsgLocationItemAfterModule.requires.push(hsgDisplayItemPolicyModule.name)
hsgLocationItemAfterModule.requires.push(slspCugPolicyModule.name)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export class slspCugPolicyController {
constructor($scope) {
this.$scope = $scope
}

$doCheck() {
this.parentCtrl = this.afterCtrl.parentCtrl
let userGroup = this.parentCtrl.userSessionManagerService.jwtUtilService.getDecodedToken().userGroup

for (let i = 0; i < this.parentCtrl.loc.items.length; i++) {
if (['GUEST', '01', '02', '03', '04', '05', '06', '11', '12', '13', '14', '15', '16', '17', '18', '91', '92', '98', '99', 'STAFF'].includes(userGroup)) {
this.parentCtrl.loc.items[i].itemFields[1] = ""
} else if (this.parentCtrl.loc.items[i].itemFields[1].trim() !== "") {
this.parentCtrl.loc.items[i].itemFields[3] = ""
}
}
}
}

slspCugPolicyController.$inject = ['$scope']
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { slspCugPolicyController } from './slsp-cug-policy.controller'

export const slspCugPolicyModule = angular
.module('slspCugPolicyModule', [])
.controller('slspCugPolicyController', slspCugPolicyController)
.component('slspCugPolicyComponent', {
bindings: { afterCtrl: '<' },
controller: 'slspCugPolicyController',
})
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ export class slspLoginBoxController {
this.$timeout(() => {
this.parentCtrl = this.afterCtrl.parentCtrl

let buttonHelp = '<p class="parallelLoginDescription" translate="parallel.login.description1"><a href="https://help.switch.ch/eduid/" onclick="window.open(https://help.switch.ch/eduid/);return false;" class="md-primoExplore-theme" style="text-decoration:underline"></a></p>'
let buttonHelp = '<a ng-href="https://help.switch.ch/eduid/" target="_blank" class="parallelLoginDescription"><span translate="parallel.login.description1"></span><svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></svg></a>'

let infoLabel = '<p class="parallelLoginDescription" translate="parallel.login.description2"></p>'

let authMeth1 = angular.element(document.querySelectorAll(`prm-login div > md-content > md-list > md-list-item:nth-child(1)`))
angular.element(authMeth1).append(this.$compile(buttonHelp)(this.$scope)).addClass('authMethSaml')

let authMeth2 = angular.element(document.querySelectorAll(`prm-login div > md-content > md-list > md-list-item:nth-child(2)`))
angular.element(authMeth2).append(this.$compile(infoLabel)(this.$scope)).addClass('authMethAlma')

}, 0)
}
}
Expand Down
12 changes: 12 additions & 0 deletions js/modules/prm-login-after/slsp-login-box/slsp-login-box.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="loginbox-register">
<a ng-href="https://registration.slsp.ch" target="_blank">
<span translate="nui.fulldisplay.otherLocations.register"></span>
<svg width="100%" height="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fit=""
preserveAspectRatio="xMidYMid meet" focusable="false">
<path
d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z">
</path>
</svg>

</a>
</div>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { slspLoginBoxController } from './slsp-login-box.controller'

import { slspLoginBoxHtml } from './slsp-login-box.html'

export const slspLoginBoxModule = angular
.module('slspLoginBoxModule', [])
.controller('slspLoginBoxController', slspLoginBoxController)
.component('slspLoginBoxComponent', {
bindings: { afterCtrl: '<' },
controller: 'slspLoginBoxController',
template: slspLoginBoxHtml
})
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ export class slspMultivolumeRequestController {

$onInit() {
this.parentCtrl = this.afterCtrl.parentCtrl
this.domManipulated = false
}

$doCheck() {
const currentUnavailableVolume = this.parentCtrl.isNoOfferAfterRefine()

if (!this.domManipulated) {
let volumeField = angular.element(document.querySelector('prm-get-it-request .form_item[ng-if="::$ctrl.isCodeEnabledforForm(\'VOLUME\')"]'))
let refineButton = angular.element(document.querySelector('span[ng-if="::$ctrl._tempRapidoLocateSerialMultivolumeOffers"]'))
volumeField.append(refineButton)
this.domManipulated = true
}

if (currentUnavailableVolume !== this.previousUnavailableVolume) {
if (currentUnavailableVolume == true) {
this.disableRequestButton()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { slspUnionLoginBoxModule } from './slsp-union-login-box/slsp-union-login-box.module'

export const hsgUnionCatalogLoginAfterModule = angular
.module('hsgUnionCatalogLoginAfterModule', [])
.component('prmUnionCatalogLoginAfter', {
template: `<slsp-union-login-box-component after-ctrl="$ctrl"></slsp-union-login-box-component>`
})

hsgUnionCatalogLoginAfterModule.requires.push(slspUnionLoginBoxModule.name)
Loading

0 comments on commit 111afa2

Please sign in to comment.