Parcourir la source

Allow global per input lookup

Denis K il y a 9 ans
Parent
commit
bf3d25c079
2 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      jet/static/jet/js/main.js
  2. 0 0
      jet/static/jet/js/main.min.js

+ 3 - 0
jet/static/jet/js/main.js

@@ -5,9 +5,12 @@
                 var $select = $(this);
                 var $selectedOption = $select.find('option:selected');
                 var url = $selectedOption.data('url');
+                var querysetLookup = $select.data('queryset--lookup');
 
                 if (url) {
                     document.location = $selectedOption.data('url');
+                } else if (querysetLookup) {
+                    document.location = '?' + querysetLookup + '=' + $selectedOption.val();
                 }
             });
         };

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
jet/static/jet/js/main.min.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff