cronapp-framework-js 3.0.0-SP.33 → 3.0.0-SP.34

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.
Files changed (26) hide show
  1. package/components/crn-navbar.components.json +25 -0
  2. package/css/themes/custom/readable/button-readable.css +61 -1
  3. package/css/themes/custom/readable/custom-readable.css +241 -26
  4. package/css/themes/custom/readable/navbar-readable.css +1 -2
  5. package/css/themes/custom/readable/panel-readable.css +6 -8
  6. package/css/themes/custom/superhero/button-superhero.css +1 -1
  7. package/css/themes/custom/superhero/custom-superhero.css +347 -45
  8. package/css/themes/custom/superhero/navbar-superhero.css +5 -1
  9. package/css/themes/custom/superhero/panel-superhero.css +4 -5
  10. package/css/themes/custom/superhero/tabs-superhero.css +1 -1
  11. package/css/themes/custom/theme-general/menu.css +0 -4
  12. package/css/themes/custom/theme-general/table-grid.css +1 -1
  13. package/dist/css/themes/custom/readable/button-readable.css +1 -1
  14. package/dist/css/themes/custom/readable/custom-readable.css +1 -1
  15. package/dist/css/themes/custom/readable/navbar-readable.css +1 -1
  16. package/dist/css/themes/custom/readable/panel-readable.css +1 -1
  17. package/dist/css/themes/custom/superhero/button-superhero.css +1 -1
  18. package/dist/css/themes/custom/superhero/custom-superhero.css +1 -1
  19. package/dist/css/themes/custom/superhero/navbar-superhero.css +1 -1
  20. package/dist/css/themes/custom/superhero/panel-superhero.css +1 -1
  21. package/dist/css/themes/custom/superhero/tabs-superhero.css +1 -1
  22. package/dist/css/themes/custom/theme-general/menu.css +1 -1
  23. package/dist/css/themes/custom/theme-general/table-grid.css +1 -1
  24. package/dist/js/directives.js +9 -9
  25. package/js/directives.js +67 -0
  26. package/package.json +1 -1
package/js/directives.js CHANGED
@@ -5399,6 +5399,73 @@
5399
5399
  mainView.classList.add("main-view-retratil");
5400
5400
  }
5401
5401
  });
5402
+
5403
+ let baseNav = element.closest('nav');
5404
+ if (baseNav && baseNav.length) {
5405
+
5406
+ let subMenuOnHover = !baseNav.hasClass('submenu-click');
5407
+ let baseNavId = baseNav.attr('id');
5408
+ if (subMenuOnHover) {
5409
+ let alreadyHooked = $(`#${baseNavId} .dropdown-submenu`).data('hooked');
5410
+ if (!alreadyHooked) {
5411
+ $(`#${baseNavId} .dropdown-submenu`).on('mouseenter', function (e) {
5412
+ $(this).children('.dropdown-menu').addClass('show');
5413
+ }).on('mouseleave', function (e) {
5414
+ $(this).children('.dropdown-menu').removeClass('show');
5415
+ });
5416
+ $(`#${baseNavId} .dropdown-submenu`).data('hooked', true);
5417
+ }
5418
+
5419
+ }
5420
+ else {
5421
+ let alreayHooked = $(`#${baseNavId} .dropdown-menu a.dropdown-toggle`).data('hooked');
5422
+ if (!alreayHooked) {
5423
+ $(`#${baseNavId} .dropdown-menu a.dropdown-toggle`).on('click', function(e) {
5424
+ if (!$(this).next().hasClass('show')) {
5425
+ $(this).parents('.dropdown-menu').first().find('.show').removeClass('show');
5426
+ }
5427
+ var $subMenu = $(this).next('.dropdown-menu');
5428
+ $subMenu.toggleClass('show');
5429
+
5430
+ $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {
5431
+ $('.dropdown-submenu .show').removeClass('show');
5432
+ });
5433
+
5434
+ if ($subMenu.length) {
5435
+ return false;
5436
+ }
5437
+ else {
5438
+ $('.dropdown-menu').removeClass('show');
5439
+ }
5440
+ });
5441
+ $(`#${baseNavId} .dropdown-menu a.dropdown-toggle`).data('hooked', true);
5442
+ }
5443
+
5444
+ let alreadyHookedBs = $(`#${baseNavId} .dropdown.nav-item`).data('hooked');
5445
+ if (!alreadyHookedBs) {
5446
+ $(`#${baseNavId} .dropdown.nav-item`).on('hidden.bs.dropdown', function (e) {
5447
+ $('.dropdown-submenu .show').removeClass("show");
5448
+ $('.dropdown-menu .show').removeClass('show');
5449
+ });
5450
+ $(`#${baseNavId} .dropdown.nav-item`).data('hooked', true);
5451
+ }
5452
+
5453
+ }
5454
+
5455
+ }
5456
+ else {
5457
+ let menuWihtoutNavBar_id = $(element).find('ul:first').attr('id')
5458
+ let alreadyHooked = $(`#${menuWihtoutNavBar_id} .dropdown-submenu`).data('hooked');
5459
+ if (!alreadyHooked) {
5460
+ $(`#${menuWihtoutNavBar_id} .dropdown-submenu`).on('mouseenter', function (e) {
5461
+ $(this).children('.dropdown-menu').addClass('show');
5462
+ }).on('mouseleave', function (e) {
5463
+ $(this).children('.dropdown-menu').removeClass('show');
5464
+ });
5465
+ $(`#${menuWihtoutNavBar_id} .dropdown-submenu`).data('hooked', true);
5466
+ }
5467
+ }
5468
+
5402
5469
  });
5403
5470
  });
5404
5471
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cronapp-framework-js",
3
- "version": "3.0.0-SP.33",
3
+ "version": "3.0.0-SP.34",
4
4
  "description": "Javascript library for CronApp's projects",
5
5
  "main": "cronapp.framework.js",
6
6
  "scripts": {