-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguageCheck.js
More file actions
70 lines (54 loc) · 1.84 KB
/
Copy pathLanguageCheck.js
File metadata and controls
70 lines (54 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
define([
"dojo/_base/declare",
"mxui/widget/_WidgetBase",
"mxui/dom",
"dojo/dom",
"dojo/dom-prop",
"dojo/dom-geometry",
"dojo/dom-class",
"dojo/dom-style",
"dojo/dom-construct",
"dojo/_base/array",
"dojo/_base/lang",
"dojo/text",
"dojo/html",
"dojo/_base/event",
"dijit/registry"
], function (declare, _WidgetBase, dom, dojoDom, dojoProp, dojoGeometry, dojoClass, dojoStyle, dojoConstruct, dojoArray, dojoLang, dojoText, dojoHtml, dojoEvent, dojoRegistry) {
"use strict";
return declare("LanguageCheck.widget.LanguageCheck", [ _WidgetBase ], {
// Internal variables.
_handles: null,
_contextObj: null,
language: "",
constructor: function () {
this._handles = [];
},
postCreate: function () {
logger.debug(this.id + ".postCreate");
},
update: function (obj, callback) {
logger.debug(this.id + ".update");
this._contextObj = obj;
this._updateRendering(callback);
},
resize: function (box) {
logger.debug(this.id + ".resize");
},
uninitialize: function () {
logger.debug(this.id + ".uninitialize");
},
_updateRendering: function (callback) {
logger.debug(this.id + "._updateRendering");
if (this.language !== mx.session.getConfig().uiconfig.locale) {
mx.session.getConfig().uiconfig.locale = this.language;
mx.ui.openForm(this.mxform.path, {callback:function(){
mx.ui.cleanupProgress = true;
}, context:this.mxform._context.trackObject});
mx.ui.hideProgress(0);
}
mendix.lang.nullExec(callback);
}
});
});
require(["LanguageCheck/widget/LanguageCheck"]);