Merge branch 'master' of git@stigma:platforma
[redakcja.git] / project / templates / explorer / panels / gallery.html
1 <div class="toolbar" style="height: 24px">
2         <select name="folders" class="id_folders">
3                 <option value="" selected="selected">-- Wybierz folder z obrazkami --</option>
4         <option value="andersen_basnie">andersen_basnie</option>
5         </select>
6 </div>
7
8 <div class="images-wrap" style="position: absolute; top: 24px; left:0px; right:0px; bottom: 0px;">
9         <div class="images"><!-- To jest div na obrazki, które są wstawiane później --></div>
10 </div>
11 <script type="text/javascript" charset="utf-8">
12
13 panel_hooks = {
14         load: function() {
15                 var contentDiv = this.contentDiv;
16                 $('.id_folders', contentDiv).change(function() {
17                 $('.images', contentDiv).fadeOut('slow', function() { 
18                     $(this).html('').load('{% url folder_image_ajax %}' + $('.id_folders', contentDiv).val() + '/',  function() {
19                     $('.images-wrap', contentDiv).data('lazyload:lastCheckedScrollTop', -10000);
20                 });
21                     })
22                 });
23                 
24                 $('.images-wrap', contentDiv).lazyload('.image-box', 
25                         {threshold: 640 * 10, scrollTreshold: 640 * 5}
26                 );
27         },
28     refresh: function() {
29         return true; // gallery is always fresh
30     },
31     dirty: function() {
32         return true; // and it doesn't get dirty 
33     }
34 };
35 </script>