Sfoglia il codice sorgente

Allow global per input lookup

Denis K 9 anni fa
parent
commit
bf3d25c079
2 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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();
                 }
             });
         };

File diff suppressed because it is too large
+ 0 - 0
jet/static/jet/js/main.min.js


Some files were not shown because too many files changed in this diff