source: extensions/UserCollections/template/picture_button.tpl @ 23361

Last change on this file since 23361 was 23361, checked in by mistic100, 11 years ago

all collections are "active", display a menu when adding to a collection

File size: 1012 bytes
Line 
1{include file=$USER_COLLEC_ABS_PATH|cat:'template/thumbnails_css_js.tpl'}
2
3{footer_script require='jquery'}{literal}
4jQuery().ready(function() {
5  jQuery("#collectionsLink").click(function() {
6          var elt = jQuery("#collectionsDropdown");
7
8    elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
9      .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
10      .toggle();
11
12    return false;
13  });
14
15  jQuery("#collectionsDropdown").on("mouseleave", function() {
16    jQuery(this).hide();
17  });
18});
19{/literal}{/footer_script}
20
21<a id="collectionsLink" title="{'Add to collection'|@translate}" class="pwg-state-default pwg-button addCollection" rel="nofollow" data-id="{$current.id}" data-cols="[{$CURRENT_COLLECTIONS}]">
22  <span class="pwg-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_add.png') center center no-repeat;"></span>
23  <span class="pwg-button-text">{'Add to collection'|@translate}</span>
24</a>
Note: See TracBrowser for help on using the repository browser.