j1-template 2021.2.2 → 2021.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -287,14 +287,12 @@ var j1 = (function () {
287
287
  // -----------------------------------------------------------------------
288
288
  // options loader
289
289
  // -----------------------------------------------------------------------
290
- var settings = $.extend(
291
- {
292
- foo: 'foo_option',
293
- bar: 'bar_option'
290
+ var settings = $.extend({
291
+ foo: 'foo_option',
292
+ bar: 'bar_option'
294
293
  },
295
294
  options
296
295
  );
297
-
298
296
  // -----------------------------------------------------------------------
299
297
  // status settings
300
298
  // save status into the adapter object for (later) global access
@@ -344,7 +342,7 @@ var j1 = (function () {
344
342
  expires: 0
345
343
  });
346
344
  if (!cookie_written) {
347
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
345
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_consent);
348
346
  }
349
347
  } else {
350
348
  logger.debug('\n' + 'write to cookie : ' + cookie_names.user_state);
@@ -356,7 +354,7 @@ var j1 = (function () {
356
354
  expires: 365
357
355
  });
358
356
  if (!cookie_written) {
359
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
357
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
360
358
  }
361
359
  }
362
360
  } else {
@@ -382,7 +380,7 @@ var j1 = (function () {
382
380
  expires: 0
383
381
  });
384
382
  if (!cookie_written) {
385
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
383
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
386
384
  }
387
385
 
388
386
  user_state = j1.existsCookie(cookie_names.user_state)
@@ -395,7 +393,7 @@ var j1 = (function () {
395
393
  expires: 365
396
394
  });
397
395
  if (!cookie_written) {
398
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
396
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
399
397
  }
400
398
 
401
399
  // jadams, 2021-07-11: Found situation that user_state NOT initialized
@@ -423,7 +421,7 @@ var j1 = (function () {
423
421
  expires: 0
424
422
  });
425
423
  if (!cookie_written) {
426
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
424
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
427
425
  }
428
426
  } else {
429
427
  logger.debug('\n' + 'write to cookie : ' + cookie_names.user_state);
@@ -435,10 +433,61 @@ var j1 = (function () {
435
433
  expires: 365
436
434
  });
437
435
  if (!cookie_written) {
438
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
436
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_state);
439
437
  }
440
438
  }
441
439
 
440
+ // initialize event handler for smooth scroll on in-page anchors
441
+ // -----------------------------------------------------------------------
442
+ $('a[href*=\\#]').on('click', function (event) {
443
+ // ignore void links
444
+ if (window.location.href.includes('#void')||this.href.includes('#void')) {
445
+ return false;
446
+ }
447
+ // for external links, redirect to this page
448
+ if (window.location.pathname !== this.pathname) {
449
+ window.location.href = this.href;
450
+ } else {
451
+ // continue on in-page anchor
452
+ var toccerScrollDuration = 300;
453
+ var toccerScrollOffset = 10;
454
+
455
+ // calculate offset value for correct (smooth) scroll position
456
+ //
457
+ var $pagehead = $('.attic');
458
+ var $navbar = $('nav.navbar');
459
+ var $adblock = $('#adblock');
460
+ var navbarType = $navbar.hasClass('navbar-fixed') ? 'fixed' : 'scrolled';
461
+ var fontSize = $('body').css('font-size').replace('px','');
462
+ var start = window.pageYOffset;
463
+ var l = parseInt(fontSize);
464
+ var h = $pagehead.length ? $pagehead.height() : 0;
465
+ var n = $navbar.length ? $navbar.height() : 0;
466
+ var a = $adblock.length ? $adblock.height() : 0;
467
+ var scrollOffset = navbarType == 'fixed' ? -1*(n + a + l) : -1*(h + n + a + l);
468
+
469
+ // TODO: to be checked why this static offset (toccerScrollOffset)
470
+ // is needed
471
+ scrollOffset = scrollOffset + toccerScrollOffset;
472
+
473
+ logger.debug('\n' + 'scroll to anchor: ' + this.hash);
474
+ $("html, body").animate({
475
+ scrollTop: $($(this).attr("href")).offset().top + scrollOffset + "px"
476
+ }, {
477
+ duration: toccerScrollDuration,
478
+ easing: "swing"
479
+ });
480
+ // disable bubble up the event
481
+ return false;
482
+ } // End in-page link
483
+ }); // END click event on anchors
484
+
485
+ // initialize event handler for window/history/back on <ESC>
486
+ // -----------------------------------------------------------------------
487
+ window.onkeyup = function (event) {
488
+ if (event.keyCode == 27) window.history.back();
489
+ };
490
+
442
491
  // detect middleware (mode 'app') and update user session cookie
