Bladeren bron

Fix theme click hash

Denis K 8 jaren geleden
bovenliggende
commit
95083993b3
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 0 1
      jet/static/jet/js/src/features/dashboard.js
  2. 3 1
      jet/static/jet/js/src/features/themes.js

+ 0 - 1
jet/static/jet/js/src/features/dashboard.js

@@ -28,7 +28,6 @@ Dashboard.prototype = {
 
         $dashboard.find('.dashboard-tools-toggle').on('click', function (e) {
             e.preventDefault();
-
             $dashboard.find('.dashboard-tools').toggleClass('visible');
         });
 

+ 3 - 1
jet/static/jet/js/src/features/themes.js

@@ -10,7 +10,9 @@ Themes.prototype = {
         $('.user-tools-welcome-msg').after($chooser);
     },
     initChooser: function() {
-        $('.choose-theme').on('click', function () {
+        $('.choose-theme').on('click', function (e) {
+            e.preventDefault();
+            
             var $link = $(this);
 
             $.cookie('JET_THEME', $link.data('theme'), { expires: 365, path: '/' });