Skip to content
Snippets Groups Projects
Commit 7bf03db3 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Merge branch 'master' into provider-component

parents 4c1a9909 4b6be2af
No related branches found
No related tags found
No related merge requests found
Showing
with 71 additions and 21 deletions
......@@ -13,7 +13,8 @@
},
"routing_name": "example",
"activities": [
{"path": "example.metadata.json"}
{"path": "example.metadata.json"},
{"path": "example2.metadata.json"}
],
"attributes": []
}
\ No newline at end of file
{
"element": "dbp-activity-example",
"module_src": "dbp-activity-example.js",
"routing_name": "activity-example2",
"name": {
"de": "Beispielaktivität 2",
"en": "Example Activity 2"
},
"short_name": {
"de": "Beispielaktivität 2",
"en": "Example Activity 2"
},
"description": {
"de": "Eine Beschreibung",
"en": "A Description"
}
}
......@@ -45,7 +45,7 @@
"watch": "npm run watch-local",
"watch-local": "rollup -c --watch",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true",
"lint": "eslint ."
}
}
......@@ -65,6 +65,10 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
this.matomo = null;
this._attrObserver = new MutationObserver(this.onAttributeObserved);
this.shellName = 'TU Graz';
this.shellSubname= 'Graz University of Technology';
this.noBrand = false;
}
static get scopedElements() {
......@@ -233,7 +237,10 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
_loginStatus: { type: Boolean, attribute: false },
matomoUrl: { type: String, attribute: "matomo-url" },
matomoSiteId: { type: Number, attribute: "matomo-site-id" },
noWelcomePage: { type: Boolean, attribute: "no-welcome-page" }
noWelcomePage: { type: Boolean, attribute: "no-welcome-page" },
shellName: { type: String, attribute: "shell-name" },
shellSubname: { type: String, attribute: "shell-subname" },
noBrand: { type: Boolean, attribute: "no-brand" }
};
}
......@@ -624,6 +631,12 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
aside .menu {
border-bottom: black 1px solid;
border-top-width: 0;
width: 100%;
position: absolute;
background-color: white;
z-index: 10;
overflow-y: scroll;
white-space: nowrap;
}
.menu li {
......@@ -644,8 +657,6 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
ul.menu.hidden {
display: none;
}
}
`;
}
......@@ -762,18 +773,17 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
</div>
<div class="hd2-left">
<div class="header">
TU Graz<br>Graz University of Technology
${this.shellName}<br>${this.shellSubname}
</div>
</div>
<div class="hd2-right">
<dbp-tugraz-logo id="main-logo" lang="${this.lang}"></dbp-tugraz-logo>
<dbp-tugraz-logo id="main-logo" lang="${this.lang}" class="${classMap({hidden: this.noBrand})}"></dbp-tugraz-logo>
</div>
</header>
<div id="headline">
<h1 class="title">${this.topicMetaDataText('name')}</h1>
</div>
<aside>
<h2 class="subtitle" @click="${this.toggleMenu}">
${this.subtitle}
......
......@@ -31,7 +31,8 @@ class ActivityExample extends LitElement {
render() {
return html`
<p>${ i18n.t('activity-example.hello-world') }</p>
<h3>${i18n.t('activity-example.hello-world')}</h3>
<ul>${(Array.from(Array(100).keys())).map(i => html`<li>${i18n.t('activity-example.hello-world') + ' ' + i}</li>`)}</ul>
`;
}
}
......
......@@ -2,6 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="dbp-check-in-place-select-demo.js"></script>
</head>
......
......@@ -45,6 +45,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
......@@ -168,6 +168,8 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(LitElement) {
};
},
processResults: function (data) {
that.$('#check-in-place-select-dropdown').addClass('select2-bug');
that.lastResult = data;
let transformed = that.jsonld.transformMembers(data, checkInPlaceContext);
const results = [];
......@@ -185,6 +187,8 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(LitElement) {
}
}
}).on("select2:select", function (e) {
that.$('#check-in-place-select-dropdown').removeClass('select2-bug');
// set custom element attributes
const identifier = e.params.data.id;
const maxCapacity = e.params.data.maximumPhysicalAttendeeCapacity;
......@@ -356,6 +360,10 @@ export class CheckInPlaceSelect extends ScopedElementsMixin(LitElement) {
-webkit-appearance: none;
}
/* https://github.com/select2/select2/issues/5457 */
.select2-bug .loading-results {
display: none !important;
}
`
];
}
......
......@@ -74,6 +74,13 @@ function supportsEval() {
return true;
}
// https://caniuse.com/abortcontroller
function supportsAbortController() {
// AbortController in older Safari is broken, so check for the signal property
// as well.
return (!!window.AbortController && Request.prototype.hasOwnProperty('signal'));
}
function isBrowserSupported() {
if (!supportsEval()) {
console.log("Eval support disabled, skipping browser feature detection.");
......@@ -110,6 +117,11 @@ function isBrowserSupported() {
return false;
}
if (!supportsAbortController()) {
console.log("AbortController not supported");
return false;
}
return true;
}
......
......@@ -29,7 +29,7 @@
"test": "npm run build-test && karma start --singleRun",
"watch": "rollup -c --watch",
"lint": "eslint .",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
},
"dependencies": {
"@open-wc/scoped-elements": "^1.3.2",
......
......@@ -156,7 +156,7 @@ export class LoadingButton extends ScopedElementsMixin(LitElement) {
render() {
return html`
<button class="button ${this.type} loading-container ${!this.loading ? "is-not-loading" : ""}" ?disabled="${this.disabled}">
<div class="label"><slot>${this.value}</slot></div> <dbp-mini-spinner class="spinner" style="display: ${this.loading ? "inline" : "none"}"></dbp-mini-spinner>
<div class="label">${this.value}</div> <dbp-mini-spinner class="spinner" style="display: ${this.loading ? "inline" : "none"}"></dbp-mini-spinner>
</button>
`;
}
......
......@@ -51,6 +51,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
{
"name": "@dbp-toolkit/file-handling",
"version": "0.1.6",
"version": "0.1.5",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
"devDependencies": {
......@@ -46,6 +46,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
......@@ -44,6 +44,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
......@@ -40,6 +40,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
......@@ -41,6 +41,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
......@@ -44,6 +44,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
......@@ -45,6 +45,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
......@@ -47,6 +47,6 @@
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"lint": "eslint .",
"publish": "can-npm-publish --verbose && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment