j1-template 2021.2.2 → 2021.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f7e03f8152b50d85ea0e9f0b046f35d0365971641373276ef4e7d66ee27a209
4
- data.tar.gz: b925f2e885a906d8b7cda24cc49015d017fbf0eedb11d65b6f5361bf04a2f49a
3
+ metadata.gz: c9dc0e231e62c57b4ba9b58db8fe7fcea64e6e5ce6d4968596be2f0d4b2a327b
4
+ data.tar.gz: 561ab314b4b3a1c751daa6d44129e28fa2b0df2f8f43593b65ab4281aeacfcbc
5
5
  SHA512:
6
- metadata.gz: 4f3ce8cdca39ad83576131a23c280f7f44a9d952dbc99802d395d0225dd3ebd59eab0001ff15c473fa69a554cfc31e59a9fd102da3b62c006028037dea3bd519
7
- data.tar.gz: d0fd423cb26fb97bb385390a20e834711fb2aeea64b2cf3bfc844006a9edc3960c0901bea53ce18832a36a1925fa788ce86ea45fe646d1a9a5be4da41b7cbfb7
6
+ metadata.gz: cb8f3b4979535967f5d06502b7534c69f716bd3162688036f2389660054fc274bb21d7005755d71c7f1ffe1d93f7362fe8ad3e103402b35109fee2836782e130
7
+ data.tar.gz: 9353adba95082496af4415cefe70d5d6ba30bd88c268f00f17ab6d2f6223184ea6019664578cf46f644e5fccb53348e9e5d37e78d3b4a66897e330e5d825f857
@@ -212,16 +212,6 @@ layout: compress
212
212
 
213
213
  </body>
214
214
 
215
- {% comment %} Place|Initialize module components
216
- ------------------------------------------------------------------------------
217
- NOTE: xhr_container should be DYNAMICALLY placed by
218
- the module using it !!!
219
- Example CookieConsent
220
- ------------------------------------------------------------------------------ {% endcomment %}
221
-
222
- {% comment %} Place container for Cookiebar modals
223
- ------------------------------------------------------------------------------ {% endcomment %}
224
-
225
215
  {% comment %} Place container for WebHook modals
226
216
  ------------------------------------------------------------------------------ {% endcomment %}
227
217
  {% if webhook_options.enabled %}
@@ -234,11 +224,14 @@ layout: compress
234
224
  <!-- [INFO ] [j1.layout.default.html ] [ place container for the r-text resizer modal ] -->
235
225
  <div id="rtext_resizer_container"></div>
236
226
 
237
- {% comment %} Initialize Tooltips|Popovers
227
+ {% comment %} Initialize global JS scripts
238
228
  ------------------------------------------------------------------------------ {% endcomment %}
239
- <!-- [INFO ] [j1.layout.default.html ] [ initialize BS tooltips|popovers ] -->
229
+ <!-- [INFO ] [j1.layout.default.html ] [ initialize global JS scripts ] -->
240
230
  <script>
241
231
  $(function() {
232
+ {% comment %} BS tooltips and popovers
233
+ ---------------------------------------------------------------------------- {% endcomment %}
234
+ // initialize BS tooltips and popovers
242
235
  {% if tooltips_options.enabled %}
243
236
  $('[data-toggle="tooltip"').tooltip({
244
237
  trigger: '{{tooltips_options.trigger}}'
@@ -249,25 +242,39 @@ layout: compress
249
242
  trigger: '{{popovers_options.trigger}}'
250
243
  });
251
244
  {% endif %}
252
- });
253
- </script>
254
245
 
255
- {% comment %} Initialize Window History (back on <ESC>)
256
- ------------------------------------------------------------------------------ {% endcomment %}
257
- <!-- [INFO ] [j1.layout.default.html ] [ initialize window.history.back ] -->
258
- <script>
259
- // Redirect on KEY <ESC>
260
- window.onkeyup = function (e)
261
- {
262
- if (e.keyCode == 27) window.history.back();
263
- }
246
+ {% comment %} Update cookie for lastpage
247
+ ---------------------------------------------------------------------------- {% endcomment %}
248
+ // save the current page to userstate cookie
249
+ var dependencies_met_page_ready = setInterval (function (options) {
250
+ if (j1.getState() === 'finished') {
251
+ var logger = log4javascript.getLogger('j1.layout.default');
252
+
253
+ function setLastPage() {
254
+ var cookie_names = j1.getCookieNames();
255
+ const user_state_cookie_name = cookie_names.user_session;
256
+ var user_state = j1.readCookie(user_state_cookie_name);
257
+ var user_state_last_page = window.location.pathname;
258
+ user_state.last_page = user_state_last_page;
259
+
260
+ j1.writeCookie({
261
+ name: user_state_cookie_name,
262
+ data: user_state,
263
+ samesite: 'Strict'
264
+ });
265
+ logger.debug('\n' + 'saved current page to cookie :' + user_state_last_page);
266
+ }
267
+ setLastPage();
268
+ clearInterval(dependencies_met_page_ready);
269
+ }
270
+ });
271
+ });
264
272
  </script>
