Skip to content

Commit

Permalink
Merge pull request #37 from HSG-Library/develop
Browse files Browse the repository at this point in the history
Release v2024.2.13
  • Loading branch information
d22 authored Feb 13, 2024
2 parents 1465976 + a418cbc commit 3e9930d
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 18 deletions.
44 changes: 35 additions & 9 deletions css/00-central-package.css
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,9 @@ span[translate="nui.item.brief.4"] {
display: none !important;
}

/*441 How to get it sections' order*/
/*441 How to get it*/

/*How to get it sections' order*/

prm-opac {
order: 1;
Expand All @@ -2068,6 +2070,30 @@ primo-explore.alert alma-htgi-svc {
font-size: 1em;
}

/*Holding fields display*/

.weak-text.layout-row[ng-repeat="line in $ctrl.currLoc.summaryHoldings.baseSummaryShort track by $index"] {
display: none !important;
}

prm-location prm-location-holdings[ng-if="$ctrl.displayHoldingsInLocationsList"] {
display: none;
}


button.button-as-link.link-alt-color.md-button.md-primoExplore-theme.md-ink-ripple.holding-expand-button,
button.button-as-link.link-alt-color.md-button.md-primoExplore-theme.md-ink-ripple.holding-collapse-button {
line-height: 23px !important;
padding: 1px 10px 1px 0px !important;
margin-top: 10px !important;
margin-left: 0px !important;
background-color: #fff !important;
}

button.button-as-link.link-alt-color.md-button.md-primoExplore-theme.md-ink-ripple.holding-expand-button:hover,
button.button-as-link.link-alt-color.md-button.md-primoExplore-theme.md-ink-ripple.holding-collapse-button:hover {
background-color: #ddd !important;
}

/*442 Filter bar*/

Expand Down Expand Up @@ -3409,12 +3435,12 @@ prm-request-services .md-button.button-as-link,
prm-location-items md-list prm-service-button .md-button.button-as-link,
#rapidoOffer prm-service-physical-best-offer .get_it_btn_digital,
prm-service-physical-best-offer .get_it_btn_physical {
background-color: #3BBFAD !important;
background-color: #4E4A99 !important;
}

@media only screen and (max-width: 599px) {
prm-topbar .top-nav-bar {
border-color: #3BBFAD !important;
border-color: #4E4A99 !important;
}
}

Expand All @@ -3433,7 +3459,7 @@ button.switch-to-simple:hover,
#rapidoOffer prm-service-physical-best-offer .get_it_btn_digital:hover,
prm-service-physical-best-offer .get_it_btn_physical:hover,
prm-resource-type-filter-bar button.md-button.md-primoExplore-theme.md-ink-ripple:hover {
background-color: #83dcd0 !important;
background-color: #393765 !important;
}

/*font color of the primary color*/
Expand Down Expand Up @@ -3465,11 +3491,11 @@ button#get_it_btn_digital,
prm-service-button>button>span,
prm-resource-type-filter-bar .container .box div,
prm-resource-type-filter-bar prm-icon {
color: #14413c !important;
color: #fff !important;
}

button.switch-to-advanced.zero-margin.button-with-icon.md-button.md-primoExplore-theme.md-ink-ripple {
border-color: #14413c !important;
border-color: #fff !important;
}


Expand All @@ -3496,13 +3522,13 @@ button.switch-to-advanced.zero-margin.button-with-icon.md-button.md-primoExplore
.prm-alert-bg,
#rapidoOffer prm-rapido-no-offer-message .main_tile,
.diamond {
background-color: #8dd8d8 !important;
background-color: #99d0d0 !important;
}

.text-highlight,
mark,
prm-location-items>md-list>md-list-item>div>div>div>div>prm-service-button>button {
box-shadow: inset 0 -0.15em 0 0 #8dd8d8;
box-shadow: inset 0 -0.15em 0 0 #99d0d0;
}


Expand All @@ -3513,7 +3539,7 @@ prm-location-items>md-list>md-list-item>div>div>div>div>prm-service-button>butto

div.alert-bar .md-button:hover:not([disabled]),
slsp-edit-personal-details-component a.bar.alert-bar:hover {
background-color: #aff7f7 !important;
background-color: #b6fafa !important;
}


Expand Down
4 changes: 4 additions & 0 deletions css/hsg-resource-type-filterbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ 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;
}

prm-resource-type-filter-bar div.container div.box button:hover span {
box-shadow: none !important;
}
2 changes: 1 addition & 1 deletion html/homepage/homepage_de.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ <h4>swisscovery plus</h4>
</a></span>
</md-card-content>
<md-card-content class="prm-primary-bg" flex-gt-sm="15" layout-align-gt-sm="end">
<a class="ps_link legal" href="https://www.unisg.ch/de/disclosures/allgemeinerechtlicheinformationen"
<a class="ps_link legal" href="https://www.unisg.ch/de/datenschutzerklaerung/"
target="_blank">Rechtliche Informationen</a>
</md-card-content>
<md-card-content class="prm-primary-bg" flex-gt-sm="15" layout-align-gt-sm="end">
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 @@ -227,7 +227,7 @@ <h4>swisscovery plus</h4>
(SLSP).</a></span>
</md-card-content>
<md-card-content class="prm-primary-bg" flex-gt-sm="15" layout-align-gt-sm="end">
<a class="ps_link legal" href="https://www.unisg.ch/en/disclosures/allgemeinerechtlicheinformationen"
<a class="ps_link legal" href="https://www.unisg.ch/en/data-protection-declaration/"
target="_blank">Legal Information</a>
</md-card-content>
<md-card-content class="prm-primary-bg" flex-gt-sm="15" layout-align-gt-sm="end">
Expand Down
7 changes: 6 additions & 1 deletion js/modules/prm-loan-after/hsg-loan-after.module.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { slspRenewItemTextModule } from './slsp-renew-item-text/slsp-renew-item-text.module'
import { slspHideRapidoLoanLinkModule } from './slsp-hide-rapido-loan-link/slsp-hide-rapido-loan-link.module'

