j1-template 2022.0.3 → 2022.0.4
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/procedures/posts/pager.proc +2 -2
- data/_layouts/default.html +20 -44
- data/assets/data/quicklinks.html +62 -47
- data/assets/themes/j1/adapter/js/cookieConsent.js +6 -4
- data/assets/themes/j1/adapter/js/translator.js +6 -4
- data/assets/themes/j1/core/js/template.js +77 -61
- data/assets/themes/j1/core/js/template.min.js +5 -5
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/builder/defaults/blog_navigator.yml +2 -2
- data/lib/starter_web/_data/modules/defaults/navigator.yml +31 -11
- data/lib/starter_web/_includes/attributes.asciidoc +1 -1
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +2 -3
- data/lib/starter_web/_data/builder/defaults/_blog_navigator.yml +0 -396
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b18b2db3ef66554cafd792fe42d9416dff862eb67ec75be4aedc629700c783f
|
4
|
+
data.tar.gz: 02fd1bc0aa69fd4a4e38d92daf755b0eac1fe5768e3add1abc61da4e7e66d344
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a66485ae8944c00a1279e6125fd0fa7dc6b505b39881af851b5e623756530de4359426feb0d5febe864a99e202987a5551baa561652dd2fda0bd8a7fb90ad04
|
7
|
+
data.tar.gz: 893ab157647f3ba740520f25754c645a5a20a5e81e89e4a9479f2fb01e24c39c6b52d83b905aedc7285c5efbbf3e5e3d29721f5dc6bd227622a43ff947a25800
|
@@ -100,9 +100,9 @@
|
|
100
100
|
|
101
101
|
<!-- [INFO ] [procedures.global.pager.proc ] [Calculate BackURL from User State Cookie for page: {{page.title}}] -->
|
102
102
|
if (re.test(last_pager)) {
|
103
|
-
last_pager_url = '<li class="page-item"><a class="page-link" href="' + last_pager + '" title="Back to
|
103
|
+
last_pager_url = '<li class="page-item"><a class="page-link" href="' + last_pager + '" title="Back to {{pager_back_button_text}}">{{pager_back_button_text}}</a></li>';
|
104
104
|
} else {
|
105
|
-
last_pager_url = '<li class="page-item disabled"><a class="page-link" title="Back to
|
105
|
+
last_pager_url = '<li class="page-item disabled"><a class="page-link" title="Back to {{pager_back_button_text}}">{{pager_back_button_text}}</a></li>';
|
106
106
|
}
|
107
107
|
document.write( last_pager_url );
|
108
108
|
j1.writeCookie({
|
data/_layouts/default.html
CHANGED
@@ -121,60 +121,35 @@ layout: compress
|
|
121
121
|
{% comment %} collect the head section (region head)
|
122
122
|
------------------------------------------------------------------------------ {% endcomment %}
|
123
123
|
<head data-proofer-ignore>
|
124
|
+
|
124
125
|
{% comment %}
|
125
126
|
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-LRlmVvLKVApDVGuspQFnRQJjkv0P7/YFrw84YYQtmYG4nK8c+M+NlmYDCv0rKWpG" crossorigin="anonymous">
|
126
127
|
{% endcomment %}
|
127
128
|
<!-- [INFO ] [j1.layout.default.html ] [ call default_writer for region: 'head' ] -->
|
128
129
|
{% include {{default_writer}} region='head' items=lanes_collate %}
|
129
130
|
<!-- [INFO ] [j1.layout.default.html ] [ end default_writer for region: 'head' ] -->
|
130
|
-
</head>
|
131
131
|
|
132
|
-
|
133
|
-
------------------------------------------------------------------------------
|
134
|
-
{% if body_scrollbar %}
|
135
|
-
<body>
|
136
|
-
{% else %}
|
137
|
-
<body class="hide-scrollbar">
|
138
|
-
{% endif %}
|
139
|
-
------------------------------------------------------------------------------
|
140
|
-
{% endcomment %}
|
132
|
+
</head>
|
141
133
|
|
142
134
|
<body>
|
143
135
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
<!-- [INFO ] [j1.layout.default.html ] [
|
153
|
-
|
154
|
-
<!--
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
<!-- [INFO ] [j1.layout.default.html ] [ end processing default_writer for region: 'body-navigation' ] -->
|
162
|
-
|
163
|
-
{% comment %} inherit CONTENT from other LAYOUTS
|
164
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
165
|
-
<!-- [INFO ] [j1.layout.default.html ] [ place content inherited by layout: {{ page.layout}} ] -->
|
166
|
-
{{ content }}
|
167
|
-
<!-- [INFO ] [j1.layout.default.html ] [ end content inherited by layout: {{ page.layout}} ] -->
|
168
|
-
|
169
|
-
{% comment %} collect the BODY-FOOTER region
|
170
|
-
-------------------------------------------------------------------------- {% endcomment %}
|
171
|
-
<!-- [INFO ] [j1.layout.default.html ] [ call default_writer for region: 'body-footer' ] -->
|
172
|
-
{% include {{default_writer}} region='body-footer' items=lanes_collate %}
|
173
|
-
<!-- [INFO ] [j1.layout.default.html ] [ end content_writer default_writer for region: 'body-footer' ] -->
|
174
|
-
|
175
|
-
</div>
|
176
|
-
<!-- [INFO ] [j1.layout.default.html ] [ end suppress flicker ] -->
|
177
|
-
<!-- [INFO ] [j1.layout.default.html ] [ end default writer] -->
|
136
|
+
{% comment %} collect the BODY-NAVIGATION region
|
137
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
138
|
+
<!-- [INFO ] [j1.layout.default.html ] [ call default_writer for region: 'body-navigation' ] -->
|
139
|
+
{% include {{default_writer}} region='body-navigation' items=lanes_collate %}
|
140
|
+
<!-- [INFO ] [j1.layout.default.html ] [ end processing default_writer for region: 'body-navigation' ] -->
|
141
|
+
|
142
|
+
{% comment %} inherit CONTENT from other LAYOUTS
|
143
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
144
|
+
<!-- [INFO ] [j1.layout.default.html ] [ place content inherited by layout: {{ page.layout}} ] -->
|
145
|
+
{{ content }}
|
146
|
+
<!-- [INFO ] [j1.layout.default.html ] [ end content inherited by layout: {{ page.layout}} ] -->
|
147
|
+
|
148
|
+
{% comment %} collect the BODY-FOOTER region
|
149
|
+
-------------------------------------------------------------------------- {% endcomment %}
|
150
|
+
<!-- [INFO ] [j1.layout.default.html ] [ call default_writer for region: 'body-footer' ] -->
|
151
|
+
{% include {{default_writer}} region='body-footer' items=lanes_collate %}
|
152
|
+
<!-- [INFO ] [j1.layout.default.html ] [ end content_writer default_writer for region: 'body-footer' ] -->
|
178
153
|
|
179
154
|
<!-- [INFO ] [j1.layout.default.html ] [ place noscript info|error page ] -->
|
180
155
|
{% assign language = site.language %}
|
@@ -229,6 +204,7 @@ layout: compress
|
|
229
204
|
|
230
205
|
<!-- [INFO ] [j1.layout.default.html ] [ place hidden color selector/themes: bg-primary ] -->
|
231
206
|
<div id="bg-primary" class="bg-primary" style="display: none"></div>
|
207
|
+
<!-- [INFO ] [j1.layout.default.html ] [ end default writer] -->
|
232
208
|
|
233
209
|
</body>
|
234
210
|
|
data/assets/data/quicklinks.html
CHANGED
@@ -78,30 +78,15 @@ exclude_from_search: true
|
|
78
78
|
-------------------------------------------------------------------------------- {% endcomment %}
|
79
79
|
{% assign icon_family = quicklinks_options.icon_family | downcase %}
|
80
80
|
|
81
|
-
{%
|
82
|
-
|
83
|
-
{% assign translate_icon = quicklinks_options.translate_icon %}
|
84
|
-
|
85
|
-
{% assign search_icon = quicklinks_options.top_search_icon %}
|
86
|
-
{% assign sidebar_icon = quicklinks_options.sidebar_icon %}
|
87
|
-
|
88
|
-
{% assign signin_icon = auth_client_config.signin_icon %}
|
89
|
-
{% assign signout_icon = auth_client_config.signout_icon %}
|
90
|
-
|
91
|
-
{% assign control_center_icon = cc_app_config_options.quicklinks_icon %}
|
92
|
-
{% assign control_center_url = cc_app_config_options.quicklinks_url %}
|
93
|
-
|
94
|
-
{% assign translator_icon = quicklinks_options.translator_icon %}
|
95
|
-
|
81
|
+
{% comment %} Link buttons
|
82
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
96
83
|
{% assign home_icon = quicklinks_options.home_icon %}
|
97
84
|
{% assign home_url = quicklinks_options.home_url %}
|
98
|
-
|
99
|
-
{% assign r_text_icon = quicklinks_options.r_text_icon %}
|
100
|
-
|
101
|
-
{% assign toc_icon = quicklinks_options.toc_icon %}
|
85
|
+
{% assign home_label = quicklinks_options.home_label %}
|
102
86
|
|
103
87
|
{% assign back_icon = quicklinks_options.back_icon %}
|
104
88
|
{% assign back_url = quicklinks_options.back_url %}
|
89
|
+
{% assign back_label = quicklinks_options.back_label %}
|
105
90
|
|
106
91
|
{% assign disqus_icon = quicklinks_options.disqus_icon %}
|
107
92
|
{% assign github_icon = quicklinks_options.github_icon %}
|
@@ -115,15 +100,50 @@ exclude_from_search: true
|
|
115
100
|
{% assign facebook_url = quicklinks_options.facebook_url %}
|
116
101
|
{% assign twitter_url = quicklinks_options.twitter_url %}
|
117
102
|
|
103
|
+
{% assign disqus_label = quicklinks_options.disqus_label %}
|
104
|
+
{% assign github_label = quicklinks_options.github_label %}
|
105
|
+
{% assign patreon_label = quicklinks_options.patreon_label %}
|
106
|
+
{% assign facebook_label = quicklinks_options.facebook_label %}
|
107
|
+
{% assign twitter_label = quicklinks_options.twitter_label %}
|
108
|
+
|
109
|
+
{% comment %} Action buttons
|
110
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
111
|
+
{% assign cookies_icon = quicklinks_options.cookies_icon %}
|
112
|
+
{% assign cookies_action = quicklinks_options.cookies_action %}
|
113
|
+
{% assign cookies_label = quicklinks_options.cookies_label %}
|
114
|
+
|
115
|
+
{% assign translate_icon = quicklinks_options.translate_icon %}
|
116
|
+
{% assign translate_action = quicklinks_options.translate_action %}
|
117
|
+
{% assign translate_label = quicklinks_options.translate_label %}
|
118
|
+
|
119
|
+
{% assign quicksearch_icon = quicklinks_options.quicksearch_icon %}
|
120
|
+
{% assign quicksearch_action = quicklinks_options.quicksearch_action %}
|
121
|
+
{% assign quicksearch_label = quicklinks_options.quicksearch_label %}
|
122
|
+
|
123
|
+
{% assign translator_icon = quicklinks_options.translator_icon %}
|
124
|
+
{% assign translator_action = quicklinks_options.translator_action %}
|
125
|
+
{% assign translator_label = quicklinks_options.translator_label %}
|
126
|
+
|
127
|
+
{% assign r_text_icon = quicklinks_options.r_text_icon %}
|
128
|
+
{% assign r_text_action = quicklinks_options.r_text_action %}
|
129
|
+
{% assign r_text_label = quicklinks_options.r_text_label %}
|
130
|
+
|
131
|
+
{% comment %} Legacy buttons
|
132
|
+
-------------------------------------------------------------------------------- {% endcomment %}
|
133
|
+
{% assign signin_icon = auth_client_config.signin_icon %}
|
134
|
+
{% assign signout_icon = auth_client_config.signout_icon %}
|
118
135
|
{% assign signin_modal_id = auth_client_config.signin_modal_id %}
|
119
136
|
|
137
|
+
{% assign control_center_icon = cc_app_config_options.quicklinks_icon %}
|
138
|
+
{% assign control_center_url = cc_app_config_options.quicklinks_url %}
|
139
|
+
|
120
140
|
|
121
141
|
{% comment %} Show|Hide Quicksearch icon
|
122
142
|
-------------------------------------------------------------------------------- {% endcomment %}
|
123
143
|
{% if quick_search_options.enabled %}
|
124
|
-
{% assign
|
144
|
+
{% assign show_quicksearch_icon = true %}
|
125
145
|
{% else %}
|
126
|
-
{% assign
|
146
|
+
{% assign show_quicksearch_icon = false %}
|
127
147
|
{% endif %}
|
128
148
|
|
129
149
|
{% comment %} Show|Hide Translator icon
|
@@ -154,19 +174,9 @@ exclude_from_search: true
|
|
154
174
|
{% assign show_control_center_icon = false %}
|
155
175
|
{% endif %}
|
156
176
|
|
157
|
-
{% comment %} Show|Hide Sidebar icon
|
158
|
-
-------------------------------------------------------------------------------- {% endcomment %}
|
159
|
-
{% if quicklinks_options.sidebar %}
|
160
|
-
{% assign show_sidebar_icon = true %}
|
161
|
-
{% else %}
|
162
|
-
{% assign show_sidebar_icon = false %}
|
163
|
-
{% endif %}
|
164
|
-
|
165
|
-
{% assign show_sidebar_icon = false %}
|
166
|
-
|
167
177
|
{% comment %} Show|Hide RSizer icon
|
168
178
|
-------------------------------------------------------------------------------- {% endcomment %}
|
169
|
-
{% if quicklinks_options.
|
179
|
+
{% if quicklinks_options.r_text_icon %}
|
170
180
|
{% assign show_r_text_icon = true %}
|
171
181
|
{% else %}
|
172
182
|
{% assign show_r_text_icon = false %}
|
@@ -238,24 +248,29 @@ exclude_from_search: true
|
|
238
248
|
|
239
249
|
<ul id="{{quicklinks_options.xhr_data_element}}" class="navbar-nav show">
|
240
250
|
|
241
|
-
{%
|
242
|
-
|
243
|
-
{% if
|
244
|
-
{% if
|
245
|
-
{% if
|
246
|
-
{% if
|
247
|
-
{% if
|
248
|
-
{% if
|
249
|
-
{% if
|
250
|
-
|
251
|
-
{%
|
252
|
-
|
253
|
-
{% if
|
251
|
+
{% comment %} Link buttons
|
252
|
+
------------------------------------------------------------------------------ {% endcomment %}
|
253
|
+
{% if back_url != "none" %}<li id="quickLinksBackButton" class="nav-item"><a id="page_back_id" class="nav-icon" href="{{back_url}}" aria-label="{{back_label}}"><i class="{{icon_family}} {{icon_family}}-{{back_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
254
|
+
{% if home_url != "none" %}<li id="quickLinksHomeButton" class="nav-item"><a id="home_id" class="nav-icon" href="{{home_url}}" aria-label="{{home_label}}"><i class="{{icon_family}} {{icon_family}}-{{home_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
255
|
+
{% if disqus_url != "none" %}<li id="quickLinksDisqusButton" class="nav-item"><a id="disqus_id" class="nav-icon" href="{{disqus_url}}" aria-label="{{disqus_label}}" target="blank"><i class="nav-icon {{icon_family}} {{icon_family}}-{{disqus_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
256
|
+
{% if github_url != "none" %}<li id="quickLinksGithubButton" class="nav-item"><a id="github_id" class="nav-icon" href="{{github_url}}" aria-label="{{github_label}}" target="blank"><i class="nav-icon {{icon_family}} {{icon_family}}-{{github_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
257
|
+
{% if patreon_url != "none" %}<li id="quickLinksPatreonButton" class="nav-item"><a id="patreon_id" class="nav-icon" href="{{patreon_url}}" aria-label="{{patreon_label}}" target="blank"><i class="nav-icon {{icon_family}} {{icon_family}}-{{patreon_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
258
|
+
{% if facebook_url != "none" %}<li id="quickLinksFacebookButton" class="nav-item"><a id="facebook_id" class="nav-icon" href="{{facebook_url}}" aria-label="{{facebook_label}}" target="blank"><i class="nav-icon {{icon_family}} {{icon_family}}-{{facebook_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
259
|
+
{% if twitter_url != "none" %}<li id="quickLinksTwitterButton" class="nav-item"><a id="twitter_id" class="nav-icon" href="{{twitter_url}}" aria-label="{{twitter_label}}" target="blank"><i class="nav-icon {{icon_family}} {{icon_family}}-{{twitter_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
260
|
+
|
261
|
+
{% comment %} Action buttons
|
262
|
+
------------------------------------------------------------------------------ {% endcomment %}
|
263
|
+
{% if show_quicksearch_icon %}<li id="quickLinksSearchButton" class="nav-item {{quicksearch_action}}"><a class="nav-icon" href="#" aria-label="{{quicksearch_label}}"><i class="nav-icon {{icon_family}} {{icon_family}}-{{quicksearch_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
264
|
+
{% if show_auth_manager_icon %}<li id="quickLinksSignInOutButton" class="nav-item sign-inout" style="display: none;"><a class="nav-icon" id="navLinkSignInOut" aria-label="SignOut" href="#" data-bs-toggle="modal" data-bs-target="#{{signin_modal_id}}"><i id="iconSignInOut" class="nav-icon {{icon_family}} {{icon_family}}-{{signin_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
265
|
+
{% if show_cookieconsent_icon %}<li id="quickLinksCookieButton" class="nav-item {{cookies_action}}" style="display: block;"><a href="#" aria-label="{{cookies_label}}"><i class="nav-icon {{icon_family}} {{icon_family}}-{{cookies_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
266
|
+
{% if show_r_text_icon %}<li id="quickLinksRTextButton" class="nav-item {{r_text_action}}" style="display: block;"><a class="nav-icon" href="#" aria-label="{{r_text_label}}" data-bs-toggle="modal" data-bs-target="#fluidModalRTextResizer"><i class="nav-icon {{icon_family}} {{icon_family}}-{{r_text_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
267
|
+
{% if show_google_translate_icon %}<li id="quickLinksTranslateButton" class="nav-item {{translate_action}}" style="display: block;"><a href="#" aria-label="{{translate_label}}"><i class="nav-icon {{icon_family}} {{icon_family}}-{{translate_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
254
268
|
|
255
269
|
{% comment %} Unused
|
256
270
|
--------------------------------------------------------------------------------
|
257
|
-
{% if
|
258
|
-
{% if
|
271
|
+
{% 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 %}
|
272
|
+
{% if show_translator_icon %}<li id="quickLinksLanguageButton" class="nav-item translator"><a class="nav-icon" href="#void" aria-label="Translator"><i class="nav-icon {{icon_family}} {{icon_family}}-{{translator_icon}} {{icon_size}}"></i></a></li>{% endif %}
|
273
|
+
{% if show_google_translate_lang %}<li id="quickLinksTranslateLangButton" class="nav-item" style="display: block;"><a href="javascript:j1.translator.showDialog()" aria-label="Google Translate"><i class="nav-icon flag-icon flag-icon-{{translate_lang}} rectangle size-md"></i></a></li>{% endif %}
|
259
274
|
-------------------------------------------------------------------------------- {% endcomment %}
|
260
275
|
|
261
276
|
</ul>
|
@@ -190,10 +190,12 @@ j1.adapter['cookieConsent'] = (function (j1, window) {
|
|
190
190
|
logger.info('\n' + 'state: ' + _this.getState());
|
191
191
|
logger.debug('\n' + 'module initialized successfully');
|
192
192
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
193
|
+
// Click events moved to Navigator (core)
|
194
|
+
//
|
195
|
+
// $('#quickLinksCookieButton').click(function(e) {
|
196
|
+
// logger.info('\n' + 'call default action');
|
197
|
+
// j1.cookieConsent.showDialog();
|
198
|
+
// });
|
197
199
|
|
198
200
|
clearInterval(dependencies_met_page_ready);
|
199
201
|
}
|
@@ -304,10 +304,12 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
304
304
|
}
|
305
305
|
}
|
306
306
|
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
307
|
+
// Click events moved to Navigator (core)
|
308
|
+
//
|
309
|
+
// $('#quickLinksTranslateButton').click(function(e) {
|
310
|
+
// logger.info('\n' + 'call default action');
|
311
|
+
// j1.translator.showDialog();
|
312
|
+
// });
|
311
313
|
|
312
314
|
_this.setState('finished');
|
313
315
|
logger.info('\n' + 'state: ' + _this.getState());
|
@@ -2507,8 +2507,15 @@ module.exports = function navigator(options) {
|
|
2507
2507
|
//
|
2508
2508
|
|
2509
2509
|
$('a[href="#"]').click(function (e) {
|
2510
|
-
|
2511
|
-
e.
|
2510
|
+
page_link = document.querySelector('[id="' + decodeURI(anchor_id).split('#').join('') + '"]') ? true : false;
|
2511
|
+
anchor_id = e.target.hash ? e.target.hash : false;
|
2512
|
+
classname = e.target.className ? e.target.className : '';
|
2513
|
+
nav_link = classname.includes('nav-');
|
2514
|
+
|
2515
|
+
if (!nav_link || page_link) {
|
2516
|
+
logger.debug('\n' + 'click event on href "#" detected: prevent default action');
|
2517
|
+
e.preventDefault ? e.preventDefault() : e.returnValue = false;
|
2518
|
+
}
|
2512
2519
|
}); // -----------------------------------------------------------------------
|
2513
2520
|
// In-page smooth scroll
|
2514
2521
|
// -----------------------------------------------------------------------
|
@@ -2674,87 +2681,96 @@ module.exports = function navigator(options) {
|
|
2674
2681
|
}
|
2675
2682
|
});
|
2676
2683
|
} // -----------------------------------------------------------------------
|
2677
|
-
//
|
2684
|
+
// Manage events for all quicklinks
|
2678
2685
|
// https://stackoverflow.com/questions/178325/how-do-i-check-if-an-element-is-hidden-in-jquery
|
2679
2686
|
// https://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily
|
2680
2687
|
// https://stackoverflow.com/questions/5963669/whats-the-difference-between-event-stoppropagation-and-event-preventdefault
|
2681
2688
|
// -----------------------------------------------------------------------
|
2682
|
-
// $('nav.navbar.navigator .attr-nav').each(function() {
|
2683
2689
|
|
2684
2690
|
|
2685
2691
|
$('.attr-nav').each(function () {
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
|
2691
|
-
|
2692
|
-
|
2693
|
-
$('.top-search').slideToggle('slow', 'swing', function () {
|
2694
|
-
if ($('.top-search').is(':visible')) {
|
2695
|
-
// disable scrolling (desktop)
|
2696
|
-
$('body').addClass('stop-scrolling'); // disable scrolling (mobile)
|
2697
|
-
|
2698
|
-
$('body').bind('touchmove', function (e) {
|
2699
|
-
e.preventDefault();
|
2700
|
-
}); // disable navbar
|
2701
|
-
|
2702
|
-
$('#' + defaultOptions.nav_bar.container_id).hide();
|
2703
|
-
} else {
|
2704
|
-
// enable scrolling (desktop)
|
2705
|
-
$('body').removeClass('stop-scrolling'); // enable scrolling (mobile)
|
2692
|
+
// ---------------------------------------------------------------------
|
2693
|
+
// QuickSearch
|
2694
|
+
//
|
2695
|
+
if ($('li.quicksearch')) {
|
2696
|
+
logger.debug('register OPEN event for QuickSearch');
|
2697
|
+
$('li.quicksearch > a', this).on('click', function (e) {
|
2698
|
+
e.preventDefault(); // don't do the default browser action
|
2706
2699
|
|
2707
|
-
|
2700
|
+
logger.debug('manage search action OPEN');
|
2701
|
+
$('html,body').animate({
|
2702
|
+
scrollTop: 0
|
2703
|
+
}, 0);
|
2704
|
+
$('.top-search').slideToggle('slow', 'swing', function () {
|
2705
|
+
if ($('.top-search').is(':visible')) {
|
2706
|
+
// disable scrolling (desktop)
|
2707
|
+
$('body').addClass('stop-scrolling'); // disable scrolling (mobile)
|
2708
2708
|
|
2709
|
-
|
2710
|
-
|
2711
|
-
|
2712
|
-
});
|
2713
|
-
});
|
2714
|
-
logger.debug('register CLOSE event|s for QuickSearch');
|
2715
|
-
$('.input-group-addon.close-search').on('click', function (e) {
|
2716
|
-
e.preventDefault(); // don't do the default browser action
|
2709
|
+
$('body').bind('touchmove', function (e) {
|
2710
|
+
e.preventDefault();
|
2711
|
+
}); // disable navbar
|
2717
2712
|
|
2718
|
-
|
2719
|
-
|
2720
|
-
|
2721
|
-
|
2722
|
-
}, 0); // enable scrolling (desktop)
|
2713
|
+
$('#' + defaultOptions.nav_bar.container_id).hide();
|
2714
|
+
} else {
|
2715
|
+
// enable scrolling (desktop)
|
2716
|
+
$('body').removeClass('stop-scrolling'); // enable scrolling (mobile)
|
2723
2717
|
|
2724
|
-
|
2718
|
+
$('body').unbind('touchmove'); // enable navbar
|
2725
2719
|
|
2726
|
-
|
2720
|
+
$('#' + defaultOptions.nav_bar.container_id).show();
|
2721
|
+
}
|
2722
|
+
});
|
2723
|
+
e.stopPropagation(); // don't bubble up the event
|
2724
|
+
});
|
2725
|
+
logger.debug('register CLOSE event for QuickSearch');
|
2726
|
+
$('.input-group-addon.close-search').on('click', function (e) {
|
2727
|
+
e.preventDefault(); // don't do the default browser action
|
2727
2728
|
|
2728
|
-
|
2729
|
-
|
2730
|
-
|
2731
|
-
|
2732
|
-
|
2729
|
+
logger.debug('manage search action CLOSE');
|
2730
|
+
$('.top-search').slideUp('slow', 'swing');
|
2731
|
+
$('html,body').animate({
|
2732
|
+
scrollTop: 0
|
2733
|
+
}, 0); // enable scrolling (desktop)
|
2733
2734
|
|
2734
|
-
|
2735
|
-
logger.debug('register SHOW|HIDE event|s for J1 Translator');
|
2736
|
-
$('li.translator > a', this).on('click', function (e) {
|
2737
|
-
// e.preventDefault(); // don't do the default browser action
|
2738
|
-
// window.location.reload(true);
|
2739
|
-
logger.debug('toggle translator icon SHOW|HIDE'); // See: https://api.jquery.com/toggle/
|
2740
|
-
// With no parameters, the .toggle() method simply toggles the visibility of elements
|
2735
|
+
$('body').removeClass('stop-scrolling'); // enable scrolling (mobile)
|
2741
2736
|
|
2742
|
-
|
2737
|
+
$('body').unbind('touchmove'); // enable navbar
|
2743
2738
|
|
2744
|
-
|
2745
|
-
|
2746
|
-
|
2747
|
-
|
2748
|
-
|
2739
|
+
$('#' + defaultOptions.nav_bar.container_id).show();
|
2740
|
+
e.stopPropagation(); // don't bubble up the event
|
2741
|
+
});
|
2742
|
+
} // END QuickSearch
|
2743
|
+
// ---------------------------------------------------------------------
|
2744
|
+
// Translator
|
2745
|
+
//
|
2749
2746
|
|
2750
|
-
|
2751
|
-
|
2747
|
+
|
2748
|
+
if ($('li.translate')) {
|
2749
|
+
logger.debug('register SHOW event for J1 Translator');
|
2750
|
+
$('li.translate > a', this).on('click', function (e) {
|
2751
|
+
j1.translator.showDialog();
|
2752
|
+
});
|
2753
|
+
} // END Translator
|
2754
|
+
// ---------------------------------------------------------------------
|
2755
|
+
// CookieConsent
|
2756
|
+
//
|
2757
|
+
|
2758
|
+
|
2759
|
+
if ($('li.cookie-consent')) {
|
2760
|
+
logger.debug('register SHOW event for J1 CookieConsent');
|
2761
|
+
$('li.cookie-consent > a', this).on('click', function (e) {
|
2762
|
+
j1.cookieConsent.showDialog();
|
2763
|
+
});
|
2764
|
+
} // END CookieConsent
|
2765
|
+
|
2766
|
+
}); // End manage events for all quicklinks
|
2767
|
+
// -----------------------------------------------------------------------
|
2752
2768
|
// Wrapper
|
2753
2769
|
// -----------------------------------------------------------------------
|
2754
2770
|
|
2755
2771
|
$('body').wrapInner('<div class=\'wrapper\'></div>');
|
2756
2772
|
},
|
2757
|
-
//
|
2773
|
+
// END eventHandler
|
2758
2774
|
// -------------------------------------------------------------------------
|
2759
2775
|
// Manage the Menu Dropdowns for Desktop|Mobile
|
2760
2776
|
// -------------------------------------------------------------------------
|