浏览代码

Allow global per input lookup

Denis K 9 年之前
父节点
当前提交
bf3d25c079
共有 2 个文件被更改,包括 3 次插入0 次删除
  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();
                 }
             });
         };

文件差异内容过多而无法显示
+ 0 - 0
jet/static/jet/js/main.min.js


部分文件因为文件数量过多而无法显示