Merge branch 'master' of stigma.nowoczesnapolska.org.pl:platforma
authorzuber <marek@stepniowski.com>
Mon, 21 Sep 2009 11:51:12 +0000 (13:51 +0200)
committerzuber <marek@stepniowski.com>
Mon, 21 Sep 2009 11:51:12 +0000 (13:51 +0200)
1  2 
project/templates/explorer/file_list.html

@@@ -2,23 -2,30 +2,23 @@@
  
  {% block extrahead %}
  <link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" />
 -<script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}js/jquery.paginate.js"></script>
      <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
      <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript" charset="utf-8">
  $(function() {
 -    $('#file-list').paginate({itemsPerPage: 15});
 -
 -    $('#file-list-find-button').click(function(event)
 -    {
 -        var expr = new RegExp( $('#file-list-filter').val() );
 -
 -        $('#file-list').filterItems( function(filename) {
 -            return expr.test(filename);
 -        });
 -
 -        event.preventDefault();
 -    });
 -
 -    $('#file-list-reset-button').click(function(event)
 -    {
 -        $('#file-list').filterItems();
 +      function search(event) {
 +        var expr = new RegExp($('#file-list-filter').val(), 'i');
 +      
 +        $('#file-list p').hide().filter(function(index) {
 +            return expr.test($(this).attr('title'));
 +        }).show();
 +    
          event.preventDefault();
 -    });
 +    }
        
 +    $('#file-list-find-button').click(search);
 +      $('#file-list-filter').bind('keyup change DOMAttrModified', search);
 +              
      var defaultOptions = {
          panels: [
          {
          }
      } catch (e) {    
          options = defaultOptions;
 -    }
 +    };
        
        $.each(options.recentFiles, function(index) {
                var fileId = options.recentFiles[index].fileId;
-               $('#recent-file-list ul').append('<li><a href="/editor/' + fileId + '/">' + fileId + '</a></li>');
+               $('#recent-file-list ul').append('<li><a href="{% url editor_base %}'+fileId+'">' + fileId + '</a></li>');
        });
  });
  </script>