mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Allow empty widget names
Fix resetting widget dialog error message
This commit is contained in:
parent
1104bcfec5
commit
bc50ec11a6
6 changed files with 10 additions and 20 deletions
|
@ -19,6 +19,7 @@ export default WidgetAbstract.extend({
|
|||
if (this.get('editing') === true) {
|
||||
// prepare modal
|
||||
this.set('name', this.get('widget.name'));
|
||||
this.set('errorMessage', null);
|
||||
|
||||
// show modal
|
||||
this.set('isShowingModal', true);
|
||||
|
|
|
@ -188,11 +188,6 @@ export default WidgetAbstract.extend({
|
|||
// verify properties
|
||||
let properties = this.getProperties('name');
|
||||
|
||||
if (properties['name'] === null || properties['name'] === "") {
|
||||
this.set('errorMessage', 'Widget name is missing');
|
||||
return;
|
||||
}
|
||||
|
||||
// set simulator by simulation model name
|
||||
let simulationModelName = this.get('simulationModelName');
|
||||
let self = this;
|
||||
|
|
|
@ -83,6 +83,7 @@ export default WidgetAbstract.extend({
|
|||
if (this.get('editing') === true) {
|
||||
// prepare modal
|
||||
this.set('name', this.get('widget.name'));
|
||||
this.set('errorMessage', null);
|
||||
|
||||
// get simlator name from id
|
||||
let self = this;
|
||||
|
@ -117,11 +118,6 @@ export default WidgetAbstract.extend({
|
|||
// verify properties
|
||||
let properties = this.getProperties('name');
|
||||
|
||||
if (properties['name'] === null || properties['name'] === "") {
|
||||
this.set('errorMessage', 'Widget name is missing');
|
||||
return;
|
||||
}
|
||||
|
||||
// set simulator by simulation model name
|
||||
let simulationModelName = this.get('simulationModelName');
|
||||
let self = this;
|
||||
|
|
|
@ -44,6 +44,7 @@ export default WidgetAbstract.extend({
|
|||
if (this.get('editing') === true) {
|
||||
// prepare modal
|
||||
this.set('name', this.get('widget.name'));
|
||||
this.set('errorMessage', null);
|
||||
|
||||
// get signal mapping for simulation model
|
||||
let self = this;
|
||||
|
@ -82,11 +83,6 @@ export default WidgetAbstract.extend({
|
|||
// verify properties
|
||||
let properties = this.getProperties('name');
|
||||
|
||||
if (properties['name'] === null || properties['name'] === "") {
|
||||
this.set('errorMessage', 'Widget name is missing');
|
||||
return;
|
||||
}
|
||||
|
||||
// set simulator by simulation model name
|
||||
let simulationModelName = this.get('simulationModelName');
|
||||
let self = this;
|
||||
|
|
|
@ -35,6 +35,12 @@
|
|||
{{#modal-dialog attachment="middle center" translucentOverlay=true}}
|
||||
<h1>Plot</h1>
|
||||
|
||||
{{#if errorMessage}}
|
||||
<p>
|
||||
<b>Error:</b> {{errorMessage}}
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
<form class="form-widget-plot" {{action 'submitModal' on='submit'}} >
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -102,9 +108,5 @@
|
|||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{{#if errorMessage}}
|
||||
<p><b>Error:</b> {{errorMessage}}</p>
|
||||
{{/if}}
|
||||
{{/modal-dialog}}
|
||||
{{/if}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{name}}: {{value}}
|
||||
{{name}}{{#if name}}:{{/if}} {{value}}
|
||||
|
||||
{{#if isShowingModal}}
|
||||
{{#modal-dialog attachment="middle center" translucentOverlay=true}}
|
||||
|
|
Loading…
Add table
Reference in a new issue