X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1a2a6714d405526c16ac4f0900b6dfb0c4c83b6a..8d62c0c82718b59c077b611fca1cd9f8054a8c41:/project/templates/explorer/file_list.html diff --git a/project/templates/explorer/file_list.html b/project/templates/explorer/file_list.html index 48be7f59..4e5a12ad 100644 --- a/project/templates/explorer/file_list.html +++ b/project/templates/explorer/file_list.html @@ -3,6 +3,8 @@ {% 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}); @@ -23,6 +25,38 @@ $(function() { $('#file-list').filterItems(); event.preventDefault(); }); + + var defaultOptions = { + panels: [ + { + name: 'htmleditor', + ratio: 0.5 + }, + + { + name: 'gallery', + ratio: 0.5 + } + ], + recentFiles: [], + lastUpdate: 0 + }; + + var options = null; + try { + var cookie = $.cookie('options'); + options = $.secureEvalJSON(cookie); + if (!options) { + options = defaultOptions; + } + } 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>'); + }); }); </script> {% endblock extrahead %} @@ -45,6 +79,12 @@ $(function() { </div> </div> +<div id="recent-file-list"> + <h2>Ostatnio oglÄ dane pliki:</h2> + <ul> + </ul> +</div> + {% if perms.explorer.can_add_files %} <div class="upload-file-widget"> <h2>Dodaj nowy utwór</h2>