export const hsgLoanAfterModule = angular
.module('hsgLoanAfterModule', [])
.component('prmLoanAfter', {
bindings: { parentCtrl: '<' },
template: `<slsp-renew-item-text-component after-ctrl="$ctrl"></slsp-renew-item-text-component>`
template: `
<slsp-renew-item-text-component after-ctrl="$ctrl"></slsp-renew-item-text-component>
<slsp-hide-rapido-loan-link-component after-ctrl="$ctrl"></slsp-hide-rapido-loan-link-component>
`
})

hsgLoanAfterModule.requires.push(slspRenewItemTextModule.name)
hsgLoanAfterModule.requires.push(slspHideRapidoLoanLinkModule.name)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export class slspHideRapidoLoanLinkController {
constructor($element) {
this.itemType = null
this.itemBarcode = null
this.hideTitle = false
this.$element = $element
}

$onInit() {
this.parentCtrl = this.afterCtrl.parentCtrl
this.itemBarcode = this.parentCtrl.item.itembarcode
this.itemType = this.parentCtrl.loansService.requestParams.type

if (this.itemBarcode.includes("RAPIDO") || this.itemBarcode.includes("41SLSP")) {
this.setTitle = setTitle
function setTitle() {
return this.parentCtrl.item.title
}
this.hideTitle = true
// Hinzufügen der hide-title Klasse zum Großelternelement prm-loan
this.$element.parent().parent().addClass('hide-title')
}
}
}

slspHideRapidoLoanLinkController.$inject = ['$element']
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div ng-if="$ctrl.itemBarcode.includes('RAPIDO') || $ctrl.itemBarcode.includes('41SLSP')" class="loan-item-title">{{$ctrl.setTitle()}}</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { slspHideRapidoLoanLinkController } from './slsp-hide-rapido-loan-link.controller'
import { slspHideRapidoLoanLinkHtml } from './slsp-hide-rapido-loan-link.html'

export const slspHideRapidoLoanLinkModule = angular
.module('slspHideRapidoLoanLinkModule', [])
.controller('slspHideRapidoLoanLinkController', slspHideRapidoLoanLinkController)
.component('slspHideRapidoLoanLinkComponent', {
bindings: { afterCtrl: '<' },
controller: 'slspHideRapidoLoanLinkController',
template: slspHideRapidoLoanLinkHtml
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const hsgServiceDetailsFoldableItemsConfig = {
ignore: ['lds03'], // use the label property of an entry of 'this.parentCtrl._details'
charCount: 500, // make foldable after that many chars
ignore: [], // use the label property of an entry of 'this.parentCtrl._details'
charCount: 400, // make foldable after that many chars
itemCount: 5, // make foldable after that many items
labels: {
expandButtonLabel: {
Expand All @@ -14,6 +14,6 @@ export const hsgServiceDetailsFoldableItemsConfig = {
},
icons: {
expand: '<md-icon md-svg-icon="hardware:ic_keyboard_arrow_down_24px" class="md-primoExplore-theme"><svg width="100%" height="100%" viewBox="0 0 24 24" id="ic_keyboard_arrow_down_24px_cache154" y="264" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"></path></svg></md-icon>',
collapse: '<md-icon class="hsg-fold-icon-collapse" md-svg-icon="hardware:ic_keyboard_arrow_down_24px" class="md-primoExplore-theme"><svg width="100%" height="100%" viewBox="0 0 24 24" id="ic_keyboard_arrow_down_24px_cache154" y="264" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"></path></svg></md-icon>'
collapse: '<md-icon class="hsg-fold-icon-collapse" md-svg-icon="hardware:ic_keyboard_arrow_down_24px" class="md-primoExplore-theme"><svg width="100%" height="100%" viewBox="0 0 24 24" id="ic_keyboard_arrow_down_24px_cache154" y="264" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"></path></svg></md-icon>',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class hsgServiceDetailsFoldableItemsController {
$onInit() {
this.parentCtrl = this.afterCtrl.parentCtrl

this.parentCtrl.NUMBER_OF_DETAILS_TO_SHOW = 1000
this.rootEl = this.$element.parent().parent().query('div').children()
let that = this
// add a watcher to the root element
Expand Down Expand Up @@ -47,9 +48,12 @@ export class hsgServiceDetailsFoldableItemsController {
let values = detail.values[0].values

let textLength = values[0].length
const configItem = this.config.itemCount
const lowerBound = configItem + 3

if (textLength > this.config.charCount) {
this.addMarkup(this.getItemContainer(key), 1, true)
} else if (values.length > this.config.itemCount) {
} else if (values.length > configItem && values.length >= lowerBound) {
this.addMarkup(this.getItemContainer(key), this.config.itemCount, false)
}
}
Expand Down Expand Up @@ -87,14 +91,14 @@ export class hsgServiceDetailsFoldableItemsController {
collapse.style.display = 'none'
item.appendChild(collapse)

expand.addEventListener('click', function () {
expand.addEventListener('click', () => {
expand.style.display = 'none'
collapse.style.display = 'inline-block'
itemContainer.classList.remove('hsg-collapsed')
itemContainer.classList.add('hsg-expanded')
})

collapse.addEventListener('click', function () {
collapse.addEventListener('click', () => {
itemContainer.classList.add('hsg-collapsed')
itemContainer.classList.remove('hsg-expanded')
expand.style.display = 'inline-block'
Expand Down

0 comments on commit 3e9930d

Please sign in to comment.