-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from HSG-Library/develop
Release v2013.12.21
- Loading branch information
Showing
19 changed files
with
445 additions
and
135 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) { | ||
|
@@ -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="…"> | ||
</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="…"> | ||
</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> | ||
` | ||
} | ||
|
@@ -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 = {} | ||
} | ||
|
||
|
@@ -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 { | ||
|
5 changes: 4 additions & 1 deletion
5
js/modules/prm-location-item-after/hsg-location-item-after.module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
20 changes: 20 additions & 0 deletions
20
js/modules/prm-location-item-after/slsp-cug-policy/slsp-cug-policy.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
9 changes: 9 additions & 0 deletions
9
js/modules/prm-location-item-after/slsp-cug-policy/slsp-cug-policy.module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
js/modules/prm-login-after/slsp-login-box/slsp-login-box.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
3 changes: 2 additions & 1 deletion
3
js/modules/prm-login-after/slsp-login-box/slsp-login-box.module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
js/modules/prm-union-catalog-login-after/hsg-union-catalog-login-after.module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.