Commits

Takumi IINO committed 07d1daa

wrap $(document).ready

  • Participants
  • Parent commits c0279b7

Comments (0)

Files changed (1)

kallithea/templates/admin/admin.html

 </div>
 
 <script>
-$('#j_filter').on('click', function(){
-    var jfilter = $('#j_filter');
-    if(jfilter.hasClass('initial')){
-        jfilter.val('');
-    }
-});
-var fix_j_filter_width = function(len){
-    $('#j_filter').css('width', Math.max(80, len*6.50)+'px');
-};
-$('#j_filter').on('keyup', function(){
+$(document).ready(function(){
+    $('#j_filter').on('click', function(){
+        var jfilter = $('#j_filter');
+        if(jfilter.hasClass('initial')){
+            jfilter.val('');
+        }
+    });
+    var fix_j_filter_width = function(len){
+        $('#j_filter').css('width', Math.max(80, len*6.50)+'px');
+    };
+    $('#j_filter').on('keyup', function(){
+        fix_j_filter_width($('#j_filter').val().length);
+    });
+    $('filter_form').on('submit', function(e){
+        e.preventDefault();
+        var val = $('#j_filter').val();
+        window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
+    });
     fix_j_filter_width($('#j_filter').val().length);
 });
-$('filter_form').on('submit', function(e){
-    e.preventDefault();
-    var val = $('#j_filter').val();
-    window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
-});
-fix_j_filter_width($('#j_filter').val().length);
 </script>
 </%def>