j1-template 2022.3.1 → 2022.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/modules/navigator/generator.html +1 -1
  3. data/assets/data/cookieconsent.html +4 -4
  4. data/assets/data/nbinteract.html +128 -0
  5. data/assets/data/quicklinks.html +15 -0
  6. data/assets/data/translator.html +15 -15
  7. data/assets/themes/j1/adapter/js/j1.js +150 -75
  8. data/assets/themes/j1/adapter/js/mmenu.js +25 -3
  9. data/assets/themes/j1/adapter/js/navigator.js +2 -2
  10. data/assets/themes/j1/adapter/js/nbinteract.js +240 -33
  11. data/assets/themes/j1/adapter/js/rangeSlider.js +27 -10
  12. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +27 -54
  13. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  14. data/assets/themes/j1/core/js/template.js +14 -3
  15. data/assets/themes/j1/core/js/template.min.js +1 -1
  16. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  17. data/assets/themes/j1/modules/nbInteract/js/nbinteract/nbinteract-core.js +1 -1
  18. data/assets/themes/j1/modules/nbInteract/js/nbinteract/nbinteract-core.js.map +1 -1
  19. data/assets/themes/j1/modules/nbInteract/js/nbinteract/nbinteract-core.min.js +1 -1
  20. data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.css +5 -0
  21. data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.min.css +1 -1
  22. data/lib/j1/version.rb +1 -1
  23. data/lib/starter_web/Gemfile +1 -1
  24. data/lib/starter_web/_config.yml +1 -1
  25. data/lib/starter_web/_data/j1_config.yml +22 -7
  26. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +51 -41
  27. data/lib/starter_web/_data/modules/defaults/navigator.yml +4 -0
  28. data/lib/starter_web/_data/modules/defaults/nbinteract.yml +99 -1
  29. data/lib/starter_web/_data/modules/defaults/translator.yml +24 -12
  30. data/lib/starter_web/_data/modules/rangeSlider.yml +38 -1
  31. data/lib/starter_web/_plugins/asciidoctor-extensions/range-slider-block.rb +44 -0
  32. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  33. data/lib/starter_web/package.json +1 -1
  34. data/lib/starter_web/pages/public/jupyter/docs/j1-nbinteract-doc.adoc +2 -3
  35. data/lib/starter_web/pages/public/jupyter/docs/nbinteract-doc.adoc +17 -17
  36. data/lib/starter_web/pages/public/jupyter/examples/j1-circular-times-table.adoc +7 -8
  37. data/lib/starter_web/pages/public/jupyter/examples/j1-interactive-widgets.adoc +4 -5
  38. data/lib/starter_web/pages/public/jupyter/examples/j1-odes-in-python.adoc +5 -6
  39. data/lib/starter_web/pages/public/jupyter/examples/j1-testing-plotly.adoc +3 -4
  40. data/lib/starter_web/pages/public/jupyter/examples/j1_climate-change-forecast.adoc +4 -4
  41. data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-checkpoint.ipynb +26 -26
  42. data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_interactive_widgets.ipynb +26 -26
  43. data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_odes_in_python.ipynb +16 -16
  44. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_central_limit_theorem-checkpoint.ipynb +247 -0
  45. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +18 -18
  46. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/nbi_docs_examples_central_limit_theorem.ipynb +1 -2
  47. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/nbi_docs_recipes_graphing.ipynb +18 -18
  48. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_interactive_widgets.html +3 -3
  49. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_odes_in_python.html +10 -10
  50. data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_recipes_graphing.html +4 -4
  51. data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +2 -2
  52. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  53. data/lib/starter_web/utilsrv/package.json +1 -1
  54. metadata +5 -7
  55. data/assets/themes/j1/modules/nbInteract/js/nbinteract/_new/nbinteract-core.js +0 -94
  56. data/assets/themes/j1/modules/nbInteract/js/nbinteract/_new/nbinteract-core.js.map +0 -1
  57. data/assets/themes/j1/modules/nbInteract/js/nbinteract/_old/j1-nbinteract-core.js +0 -94
  58. data/assets/themes/j1/modules/nbInteract/js/nbinteract/_old/j1-nbinteract-core.js.map +0 -1
  59. data/lib/starter_web/pages/public/se/se-fake.adoc +0 -47
@@ -106,6 +106,11 @@ j1.adapter.nbinteract = (function (j1, window) {
106
106
  className: 'spinner', // CSS class assined to the spinner
107
107
  position: 'fixed', // element positioning: absolute|fixed
108
108
  };
109
+
110
+ var nbActions = {
111
+ "resetLocalStorage": true
112
+ };
113
+
109
114
  var spinnerStarted = false; // switch to indicate a started spinner
110
115
  var nbiContentModalInfoID = 'nbiModalInfoBody'; // ID of the content (messages) for the INFO modal
111
116
  var nbiContentModalSuccessID = 'nbiModalSuccessBody'; // ID of the content (messages) for the SUCCESS modal
@@ -116,7 +121,8 @@ j1.adapter.nbinteract = (function (j1, window) {
116
121
  var nbiModalErrorID = '#' + 'nbiModalTLDanger'; // ID of the ERROR modal
117
122
  var nbinteract_prepared = false; // switch to indicate if ???
118
123
  var nbiModalSuccessMessagesID = 'nbiModalSuccessMessages'; // UL contalner SUCCESS messages
119
- var nbiModalErrorMessagesID = 'nbiModalErrorMessages'; // UL contalner ERROR messahes
124
+ var nbiModalErrorMessagesID = 'nbiModalErrorMessages'; // UL contalner ERROR messages
125
+ var nbiCellsRendered = false; // flag indicates if all widgets in page are rendered
120
126
  var nbiShowMessages; // switch to show NBI messages
121
127
  var nbiIndicateNbiActivity; // switch to show a spinner while NBI is being initialized
122
128
  var nbiModalAutoClose; // switch to auto-close nbi message modals
@@ -133,6 +139,10 @@ j1.adapter.nbinteract = (function (j1, window) {
133
139
  var logger;
134
140
  var coreLogger;
135
141
  var logText;
142
+ var widgetCells;
143
+ var widgetCellsRendered;
144
+ var nbiNotebookReady;
145
+ var Events;
136
146
 
137
147
  // ---------------------------------------------------------------------------
138
148
  // Helper functions
@@ -148,6 +158,19 @@ j1.adapter.nbinteract = (function (j1, window) {
148
158
  // -------------------------------------------------------------------------
149
159
  init: function (options) {
150
160
 
161
+ // -----------------------------------------------------------------------
162
+ // global event handler
163
+ // -----------------------------------------------------------------------
164
+ Events = {
165
+ documentReady: function (onDocumentReady) {
166
+ if (document.readyState !== 'loading') {
167
+ onDocumentReady();
168
+ } else {
169
+ document.addEventListener('DOMContentLoaded', onDocumentReady);
170
+ }
171
+ }
172
+ };
173
+
151
174
  // -----------------------------------------------------------------------
152
175
  // Default module settings
153
176
  // -----------------------------------------------------------------------
@@ -169,6 +192,7 @@ j1.adapter.nbinteract = (function (j1, window) {
169
192
  nbiShowMessages = moduleOptions.show_nbi_messages;
170
193
  nbiIndicateNbiActivity = moduleOptions.indicate_nbi_activity;
171
194
  nbiInitMathJax = moduleOptions.nbi_init_mathjax;
195
+ nbiNotebookReady = moduleOptions.notebook_ready;
172
196
 
173
197
  // -----------------------------------------------------------------------
174
198
  // load|configure Mathjax
@@ -176,22 +200,25 @@ j1.adapter.nbinteract = (function (j1, window) {
176
200
  if (nbiInitMathJax) {
177
201
  _this.initMathJax();
178
202
  }
203
+ // -----------------------------------------------------------------------
204
+ // load|configure NBI dialog (modal)
205
+ // -----------------------------------------------------------------------
206
+ _this.loadDialog(moduleOptions);
179
207
 
180
208
  // -----------------------------------------------------------------------
181
- // load HTML data for all modals used by nbInteract
209
+ // load all modals (HTML portion) used by NBI
182
210
  // -----------------------------------------------------------------------
183
211
  _this.loadNbiModals();
184
212
 
185
213
  // -----------------------------------------------------------------------
186
- // load the HTML portion for all textbooks configured|enabled
214
+ // load all textbooks (HTML portion) configured|enabled
187
215
  // -----------------------------------------------------------------------
188
216
  _this.loadNbiTextbooks(moduleOptions);
189
217
 
190
- // -------------------------------------------------------------------
218
+ // -----------------------------------------------------------------------
191
219
  // run a spinner to indicate activity of 'nbInteract' if enabled
192
- // -------------------------------------------------------------------
220
+ // -----------------------------------------------------------------------
193
221
  $(document).ready(function() {
194
-
195
222
  if (nbiIndicateNbiActivity && !spinnerStarted) {
196
223
  spinnerStarted = true;
197
224
  target = document.getElementById('content');
@@ -214,6 +241,19 @@ j1.adapter.nbinteract = (function (j1, window) {
214
241
  // -----------------------------------------------------------------------
215
242
  _this.interactNbiTextbooks(moduleOptions);
216
243
 
244
+ // toggle hide|show the FAB button, if to wait on 'last_widget' rendered
245
+ //
246
+ if (nbiNotebookReady == 'last_widget') {
247
+ var dependencies_met_page_rendered = setInterval(function() {
248
+ if (nbiCellsRendered) {
249
+ $('.fab-btn').show();
250
+ clearInterval(dependencies_met_page_rendered);
251
+ } else {
252
+ $('.fab-btn').hide();
253
+ }
254
+ }, 25); // END interval dependencies_met_page_rendered
255
+ }
256
+
217
257
  }, // END init
218
258
 
219
259
  // -------------------------------------------------------------------------
@@ -463,6 +503,7 @@ j1.adapter.nbinteract = (function (j1, window) {
463
503
  if (nbiButtonState) {
464
504
  // button NOT removed
465
505
  logger.warn('NBI initialialization failed on textbook: {{textbook_id}}');
506
+ spinner.stop();
466
507
  // hide the info modal
467
508
  $(nbiModalSuccessID).modal('hide');
468
509
 
@@ -564,7 +605,7 @@ j1.adapter.nbinteract = (function (j1, window) {
564
605
 
565
606
  // ------------------------------------------------------------------
566
607
  // see: https://www.codingexercises.com/replace-all-instances-of-css-class-in-vanilla-js
567
- // see: https://wiki.selfhtml.org/wiki/JavaScript/Operatoren/Rest-_oder_Spread-Operator
608
+ // see: https://wiki.thishtml.org/wiki/JavaScript/Operatoren/Rest-_oder_Spread-Operator
568
609
  // ------------------------------------------------------------------
569
610
 
570
611
  // disable (Google) translation for all HTML 'output_wrapper' elements
@@ -1007,13 +1048,9 @@ j1.adapter.nbinteract = (function (j1, window) {
1007
1048
  // -----------------------------------------------------------------------
1008
1049
 
1009
1050
  // -----------------------------------------------------------------------
1010
- // command|nbi_init_finished
1011
- //
1012
- if (message.type === 'command' && message.action === 'nbi_init_finished') {
1013
-
1014
- _this.setState('finished');
1015
- logger.debug('\n' + 'state: ' + _this.getState());
1016
- logger.info('\n' + 'initializing module finished');
1051
+ // command|nbi_init_started
1052
+ // -----------------------------------------------------------------------
1053
+ if (message.type === 'command' && message.action === 'nbi_init_started') {
1017
1054
 
1018
1055
  if (nbiShowMessages) {
1019
1056
  if (nbiModalAutoClose) {
@@ -1023,21 +1060,47 @@ j1.adapter.nbinteract = (function (j1, window) {
1023
1060
  }
1024
1061
  }
1025
1062
 
1026
- if (nbiIndicateNbiActivity) {
1027
- spinner.stop();
1063
+ if (nbiNotebookReady == 'first_widget') {
1064
+ if (nbiIndicateNbiActivity) spinner.stop();
1065
+ $('.fab-btn').show();
1028
1066
  }
1029
1067
 
1030
- } // END message command/nbi_init_finished
1068
+ widgetCells = document.querySelectorAll('.output_widget_view').length;
1069
+ var dependencies_met_page_rendered = setInterval(function() {
1070
+ widgetCellsRendered = document.querySelectorAll('.widget-vbox').length;
1071
+ if (widgetCellsRendered >= widgetCells) {
1072
+ logger.info('\n' + 'widgets rendered in page (interactive|total) : ' + widgetCells + '|' + widgetCellsRendered);
1073
+ nbiCellsRendered = true;
1074
+ if (nbiIndicateNbiActivity) spinner.stop();
1075
+ _this.setState('finished');
1076
+ logger.debug('\n' + 'state: ' + _this.getState());
1077
+ logger.info('\n' + 'initializing module finished');
1078
+
1079
+ clearInterval(dependencies_met_page_rendered);
1080
+ }
1081
+ }, 25); // END interval dependencies_met_page_rendered
1031
1082
 
1083
+ // ---------------------------------------------------------------------
1084
+ // show the quicklinks icon
1085
+ // ---------------------------------------------------------------------
1086
+ $('#quickLinksNotebookseButton').show();
1087
+
1088
+ } // END message command/nbi_init_started
1089
+
1090
+ // -----------------------------------------------------------------------
1091
+ // command|mathjax
1092
+ // -----------------------------------------------------------------------
1032
1093
  if (message.type === 'command' && message.action === 'mathjax') {
1033
1094
  logger.error('\n' + 'New Math, ID: ' + message.text);
1034
1095
 
1035
- MathJax.Hub.Startup.signal.Interest(function (message) {
1036
- logger.error("Startup: " + message)
1037
- // if (message.contains('End')) {
1038
- // logger.error("Startup: " + message)
1039
- // }
1040
- });
1096
+ // Register a MathJax callback if page is FULLY rendered
1097
+ // TODO: Dosn't for now tha way !!!
1098
+ // MathJax.Hub.Startup.signal.Interest(function (message) {
1099
+ // logger.error("Startup: " + message)
1100
+ // if (message.contains('End')) {
1101
+ // logger.error("Startup: " + message)
1102
+ // }
1103
+ // });
1041
1104
 
1042
1105
  var dependencies_met_mathjax_rendered = setInterval(function() {
1043
1106
  var elm = document.getElementById('MathJax-Element-6' + '-Frame');
@@ -1051,15 +1114,23 @@ j1.adapter.nbinteract = (function (j1, window) {
1051
1114
  clearInterval(dependencies_met_mathjax_rendered);
1052
1115
  }, 25); // END interval dependencies_met_mathjax_rendered
1053
1116
 
1054
- } // END message command/nbi_init_finished
1117
+ } // END message command/mathjax
1055
1118
 
1056
1119
  // -----------------------------------------------------------------------
1057
- // command|info
1058
- //
1120
+ // command|info
1121
+ // TODO: count messages contain 'Pulling image'.
1122
+ // Potentially a enless loop
1123
+ // -----------------------------------------------------------------------
1059
1124
  if (message.type === 'command' && message.action === 'info') {
1060
1125
  // var reMessageTS = new RegExp('/(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-][01]\d:[0-5]\d)/');
1061
1126
  var messageTS;
1062
1127
 
1128
+ // widget render info messages for logging
1129
+ //
1130
+ if (message.text.includes('Displaying widget') || message.text.includes('First widget')) {
1131
+ logger.debug('\n' + message.text);
1132
+ }
1133
+
1063
1134
  // remove timestamp|loglevel from message if exists
1064
1135
  //
1065
1136
  messageTS = message.text.split('] ')[1];
@@ -1068,7 +1139,6 @@ j1.adapter.nbinteract = (function (j1, window) {
1068
1139
  }
1069
1140
 
1070
1141
  _this.appendModalMessage(messageSuccessUL, message.text)
1071
-
1072
1142
  logger.debug('\n' + message.text);
1073
1143
 
1074
1144
  // show the info modal
@@ -1083,10 +1153,29 @@ j1.adapter.nbinteract = (function (j1, window) {
1083
1153
 
1084
1154
  // -----------------------------------------------------------------------
1085
1155
  // command|error
1086
- //
1156
+ // -----------------------------------------------------------------------
1087
1157
  if (message.type === 'command' && message.action === 'error') {
1088
1158
  var messageTS;
1089
1159
 
1160
+ if (messageTS.contains('Too many users') ||
1161
+ messageTS.contains('Insufficent nodes') ||
1162
+ messageTS.contains('ImagePullBackOff') ||
1163
+ messageTS.contains('failed to connect')
1164
+ ) {
1165
+ var modaBodyText = `
1166
+ The <i>Binder Service</i> is currently not available or is overloaded.
1167
+ All interactive components on the page are <b>not</b> available.
1168
+ You can reload the page or re-open later again.
1169
+ `;
1170
+ logger.error('\n', 'Binder access: failed');
1171
+ if ($(nbiModalTRInfo).is(':hidden')) {
1172
+ document.getElementById('nbiModalTRInfoBody').innerHTML = modaBodyText;
1173
+ $(nbiModalTRInfo).modal('show');
1174
+ }
1175
+
1176
+ return;
1177
+ }
1178
+
1090
1179
  // remove timestamp|loglevel from message if exists
1091
1180
  //
1092
1181
  messageTS = message.text.split('] ')[1];
@@ -1095,14 +1184,13 @@ j1.adapter.nbinteract = (function (j1, window) {
1095
1184
  }
1096
1185
 
1097
1186
  _this.appendModalMessage(messageErrorUL, message.text)
1098
-
1099
1187
  logger.error('\n' + message.text);
1100
1188
 
1101
- // stop the (progress) spinner (currently NOT used)
1189
+ // stop the (progress) spinner
1102
1190
  //
1103
- // if (moduleOptions.indicate_nbi_activity) {
1104
- // spinner.stop();
1105
- // }
1191
+ if (moduleOptions.indicate_nbi_activity) {
1192
+ spinner.stop();
1193
+ }
1106
1194
 
1107
1195
  if (nbiShowMessages) {
1108
1196
  // hide the info modal if shown
@@ -1189,6 +1277,125 @@ j1.adapter.nbinteract = (function (j1, window) {
1189
1277
  });
1190
1278
 
1191
1279
  }, // END checkURL
1280
+
1281
+ // -------------------------------------------------------------------------
1282
+ // loadDialog()
1283
+ // Loads the NBI dialog (modal)
1284
+ // -------------------------------------------------------------------------
1285
+ loadDialog: function (options) {
1286
+ Events.documentReady(function () {
1287
+
1288
+ _this.modal = document.getElementById(options.dialogContainerID);
1289
+ if (!_this.modal) {
1290
+ logger.info('\n' + 'load consent modal');
1291
+
1292
+ _this.modal = document.createElement('div');
1293
+ _this.modal.id = options.dialogContainerID;
1294
+ _this.modal.style.display = 'none';
1295
+
1296
+ _this.modal.setAttribute('class', 'modal fade');
1297
+ _this.modal.setAttribute('tabindex', '-1');
1298
+ _this.modal.setAttribute('role', 'dialog');
1299
+ _this.modal.setAttribute('aria-labelledby', options.dialogContainerID);
1300
+ document.body.append(_this.modal);
1301
+ _this.$modal = $(_this.modal);
1302
+
1303
+ // -------------------------------------------------------------------
1304
+ // load|initialize the dialog (modal content)
1305
+ // -------------------------------------------------------------------
1306
+ var templateUrl = options.contentURL + '/' + 'index.html';
1307
+ $.get(templateUrl)
1308
+ .done(function (data) {
1309
+ // load ALL modals HTML
1310
+ _this.modal.innerHTML = data;
1311
+ // select only the requested modal
1312
+ _this.modal.innerHTML = $('#' + options.xhrDataElement).eq(0).html();
1313
+
1314
+ // set dialog type to 'modal'
1315
+ //
1316
+ $(_this.modal).modal({
1317
+ backdrop: 'static',
1318
+ keyboard: false
1319
+ });
1320
+
1321
+ // register all button links
1322
+ //
1323
+ _this.$buttonDoNotAgree = $('#nbi-buttonDoNotAgree');
1324
+ _this.$buttonAgree = $('#nbi-buttonAgree');
1325
+ _this.$buttonSave = $('#nbi-buttonSave');
1326
+ _this.$buttonAgreeAll = $('#nbi-buttonAgreeAll');
1327
+
1328
+ // register all actions
1329
+ //
1330
+ _this.registerActions();
1331
+
1332
+ // register button event handler
1333
+ //
1334
+ _this.$buttonDoNotAgree.click(function () {
1335
+ _this.doNotAgree();
1336
+ });
1337
+
1338
+ _this.$buttonAgree.click(function () {
1339
+ _this.agreeAll();
1340
+ });
1341
+ })
1342
+ .fail(function () {
1343
+ logger.error('\n' + 'loading nbi dialog (modal): failed');
1344
+ logger.warn('\n' + 'probably no|wrong `contentURL` set');
1345
+ });
1346
+ }
1347
+ }.bind(_this));
1348
+ }, // END loadDialog
1349
+
1350
+ // -------------------------------------------------------------------------
1351
+ // showDialog()
1352
+ // Show the NBI dialog (modal)
1353
+ // -------------------------------------------------------------------------
1354
+ showDialog: function () {
1355
+ this.$modal.modal('show');
1356
+ }, // END showDialog
1357
+
1358
+ // -------------------------------------------------------------------------
1359
+ // registerActions()
1360
+ // register actions to run
1361
+ // -------------------------------------------------------------------------
1362
+ registerActions: function () {
1363
+
1364
+ $('input:checkbox[name="checkboxClearLocalStorage"]').on('click', function (e) {
1365
+ nbActions.resetLocalStorage = $(this).is(':checked');
1366
+ logText = '\n' + 'action ClearLocalStorage changed to: ' + value;
1367
+ logger.info(logText);
1368
+
1369
+ e.stopPropagation();
1370
+ });
1371
+
1372
+ }, // END registerActions
1373
+
1374
+ // -------------------------------------------------------------------------
1375
+ // doNotAgree()
1376
+ // action to run ...
1377
+ // -------------------------------------------------------------------------
1378
+ doNotAgree: function (elmID, msg) {
1379
+ _this.$modal.modal('hide');
1380
+ }, // END doNotAgree
1381
+
1382
+ // -------------------------------------------------------------------------
1383
+ // agreeAll()
1384
+ // caction to run ...
1385
+ // -------------------------------------------------------------------------
1386
+ agreeAll: function (elmID, msg) {
1387
+
1388
+ if (nbActions.resetLocalStorage) {
1389
+ logText = '\n' + 'run action: "Clear Binder Settings"';
1390
+ logger.info(logText);
1391
+ localStorage.removeItem('serverParams');
1392
+ localStorage.removeItem('kernelId');
1393
+ }
1394
+
1395
+ _this.$modal.modal('hide');
1396
+ location.reload(true);
1397
+ }, // END agreeAll
1398
+
1192
1399
  // -------------------------------------------------------------------------
1193
1400
  // appendModalMessage()
1194
1401
  // Appends a message to given (NBI) modal
@@ -93,8 +93,16 @@ j1.adapter.rangeSlider = (function (j1, window) {
93
93
  // Helper functions
94
94
  // ---------------------------------------------------------------------------
95
95
 
96
- function insertAfter(newNode, referenceNode) {
97
- referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
96
+ function prepend(newNode, referenceNode) {
97
+ referenceNode.parentNode.insertBefore(newNode, referenceNode);
98
+ }
99
+
100
+ function append(newNode, referenceNode) {
101
+ referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
102
+ }
103
+
104
+ function insert(newNode, referenceNode) {
105
+ referenceNode.appendChild(newNode);
98
106
  }
99
107
 
100
108
  // ---------------------------------------------------------------------------
@@ -133,7 +141,7 @@ j1.adapter.rangeSlider = (function (j1, window) {
133
141
  if (j1.getState() == 'finished') {
134
142
 
135
143
  logger.info('\n' + 'module is being initialized');
136
-
144
+
137
145
  // initialize state flag
138
146
  _this.setState('started');
139
147
  logger.debug('\n' + 'state: ' + _this.getState());
@@ -163,8 +171,10 @@ j1.adapter.rangeSlider = (function (j1, window) {
163
171
  {% assign format_decimals = range_slider_options.options.format.decimals %}
164
172
  {% assign cbOnUpdate = range_slider_options.options.cbOnUpdate %}
165
173
 
174
+
166
175
  {% comment %} overload defaults by slider options
167
- -------------------------------------------------------------------- {% endcomment %}
176
+ ---------------------------------------------------------------- {% endcomment %}
177
+ {% if item.slider.options.title %} {% assign title = item.slider.options.title %} {% endif %}
168
178
  {% if item.slider.options.label %} {% assign label = item.slider.options.label %} {% endif %}
169
179
  {% if item.slider.options.start %} {% assign start = item.slider.options.start %} {% endif %}
170
180
  {% if item.slider.options.connect %} {% assign connect = item.slider.options.connect %} {% endif %}
@@ -176,7 +186,8 @@ j1.adapter.rangeSlider = (function (j1, window) {
176
186
  {% if item.slider.options.cbOnUpdate %} {% assign cbOnUpdate = item.slider.options.cbOnUpdate %} {% endif %}
177
187
 
178
188
  elms.forEach(function (elm) {
179
- var id = elm.id;
189
+ var id = elm.id;
190
+ var parent = document.getElementById(id);
180
191
 
181
192
  if (id === '{{slider_id}}') {
182
193
  // processing rangeSlider: {{slider_id}}
@@ -198,11 +209,17 @@ j1.adapter.rangeSlider = (function (j1, window) {
198
209
  })
199
210
  });
200
211
 
201
- var el = document.createElement("label");
202
- el.classList.add('range-slider-label');
203
- el.innerHTML = '{{label}}';
204
- var div = document.getElementById(id);
205
- insertAfter(el, div);
212
+ if ('{{title}}'.length) {
213
+ var title = document.createElement('div');
214
+ title.classList.add('range-slider-title');
215
+ title.innerHTML = '{{title}}';
216
+ prepend(title, parent);
217
+ }
218
+
219
+ var label = document.createElement('label');
220
+ label.classList.add('range-slider-label');
221
+ label.innerHTML = '{{label}}';
222
+ insert(label, parent);
206
223
 
207
224
  slider_{{slider_id}}.noUiSlider.on('update', function (values, handle) {
208
225
  var logger = log4javascript.getLogger('j1.adapter.rangeSlider.cbOnUpdate');
@@ -25186,15 +25186,16 @@ li.dropdown.nav-item.nav-sub-item:before {
25186
25186
  transition: all 1s ease-in-out;
25187
25187
  background-color: transparent;
25188
25188
  border-bottom: 0; }
25189
+ nav.navbar.navigator.navbar-transparent .quicklink-nav {
25190
+ padding-left: 15px;
25191
+ margin-left: 30px; }
25189
25192
  nav.navbar.navigator.navbar-transparent.light {
25190
25193
  background-color: rgba(255, 255, 255, 0.3); }
25191
25194
  nav.navbar.navigator.navbar-transparent.dark {
25192
25195
  background-color: rgba(0, 0, 0, 0.3); }
25193
25196
  nav.navbar.navigator.menu-center .container {
25194
25197
  position: relative; }
25195
- nav.navbar.navigator.menu-center .navbar-header {
25196
- position: absolute; }
25197
- nav.navbar.navigator.menu-center .attr-nav {
25198
+ nav.navbar.navigator.menu-center .quicklink-nav {
25198
25199
  position: absolute;
25199
25200
  right: 15px; }
25200
25201
  nav.navbar.navigator.menu-center ul.nav.navbar-center {
@@ -25227,25 +25228,26 @@ li.dropdown.nav-item.nav-sub-item:before {
25227
25228
  background-color: rgba(0, 0, 0, 0.3);
25228
25229
  border-bottom: solid 3px #212121;
25229
25230
  border-left: solid 1px #212121; }
25230
- .attr-nav {
25231
+ .quicklink-nav {
25231
25232
  margin-left: 0;
25232
25233
  margin-right: -20px;
25233
25234
  float: right;
25234
25235
  position: relative;
25235
25236
  display: inline-block;
25236
25237
  margin-right: 1.5rem; }
25237
- .attr-nav > ul {
25238
+ .quicklink-nav > ul {
25238
25239
  list-style: none;
25239
25240
  overflow: hidden; }
25240
- .attr-nav > ul > li {
25241
+ .quicklink-nav > ul > li {
25241
25242
  float: left;
25242
25243
  display: block; }
25243
- .attr-nav > ul > li > a {
25244
+ .quicklink-nav > ul > li > a {
25244
25245
  color: rgba(255, 255, 255, 0.5);
25245
25246
  display: block;
25246
25247
  padding: 10px 5px;
25247
- position: relative; }
25248
- .attr-nav > ul > li > a span.badge {
25248
+ position: relative;
25249
+ border-bottom: unset; }
25250
+ .quicklink-nav > ul > li > a span.badge {
25249
25251
  position: absolute;
25250
25252
  top: 50%;
25251
25253
  margin-top: -15px;
@@ -25255,7 +25257,7 @@ li.dropdown.nav-item.nav-sub-item:before {
25255
25257
  width: 15px;
25256
25258
  height: 15px;
25257
25259
  padding-top: 2px; }
25258
- .attr-nav > ul > li.dropdown ul.dropdown-menu {
25260
+ .quicklink-nav > ul > li.dropdown ul.dropdown-menu {
25259
25261
  border-radius: 0;
25260
25262
  box-shadow: 0 0 0;
25261
25263
  border: solid 1px #e0e0e0;
@@ -25487,11 +25489,11 @@ li.dropdown.nav-item.nav-sub-item:before {
25487
25489
  border: none;
25488
25490
  margin-bottom: 0; }
25489
25491
  nav.navbar.navigator .navbar-collapse.collapse {
25490
- display: none !important; }
25492
+ display: none; }
25491
25493
  nav.navbar.navigator .navbar-collapse.collapse.in {
25492
- display: block !important; }
25494
+ display: block; }
25493
25495
  nav.navbar.navigator .navbar-collapse.collapse.show {
25494
- display: block !important; }
25496
+ display: block; }
25495
25497
  nav.navbar.navigator .navbar-nav {
25496
25498
  padding-top: 5px;
25497
25499
  padding-left: 15px;
@@ -25621,11 +25623,10 @@ li.dropdown.nav-item.nav-sub-item:before {
25621
25623
  border: 0;
25622
25624
  border-color: transparent;
25623
25625
  border-radius: 0;
25626
+ box-shadow: unset;
25624
25627
  z-index: 2; }
25625
25628
  nav.navbar.navigator .navbar-toggler:hover {
25626
25629
  color: rgba(255, 255, 255, 0.9); }
25627
- nav.navbar.navigator .navbar-toggler:focus {
25628
- color: rgba(255, 255, 255, 0.9); }
25629
25630
  nav.navbar.navigator .dropdown-item:focus {
25630
25631
  background-color: rgba(0, 0, 0, 0.5) !important; }
25631
25632
  nav.navbar.navigator .dropdown-item:hover {
@@ -25679,19 +25680,19 @@ li.dropdown.nav-item.nav-sub-item:before {
25679
25680
  nav.navbar.navigator.navbar-transparent.light {
25680
25681
  background-color: rgba(0, 0, 0, 0.4) !important;
25681
25682
  border-bottom: 0; }
25682
- .attr-nav {
25683
+ .quicklink-nav {
25683
25684
  position: absolute;
25684
25685
  right: 1.5rem;
25685
25686
  margin-right: 0;
25686
25687
  overflow: hidden; }
25687
- .attr-nav > ul {
25688
+ .quicklink-nav > ul {
25688
25689
  padding: 0;
25689
25690
  margin: 0 -15px -7px 0; }
25690
- .attr-nav > ul > li > a {
25691
+ .quicklink-nav > ul > li > a {
25691
25692
  padding: 16px 15px 15px; }
25692
- .attr-nav > ul > li.dropdown > a.dropdown-toggle:before {
25693
+ .quicklink-nav > ul > li.dropdown > a.dropdown-toggle:before {
25693
25694
  display: none; }
25694
- .attr-nav > ul > li.dropdown ul.dropdown-menu {
25695
+ .quicklink-nav > ul > li.dropdown ul.dropdown-menu {
25695
25696
  margin-top: 2px;
25696
25697
  margin-left: 55px;
25697
25698
  width: 350px;
@@ -25711,45 +25712,17 @@ li.dropdown.nav-item.nav-sub-item:before {
25711
25712
  .nav-item + .nav-item {
25712
25713
  margin-left: 0 !important; } }
25713
25714
 
25714
- @media screen and (min-width: 768px), screen and (max-width: 575px) {
25715
- nav.navbar.navigator .navbar-header {
25716
- padding-left: 15px;
25717
- padding-right: 15px; }
25718
- nav.navbar.navigator .navbar-nav {
25719
- padding-top: 5px;
25720
- padding-left: 15px;
25721
- padding-right: 35px; }
25722
- nav.navbar.navigator.navbar-mobile .navbar-collapse {
25723
- margin-left: 0; }
25724
- nav.navbar.navigator.navbar-mobile.navbar-sidebar .share {
25725
- padding: 30px 15px !important;
25726
- margin-bottom: 0; }
25727
- nav.navbar.navigator.navbar-mobile ul.nav {
25728
- margin-left: -15px;
25729
- border-top: solid 1px #ffffff; }
25730
- nav.navbar.navigator.navbar-sidebar .share {
25731
- padding: 30px 15px !important;
25732
- padding: 30px 0 !important;
25733
- margin-bottom: 0; }
25734
- nav.navigator.navbar-full .navbar-collapse {
25735
- left: 15px; }
25736
- nav.navigator.navbar-full .navbar-header {
25737
- padding-right: 0; }
25738
- nav.navigator.navbar-full .navbar-toggle {
25739
- margin-right: -15px; }
25740
- nav.navigator.navbar-full ul.nav > li > a {
25741
- color: rgba(255, 255, 255, 0.5);
25742
- font-size: 18px !important;
25743
- line-height: 24px !important;
25744
- padding: 5px 10px !important; }
25745
- .attr-nav > ul {
25715
+ @media screen and (max-width: 992px), screen and (max-width: 575px) {
25716
+ ul#desktop_menu {
25717
+ display: none; }
25718
+ .quicklink-nav > ul {
25746
25719
  margin-right: -10px; }
25747
- .attr-nav > ul > li > a {
25720
+ .quicklink-nav > ul > li > a {
25748
25721
  color: rgba(255, 255, 255, 0.5);
25749
25722
  padding: 16px 10px 15px;
25750
25723
  padding-left: 0;
25751
25724
  border-bottom: unset; }
25752
- .attr-nav > ul > li.dropdown ul.dropdown-menu {
25725
+ .quicklink-nav > ul > li.dropdown ul.dropdown-menu {
25753
25726
  left: -275px; }
25754
25727
  .top-search .container {
25755
25728
  padding: 0 15px; }