Grammalecte  Diff

Differences From Artifact [b5c79a2ce5]:

To Artifact [98261d40f5]:


1
2
3
4
5
6

7
8
9
10
11
12
13
1
2
3
4
5

6
7
8
9
10
11
12
13





-
+







// JavaScript
// Panel creator

/* jshint esversion:6, -W097 */
/* jslint esversion:6 */
/* global GrammalectePanel, oGrammalecte, xGrammalectePort, showError, window, document, console */
/* global GrammalectePanel, oGrammalecte, showError, window, document, console */

"use strict";


class GrammalectePanel {

    constructor (sId, sTitle, nWidth, nHeight, bFlexible=true) {
268
269
270
271
272
273
274
275
276
277
278
279

280
281
282
283
284
285
286
287
288
289

290
291
292
293
294
295
296
297
268
269
270
271
272
273
274


275


276



277
278
279
280
281
282

283















-
-

-
-
+
-
-
-






-
+
-
-
-
-
-
-
-
-
    hideMessage () {
        this.xPanelMessageBlock.style.display = "none";
        this.xPanelMessageActionButton.style.display = "none";
    }

    executeButtonAction (sActionName) {
        switch (sActionName) {
            case "":
                break;
            case "restartWorker":
                xGrammalectePort.postMessage({
                    sCommand: "restartWorker",
                oGrammalecteBackgroundPort.restartWorker();
                    dParam: { "nTimeDelay": 10 },
                    dInfo: {}
                });
                this.stopWaitIcon();
                break;
            default:
                console.log("Action inconnue: ", sAction);
        }
    }

}
    openURL (sURL) {
        xGrammalectePort.postMessage({
            sCommand: "openURL",
            dParam: {"sURL": sURL},
            dInfo: {}
        });
    }
}