Skip to content

Commit 8e556fc

Browse files
author
Diego Antonelli
committed
fix: removing deprecated window.logger api
1 parent cd75f86 commit 8e556fc

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

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

src/MicroflowTimer/widget/MicroflowTimer.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ define([
3131
postCreate: function() {
3232
this._handles = [];
3333

34-
if(!(this.microflow && this.callEvent == "callMicroflow" || this.nanoflow.nanoflow && this.callEvent == "callNanoflow")) {
35-
mx.ui.error("No action specified for " + this.callEvent)
34+
if(!(this.microflow && this.callEvent === "callMicroflow" || this.nanoflow.nanoflow && this.callEvent === "callNanoflow")) {
35+
mx.ui.error("No action specified for " + this.callEvent);
3636
}
3737
},
3838

3939
update: function (obj, callback) {
40-
logger.debug(this.id + ".update");
40+
mx.logger.debug(this.id + ".update");
4141

4242
this._contextObj = obj;
4343
this._resetSubscriptions();
@@ -61,7 +61,7 @@ define([
6161
},
6262

6363
_checkTimerStatus: function() {
64-
logger.debug(this.id + "._checkStatus");
64+
mx.logger.debug(this.id + "._checkStatus");
6565

6666
var running, newInterval;
6767

@@ -109,7 +109,7 @@ define([
109109

110110
//Called when the optional timer interval attribute is changed
111111
_intervalChange: function (newInterval) {
112-
logger.debug(this.id + "._intervalChange");
112+
mx.logger.debug(this.id + "._intervalChange");
113113

114114
this.interval = newInterval;
115115

@@ -120,7 +120,7 @@ define([
120120
},
121121

122122
_runTimer: function() {
123-
logger.debug(this.id + "._runTimer", this.interval);
123+
mx.logger.debug(this.id + "._runTimer", this.interval);
124124
if (this.callEvent !== "" && this._contextObj) {
125125
this._timerStarted = true;
126126

@@ -154,16 +154,16 @@ define([
154154
},
155155

156156
_stopTimer: function() {
157-
logger.debug(this.id + "._stopTimer");
157+
mx.logger.debug(this.id + "._stopTimer");
158158
this._timerStarted = false;
159159

160160
if (this._timer !== null) {
161-
logger.debug(this.id + "._stopTimer timer cleared");
161+
mx.logger.debug(this.id + "._stopTimer timer cleared");
162162
clearInterval(this._timer);
163163
this._timer = null;
164164
}
165165
if (this._timeout !== null) {
166-
logger.debug(this.id + "._stopTimer timeout cleared");
166+
mx.logger.debug(this.id + "._stopTimer timeout cleared");
167167
clearTimeout(this._timeout);
168168
this._timeout = null;
169169
}
@@ -173,20 +173,20 @@ define([
173173
if (this._flowRunning === true) {
174174
return;
175175
}
176-
176+
177177
this._flowRunning = true;
178-
178+
179179
if(this.callEvent === "callMicroflow" && this.microflow) {
180-
this._execMf()
180+
this._execMf();
181181
} else if (this.callEvent === "callNanoflow" && this.nanoflow.nanoflow){
182-
this._executeNanoFlow()
182+
this._executeNanoFlow();
183183
} else {
184184
return;
185185
}
186186
},
187187

188188
_execMf: function() {
189-
logger.debug(this.id + "._execMf");
189+
mx.logger.debug(this.id + "._execMf");
190190
if (!this._contextObj) {
191191
return;
192192
}
@@ -200,13 +200,13 @@ define([
200200
},
201201
callback: lang.hitch(this, function(result) {
202202
if (!result) {
203-
logger.debug(this.id + "._execMf callback, stopping timer");
203+
mx.logger.debug(this.id + "._execMf callback, stopping timer");
204204
this._stopTimer();
205205
}
206206
this._flowRunning = false;
207207
}),
208208
error: lang.hitch(this, function(error) {
209-
logger.error(this.id + ": An error ocurred while executing microflow: ", error);
209+
mx.logger.error(this.id + ": An error ocurred while executing microflow: ", error);
210210
this._flowRunning = false;
211211
})
212212
};
@@ -231,13 +231,13 @@ define([
231231
context: this.mxcontext,
232232
callback: lang.hitch(this, function(result) {
233233
if (!result) {
234-
logger.debug(this.id + "._executeNanoFlow callback, stopping timer");
234+
mx.logger.debug(this.id + "._executeNanoFlow callback, stopping timer");
235235
this._stopTimer();
236236
}
237237
this._flowRunning = false;
238238
}),
239239
error: lang.hitch(this, function(error) {
240-
logger.error(this.id + ": An error ocurred while executing nanoflow: ", error);
240+
mx.logger.error(this.id + ": An error ocurred while executing nanoflow: ", error);
241241
this._flowRunning = false;
242242
})
243243
});
@@ -276,12 +276,12 @@ define([
276276
},
277277

278278
_executeCallback: function (cb, from) {
279-
logger.debug(this.id + "._executeCallback" + (from ? " from " + from : ""));
279+
mx.logger.debug(this.id + "._executeCallback" + (from ? " from " + from : ""));
280280
if (cb && typeof cb === "function") {
281281
cb();
282282
}
283283
}
284284
});
285285
});
286286

287-
require(["MicroflowTimer/widget/MicroflowTimer"])
287+
require(["MicroflowTimer/widget/MicroflowTimer"]);

src/package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="MicroflowTimer" version="4.0.2" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="MicroflowTimer" version="4.0.3" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="MicroflowTimer/MicroflowTimer.xml"/>
66
</widgetFiles>
77
<files>
88
<file path="MicroflowTimer/widget/"/>
99
</files>
1010
</clientModule>
11-
</package>
11+
</package>

test/widgets/MicroflowTimer.mpk

9 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)