Skip to content

Commit

Permalink
Merge pull request #70 from mendix/fix-deprecation
Browse files Browse the repository at this point in the history
Fix the deprecation warning and add nvmrc
  • Loading branch information
r0b1n authored Dec 4, 2023
2 parents cfe74c3 + 2b23f61 commit 48fb2a3
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 25 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v12
43 changes: 31 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "HTMLSnippet",
"version": "3.9.7",
"version": "3.9.8",
"description": "",
"license": "",
"author": "",
Expand Down
22 changes: 11 additions & 11 deletions src/HTMLSnippet/widget/HTMLSnippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ define([
contextObj: null,

postCreate: function () {
mx.logger.debug(this.id + ".postCreate");
console.debug(this.id + ".postCreate");
this._setupEvents();

if (!this.refreshOnContextChange) {
Expand All @@ -44,7 +44,7 @@ define([
},

executeCode: function () {
mx.logger.debug(this.id + ".executeCode");
console.debug(this.id + ".executeCode");
var external = this.contentsPath !== "" ? true : false;
switch (this.contenttype) {
case "html":
Expand Down Expand Up @@ -99,7 +99,7 @@ define([
},

update: function (obj, callback) {
mx.logger.debug(this.id + ".update");
console.debug(this.id + ".update");
this.contextObj = obj;
if (this.refreshOnContextChange) {
this.executeCode();
Expand All @@ -123,7 +123,7 @@ define([
},

_setupEvents: function () {
mx.logger.debug(this.id + "._setupEvents");
console.debug(this.id + "._setupEvents");
if (this.onclickmf) {
this.connect(
this.domNode,
Expand All @@ -134,7 +134,7 @@ define([
},

_executeMicroflow: function () {
mx.logger.debug(this.id + "._executeMicroflow");
console.debug(this.id + "._executeMicroflow");
if (this.onclickmf) {
var params = {
actionname: this.onclickmf
Expand All @@ -146,19 +146,19 @@ define([
mx.data.action({
params: params,
callback: function (obj) {
mx.logger.debug(
console.debug(
this.id + " (executed microflow successfully)."
);
},
error: function (error) {
mx.logger.error(this.id + error);
console.error(this.id + error);
}
});
}
},

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

_evalJQueryCode: function () {
mx.logger.debug(this.id + "._evalJQueryCode");
console.debug(this.id + "._evalJQueryCode");
require(["jquery"], lang.hitch(this, function(jQuery){
try {
(function (snippetCode) {
Expand Down Expand Up @@ -197,7 +197,7 @@ define([
},

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

_executeCallback: function (cb, from) {
mx.logger.debug(this.id + "._executeCallback" + (from ? " from " + from : ""));
console.debug(this.id + "._executeCallback" + (from ? " from " + from : ""));
if (cb && typeof cb === "function") {
cb();
}
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="HTMLSnippet" version="3.9.7" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="HTMLSnippet" version="3.9.8" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="HTMLSnippet/HTMLSnippet.xml"/>
<widgetFile path="HTMLSnippet/HTMLSnippetContext.xml"/>
Expand Down

0 comments on commit 48fb2a3

Please sign in to comment.