Last change
on this file since 16658 was
16658,
checked in by plg, 12 years ago
|
(by mistic100, but svn commit crashes for him)
-use random public_id, preventing to access other public collections
-use colorbox to browse inside a collection
-small css fixes
|
File size:
1.5 KB
|
Rev | Line | |
---|
[16625] | 1 | {html_style} |
---|
| 2 | .thumbnails .wrap1 {ldelim} position:relative !important; } |
---|
[16658] | 3 | .addCollection {ldelim} width:100%;height:16px;display:none;position:absolute;top:0;background:rgba(0,0,0,0.8);padding:2px;border-radius:2px;font-size:10px;z-index:100;color:#eee;white-space:nowrap; } |
---|
[16625] | 4 | .wrap1:hover .addCollection {ldelim} display:block; } |
---|
| 5 | {/html_style} |
---|
| 6 | |
---|
| 7 | {footer_script require='jquery'} |
---|
| 8 | jQuery(".addCollection").click(function() {ldelim} |
---|
| 9 | var toggle_id = jQuery(this).data("id"); |
---|
| 10 | var $trigger = jQuery(this); |
---|
| 11 | |
---|
| 12 | jQuery.ajax({ldelim} |
---|
| 13 | type: "POST", |
---|
| 14 | url: "{$USER_COLLEC_PATH}toggle_image.php", |
---|
| 15 | data: {ldelim} {if $COL_ID}"col_id": "{$COL_ID}", {/if}"toggle_id": toggle_id } |
---|
| 16 | }).done(function(msg) {ldelim} |
---|
| 17 | if (msg == "true") {ldelim} |
---|
| 18 | $trigger.html('{'Remove from collection'|@translate} <img src="{$USER_COLLEC_PATH}template/image_delete.png" title="{'Remove from collection'|@translate}">'); |
---|
| 19 | jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) +1); |
---|
| 20 | } else if (msg == "false") {ldelim} |
---|
| 21 | {if $COL_ID} |
---|
| 22 | $trigger.parent(".wrap1").hide("fast", function() {ldelim} $trigger.remove() }); |
---|
| 23 | {else} |
---|
| 24 | $trigger.html('{'Add to collection'|@translate} <img src="{$USER_COLLEC_PATH}template/image_add.png" title="{'Add to collection'|@translate}">'); |
---|
| 25 | {/if} |
---|
| 26 | jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) -1); |
---|
| 27 | } else {ldelim} |
---|
| 28 | $trigger.html('{'Un unknown error occured'|@translate}'); |
---|
| 29 | } |
---|
| 30 | }); |
---|
| 31 | |
---|
| 32 | return false; |
---|
| 33 | }); |
---|
| 34 | {/footer_script} |
---|
Note: See
TracBrowser
for help on using the repository browser.