Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit e5b63db

Browse files
author
Jelte Lagendijk
committed
Fix #5: Icon does not appear on EventTrackerButton
1 parent a59004a commit e5b63db

5 files changed

Lines changed: 12 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "GoogleAnalytics",
3-
"version": "3.2.0",
3+
"version": "3.2.1",
44
"description": "",
55
"license": "",
66
"author": "",

src/GoogleAnalytics/EventTrackerButton.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
</enumerationValues>
3535
</property>
3636
<property key="icon" type="image" required="false">
37-
<caption>Image</caption>
37+
<caption>Icon</caption>
3838
<category>Appearance</category>
39-
<description>Image</description>
39+
<description>Icon that appears in front of the caption</description>
4040
</property>
4141

4242
<property key="onclickmf" type="microflow">
@@ -70,7 +70,7 @@
7070
<attributeType name="String"/>
7171
</attributeTypes>
7272
</property>
73-
<property key="value" type="attribute" required="false">
73+
<property key="value" type="attribute" required="false">
7474
<caption>Value</caption>
7575
<category>Behavior</category>
7676
<description>Value</description>

src/GoogleAnalytics/widget/EventTrackerButton.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,23 @@ define("GoogleAnalytics/widget/EventTrackerButton", [
77

88
// Internal variables. Non-primitives created in the prototype are shared between all widget instances.
99
_contextObj: null,
10+
_iconSet: false,
1011

1112
postCreate: function () {
13+
//logger.level(logger.DEBUG);
1214
logger.debug(this.id + ".postCreate");
15+
this._iconSet = (this.icon === "");
1316
this._insertGoogleAnalytics();
1417
this.inherited(arguments);
1518
},
1619

1720
update: function (obj, callback) {
1821
logger.debug(this.id + ".update");
1922
this._contextObj = obj;
23+
if (!this._iconSet) {
24+
this._setIcon(this.icon, false);
25+
this._iconSet = true;
26+
}
2027
callback();
2128
},
2229

src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="GoogleAnalytics" version="3.2.0" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="GoogleAnalytics" version="3.2.1" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="GoogleAnalytics/MasterPageTracker.xml"/>
66
<widgetFile path="GoogleAnalytics/PageTracker.xml"/>

test/widgets/GoogleAnalytics.mpk

115 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)