Advertisement
utan

Oxwall, photo plugin top rated

Dec 24th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.35 KB | None | 0 0
  1.  
  2. {script}
  3. {literal}
  4.     $(document).ready(function(){
  5.         var $tb_container = $(".ow_box_toolbar_cont", $("#photo_list_widget").parents('.ow_box, .ow_box_empty').get(0));
  6.  
  7.         $("#photo-widget-menu-featured").click(function(){
  8.             $tb_container.html($("div#photo-widget-toolbar-featured").html());
  9.         });
  10.  
  11.         $("#photo-widget-menu-latest").click(function(){
  12.             $tb_container.html($("div#photo-widget-toolbar-latest").html());
  13.         });
  14.  
  15.         $("#photo-widget-menu-top-rated").click(function(){
  16.             $tb_container.html($("div#photo-widget-toolbar-top-rated").html());
  17.         });
  18.     });
  19. {/literal}
  20. {/script}
  21.  
  22. <div id="photo_list_widget">
  23.  
  24.     {if $latest || $featured || $toprated} {if isset($menu)}{$menu}{/if} {/if}
  25.    
  26.     {capture assign='nocontent'}
  27.        <div class="ow_nocontent">{text key='photo+no_photo'}, <a href="{url_for for="PHOTO_CTRL_Upload:index"}">{text key='photo+add_new'}</a></div>
  28.     {/capture}
  29.    
  30.     <div class="ow_lp_photos ow_center" id="{$items.latest.contId}" style="display: none">
  31.         {foreach from=$latest item='p'}<a class="ow_lp_wrapper" rel="{$p.id}" href="{url_for_route for="view_photo:[id=>`$p.id`]"}"><img src="{$p.url}" /></a>{foreachelse}
  32.             {$nocontent}
  33.         {/foreach}
  34.     </div>
  35.  
  36.     {if $featured}
  37.     <div class="ow_lp_photos ow_center" id="{$items.featured.contId}" style="display: none">
  38.         {foreach from=$featured item='p'}<a class="ow_lp_wrapper" rel="{$p.id}" href="{url_for_route for="view_photo:[id=>`$p.id`]"}"><img src="{$p.url}" /></a>{foreachelse}
  39.             {$nocontent}  
  40.         {/foreach}
  41.     </div>
  42.     {/if}
  43.    
  44.     <div class="ow_lp_photos ow_center" id="{$items.toprated.contId}" style="display: block">
  45.         {foreach from=$toprated item='p'}<a class="ow_lp_wrapper" rel="{$p.id}" href="{url_for_route for="view_photo:[id=>`$p.id`]"}"><img src="{$p.url}" /></a>{foreachelse}
  46.             {$nocontent}  
  47.         {/foreach}
  48.     </div>
  49.  
  50.     {if $latest}<div id="photo-widget-toolbar-latest" style="display: none">{decorator name='box_toolbar' itemList=$toolbars.latest}</div>{/if}
  51.     {if $featured}<div id="photo-widget-toolbar-featured" style="display: none">{decorator name='box_toolbar' itemList=$toolbars.featured}</div>{/if}  
  52.     {if $toprated}<div id="photo-widget-toolbar-top-rated" style="display: none">{decorator name='box_toolbar' itemList=$toolbars.toprated}</div>{/if}
  53.    
  54. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement