Skip to content

Commit 48fb2a3

Browse files
authored
Merge pull request #70 from mendix/fix-deprecation
Fix the deprecation warning and add nvmrc
2 parents cfe74c3 + 2b23f61 commit 48fb2a3

File tree

5 files changed

+45
-25
lines changed

5 files changed

+45
-25
lines changed

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v12

package-lock.json

+31-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "HTMLSnippet",
3-
"version": "3.9.7",
3+
"version": "3.9.8",
44
"description": "",
55
"license": "",
66
"author": "",

src/HTMLSnippet/widget/HTMLSnippet.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ define([
3535
contextObj: null,
3636

3737
postCreate: function () {
38-
mx.logger.debug(this.id + ".postCreate");
38+
console.debug(this.id + ".postCreate");
3939
this._setupEvents();
4040

4141
if (!this.refreshOnContextChange) {
@@ -44,7 +44,7 @@ define([
4444
},
4545

4646
executeCode: function () {
47-
mx.logger.debug(this.id + ".executeCode");
47+
console.debug(this.id + ".executeCode");
4848
var external = this.contentsPath !== "" ? true : false;
4949
switch (this.contenttype) {
5050
case "html":
@@ -99,7 +99,7 @@ define([
9999
},
100100

101101
update: function (obj, callback) {
102-
mx.logger.debug(this.id + ".update");
102+
console.debug(this.id + ".update");
103103
this.contextObj = obj;
104104
if (this.refreshOnContextChange) {
105105
this.executeCode();
@@ -123,7 +123,7 @@ define([
123123
},
124124

125125
_setupEvents: function () {
126-
mx.logger.debug(this.id + "._setupEvents");
126+
console.debug(this.id + "._setupEvents");
127127
if (this.onclickmf) {
128128
this.connect(
129129
this.domNode,
@@ -134,7 +134,7 @@ define([
134134
},
135135

136136
_executeMicroflow: function () {
137-
mx.logger.debug(this.id + "._executeMicroflow");
137+
console.debug(this.id + "._executeMicroflow");
138138
if (this.onclickmf) {
139139
var params = {
140140
actionname: this.onclickmf
@@ -146,19 +146,19 @@ define([
146146
mx.data.action({
147147
params: params,
148148
callback: function (obj) {
149-
mx.logger.debug(
149+
console.debug(
150150
this.id + " (executed microflow successfully)."
151151
);
152152
},
153153
error: function (error) {
154-
mx.logger.error(this.id + error);
154+
console.error(this.id + error);
155155
}
156156
});
157157
}
158158
},
159159

160160
evalJs: function () {
161-
mx.logger.debug(this.id + ".evalJS");
161+
console.debug(this.id + ".evalJS");
162162
try {
163163
eval(this.contents + "\r\n//# sourceURL=" + this.id + ".js");
164164
} catch (error) {
@@ -167,7 +167,7 @@ define([
167167
},
168168

169169
_evalJQueryCode: function () {
170-
mx.logger.debug(this.id + "._evalJQueryCode");
170+
console.debug(this.id + "._evalJQueryCode");
171171
require(["jquery"], lang.hitch(this, function(jQuery){
172172
try {
173173
(function (snippetCode) {
@@ -197,7 +197,7 @@ define([
197197
},
198198

199199
_handleError: function (error) {
200-
mx.logger.debug(this.id + "._handleError");
200+
console.debug(this.id + "._handleError");
201201
domConstruct.place(
202202
'<div class="alert alert-danger">Error while evaluating javascript input: ' +
203203
error +
@@ -208,7 +208,7 @@ define([
208208
},
209209

210210
_executeCallback: function (cb, from) {
211-
mx.logger.debug(this.id + "._executeCallback" + (from ? " from " + from : ""));
211+
console.debug(this.id + "._executeCallback" + (from ? " from " + from : ""));
212212
if (cb && typeof cb === "function") {
213213
cb();
214214
}

src/package.xml

+1-1
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="HTMLSnippet" version="3.9.7" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="HTMLSnippet" version="3.9.8" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="HTMLSnippet/HTMLSnippet.xml"/>
66
<widgetFile path="HTMLSnippet/HTMLSnippetContext.xml"/>

0 commit comments

Comments
 (0)