443
492
  // -----------------------------------------------------------------------
444
493
  if (user_session.mode === 'app') {
@@ -473,7 +522,7 @@ var j1 = (function () {
473
522
  });
474
523
 
475
524
  if (!cookie_written) {
476
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
525
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
477
526
  }
478
527
 
479
528
  j1.setState(curr_state);
@@ -499,7 +548,7 @@ var j1 = (function () {
499
548
  clearInterval(dependencies_met_page_displayed);
500
549
  }
501
550
  }
502
- }, 25); // END dependencies_met_page_displayed
551
+ }, 25);
503
552
  })
504
553
  .catch(function(error) {
505
554
  // jadams, 2018-08-31: Why a hell a setTimeout is needed ???
@@ -521,14 +570,15 @@ var j1 = (function () {
521
570
  expires: 0
522
571
  });
523
572
  if (!cookie_written) {
524
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
573
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
525
574
  }
526
575
 
527
576
  j1.setState(curr_state);
528
577
  logger.info('\n' + 'state: ' + j1.getState());
529
578
  }, detectTimeout);
530
579
  });
531
- } else { // web mode
580
+ } else {
581
+ // web mode
532
582
  state = 'started';
533
583
  logger.info('\n' + 'state: ' + state);
534
584
  logger.info('\n' + 'page is being initialized');
@@ -584,7 +634,7 @@ var j1 = (function () {
584
634
  });
585
635
 
586
636
  if (!cookie_written) {
587
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
637
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
588
638
  }
589
639
 
590
640
  // NOTE: asynchronous calls should be rewitten to xhrData
@@ -607,7 +657,7 @@ var j1 = (function () {
607
657
  expires: 0
608
658
  });
609
659
  if (!cookie_written) {
610
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
660
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
611
661
  }
612
662
 
613
663
  // -----------------------------------------------------------------------
@@ -617,9 +667,7 @@ var j1 = (function () {
617
667
 
618
668
  // finalize and display page
619
669
  j1.displayPage();
620
-
621
- }, // END init
622
-
670
+ },
623
671
  // -------------------------------------------------------------------------
624
672
  // initBanner()
625
673
  // AJAX fetcher to load and place all banner used for a page
@@ -718,15 +766,14 @@ var j1 = (function () {
718
766
  var banner_data_path = '{{banner_data_path}} ' + id;
719
767
  selector.load(banner_data_path, cb_load_closure(id));
720
768
  }
721
- } // END for
769
+ }
722
770
  } else {
723
771
  logText = '\n' + 'no banner found in site';
724
772
  logger.warn(logText);
725
773
  return false;
726
774
  }
727
775
  return true;
728
- }, // END initBanner
729
-
776
+ },
730
777
  // -------------------------------------------------------------------------
731
778
  // initPanel()
732
779
  // AJAX fetcher to load and place all panel used for a page
@@ -821,15 +868,14 @@ var j1 = (function () {
821
868
  var panel_data_path = '{{panel_data_path}} ' + id;
822
869
  selector.load(panel_data_path, cb_load_closure(id));
823
870
  }
824
- } // END for
871
+ }
825
872
  } else {
826
873
  logText = '\n' + 'no panel found in site';
827
874
  logger.warn(logText);
828
875
  return false;
829
876
  }
830
877
  return true;
831
- }, // END initPanel
832
-
878
+ },
833
879
  // -------------------------------------------------------------------------
834
880
  // initFooter()
835
881
  // AJAX fetcher to load and place the footer used for a page
@@ -882,8 +928,7 @@ var j1 = (function () {
882
928
  return false;
883
929
  }
884
930
  return true;
885
- }, // END initFooter
886
-
931
+ },
887
932
  // -------------------------------------------------------------------------
888
933
  // displayPage
889
934
  // show the page after timeout of {{flickerTimeout}} ms
@@ -958,7 +1003,7 @@ var j1 = (function () {
958
1003
  expires: 0
959
1004
  });
960
1005
  if (!cookie_written) {
961
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
1006
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
962
1007
  }
963
1008
 
964
1009
  providerPermissions = user_session.provider_permissions;
@@ -981,11 +1026,10 @@ var j1 = (function () {
981
1026
  window.location.href = ep_page_validation;
982
1027
  return false;
983
1028
  }
984
- } // END check protected pages
1029
+ }
985
1030
 
986
1031
  // show the page delayed
987
1032
  setTimeout (function() {
988
-
989
1033
  // Manage providers for personalization OptIn/Out (Comments|Ads)
990
1034
  if (!user_consent.personalization) {
991
1035
  logger.warn('\n' + 'disable comment provider: ' + comment_provider);
@@ -1016,8 +1060,8 @@ var j1 = (function () {
1016
1060
  $('#main-content').append('<div id="hyvor-talk-view"></div>');
1017
1061
  $('body').append('<script async id="hyvor-embed" type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>');
1018
1062
  }
1019
- } // END comments
1020
- } // END personalization
1063
+ }
1064
+ }
1021
1065
 
1022
1066
  // display page
1023
1067
  $('#no_flicker').css('display', 'block');
@@ -1028,13 +1072,12 @@ var j1 = (function () {
1028
1072
  // add recommended title to hyvor iframe for SEO optimization (if loadad)
1029
1073
  if (comment_provider === 'hyvor') {
1030
1074
  var dependencies_met_load_finished = setInterval (function () {
1031
- if ($('#hyvor-talk-view').children().length) {
1032
- $('#hyvor-talk-iframe').prop('title', 'Hyvor talk iframe');
1033
- clearInterval(dependencies_met_load_finished);
1034
- }
1075
+ if ($('#hyvor-talk-view').children().length) {
1076
+ $('#hyvor-talk-iframe').prop('title', 'Hyvor talk iframe');
1077
+ clearInterval(dependencies_met_load_finished);
1078
+ }
1035
1079
  }, 25);
1036
1080
  }
1037
-
1038
1081
  // NOTE: Placed tracking warning/info here because page may reloaded
1039
1082
  // after cookie consent selection
1040
1083
  if (user_consent.analyses) {
@@ -1126,11 +1169,10 @@ var j1 = (function () {
1126
1169
  logger.info(logText);
1127
1170
  logText = '\n' + 'page finalized successfully';
1128
1171
  logger.info(logText);
1129
-
1130
1172
  }, flickerTimeout);
1131
- }); // END APP mode
1132
- } else { // web mode
1133
- // show the page delayed
1173
+ });
1174
+ } else {
1175
+ // web mode
1134
1176
  setTimeout (function() {
1135
1177
  j1.setState('finished');
1136
1178
  logger.info('\n' + 'state: finished');
@@ -1166,22 +1208,22 @@ var j1 = (function () {
1166
1208
  $('#main-content').append('<div id="hyvor-talk-view"></div>');
1167
1209
  $('body').append('<script async id="hyvor-embed" type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>');
1168
1210
  }
1169
- } // END comments
1170
- } // END personalization
1211
+ }
1212
+ }
1171
1213
 
1172
1214
  // display page
1173
1215
  $('#no_flicker').css('display', 'block');
1174
1216
 
1175
1217
  // Add minus icon for collapse element which is open by default
1176
- $(".collapse.show").each(function(){
1177
- $(this).prev(".card-header").addClass("highlight");
1178
- });
1218
+ $(".collapse.show").each(function(){
1219
+ $(this).prev(".card-header").addClass("highlight");
1220
+ });
1179
1221
 
1180
- // Highlight open collapsed element
1181
- $(".card-header .btn").click(function(){
1182
- $(".card-header").not($(this).parents()).removeClass("highlight");
1183
- $(this).parents(".card-header").toggleClass("highlight");
1184
- });
1222
+ // Highlight open collapsed element
1223
+ $(".card-header .btn").click(function(){
1224
+ $(".card-header").not($(this).parents()).removeClass("highlight");
1225
+ $(this).parents(".card-header").toggleClass("highlight");
1226
+ });
1185
1227
 
1186
1228
  // initialize backdrops
1187
1229
  j1.core.createDropCap();
