Skip to content

Commit

Permalink
Bugfix for 'false' condition
Browse files Browse the repository at this point in the history
Bugfixed showing the element in the 'false' condition.
  • Loading branch information
remcos committed Jun 9, 2016
1 parent de13c78 commit 5114071
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ShowByCondition/src/ShowByCondition/widget/ShowByCondition.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
@version : 1
@author : Remco
@date : Fri, 22 Jan 2016 12:45:23 GMT
@copyright :
@license :
@copyright :
@license :
Documentation
========================
Expand All @@ -29,6 +29,7 @@ define([

// Parameters configured in the Modeler.
microflowName: "",
returnValue: "",

// dojo.declare.constructor is called to construct the widget instance. Implement to initialize non-primitive properties.
constructor: function() {
Expand All @@ -40,22 +41,21 @@ define([
// dijit._WidgetBase.postCreate is called after constructing the widget. Implement to do extra setup work.
postCreate: function() {
logger.debug(this.id + ".postCreate");
this.domNode.parentElement.style.display = "none";
},

setParentDisplay : function(display) {
console.log(display);
if (display){
if (display == this.returnValue){
this.domNode.parentElement.style.display = "block";
}
}
},

// mxui.widget._WidgetBase.update is called when context is changed or initialized. Implement to re-render and / or fetch data.
update: function(obj, callback) {
logger.debug(this.id + ".update");

this.domNode.parentElement.style.display = "none";
this.contextGUID = obj.getGuid();

if (this.contextGUID) {
if (this.microflowName != '') {
mx.data.action({
Expand All @@ -72,7 +72,7 @@ define([
}
}, this);
}
}
}
callback();
},

Expand All @@ -86,4 +86,4 @@ define([

require(["ShowByCondition/widget/ShowByCondition"], function() {
"use strict";
});
});
Binary file modified ShowByCondition/test/Widget/ShowByCondition.mpk
Binary file not shown.

0 comments on commit 5114071

Please sign in to comment.