j1-template 2021.1.9 → 2021.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_app.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_blog_archive.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_collection.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_page.html +4 -1
- data/_includes/themes/j1/layouts/content_generator_post.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_raw.html +1 -1
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +55 -0
- data/_includes/themes/j1/modules/connectors/comment/commento.html +31 -0
- data/_includes/themes/j1/modules/connectors/comment/custom-provider.html +7 -8
- data/_includes/themes/j1/modules/connectors/comment/disqus.html +12 -54
- data/_includes/themes/j1/modules/connectors/comment/facebook.html +7 -8
- data/_includes/themes/j1/modules/connectors/comment/hyvor.html +33 -0
- data/_includes/themes/j1/modules/connectors/comment/just-comments.html +31 -0
- data/_includes/themes/j1/modules/connectors/comments +3 -0
- data/_layouts/default.html +51 -0
- data/assets/data/disqus.js +81 -0
- data/assets/data/hyvor.js +72 -0
- data/assets/error_pages/HTTP204.html +5 -1
- data/assets/error_pages/HTTP400.html +4 -0
- data/assets/error_pages/HTTP401.html +4 -0
- data/assets/error_pages/HTTP403.html +4 -0
- data/assets/error_pages/HTTP404.html +4 -0
- data/assets/error_pages/HTTP444.html +93 -0
- data/assets/error_pages/HTTP500.html +4 -0
- data/assets/error_pages/HTTP501.html +4 -0
- data/assets/error_pages/HTTP502.html +4 -0
- data/assets/error_pages/HTTP503.html +4 -0
- data/assets/themes/j1/adapter/js/algolia.js +10 -10
- data/assets/themes/j1/adapter/js/asciidoctor.js +6 -6
- data/assets/themes/j1/adapter/js/attic.js +17 -17
- data/assets/themes/j1/adapter/js/bmd.js +6 -6
- data/assets/themes/j1/adapter/js/carousel.js +10 -10
- data/assets/themes/j1/adapter/js/clipboard.js +10 -10
- data/assets/themes/j1/adapter/js/cookieConsent.js +68 -41
- data/assets/themes/j1/adapter/js/fam.js +34 -34
- data/assets/themes/j1/adapter/js/framer.js +6 -6
- data/assets/themes/j1/adapter/js/j1.js +531 -231
- data/assets/themes/j1/adapter/js/justifiedGallery.js +11 -11
- data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +19 -19
- data/assets/themes/j1/adapter/js/lightbox.js +6 -6
- data/assets/themes/j1/adapter/js/logger.js +7 -7
- data/assets/themes/j1/adapter/js/mmenu.js +25 -25
- data/assets/themes/j1/adapter/js/navigator.js +52 -49
- data/assets/themes/j1/adapter/js/quicksearch.js +6 -6
- data/assets/themes/j1/adapter/js/rouge.js +7 -7
- data/assets/themes/j1/adapter/js/rtable.js +6 -6
- data/assets/themes/j1/adapter/js/themer.js +145 -94
- data/assets/themes/j1/adapter/js/toccer.js +9 -9
- data/assets/themes/j1/core/js/template.js +24 -4
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +24 -4
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +3 -3
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +35 -23
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +35 -23
- data/assets/themes/j1/modules/lunrSearch/js/quicksearch.js +1 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +19 -19
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +42 -24
- data/lib/starter_web/_data/_defaults/private.default.yml +119 -0
- data/lib/starter_web/_data/j1_config.yml +22 -11
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +2 -1
- data/lib/starter_web/_data/resources.yml +0 -4
- data/lib/starter_web/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/dot.gitignore +1 -1
- data/lib/starter_web/index.html +3 -3
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +3 -0
- data/lib/starter_web/pages/public/blog/navigator/archive.html +4 -0
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +4 -0
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +4 -0
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +5 -1
- data/lib/starter_web/pages/public/blog/navigator/index.html +4 -0
- data/lib/starter_web/pages/public/cookieConsent.adoc +3 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +2 -1
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +0 -2
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +0 -2
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +0 -1
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +0 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +0 -1
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +78 -17
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +3 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +9 -8
- data/assets/themes/j1/adapter/js/themer.1.js +0 -326
- data/assets/themes/j1/modules/util/js/js.cookie.js +0 -163
- data/assets/themes/j1/modules/util/js/lite-url.js +0 -203
- data/assets/themes/j1/modules/util/js/lite-url.min.js +0 -7
- data/assets/themes/j1/modules/util/js/platform.js +0 -1260
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.org.asciidoc +0 -244
@@ -28,14 +28,18 @@ regenerate: true
|
|
28
28
|
{% comment %} Set config files
|
29
29
|
-------------------------------------------------------------------------------- {% endcomment %}
|
30
30
|
{% assign environment = site.environment %}
|
31
|
+
{% assign blocks = site.data.blocks %}
|
31
32
|
{% assign modules = site.data.modules %}
|
33
|
+
{% assign template_config = site.data.j1_config %}
|
32
34
|
|
33
35
|
{% comment %} Set config data
|
34
36
|
-------------------------------------------------------------------------------- {% endcomment %}
|
35
37
|
{% assign consent_defaults = modules.defaults.cookieconsent.defaults %}
|
36
38
|
{% assign consent_settings = modules.cookieconsent.settings %}
|
37
|
-
{% assign tracking_enabled =
|
38
|
-
{% assign tracking_id =
|
39
|
+
{% assign tracking_enabled = template_config.analytics.enabled %}
|
40
|
+
{% assign tracking_id = template_config.analytics.google.tracking_id %}
|
41
|
+
|
42
|
+
{% assign comment_provider = site.data.j1_config.comments.provider %}
|
39
43
|
|
40
44
|
{% comment %} Set config options
|
41
45
|
-------------------------------------------------------------------------------- {% endcomment %}
|
@@ -76,19 +80,27 @@ regenerate: true
|
|
76
80
|
'use strict';
|
77
81
|
|
78
82
|
{% comment %} Main
|
79
|
-
|
83
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
80
84
|
j1.adapter['cookieConsent'] = (function (j1, window) {
|
81
85
|
|
82
86
|
var environment = '{{environment}}';
|
83
87
|
var tracking_enabled = ('{{tracking_enabled}}' === 'true') ? true: false;
|
84
88
|
var tracking_id = '{{tracking_id}}';
|
85
89
|
var tracking_id_valid = (tracking_id.includes('tracking-id')) ? false : true;
|
90
|
+
var comment_provider = '{{comment_provider}}';
|
86
91
|
var moduleOptions = {};
|
87
92
|
var _this;
|
88
93
|
var $modal;
|
89
94
|
var user_cookie;
|
90
95
|
var logger;
|
96
|
+
var url;
|
97
|
+
var baseUrl;
|
98
|
+
var hostname;
|
99
|
+
var domain;
|
100
|
+
var cookie_domain;
|
101
|
+
var secure;
|
91
102
|
var logText;
|
103
|
+
var cookie_written;
|
92
104
|
|
93
105
|
// NOTE: RegEx for tracking_id: ^(G|UA|YT|MO)-[a-zA-Z0-9-]+$
|
94
106
|
// See: https://stackoverflow.com/questions/20411767/how-to-validate-google-analytics-tracking-id-using-a-javascript-function/20412153
|
@@ -110,8 +122,20 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
110
122
|
// -----------------------------------------------------------------------
|
111
123
|
// globals
|
112
124
|
// -----------------------------------------------------------------------
|
113
|
-
_this
|
114
|
-
logger
|
125
|
+
_this = j1.adapter.cookieConsent;
|
126
|
+
logger = log4javascript.getLogger('j1.adapter.cookieConsent');
|
127
|
+
url = new liteURL(window.location.href);
|
128
|
+
baseUrl = url.origin;
|
129
|
+
hostname = url.hostname;
|
130
|
+
domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
131
|
+
secure = (url.protocol.includes('https')) ? true : false;
|
132
|
+
|
133
|
+
// set domain used by cookies
|
134
|
+
if(domain !== 'localhost') {
|
135
|
+
cookie_domain = '.' + hostname;
|
136
|
+
} else {
|
137
|
+
cookie_domain = hostname;
|
138
|
+
}
|
115
139
|
|
116
140
|
// initialize state flag
|
117
141
|
_this.state = 'pending';
|
@@ -141,8 +165,8 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
141
165
|
var dependencies_met_page_ready = setInterval (function (options) {
|
142
166
|
if ( j1.getState() === 'finished' ) {
|
143
167
|
_this.setState('started');
|
144
|
-
logger.info('state: ' + _this.getState());
|
145
|
-
logger.info('module is being initialized');
|
168
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
169
|
+
logger.info('\n' + 'module is being initialized');
|
146
170
|
|
147
171
|
j1.cookieConsent = new BootstrapCookieConsent({
|
148
172
|
contentURL: moduleOptions.contentURL,
|
@@ -151,12 +175,14 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
151
175
|
whitelisted: moduleOptions.whitelisted,
|
152
176
|
reloadPageOnChange: moduleOptions.reloadPageOnChange,
|
153
177
|
xhr_data_element: moduleOptions.xhr_data_element + '-' + moduleOptions.language,
|
178
|
+
sameSite: moduleOptions.sameSite,
|
179
|
+
secure: secure,
|
154
180
|
postSelectionCallback: function () {j1.adapter.cookieConsent.cbCookie()}
|
155
181
|
});
|
156
182
|
|
157
183
|
_this.setState('finished');
|
158
|
-
logger.info('state: ' + _this.getState());
|
159
|
-
logger.debug('module initialized successfully');
|
184
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
185
|
+
logger.debug('\n' + 'module initialized successfully');
|
160
186
|
clearInterval(dependencies_met_page_ready);
|
161
187
|
}
|
162
188
|
});
|
@@ -169,7 +195,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
169
195
|
messageHandler: function (sender, message) {
|
170
196
|
var json_message = JSON.stringify(message, undefined, 2);
|
171
197
|
|
172
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
198
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
173
199
|
logger.debug(logText);
|
174
200
|
|
175
201
|
// -----------------------------------------------------------------------
|
@@ -179,7 +205,7 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
179
205
|
//
|
180
206
|
// Place handling of command|action here
|
181
207
|
//
|
182
|
-
logger.info(message.text);
|
208
|
+
logger.info('\n' + message.text);
|
183
209
|
}
|
184
210
|
|
185
211
|
//
|
@@ -212,33 +238,40 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
212
238
|
// -------------------------------------------------------------------------
|
213
239
|
cbCookie: function () {
|
214
240
|
var gaCookies = j1.findCookie('_ga');
|
215
|
-
var
|
216
|
-
var
|
241
|
+
var j1Cookies = j1.findCookie('j1');
|
242
|
+
var cookie_names = j1.getCookieNames();
|
243
|
+
var user_state = j1.readCookie(cookie_names.user_state);
|
244
|
+
var user_consent = j1.readCookie(cookie_names.user_consent);
|
217
245
|
var json = JSON.stringify(user_consent);
|
218
246
|
var user_agent = platform.ua;
|
219
247
|
|
220
|
-
logger.info('
|
221
|
-
logger.info('
|
248
|
+
logger.info('\n' + 'entered post selection callback from CookieConsent');
|
249
|
+
logger.info('\n' + 'current values from CookieConsent: ' + json);
|
222
250
|
|
223
251
|
// enable cookie button if not visible
|
224
252
|
if ($('#quickLinksCookieButton').css('display') === 'none') {
|
225
253
|
$('#quickLinksCookieButton').css('display', 'block');
|
226
254
|
}
|
227
255
|
|
256
|
+
// jadams, 2021-07-11: moved to j1 adapter (displayPage)
|
228
257
|
// NOTE: Warning needs to be moved to another module
|
229
258
|
// because page is reloaded after selection
|
230
259
|
//
|
231
|
-
if (tracking_enabled && !tracking_id_valid) {
|
232
|
-
|
260
|
+
// if (tracking_enabled && !tracking_id_valid) {
|
261
|
+
// logger.error('\n' + 'tracking enabled, but invalid tracking id found: ' + tracking_id);
|
262
|
+
// } else {
|
263
|
+
// logger.warn('\n' + 'tracking enabled, tracking id found: ' + tracking_id);
|
264
|
+
// }
|
265
|
+
|
266
|
+
// for development only
|
267
|
+
if (environment === 'development') {
|
268
|
+
gaCookies.forEach(item => console.log('cookieConsent: ' + item));
|
269
|
+
j1Cookies.forEach(item => console.log('cookieConsent: ' + item));
|
233
270
|
}
|
234
271
|
|
235
|
-
// local adapter
|
236
|
-
|
237
|
-
// for debugging
|
238
|
-
// gaCookies.forEach(item => console.log('cookieConsent: ' + item));
|
239
|
-
|
240
272
|
if (user_agent.includes('iPad')) {
|
241
|
-
logger.warn('
|
273
|
+
logger.warn('\n' + 'product detected : ' + platform.product);
|
274
|
+
logger.warn('\n' + 'skip deleting (unwanted) cookies for this platform');
|
242
275
|
}
|
243
276
|
|
244
277
|
// Manage Google Analytics OptIn/Out
|
@@ -246,40 +279,34 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
246
279
|
if (tracking_enabled && tracking_id_valid) {
|
247
280
|
GTagOptIn.register(tracking_id);
|
248
281
|
if (user_consent.analyses) {
|
249
|
-
logger.info('
|
282
|
+
logger.info('\n' + 'enable: GA');
|
250
283
|
GTagOptIn.optIn();
|
251
284
|
} else {
|
252
|
-
logger.warn('
|
285
|
+
logger.warn('\n' + 'disable: GA');
|
253
286
|
GTagOptIn.optOut();
|
254
287
|
|
255
288
|
if (!user_agent.includes('iPad')) {
|
256
289
|
gaCookies.forEach(function (item) {
|
257
|
-
logger.warn('
|
258
|
-
j1.removeCookie({name: item,
|
290
|
+
logger.warn('\n' + 'delete GA cookie: ' + item);
|
291
|
+
j1.removeCookie({ name: item, domain: cookie_domain });
|
259
292
|
});
|
260
293
|
}
|
261
294
|
}
|
262
295
|
|
263
|
-
|
296
|
+
// Managing providers for personalization OptIn/Out (Comments|Ads)
|
297
|
+
// moved to J1 adapter
|
298
|
+
|
299
|
+
if (!user_consent.analyses || !user_consent.personalization) {
|
264
300
|
// expire consent|state cookies to session
|
265
|
-
j1.
|
266
|
-
|
267
|
-
data: user_state,
|
268
|
-
samesite: 'Strict'
|
269
|
-
});
|
270
|
-
j1.writeCookie({
|
271
|
-
name: 'j1.user.consent',
|
272
|
-
data: user_consent,
|
273
|
-
samesite: 'Strict'
|
274
|
-
});
|
301
|
+
j1.expireCookie({ name: cookie_names.user_state });
|
302
|
+
j1.expireCookie({ name: cookie_names.user_consent });
|
275
303
|
}
|
276
|
-
|
277
|
-
if (moduleOptions.reloadPageOnChange) {
|
304
|
+
if (moduleOptions.reloadPageOnChange) {
|
278
305
|
// reload current page (skip cache)
|
279
306
|
location.reload(true);
|
280
307
|
}
|
281
|
-
} // END if tracking_enabled
|
282
308
|
|
309
|
+
} // END if tracking_enabled
|
283
310
|
} // END cbCookie
|
284
311
|
|
285
312
|
}; // END return
|
@@ -127,8 +127,8 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
127
127
|
|
128
128
|
// initialize state flag
|
129
129
|
_this.setState('started');
|
130
|
-
logger.info('set module state to: ' + _this.getState());
|
131
|
-
logger.info('module is being initialized');
|
130
|
+
logger.info('\n' + 'set module state to: ' + _this.getState());
|
131
|
+
logger.info('\n' + 'module is being initialized');
|
132
132
|
|
133
133
|
// create settings object from frontmatterOptions
|
134
134
|
var frontmatterOptions = options != null ? $.extend({}, options) : {};
|
@@ -161,7 +161,7 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
161
161
|
|
162
162
|
var dependencies_met_navigator = setInterval(function() {
|
163
163
|
if (j1.adapter.navigator.getState() == 'finished') {
|
164
|
-
logger.info('met dependencies for: navigator');
|
164
|
+
logger.info('\n' + 'met dependencies for: navigator');
|
165
165
|
_this.famLoader(moduleOptions);
|
166
166
|
clearInterval(dependencies_met_navigator);
|
167
167
|
}
|
@@ -175,10 +175,10 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
175
175
|
famLoader: function (famOptions) {
|
176
176
|
|
177
177
|
_this.setState('loading');
|
178
|
-
logger.info('set module state to: ' + _this.getState());
|
179
|
-
logger.info('load HTML data for fam');
|
178
|
+
logger.info('\n' + 'set module state to: ' + _this.getState());
|
179
|
+
logger.info('\n' + 'load HTML data for fam');
|
180
180
|
|
181
|
-
j1.
|
181
|
+
j1.loadHTML({
|
182
182
|
xhr_container_id: famOptions.xhr_container_id,
|
183
183
|
xhr_data_path: famOptions.xhr_data_path,
|
184
184
|
xhr_data_element: famOptions.fam_menu_id },
|
@@ -192,15 +192,15 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
192
192
|
var dependencies_met_fam_initialized = setInterval (function () {
|
193
193
|
if (j1.xhrDOMState['#' + famOptions.xhr_container_id] == 'success' && j1.getState() == 'finished') {
|
194
194
|
_this.setState('loaded');
|
195
|
-
logger.info('set module state to: ' + _this.getState());
|
196
|
-
logger.info('HTML data for fam: ' + _this.getState());
|
195
|
+
logger.info('\n' + 'set module state to: ' + _this.getState());
|
196
|
+
logger.info('\n' + 'HTML data for fam: ' + _this.getState());
|
197
197
|
|
198
198
|
// _this.scrollSpy(famOptions);
|
199
199
|
_this.buttonInitializer(famOptions);
|
200
200
|
|
201
201
|
_this.setState('finished');
|
202
|
-
logger.info('state: ' + _this.getState());
|
203
|
-
logger.info('module initialized successfully');
|
202
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
203
|
+
logger.info('\n' + 'module initialized successfully');
|
204
204
|
|
205
205
|
$('.fam-btn').show();
|
206
206
|
|
@@ -231,14 +231,14 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
231
231
|
//
|
232
232
|
$('a[href="#void"]').click(function(e) {
|
233
233
|
e.preventDefault ? e.preventDefault() : e.returnValue = false;
|
234
|
-
logger.info('bound click event to "#void", suppress default action');
|
234
|
+
logger.info('\n' + 'bound click event to "#void", suppress default action');
|
235
235
|
});
|
236
236
|
|
237
237
|
// check if multiple buttons detected
|
238
238
|
if ( famButtons.length == 1 ) {
|
239
239
|
_this.setState('processing');
|
240
|
-
logger.info('set module state to: ' + _this.getState());
|
241
|
-
logger.info('initialize fam menu');
|
240
|
+
logger.info('\n' + 'set module state to: ' + _this.getState());
|
241
|
+
logger.info('\n' + 'initialize fam menu');
|
242
242
|
|
243
243
|
actionButtonId = famButtons[0].firstElementChild.id;
|
244
244
|
actionMenuId = actionButtonId.replace('_button', '');
|
@@ -281,25 +281,25 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
281
281
|
eventHandler = item.event_handler;
|
282
282
|
// check if eventhandler configured is a SINGLE word
|
283
283
|
if (eventHandler.split(' ').length == 1) {
|
284
|
-
logger.info('register pre-configured eventhandler ' +eventHandler+ ' on id: #' + item.id);
|
284
|
+
logger.info('\n' + 'register pre-configured eventhandler ' +eventHandler+ ' on id: #' + item.id);
|
285
285
|
|
286
286
|
if ( eventHandler === 'open_mmenu_toc' ) {
|
287
287
|
if ($('#j1-toc-mgr').length) {
|
288
|
-
logger.info('found toc in page: enabled');
|
288
|
+
logger.info('\n' + 'found toc in page: enabled');
|
289
289
|
var dependencies_met_toccer_finished = setInterval (function () {
|
290
290
|
if ( j1.adapter.toccer.getState() == 'finished' ) {
|
291
|
-
logger.info('met dependencies for: toccer');
|
291
|
+
logger.info('\n' + 'met dependencies for: toccer');
|
292
292
|
|
293
293
|
// famOptions.mode === 'icon'
|
294
|
-
// ? logger.info('fam mode detected: icon')
|
295
|
-
// : logger.info('fam mode detected: menu');
|
294
|
+
// ? logger.info('\n' + 'fam mode detected: icon')
|
295
|
+
// : logger.info('\n' + 'fam mode detected: menu');
|
296
296
|
|
297
297
|
$('#open_mmenu_toc').show();
|
298
298
|
clearInterval(dependencies_met_toccer_finished);
|
299
299
|
}
|
300
300
|
}, 25); // END dependencies_met_toccer_finished
|
301
301
|
} else {
|
302
|
-
logger.info('found toc in page: disabled');
|
302
|
+
logger.info('\n' + 'found toc in page: disabled');
|
303
303
|
}
|
304
304
|
} else {
|
305
305
|
$('#' + item.id).show();
|
@@ -313,16 +313,16 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
313
313
|
});
|
314
314
|
});
|
315
315
|
} else {
|
316
|
-
logger.info('register custom eventhandler on id: #' + item.id);
|
316
|
+
logger.info('\n' + 'register custom eventhandler on id: #' + item.id);
|
317
317
|
}
|
318
318
|
} else {
|
319
319
|
// alert ('Creating Eventhandler failed on id: #' + item.id);
|
320
|
-
logger.error('
|
320
|
+
logger.error('\n' + 'creating Eventhandler failed on id: #' + item.id);
|
321
321
|
} // END if items (action buttons)
|
322
322
|
});
|
323
323
|
} else {
|
324
324
|
// single action, create FAB
|
325
|
-
logger.info('single action found for FAM, create: FAB');
|
325
|
+
logger.info('\n' + 'single action found for FAM, create: FAB');
|
326
326
|
|
327
327
|
// disable hover event (CSS)
|
328
328
|
// $actionButton.css({'pointer-events': 'none'})
|
@@ -331,7 +331,7 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
331
331
|
eventHandler = item.event_handler;
|
332
332
|
// check if eventhandler configured is a SINGLE word
|
333
333
|
if (eventHandler.split(' ').length == 1) {
|
334
|
-
logger.info('register pre-configured eventhandler ' +eventHandler+ ' on id: #' + actionButtonId);
|
334
|
+
logger.info('\n' + 'register pre-configured eventhandler ' +eventHandler+ ' on id: #' + actionButtonId);
|
335
335
|
|
336
336
|
if (eventHandler === 'scroll_to_top') {
|
337
337
|
// register click event
|
@@ -346,10 +346,10 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
346
346
|
if ( eventHandler === 'open_mmenu_toc' ) {
|
347
347
|
// check if toccer (toc_mgr) is available
|
348
348
|
if ($('#j1-toc-mgr').length) {
|
349
|
-
logger.info('found toc in page: enabled');
|
349
|
+
logger.info('\n' + 'found toc in page: enabled');
|
350
350
|
var dependencies_met_toccer_finished = setInterval (function () {
|
351
351
|
if ( j1.adapter.toccer.getState() == 'finished' ) {
|
352
|
-
logger.info('met dependencies for toccer: finished');
|
352
|
+
logger.info('\n' + 'met dependencies for toccer: finished');
|
353
353
|
// change the id of the $actionButton to the already
|
354
354
|
// registered id by mmenu adapter of ('open_mmenu_toc')
|
355
355
|
// to open the TOC sidebar
|
@@ -359,8 +359,8 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
359
359
|
}
|
360
360
|
}, 25); // END dependencies_met_toccer_finished
|
361
361
|
} else {
|
362
|
-
logger.info('found toc in page: disabled');
|
363
|
-
logger.info('eventhandler: disabled');
|
362
|
+
logger.info('\n' + 'found toc in page: disabled');
|
363
|
+
logger.info('\n' + 'eventhandler: disabled');
|
364
364
|
}
|
365
365
|
} // END if eventHandler == open_mmenu_toc
|
366
366
|
}
|
@@ -368,8 +368,8 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
368
368
|
} // END else
|
369
369
|
} else {
|
370
370
|
// alert ('Multiple FAM buttons found: ' + famButtons.length);
|
371
|
-
logger.error('
|
372
|
-
logger.info('FAM container set to hidden: ' + $famContainer);
|
371
|
+
logger.error('\n' + 'multiple FAM buttons found: ' + famButtons.length);
|
372
|
+
logger.info('\n' + 'FAM container set to hidden: ' + $famContainer);
|
373
373
|
$famContainer.hide();
|
374
374
|
} // END if famButton
|
375
375
|
}, // END buttonInitializer
|
@@ -573,7 +573,7 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
573
573
|
// var json_message = JSON.stringify(message, undefined, 2); // multiline
|
574
574
|
var json_message = JSON.stringify(message);
|
575
575
|
|
576
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
576
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
577
577
|
logger.debug(logText);
|
578
578
|
|
579
579
|
// -----------------------------------------------------------------------
|
@@ -583,10 +583,10 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
583
583
|
//
|
584
584
|
// Place handling of command|action here
|
585
585
|
//
|
586
|
-
logger.info(message.text);
|
586
|
+
logger.info('\n' + message.text);
|
587
587
|
}
|
588
588
|
if (message.type === 'command' && message.action === 'status') {
|
589
|
-
logger.info('messageHandler: received - ' + message.action);
|
589
|
+
logger.info('\n' + 'messageHandler: received - ' + message.action);
|
590
590
|
}
|
591
591
|
|
592
592
|
//
|
@@ -645,8 +645,8 @@ j1.adapter['fam'] = (function (j1, window) {
|
|
645
645
|
? $famContainer.css('display','block')
|
646
646
|
: $famContainer.css('display','none');
|
647
647
|
|
648
|
-
// logger.debug('content pos detected as: ' + m + 'px');
|
649
|
-
// logger.debug('scroll pos detected as: ' + scrollPos + 'px');
|
648
|
+
// logger.debug('\n' + 'content pos detected as: ' + m + 'px');
|
649
|
+
// logger.debug('\n' + 'scroll pos detected as: ' + scrollPos + 'px');
|
650
650
|
}); // END setTop on scroll
|
651
651
|
|
652
652
|
}, // END scrollSpy
|
@@ -115,8 +115,8 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
115
115
|
|
116
116
|
// initialize state flag
|
117
117
|
_this.setState('started');
|
118
|
-
logger.info('state: ' + _this.getState());
|
119
|
-
logger.info('module is being initialized');
|
118
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
119
|
+
logger.info('\n' + 'module is being initialized');
|
120
120
|
|
121
121
|
// -----------------------------------------------------------------------
|
122
122
|
// Default module settings
|
@@ -160,8 +160,8 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
160
160
|
});
|
161
161
|
|
162
162
|
_this.setState('finished');
|
163
|
-
logger.info('state: ' + _this.getState());
|
164
|
-
logger.info('initializing module finished');
|
163
|
+
logger.info('\n' + 'state: ' + _this.getState());
|
164
|
+
logger.info('\n' + 'initializing module finished');
|
165
165
|
|
166
166
|
clearInterval(dependencies_met_page_finished);
|
167
167
|
|
@@ -179,7 +179,7 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
179
179
|
messageHandler: function (sender, message) {
|
180
180
|
var json_message = JSON.stringify(message, undefined, 2);
|
181
181
|
|
182
|
-
logText = 'received message from ' + sender + ': ' + json_message;
|
182
|
+
logText = '\n' + 'received message from ' + sender + ': ' + json_message;
|
183
183
|
logger.debug(logText);
|
184
184
|
|
185
185
|
// -----------------------------------------------------------------------
|
@@ -189,7 +189,7 @@ j1.adapter['framer'] = (function (j1, window) {
|
|
189
189
|
//
|
190
190
|
// Place handling of command|action here
|
191
191
|
//
|
192
|
-
logger.info(message.text);
|
192
|
+
logger.info('\n' + message.text);
|
193
193
|
}
|
194
194
|
|
195
195
|
//
|