265
273
  <!-- [INFO ] [j1.layout.default.html ] [ end page processing ] -->
266
274
  </html>
267
275
 
268
276
  {% endcapture %}
269
277
 
270
-
271
278
  {% comment %} POST processing of the generated page using (captured) cache
272
279
  -------------------------------------------------------------------------------- {% endcomment %}
273
280
  {% case environment %}
@@ -281,7 +288,6 @@ layout: compress
281
288
  {{ j1_cache | strip_empty_lines | remove: '<p>excerpt__end</p>' }}
282
289
  {% endif %} {% comment %} END prettify {% endcomment %}
283
290
 
284
-
285
291
  {% comment %} PRODUCTION mode
286
292
  ------------------------------------------------------------------------------ {% endcomment %}
287
293
  {% when 'production' or 'prod' %}
@@ -144,7 +144,6 @@ exclude_from_search: true
144
144
  authentication_enabled: {{ authentication_enabled | debug }}
145
145
  -->
146
146
 
147
-
148
147
  {% comment %} Show|Hide Control Center icon
149
148
  -------------------------------------------------------------------------------- {% endcomment %}
150
149
  {% if cc_app_config_options.enabled %}
@@ -236,7 +235,7 @@ exclude_from_search: true
236
235
  {% if show_auth_manager_icon %}<li id="quickLinksSignInOutButton" class="nav-item" style="display: none;"><a class="nav-icon" id="navLinkSignInOut" aria-label="SignOut" href="#" data-toggle="modal" data-target="#{{signin_modal_id}}"><i id="iconSignInOut" class="{{icon_family}} {{icon_family}}-{{signin_icon}} {{icon_size}}"></i></a></li>{% endif %}
237
236
  {% if show_cookieconsent_icon %}<li id="quickLinksCookieButton" class="nav-item" style="display: block;"><a href="javascript:j1.cookieConsent.showDialog()" aria-label="Cookie Consent"><i class="{{icon_family}} {{icon_family}}-{{cookies_icon}} {{icon_size}}"></i></a></li>{% endif %}
238
237
  {% if show_translator_icon %}<li id="quickLinksLanguageButton" class="nav-item translator"><a class="nav-icon" href="#" aria-label="Translator"><i class="{{icon_family}} {{icon_family}}-{{translator_icon}} {{icon_size}}"></i></a></li>{% endif %}
239
- {% if show_quick_search_icon %}<li id="quickLinksSearchButton" class="nav-item search"><a class="nav-icon" href="#" aria-label="Search"><i class="{{icon_family}} {{icon_family}}-{{search_icon}} {{icon_size}}"></i></a></li>{% endif %}
238
+ {% if show_quick_search_icon %}<li id="quickLinksSearchButton" class="nav-item search"><a class="nav-icon" href="#void" aria-label="Search"><i class="{{icon_family}} {{icon_family}}-{{search_icon}} {{icon_size}}"></i></a></li>{% endif %}
240
239
  {% if show_control_center_icon %}<li id="quickLinksControlCenterButton" class="nav-item control-center" style="display: block;"><a class="nav-icon" href="{{control_center_url}}" aria-label="ControlCenter"><i class="{{icon_family}} {{icon_family}}-{{control_center_icon}} {{icon_size}}"></i></a></li>{% endif %}
241
240
  {% if show_r_text_icon %}<li id="quickLinksRTextButton" class="nav-item control-center" style="display: block;"><a class="nav-icon" href="#" aria-label="TextResizer" data-toggle="modal" data-target="#fluidModalRTextResizer"><i class="{{icon_family}} {{icon_family}}-{{r_text_icon}} {{icon_size}}"></i></a></li>{% endif %}
242
241
  </ul>
@@ -55,7 +55,6 @@ regenerate: true
55
55
  {% assign production = true %}
56
56
  {% endif %}
57
57
 
58
-
59
58
  /*
60
59
  # -----------------------------------------------------------------------------
61
60
  # ~/assets/themes/j1/adapter/js/fam.js
@@ -232,6 +231,7 @@ j1.adapter['fam'] = (function (j1, window) {
232
231
  $('a[href="#void"]').click(function(e) {
233
232
  e.preventDefault ? e.preventDefault() : e.returnValue = false;
234
233
  logger.info('\n' + 'bound click event to "#void", suppress default action');
234
+ return false;
235
235
  });
236
236
 
237
237
  // check if multiple buttons detected