@@ -35,7 +35,7 @@ define([
35
35
contextObj : null ,
36
36
37
37
postCreate : function ( ) {
38
- logger . debug ( this . id + ".postCreate" ) ;
38
+ mx . logger . debug ( this . id + ".postCreate" ) ;
39
39
this . _setupEvents ( ) ;
40
40
41
41
if ( ! this . refreshOnContextChange ) {
@@ -44,7 +44,7 @@ define([
44
44
} ,
45
45
46
46
executeCode : function ( ) {
47
- logger . debug ( this . id + ".executeCode" ) ;
47
+ mx . logger . debug ( this . id + ".executeCode" ) ;
48
48
var external = this . contentsPath !== "" ? true : false ;
49
49
switch ( this . contenttype ) {
50
50
case "html" :
@@ -99,7 +99,7 @@ define([
99
99
} ,
100
100
101
101
update : function ( obj , callback ) {
102
- logger . debug ( this . id + ".update" ) ;
102
+ mx . logger . debug ( this . id + ".update" ) ;
103
103
this . contextObj = obj ;
104
104
if ( this . refreshOnContextChange ) {
105
105
this . executeCode ( ) ;
@@ -123,7 +123,7 @@ define([
123
123
} ,
124
124
125
125
_setupEvents : function ( ) {
126
- logger . debug ( this . id + "._setupEvents" ) ;
126
+ mx . logger . debug ( this . id + "._setupEvents" ) ;
127
127
if ( this . onclickmf ) {
128
128
this . connect (
129
129
this . domNode ,
@@ -134,32 +134,31 @@ define([
134
134
} ,
135
135
136
136
_executeMicroflow : function ( ) {
137
- logger . debug ( this . id + "._executeMicroflow" ) ;
137
+ mx . logger . debug ( this . id + "._executeMicroflow" ) ;
138
138
if ( this . onclickmf ) {
139
- var params = { } ;
139
+ var params = {
140
+ actionname : this . onclickmf
141
+ } ;
140
142
if ( this . contextObj !== null ) {
141
143
params . applyto = "selection" ;
142
144
params . guids = [ this . contextObj . getGuid ( ) ] ;
143
145
}
144
- mx . ui . action (
145
- this . onclickmf , {
146
- params : params ,
147
- callback : function ( obj ) {
148
- logger . debug (
149
- this . id + " (executed microflow successfully)."
150
- ) ;
151
- } ,
152
- error : function ( error ) {
153
- logger . error ( this . id + error ) ;
154
- }
146
+ mx . data . action ( {
147
+ params : params ,
148
+ callback : function ( obj ) {
149
+ mx . logger . debug (
150
+ this . id + " (executed microflow successfully)."
151
+ ) ;
155
152
} ,
156
- this
157
- ) ;
153
+ error : function ( error ) {
154
+ mx . logger . error ( this . id + error ) ;
155
+ }
156
+ } ) ;
158
157
}
159
158
} ,
160
159
161
160
evalJs : function ( ) {
162
- logger . debug ( this . id + ".evalJS" ) ;
161
+ mx . logger . debug ( this . id + ".evalJS" ) ;
163
162
try {
164
163
eval ( this . contents + "\r\n//# sourceURL=" + this . id + ".js" ) ;
165
164
} catch ( error ) {
@@ -168,7 +167,7 @@ define([
168
167
} ,
169
168
170
169
_evalJQueryCode : function ( ) {
171
- logger . debug ( this . id + "._evalJQueryCode" ) ;
170
+ mx . logger . debug ( this . id + "._evalJQueryCode" ) ;
172
171
require ( [ "jquery" ] , lang . hitch ( this , function ( jQuery ) {
173
172
try {
174
173
( function ( snippetCode ) {
@@ -198,7 +197,7 @@ define([
198
197
} ,
199
198
200
199
_handleError : function ( error ) {
201
- logger . debug ( this . id + "._handleError" ) ;
200
+ mx . logger . debug ( this . id + "._handleError" ) ;
202
201
domConstruct . place (
203
202
'<div class="alert alert-danger">Error while evaluating javascript input: ' +
204
203
error +
@@ -209,7 +208,7 @@ define([
209
208
} ,
210
209
211
210
_executeCallback : function ( cb , from ) {
212
- logger . debug ( this . id + "._executeCallback" + ( from ? " from " + from : "" ) ) ;
211
+ mx . logger . debug ( this . id + "._executeCallback" + ( from ? " from " + from : "" ) ) ;
213
212
if ( cb && typeof cb === "function" ) {
214
213
cb ( ) ;
215
214
}
0 commit comments