Compare commits

...

10 Commits

2 changed files with 14 additions and 12 deletions

View File

@ -1,7 +1,7 @@
{
"name": "strolch-wc-information-dialog",
"description": "Strolch WebComponent Information Dialog",
"version": "0.1.7",
"version": "0.1.16",
"authors": [
"Robert von Burg"
],
@ -19,10 +19,11 @@
"homepage": "https://github.com/strolch-li/strolch-wc-information-dialog",
"ignore": [],
"dependencies": {
"strolchjs": "strolch-li/strolchjs#^0.4.3",
"strolch-wc-localize-behavior": "strolch-li/strolch-wc-localize-behavior#^1.1.11",
"strolchjs": "strolch-li/strolchjs#^0.5.3",
"strolch-wc-styles": "strolch-li/strolch-wc-styles#^0.4.7",
"strolch-wc-localize-behavior": "strolch-li/strolch-wc-localize-behavior#^1.1.17",
"polymer": "Polymer/polymer#^1.11.3",
"polymer": "Polymer/polymer#^1.12.0",
"iron-a11y-keys": "PolymerElements/iron-a11y-keys#^1.0.9",

View File

@ -6,20 +6,22 @@
<link rel="import" href="../paper-dialog/paper-dialog.html">
<link rel="import" href="../strolch-wc-localize-behavior/strolch-wc-localize-behavior.html">
<link rel="import" href="../strolch-wc-styles/strolch-wc-app-style.html">
<dom-module id="strolch-wc-information-dialog">
<template>
<!-- Style -->
<style is="custom-style">
:host {
.title {
color: var(--paper-dialog-button-color);
}
</style>
<paper-dialog id="dlg" modal>
<iron-a11y-keys keys="esc" on-keys-pressed="close"></iron-a11y-keys>
<h2>[[title]]</h2>
<h2 class="title">[[title]]</h2>
<p>[[line1]]</p>
@ -55,7 +57,7 @@
<script>
Polymer({
is: "strolch-wc-information-dialog",
is: 'strolch-wc-information-dialog',
behaviors: [
StrolchLocalizeBehavior
],
@ -203,10 +205,9 @@
this.confirmation = true;
}
if (typeof data.cancelable === "boolean")
this.cancelable = data.cancelable;
if (typeof data.closeable === "boolean")
this.closeable = data.closeable;
if (this.confirmation)
this.cancelable = !(typeof data.cancelable === "boolean") || data.cancelable;
this.closeable = typeof data.closeable === "boolean" && data.closeable;
console.log("Message: " + this.title + ': ' + this.line1);
this.$.dlg.notifyResize();