[Fix] Removed localizeContent feature: doesn't work

This commit is contained in:
Robert von Burg 2022-02-01 22:10:49 +01:00
parent eebe6bcb5a
commit e776171bef
2 changed files with 17 additions and 25 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "strolch-wc-dialog-button", "name": "strolch-wc-dialog-button",
"description": "Strolch WebComponent Dialog Button", "description": "Strolch WebComponent Dialog Button",
"version": "0.1.0", "version": "0.1.1",
"authors": [ "authors": [
"Robert von Burg" "Robert von Burg"
], ],
@ -24,7 +24,6 @@
"strolchjs": "strolch-li/strolchjs#^0.4.4", "strolchjs": "strolch-li/strolchjs#^0.4.4",
"strolch-wc-styles": "strolch-li/strolch-wc-styles#^0.3.1", "strolch-wc-styles": "strolch-li/strolch-wc-styles#^0.3.1",
"strolch-wc-util-behavior": "strolch-li/strolch-wc-util-behavior#^0.1.1", "strolch-wc-util-behavior": "strolch-li/strolch-wc-util-behavior#^0.1.1",
"strolch-wc-localize-behavior": "strolch-li/strolch-wc-localize-behavior#^1.1.12",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.1.6", "paper-icon-button": "PolymerElements/paper-icon-button#^1.1.6",
"paper-dialog": "PolymerElements/paper-dialog#^1.1.0", "paper-dialog": "PolymerElements/paper-dialog#^1.1.0",

View File

@ -6,7 +6,6 @@
<link rel="import" href="../strolch-wc-styles/strolch-wc-styles.html"> <link rel="import" href="../strolch-wc-styles/strolch-wc-styles.html">
<link rel="import" href="../strolch-wc-util-behavior/strolch-wc-util-behavior.html"> <link rel="import" href="../strolch-wc-util-behavior/strolch-wc-util-behavior.html">
<link rel="import" href="../strolch-wc-localize-behavior/strolch-wc-localize-behavior.html">
<dom-module id="strolch-wc-dialog-button"> <dom-module id="strolch-wc-dialog-button">
<template> <template>
@ -23,8 +22,8 @@
</style> </style>
<!-- Content --> <!-- Content -->
<paper-icon-button disabled$="{{!dialogContent}}" <paper-icon-button disabled$="[[!dialogContent]]"
icon="{{buttonIcon}}" icon="[[buttonIcon]]"
on-tap="toggleDialog"></paper-icon-button> on-tap="toggleDialog"></paper-icon-button>
<template is="dom-if" if="[[open]]" restamp> <template is="dom-if" if="[[open]]" restamp>
@ -35,21 +34,16 @@
id="paper-dialog" id="paper-dialog"
class="aligned-dialog" class="aligned-dialog"
on-iron-overlay-closed="onClose"> on-iron-overlay-closed="onClose">
<template is="dom-if" if="[[dialogHeadline]]"> <template is="dom-if" if="[[dialogHeadline]]">
<h2>{{dialogHeadline}}</h2> <h2>[[dialogHeadline]]</h2>
</template> </template>
<template is="dom-if" if="[[isDefined(localizeContent)]]">
<p>[[localize(dialogContent)]]</p> <p>[[dialogContent]]</p>
<template is="dom-if" if="[[isNotEmptyString(supplementaryContent)]]"> <template is="dom-if" if="[[isNotEmptyString(supplementaryContent)]]">
<p>[[localize(supplementaryContent)]]</p> <p>[[supplementaryContent]]</p>
</template>
</template>
<template is="dom-if" if="[[!isDefined(localizeContent)]]">
<p>[[dialogContent]]</p>
<template is="dom-if" if="[[isNotEmptyString(supplementaryContent)]]">
<p>[[supplementaryContent]]</p>
</template>
</template> </template>
<template is="dom-if" if="[[linkUrl]]"> <template is="dom-if" if="[[linkUrl]]">
<a href$="[[linkUrl]]" target="_blank"> <a href$="[[linkUrl]]" target="_blank">
<paper-button raised style="margin-bottom: 10px">[[linkName]]</paper-button> <paper-button raised style="margin-bottom: 10px">[[linkName]]</paper-button>
@ -72,7 +66,7 @@
<!-- Behaviors --> <!-- Behaviors -->
behaviors: [ behaviors: [
StrolchUtilBehavior, StrolchLocalizeBehavior StrolchUtilBehavior
], ],
<!-- Properties --> <!-- Properties -->
@ -81,18 +75,17 @@
type: Boolean, type: Boolean,
value: false value: false
}, },
localizeContent: {
type: Boolean,
value: false
},
dialogContent: { dialogContent: {
type: String type: String,
value: null
}, },
supplementaryContent: { supplementaryContent: {
type: String type: String,
value: null
}, },
newPage: { newPage: {
type: String type: String,
value: null
} }
}, },