Skip to content

Commit 12781f1

Browse files
committed
Readability and updated README
Renamed JavaScript function and updated README to include the new onClick microflow and the (already existing 'External File' option
1 parent b850600 commit 12781f1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ For more information on contributing to this repository visit [Contributing to a
1515

1616
* Embed raw HTML
1717
* Embed raw JavaScript
18+
* Load external HTML / JS file
1819

1920
## Dependencies
2021
* Mendix 5.x environment
@@ -25,5 +26,9 @@ For more information on contributing to this repository visit [Contributing to a
2526
Select how the snippet should be rendered. The JavaScript with jQuery option will make sure that jQuery 1.11.3 is loaded and should be available on window.jQuery for the snippet.
2627
* Contents :
2728
The HTML or Javascript to embed.
29+
* External File :
30+
The path to the HTML or JavaScript file you want to add. The root is the theme folder. Will override the Contents section if used.
31+
* On click microflow :
32+
The microflow which should be executed on click. This can be used to, for example, show a page when the snippet is being clicked.
2833
* Documentation :
2934
Documentation of this widget. Should explain its purpose.

src/HTMLSnippet/widget/HTMLSnippet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ require([
6262

6363
_setupEvents: function () {
6464
if (this.onclickmf) {
65-
this.connect(this.domNode, "click", this.execmf)};
65+
this.connect(this.domNode, "click", this._executeMicroflow)};
6666
},
6767

68-
execmf: function () {
68+
_executeMicroflow: function () {
6969
if (this.onclickmf) {
7070
mx.data.action({
7171
store: {

0 commit comments

Comments
 (0)