@@ -1195,7 +1237,6 @@ var j1 = (function () {
1195
1237
  }
1196
1238
  }, 25);
1197
1239
  }
1198
-
1199
1240
  // NOTE: Placed tracking warning/info here because page may reloaded
1200
1241
  // after cookie consent selection
1201
1242
  if (user_consent.analyses) {
@@ -1225,7 +1266,7 @@ var j1 = (function () {
1225
1266
  expires: 0
1226
1267
  });
1227
1268
  if (!cookie_written) {
1228
- logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
1269
+ logger.error('\n' + 'failed to write cookie: ' + cookie_names.user_session);
1229
1270
  }
1230
1271
 
1231
1272
  // show|hide translator icon (currently NOT supported)
@@ -1288,12 +1329,9 @@ var j1 = (function () {
1288
1329
  logger.info(logText);
1289
1330
  logText = '\n' + 'page finalized successfully';
1290
1331
  logger.info(logText);
1291
-
1292
- // }, flickerTimeout);
1293
- }, 500);
1294
- } // END WEB mode
1295
- }, // END displayPage
1296
-
1332
+ }, flickerTimeout);
1333
+ }
1334
+ },
1297
1335
  // -------------------------------------------------------------------------
1298
1336
  // Helper functions
1299
1337
  // -------------------------------------------------------------------------
@@ -1313,16 +1351,14 @@ var j1 = (function () {
1313
1351
  }
1314
1352
  }
1315
1353
  return o;
1316
- }, // END mergeData
1317
-
1354
+ },
1318
1355
  // -------------------------------------------------------------------------
1319
1356
  // getPrevPage()
1320
1357
  // Returns the last vistited page
1321
1358
  // -------------------------------------------------------------------------
1322
1359
  getPrevPage: function () {
1323
1360
  return previous_page;
1324
- }, // END getPrevPage
1325
-
1361
+ },
1326
1362
  // -------------------------------------------------------------------------
1327
1363
  // getLanguage()
1328
1364
  // Returns the preferred language taken form window.navigator
@@ -1331,16 +1367,14 @@ var j1 = (function () {
1331
1367
  // -------------------------------------------------------------------------
1332
1368
  getLanguage: function () {
1333
1369
  var language = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage);
1334
- }, // END getLanguage
1335
-
1370
+ },
1336
1371
  // -------------------------------------------------------------------------
1337
1372
  // getTemplateVersion()
1338
1373
  // Returns the template version taken from site config (_config.yml)
1339
1374
  // -------------------------------------------------------------------------
1340
1375
  getTemplateVersion: function () {
1341
1376
  return '{{template_version}}';
1342
- }, // END getTemplateVersion
1343
-
1377
+ },
1344
1378
  // -------------------------------------------------------------------------
1345
1379
  // scrollTo()
1346
1380
  // Scrolls smooth to any anchor referenced by an page URL on
@@ -1399,15 +1433,14 @@ var j1 = (function () {
1399
1433
  //
1400
1434
  $(window).scrollTop($(window).scrollTop()+1);
1401
1435
  $(window).scrollTop($(window).scrollTop()-1);
1402
- } // END if anchor_id
1436
+ }
1403
1437
  } else if (anchor_id === '#') {
1404
1438
  logger.info('\n' + 'bound click event to "#", suppress default action');
1405
1439
  $(window).scrollTop($(window).scrollTop()+1);
1406
1440
  $(window).scrollTop($(window).scrollTop()-1);
1407
1441
  return false;
1408
1442
  }
1409
- }, // END scrollTo
1410
-
1443
+ },
1411
1444
  // -------------------------------------------------------------------------
1412
1445
  // authEnabled()
1413
1446
  // Returns the state of the authentication module
@@ -1417,8 +1450,7 @@ var j1 = (function () {
1417
1450
  var authEnabled = {{authentication_options.j1_auth.enabled}};
1418
1451
 
1419
1452
  return authEnabled;
1420
- }, // END authEnabled
1421
-
1453
+ },
1422
1454
  // -------------------------------------------------------------------------
1423
1455
  // appDetected()
1424
1456
  // Returns true if a web session cookie exists
@@ -1436,8 +1468,7 @@ var j1 = (function () {
1436
1468
  detected = false;
1437
1469
  }
1438
1470
  return detected;
1439
- }, // END appDetected
1440
-
1471
+ },
1441
1472
  // -------------------------------------------------------------------------
1442
1473
  // loadHTML()
1443
1474
  // Load HTML data asychronously using XHR|jQuery on an element (e.g. <div>)
@@ -1543,8 +1574,7 @@ var j1 = (function () {
1543
1574
  }
1544
1575
  }
1545
1576
  return state;
1546
- }, // END loadHTML
1547
-
1577
+ },
1548
1578
  // -------------------------------------------------------------------------
1549
1579
  // loadJS()
1550
1580
  // Load JS data asychronously using jQuery (XHR)
@@ -1582,8 +1612,7 @@ var j1 = (function () {
1582
1612
  });
1583
1613
 
1584
1614
  return state;
1585
- }, // END loadJS
1586
-
1615
+ },
1587
1616
  // -------------------------------------------------------------------------
1588
1617
  // readCookie (Vanilla JS)
1589
1618
  // -------------------------------------------------------------------------
@@ -1604,8 +1633,7 @@ var j1 = (function () {
1604
1633
  } else {
1605
1634
  return false;
1606
1635
  }
1607
- }, // END readCookie
1608
-
1636
+ },
1609
1637
  // -------------------------------------------------------------------------
1610
1638
  // writeCookie (Cookie lib)
1611
1639
  // Write 'data' to a cookie 'name'. If not exists, the cookie gets
@@ -1698,8 +1726,7 @@ var j1 = (function () {
1698
1726
  return false;
1699
1727
  }
1700
1728
 
1701
- }, // END writeCookie
1702
-
1729
+ },
1703
1730
  // -------------------------------------------------------------------------
1704
1731
  // findCookie (Vanilla JS)
1705
1732
  // Search for cookies (names) in the page header that matches a given
@@ -1714,8 +1741,7 @@ var j1 = (function () {
1714
1741
  document.cookie.replace(new RegExp(name + '[^= ]*', 'g'), function(a){ rCookie.push(a.trim()); });
1715
1742
 
1716
1743
  return rCookie;
1717
- }, // END findCookie
1718
-
1744
+ },
1719
1745
  // -------------------------------------------------------------------------
1720
1746
  // removeCookie (Vanilla JS)
1721
1747
  // -------------------------------------------------------------------------
@@ -1734,8 +1760,7 @@ var j1 = (function () {
1734
1760
  } else {
1735
1761
  return false;
1736
1762
  }
1737
- }, // END removeCookie
1738
-
1763
+ },
1739
1764
  // -------------------------------------------------------------------------
1740
1765
  // expireCookie (Vanilla JS)
1741
1766
  // Expires given cookies by name except cookies set to httpOnly. For all
@@ -1796,8 +1821,7 @@ var j1 = (function () {
1796
1821
  }
1797
1822
 
1798
1823
  return true;
1799
- }, // END expireCookie
1800
-
1824
+ },
1801
1825
  // -------------------------------------------------------------------------
1802
1826
  // existsCookie (Vanilla JS)
1803
1827
  // returns true if a given cookie exists
@@ -1831,8 +1855,7 @@ var j1 = (function () {
1831
1855
  cookieExists = cookieContent.length ? true : false;
1832
1856
 
1833
1857
  return cookieExists;
1834
- }, // END existsCookie
1835
-
1858
+ },
1836
1859
  // -------------------------------------------------------------------------
1837
1860
  // Resolve MACROs
1838
1861
  //
@@ -1908,9 +1931,8 @@ var j1 = (function () {
1908
1931
  return false;
1909
1932
  }
1910
1933
  }
1911
- }, 25); // END 'sidebarLoaded'
1912
- }, // END resolveMacros
1913
-
1934
+ }, 25);
1935
+ },
1914
1936
  // -------------------------------------------------------------------------
1915
1937
  // Update MACROs
1916
1938
  // Update the values, NOT the placeholders
@@ -1966,9 +1988,8 @@ var j1 = (function () {
1966
1988
  return false;
1967
1989
  }
1968
1990
  }
1969
- }, 25); // END 'sidebarLoaded'
1970
- }, // END updateMacros
1971
-
1991
+ }, 25);
1992
+ },
1972
1993
  // -------------------------------------------------------------------------
1973
1994
  // getMessage
1974
1995
  // Get a log message from the log message catalog object
@@ -1977,8 +1998,7 @@ var j1 = (function () {
1977
1998
  var message = j1.messages[level][message]['message'][property];
1978
1999
 
1979
2000
  return message;
1980
- }, // END getMessage
1981
-
2001
+ },
1982
2002
  // -------------------------------------------------------------------------
1983
2003
  // logger
1984
2004
  // Log a message
@@ -1989,8 +2009,7 @@ var j1 = (function () {
1989
2009
  logger[level](message);
1990
2010
 
1991
2011
  return true;
1992
- }, // END logger
1993
-
2012
+ },
1994
2013
  // -------------------------------------------------------------------------
1995
2014
  // Send message
1996
2015
  // -------------------------------------------------------------------------
@@ -2010,8 +2029,7 @@ var j1 = (function () {
2010
2029
  executeFunctionByName(receiver + '.messageHandler', window, sender, message);
2011
2030
  }
2012
2031
 
2013
- }, // END sendMessage
2014
-
2032
+ },
2015
2033
  // -------------------------------------------------------------------------
2016
2034
  // messageHandler: MessageHandler for J1 CookieConsent module
2017
2035
  // Manage messages send from other J1 modules
@@ -2036,8 +2054,7 @@ var j1 = (function () {
2036
2054
  //
2037
2055
 
2038
2056
  return true;
2039
- }, // END messageHandler
2040
-
2057
+ },
2041
2058
  // -------------------------------------------------------------------------
2042
2059
  // getStyleValue:
2043
2060
  // Returns the value of a style from a css class definition
@@ -2057,8 +2074,7 @@ var j1 = (function () {
2057
2074
  document.body.removeChild(testElement);
2058
2075
 
2059
2076
  return val;
2060
- }, // END getStyleValue
2061
-
2077
+ },
2062
2078
  // -------------------------------------------------------------------------
2063
2079
  // getStyleSheetLoaded:
2064
2080
  // NOTE:
@@ -2075,14 +2091,12 @@ var j1 = (function () {
2075
2091
  }
2076
2092
  }
2077
2093
  },
2078
-
2079
2094
  // -------------------------------------------------------------------------
2080
2095
  // Returns the names of cookies used for J1 Template
2081
2096
  // -------------------------------------------------------------------------
2082
2097
  getCookieNames: function () {
2083
2098
  return cookie_names;
2084
- }, // end getCookieNames
2085
-
2099
+ },
2086
2100
  // -------------------------------------------------------------------------
2087
2101
  // Set dynamic styles
2088
2102
  // -------------------------------------------------------------------------
@@ -2146,40 +2160,35 @@ var j1 = (function () {
2146
2160
  // $('head').append('<style>.nav-link.active { background-color: ' +tabs_pills_link_color_active+ ' !important; }</style>');
2147
2161
 
2148
2162
  return true;
2149
- }, // END setCss
2150
-
2163
+ },
2151
2164
  // -------------------------------------------------------------------------
2152
2165
  // setState()
2153
2166
  // Set the current (processing) state of the module
2154
2167
  // -------------------------------------------------------------------------
2155
2168
  setState: function (stat) {
2156
2169
  state = stat;
2157
- }, // end setState
2158
-
2170
+ },
2159
2171
  // -------------------------------------------------------------------------
2160
2172
  // getState()
2161
2173
  // Returns the current (processing) state of the module
2162
2174
  // -------------------------------------------------------------------------
2163
2175
  getState: function () {
2164
2176
  return state;
2165
- }, // end getState
2166
-
2177
+ },
2167
2178
  // -------------------------------------------------------------------------
2168
2179
  // setXhrDataState()
2169
2180
  // Set the final (loading) state of an element (partial) loaded via Xhr
2170
2181
  // -------------------------------------------------------------------------
2171
2182
  setXhrDataState: function (obj, stat) {
2172
2183
  j1.xhrDataState[obj] = stat;
2173
- }, // END setXhrDataState
2174
-
2184
+ },
2175
2185
  // -------------------------------------------------------------------------
2176
2186
  // getXhrDataState()
2177
2187
  // Returns the final (loading) state of an element (partial) loaded via Xhr
2178
2188
  // -------------------------------------------------------------------------
2179
2189
  getXhrDataState: function (obj) {
2180
2190
  return j1.xhrDataState[obj];
2181
- }, // END getXhrDataState
2182
-
2191
+ },
2183
2192
  // -------------------------------------------------------------------------
2184
2193
  // setXhrDomState()
2185
2194
  // Set the state of an element loaded via Xhr that is
@@ -2187,8 +2196,7 @@ var j1 = (function () {
2187
2196
  // -------------------------------------------------------------------------
2188
2197
  setXhrDomState: function (obj, stat) {
2189
2198
  j1.xhrDOMState[obj] = stat;
2190
- }, // END setXhrDomState
2191
-
2199
+ },
2192
2200
  // -------------------------------------------------------------------------
2193
2201
  // getXhrDataState()
2194
2202
  // Returns the state of an element loaded via Xhr that is
@@ -2196,24 +2204,21 @@ var j1 = (function () {
2196
2204
  // -------------------------------------------------------------------------
2197
2205
  getXhrDOMState: function (obj) {
2198
2206
  return j1.xhrDOMState[obj];
2199
- }, // END getXhrDOMState
2200
-
2207
+ },
2201
2208
  // -------------------------------------------------------------------------
2202
2209
  // setMode()
2203
2210
  // Set the current mode of the site (web|app)
2204
2211
  // -------------------------------------------------------------------------
2205
2212
  setMode: function (mod) {
2206
2213
  mode = mod;
2207
- }, // END setMode
2208
-
2214
+ },
2209
2215
  // -------------------------------------------------------------------------
2210
2216
  // getMode()
2211
2217
  // Returns the current mode of the site (web|app)
2212
2218
  // -------------------------------------------------------------------------
2213
2219
  getMode: function () {
2214
2220
  return mode;
2215
- }, // END getMode
2216
-
2221
+ },
2217
2222
  // -------------------------------------------------------------------------
2218
2223
  // checkUserAgent()
2219
2224
  // Returns the name (UA) of the web browser
@@ -2224,8 +2229,7 @@ var j1 = (function () {
2224
2229
  } else {
2225
2230
  return false;
2226
2231
  }
2227
- }, // END checkUserAgent
2228
-
2232
+ },
2229
2233
  // -------------------------------------------------------------------------
2230
2234
  // generateId()
2231
2235
  // Generate a unique (thread) id used by the logger
@@ -2238,24 +2242,21 @@ var j1 = (function () {
2238
2242
  result += characters.charAt(Math.floor(Math.random() * charactersLength));
2239
2243
  }
2240
2244
  return result;
2241
- }, // END generateId
2242
-
2245
+ },
2243
2246
  // -------------------------------------------------------------------------
2244
2247
  // getTrue()
2245
2248
  // Returns always true (for testing purposes)
2246
2249
  // -------------------------------------------------------------------------
2247
2250
  getTrue: function () {
2248
2251
  return true;
2249
- }, // END isTrue
2250
-
2252
+ },
2251
2253
  // -------------------------------------------------------------------------
2252
2254
  // getFalse()
2253
2255
  // Returns always false (for testing purposes)
2254
2256
  // -------------------------------------------------------------------------
2255
2257
  getFalse: function () {
2256
2258
  return false;
2257
- }, // END isTrue
2258
-
2259
+ },
2259
2260
  // -------------------------------------------------------------------------
2260
2261
  // goHome()
2261
2262
  // Redirect current page to the browser homepage
@@ -2270,8 +2271,7 @@ var j1 = (function () {
2270
2271
  } else {
2271
2272
  window.location.href = 'about:blank';
2272
2273
  }
2273
- }, // END gohome
2274
-
2274
+ },
2275
2275
  // -------------------------------------------------------------------------
2276
2276
  // goBack()
2277
2277
  // Redirect current page to last visited page (referrer)
@@ -2279,9 +2279,8 @@ var j1 = (function () {
2279
2279
  goBack: function () {
2280
2280
  // where visitor has come from
2281
2281
  window.location.href = document.referrer;
2282
- } // END goBack
2283
-
2284
- }; // END j1 (return)
2282
+ }
2283
+ };
2285
2284
  }) (j1, window);
2286
2285
 
2287
2286
  {% comment %} NOTE: Unexpected token: punc (;) errors if compressed