j1-template 2022.0.17 → 2022.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/error_pages/HTTP204.html +1 -1
- data/assets/error_pages/HTTP400.html +1 -1
- data/assets/error_pages/HTTP401.html +1 -1
- data/assets/error_pages/HTTP403.html +1 -1
- data/assets/error_pages/HTTP404.html +1 -1
- data/assets/error_pages/HTTP444.html +1 -1
- data/assets/error_pages/HTTP445.html +1 -1
- data/assets/error_pages/HTTP446.html +1 -1
- data/assets/error_pages/HTTP447.html +1 -1
- data/assets/error_pages/HTTP448.html +1 -1
- data/assets/error_pages/HTTP500.html +1 -1
- data/assets/error_pages/HTTP501.html +1 -1
- data/assets/error_pages/HTTP502.html +1 -1
- data/assets/error_pages/HTTP503.html +1 -1
- data/assets/themes/j1/adapter/js/customFunctions.js +221 -0
- data/assets/themes/j1/adapter/js/customModule.js +221 -0
- data/assets/themes/j1/adapter/js/dropdowns.js +319 -0
- data/assets/themes/j1/adapter/js/rtable.js +2 -6
- data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.css +109 -0
- data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.min.css +15 -0
- data/assets/themes/j1/modules/dropdowns/js/cash.js +978 -0
- data/assets/themes/j1/modules/dropdowns/js/dropdowns.js +864 -0
- data/lib/j1/commands/generate.rb +25 -14
- data/lib/j1/commands/rebuild.rb +1 -0
- data/lib/j1/commands/reset.rb +6 -3
- data/lib/j1/commands/setup.rb +18 -13
- data/lib/j1/commands/site.rb +2 -1
- data/lib/j1/utils/exec2.rb +33 -7
- data/lib/j1/version.rb +3 -3
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/apps/carousel.yml +138 -140
- data/lib/starter_web/_data/blocks/banner.yml +7 -7
- data/lib/starter_web/_data/modules/defaults/dropdowns.yml +164 -0
- data/lib/starter_web/_data/modules/dropdowns.yml +77 -0
- data/lib/starter_web/_data/resources.yml +73 -2
- data/lib/starter_web/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/_plugins/lunr_index.rb +2 -2
- data/lib/starter_web/package.json +2 -2
- data/lib/starter_web/pages/public/about/about_site.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/000_intro.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.ads.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.base.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.comments.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +1 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +1 -1
- data/lib/starter_web/pages/public/manuals/j1-dropdown.adoc +294 -0
- data/lib/starter_web/pages/public/manuals/{dropdown-help.adoc → msdropdown.adoc} +0 -0
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +14 -6
- data/assets/themes/j1/modules/fab/css/theme/uno/fab.css +0 -373
- data/assets/themes/j1/modules/fab/css/theme/uno/fab.min.css +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dda116d7738b5f1ed84d7646c7cbac192174fc5054e030db72b5d1e58e6b859
|
4
|
+
data.tar.gz: 1fef5c086dc78c80f06c151ff6db2cc114e20b52caa1fb2f1d3e85fd58f4317d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6efcb82880b323fc8608f1b2bdde14f9b53357c1d9061102ebc6737fede3883ca20e75f77df43dea30e9c191beff6955e1b2cab04318e948a4cc44afb8f2e829
|
7
|
+
data.tar.gz: 7aa61ebde0962f78c892410455efdac6c11e2d18dde3c246126ed2ed7fd955d21c44c6af4beaacd58074d597af0956261e203ac7ad841df47ab5fa8dcbe0526e
|
@@ -0,0 +1,221 @@
|
|
1
|
+
---
|
2
|
+
regenerate: true
|
3
|
+
---
|
4
|
+
|
5
|
+
{% capture cache %}
|
6
|
+
|
7
|
+
{% comment %}
|
8
|
+
# -----------------------------------------------------------------------------
|
9
|
+
# ~/assets/themes/j1/adapter/js/custom_functions.js
|
10
|
+
# Liquid template to adapt custom functions
|
11
|
+
#
|
12
|
+
# Product/Info:
|
13
|
+
# https://jekyll.one
|
14
|
+
# Copyright (C) 2021 Juergen Adams
|
15
|
+
#
|
16
|
+
# J1 Template is licensed under the MIT License.
|
17
|
+
# For details, see https://jekyll.one
|
18
|
+
# -----------------------------------------------------------------------------
|
19
|
+
# Test data:
|
20
|
+
# {{ liquid_var | debug }}
|
21
|
+
# {{ dropdowns_options | debug }}
|
22
|
+
# -----------------------------------------------------------------------------
|
23
|
+
{% endcomment %}
|
24
|
+
|
25
|
+
{% comment %} Liquid procedures
|
26
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
27
|
+
|
28
|
+
{% comment %} Set global settings
|
29
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
30
|
+
{% assign environment = site.environment %}
|
31
|
+
{% assign asset_path = "/assets/themes/j1" %}
|
32
|
+
|
33
|
+
{% comment %} Process YML config data
|
34
|
+
================================================================================ {% endcomment %}
|
35
|
+
|
36
|
+
{% comment %} Set config files
|
37
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
38
|
+
{% assign template_config = site.data.j1_config %}
|
39
|
+
{% assign blocks = site.data.blocks %}
|
40
|
+
{% assign modules = site.data.modules %}
|
41
|
+
|
42
|
+
{% comment %} Set config data (unused)
|
43
|
+
--------------------------------------------------------------------------------
|
44
|
+
{% assign custom_defaults = modules.defaults.custom.defaults %}
|
45
|
+
{% assign custom_settings = modules.custom.settings %}
|
46
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
47
|
+
|
48
|
+
{% comment %} Set config options (unused)
|
49
|
+
--------------------------------------------------------------------------------
|
50
|
+
{% assign custom_options = custom_defaults | merge: custom_settings %}
|
51
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
52
|
+
|
53
|
+
{% assign production = false %}
|
54
|
+
{% if environment == 'prod' or environment == 'production' %}
|
55
|
+
{% assign production = true %}
|
56
|
+
{% endif %}
|
57
|
+
|
58
|
+
/*
|
59
|
+
# -----------------------------------------------------------------------------
|
60
|
+
# ~/assets/themes/j1/adapter/js/customFunctions.js
|
61
|
+
# J1 Adapter for custom functions
|
62
|
+
#
|
63
|
+
# Product/Info:
|
64
|
+
# https://jekyll.one
|
65
|
+
#
|
66
|
+
# Copyright (C) 2021 Juergen Adams
|
67
|
+
#
|
68
|
+
# J1 Template is licensed under the MIT License.
|
69
|
+
# For details, see https://jekyll.one
|
70
|
+
# -----------------------------------------------------------------------------
|
71
|
+
# Adapter generated: {{site.time}}
|
72
|
+
# -----------------------------------------------------------------------------
|
73
|
+
*/
|
74
|
+
|
75
|
+
// -----------------------------------------------------------------------------
|
76
|
+
// ESLint shimming
|
77
|
+
// -----------------------------------------------------------------------------
|
78
|
+
/* eslint indent: "off" */
|
79
|
+
// -----------------------------------------------------------------------------
|
80
|
+
'use strict';
|
81
|
+
j1.adapter.customFunctions = (function (j1, window) {
|
82
|
+
|
83
|
+
{% comment %} Set global variables
|
84
|
+
------------------------------------------------------------------------------ {% endcomment %}
|
85
|
+
var environment = '{{environment}}';
|
86
|
+
var moduleOptions = {};
|
87
|
+
var instances = [];
|
88
|
+
var frontmatterOptions;
|
89
|
+
var _this;
|
90
|
+
var logger;
|
91
|
+
var logText;
|
92
|
+
|
93
|
+
// ---------------------------------------------------------------------------
|
94
|
+
// Helper functions
|
95
|
+
// ---------------------------------------------------------------------------
|
96
|
+
|
97
|
+
// ---------------------------------------------------------------------------
|
98
|
+
// Main object
|
99
|
+
// ---------------------------------------------------------------------------
|
100
|
+
return {
|
101
|
+
|
102
|
+
// -------------------------------------------------------------------------
|
103
|
+
// Initializer
|
104
|
+
// -------------------------------------------------------------------------
|
105
|
+
init: function (options) {
|
106
|
+
|
107
|
+
// -----------------------------------------------------------------------
|
108
|
+
// Default module settings
|
109
|
+
// -----------------------------------------------------------------------
|
110
|
+
var settings = $.extend({
|
111
|
+
module_name: 'j1.adapter.custom_functions',
|
112
|
+
generated: '{{site.time}}'
|
113
|
+
}, options);
|
114
|
+
|
115
|
+
// -----------------------------------------------------------------------
|
116
|
+
// Global variable settings
|
117
|
+
// -----------------------------------------------------------------------
|
118
|
+
_this = j1.adapter.dropdowns;
|
119
|
+
logger = log4javascript.getLogger('j1.adapter.custom_functions');
|
120
|
+
|
121
|
+
// initialize state flag
|
122
|
+
_this.setState('started');
|
123
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
124
|
+
logger.info('\n' + 'module is being initialized');
|
125
|
+
|
126
|
+
// create settings object from frontmatterOptions
|
127
|
+
frontmatterOptions = options != null ? $.extend({}, options) : {};
|
128
|
+
moduleOptions = $.extend({}, {{dropdowns_options | replace: 'nil', 'null' | replace: '=>', ':' }});
|
129
|
+
|
130
|
+
if (typeof frontmatterOptions !== 'undefined') {
|
131
|
+
moduleOptions = j1.mergeData(moduleOptions, frontmatterOptions);
|
132
|
+
}
|
133
|
+
|
134
|
+
var dependencies_met_j1_finished = setInterval(function() {
|
135
|
+
if (j1.getState() == 'finished') {
|
136
|
+
var elms = document.querySelectorAll('.dropdowns');
|
137
|
+
|
138
|
+
// -------------------------------------------------------------------
|
139
|
+
// Initializer
|
140
|
+
// -------------------------------------------------------------------
|
141
|
+
var log_text = '\n' + 'custom functions are being initialized';
|
142
|
+
logger.info(log_text);
|
143
|
+
|
144
|
+
//
|
145
|
+
// place init code here if required
|
146
|
+
//
|
147
|
+
_this.setState('finished');
|
148
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
149
|
+
|
150
|
+
clearInterval(dependencies_met_j1_finished);
|
151
|
+
} // END dependencies_met_j1_finished
|
152
|
+
}, 25);
|
153
|
+
|
154
|
+
}, // END init
|
155
|
+
|
156
|
+
// -------------------------------------------------------------------------
|
157
|
+
// custom_1
|
158
|
+
// Called by ???
|
159
|
+
// -------------------------------------------------------------------------
|
160
|
+
custom_1: function (options) {
|
161
|
+
var logger = log4javascript.getLogger('j1.adapter.custom_functions.custom_1');
|
162
|
+
|
163
|
+
logText = '\n' + 'entered custom function: custom_1';
|
164
|
+
logger.info(logText);
|
165
|
+
|
166
|
+
return true;
|
167
|
+
},
|
168
|
+
|
169
|
+
// -------------------------------------------------------------------------
|
170
|
+
// messageHandler
|
171
|
+
// Manage messages send from other J1 modules
|
172
|
+
// -------------------------------------------------------------------------
|
173
|
+
messageHandler: function (sender, message) {
|
174
|
+
var json_message = JSON.stringify(message, undefined, 2);
|
175
|
+
|
176
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
177
|
+
logger.debug(logText);
|
178
|
+
|
179
|
+
// -----------------------------------------------------------------------
|
180
|
+
// Process commands|actions
|
181
|
+
// -----------------------------------------------------------------------
|
182
|
+
if (message.type === 'command' && message.action === 'module_initialized') {
|
183
|
+
//
|
184
|
+
// Place handling of command|action here
|
185
|
+
//
|
186
|
+
logger.info('\n' + message.text);
|
187
|
+
}
|
188
|
+
|
189
|
+
//
|
190
|
+
// Place handling of other command|action here
|
191
|
+
//
|
192
|
+
|
193
|
+
return true;
|
194
|
+
}, // END messageHandler
|
195
|
+
|
196
|
+
// -------------------------------------------------------------------------
|
197
|
+
// setState()
|
198
|
+
// Sets the current (processing) state of the module
|
199
|
+
// -------------------------------------------------------------------------
|
200
|
+
setState: function (stat) {
|
201
|
+
_this.state = stat;
|
202
|
+
}, // END setState
|
203
|
+
|
204
|
+
// -------------------------------------------------------------------------
|
205
|
+
// getState()
|
206
|
+
// Returns the current (processing) state of the module
|
207
|
+
// -------------------------------------------------------------------------
|
208
|
+
getState: function () {
|
209
|
+
return _this.state;
|
210
|
+
} // END getState
|
211
|
+
|
212
|
+
}; // END return
|
213
|
+
})(j1, window);
|
214
|
+
|
215
|
+
{% endcapture %}
|
216
|
+
{% if production %}
|
217
|
+
{{ cache | minifyJS }}
|
218
|
+
{% else %}
|
219
|
+
{{ cache | strip_empty_lines }}
|
220
|
+
{% endif %}
|
221
|
+
{% assign cache = nil %}
|
@@ -0,0 +1,221 @@
|
|
1
|
+
---
|
2
|
+
regenerate: true
|
3
|
+
---
|
4
|
+
|
5
|
+
{% capture cache %}
|
6
|
+
|
7
|
+
{% comment %}
|
8
|
+
# -----------------------------------------------------------------------------
|
9
|
+
# ~/assets/themes/j1/adapter/js/customModule.js
|
10
|
+
# Liquid template to adapt a custom module
|
11
|
+
#
|
12
|
+
# Product/Info:
|
13
|
+
# https://jekyll.one
|
14
|
+
# Copyright (C) 2021 Juergen Adams
|
15
|
+
#
|
16
|
+
# J1 Template is licensed under the MIT License.
|
17
|
+
# For details, see https://jekyll.one
|
18
|
+
# -----------------------------------------------------------------------------
|
19
|
+
# Test data:
|
20
|
+
# {{ liquid_var | debug }}
|
21
|
+
# {{ dropdowns_options | debug }}
|
22
|
+
# -----------------------------------------------------------------------------
|
23
|
+
{% endcomment %}
|
24
|
+
|
25
|
+
{% comment %} Liquid procedures
|
26
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
27
|
+
|
28
|
+
{% comment %} Set global settings
|
29
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
30
|
+
{% assign environment = site.environment %}
|
31
|
+
{% assign asset_path = "/assets/themes/j1" %}
|
32
|
+
|
33
|
+
{% comment %} Process YML config data
|
34
|
+
================================================================================ {% endcomment %}
|
35
|
+
|
36
|
+
{% comment %} Set config files
|
37
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
38
|
+
{% assign template_config = site.data.j1_config %}
|
39
|
+
{% assign blocks = site.data.blocks %}
|
40
|
+
{% assign modules = site.data.modules %}
|
41
|
+
|
42
|
+
{% comment %} Set config data (unused)
|
43
|
+
--------------------------------------------------------------------------------
|
44
|
+
{% assign custom_module_defaults = modules.defaults.custom_module.defaults %}
|
45
|
+
{% assign custom_module_settings = modules.custom_module.settings %}
|
46
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
47
|
+
|
48
|
+
{% comment %} Set config options (unused)
|
49
|
+
--------------------------------------------------------------------------------
|
50
|
+
{% assign custom_module_options = custom_module_defaults | merge: custom_module_settings %}
|
51
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
52
|
+
|
53
|
+
{% assign production = false %}
|
54
|
+
{% if environment == 'prod' or environment == 'production' %}
|
55
|
+
{% assign production = true %}
|
56
|
+
{% endif %}
|
57
|
+
|
58
|
+
/*
|
59
|
+
# -----------------------------------------------------------------------------
|
60
|
+
# ~/assets/themes/j1/adapter/js/customModule.js
|
61
|
+
# J1 Adapter for custom module
|
62
|
+
#
|
63
|
+
# Product/Info:
|
64
|
+
# https://jekyll.one
|
65
|
+
#
|
66
|
+
# Copyright (C) 2021 Juergen Adams
|
67
|
+
#
|
68
|
+
# J1 Template is licensed under the MIT License.
|
69
|
+
# For details, see https://jekyll.one
|
70
|
+
# -----------------------------------------------------------------------------
|
71
|
+
# Adapter generated: {{site.time}}
|
72
|
+
# -----------------------------------------------------------------------------
|
73
|
+
*/
|
74
|
+
|
75
|
+
// -----------------------------------------------------------------------------
|
76
|
+
// ESLint shimming
|
77
|
+
// -----------------------------------------------------------------------------
|
78
|
+
/* eslint indent: "off" */
|
79
|
+
// -----------------------------------------------------------------------------
|
80
|
+
'use strict';
|
81
|
+
j1.adapter.customModule = (function (j1, window) {
|
82
|
+
|
83
|
+
{% comment %} Set global variables
|
84
|
+
------------------------------------------------------------------------------ {% endcomment %}
|
85
|
+
var environment = '{{environment}}';
|
86
|
+
var moduleOptions = {};
|
87
|
+
var instances = [];
|
88
|
+
var frontmatterOptions;
|
89
|
+
var _this;
|
90
|
+
var logger;
|
91
|
+
var logText;
|
92
|
+
|
93
|
+
// ---------------------------------------------------------------------------
|
94
|
+
// Helper functions
|
95
|
+
// ---------------------------------------------------------------------------
|
96
|
+
|
97
|
+
// ---------------------------------------------------------------------------
|
98
|
+
// Main object
|
99
|
+
// ---------------------------------------------------------------------------
|
100
|
+
return {
|
101
|
+
|
102
|
+
// -------------------------------------------------------------------------
|
103
|
+
// Initializer
|
104
|
+
// -------------------------------------------------------------------------
|
105
|
+
init: function (options) {
|
106
|
+
|
107
|
+
// -----------------------------------------------------------------------
|
108
|
+
// Default module settings
|
109
|
+
// -----------------------------------------------------------------------
|
110
|
+
var settings = $.extend({
|
111
|
+
module_name: 'j1.adapter.customModule',
|
112
|
+
generated: '{{site.time}}'
|
113
|
+
}, options);
|
114
|
+
|
115
|
+
// -----------------------------------------------------------------------
|
116
|
+
// Global variable settings
|
117
|
+
// -----------------------------------------------------------------------
|
118
|
+
_this = j1.adapter.dropdowns;
|
119
|
+
logger = log4javascript.getLogger('j1.adapter.customModule');
|
120
|
+
|
121
|
+
// initialize state flag
|
122
|
+
_this.setState('started');
|
123
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
124
|
+
logger.info('\n' + 'module is being initialized');
|
125
|
+
|
126
|
+
// create settings object from frontmatterOptions
|
127
|
+
frontmatterOptions = options != null ? $.extend({}, options) : {};
|
128
|
+
moduleOptions = $.extend({}, {{dropdowns_options | replace: 'nil', 'null' | replace: '=>', ':' }});
|
129
|
+
|
130
|
+
if (typeof frontmatterOptions !== 'undefined') {
|
131
|
+
moduleOptions = j1.mergeData(moduleOptions, frontmatterOptions);
|
132
|
+
}
|
133
|
+
|
134
|
+
var dependencies_met_j1_finished = setInterval(function() {
|
135
|
+
if (j1.getState() == 'finished') {
|
136
|
+
var elms = document.querySelectorAll('.dropdowns');
|
137
|
+
|
138
|
+
// -------------------------------------------------------------------
|
139
|
+
// Initializer
|
140
|
+
// -------------------------------------------------------------------
|
141
|
+
var log_text = '\n' + 'custom functions are being initialized';
|
142
|
+
logger.info(log_text);
|
143
|
+
|
144
|
+
//
|
145
|
+
// place init code here if required
|
146
|
+
//
|
147
|
+
_this.setState('finished');
|
148
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
149
|
+
|
150
|
+
clearInterval(dependencies_met_j1_finished);
|
151
|
+
} // END dependencies_met_j1_finished
|
152
|
+
}, 25);
|
153
|
+
|
154
|
+
}, // END init
|
155
|
+
|
156
|
+
// -------------------------------------------------------------------------
|
157
|
+
// custom_module_1
|
158
|
+
// Called by ???
|
159
|
+
// -------------------------------------------------------------------------
|
160
|
+
custom_module_1: function (options) {
|
161
|
+
var logger = log4javascript.getLogger('j1.adapter.customModule.custom_module_1');
|
162
|
+
|
163
|
+
logText = '\n' + 'entered custom function: custom_module_1';
|
164
|
+
logger.info(logText);
|
165
|
+
|
166
|
+
return true;
|
167
|
+
},
|
168
|
+
|
169
|
+
// -------------------------------------------------------------------------
|
170
|
+
// messageHandler
|
171
|
+
// Manage messages send from other J1 modules
|
172
|
+
// -------------------------------------------------------------------------
|
173
|
+
messageHandler: function (sender, message) {
|
174
|
+
var json_message = JSON.stringify(message, undefined, 2);
|
175
|
+
|
176
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
177
|
+
logger.debug(logText);
|
178
|
+
|
179
|
+
// -----------------------------------------------------------------------
|
180
|
+
// Process commands|actions
|
181
|
+
// -----------------------------------------------------------------------
|
182
|
+
if (message.type === 'command' && message.action === 'module_initialized') {
|
183
|
+
//
|
184
|
+
// Place handling of command|action here
|
185
|
+
//
|
186
|
+
logger.info('\n' + message.text);
|
187
|
+
}
|
188
|
+
|
189
|
+
//
|
190
|
+
// Place handling of other command|action here
|
191
|
+
//
|
192
|
+
|
193
|
+
return true;
|
194
|
+
}, // END messageHandler
|
195
|
+
|
196
|
+
// -------------------------------------------------------------------------
|
197
|
+
// setState()
|
198
|
+
// Sets the current (processing) state of the module
|
199
|
+
// -------------------------------------------------------------------------
|
200
|
+
setState: function (stat) {
|
201
|
+
_this.state = stat;
|
202
|
+
}, // END setState
|
203
|
+
|
204
|
+
// -------------------------------------------------------------------------
|
205
|
+
// getState()
|
206
|
+
// Returns the current (processing) state of the module
|
207
|
+
// -------------------------------------------------------------------------
|
208
|
+
getState: function () {
|
209
|
+
return _this.state;
|
210
|
+
} // END getState
|
211
|
+
|
212
|
+
}; // END return
|
213
|
+
})(j1, window);
|
214
|
+
|
215
|
+
{% endcapture %}
|
216
|
+
{% if production %}
|
217
|
+
{{ cache | minifyJS }}
|
218
|
+
{% else %}
|
219
|
+
{{ cache | strip_empty_lines }}
|
220
|
+
{% endif %}
|
221
|
+
{% assign cache = nil %}
|