Last change
on this file since 18625 was
17178,
checked in by mistic100, 12 years ago
|
rewrite all urls to be compatible with "question_mark_in_urls"
|
File size:
1.6 KB
|
Line | |
---|
1 | {html_style} |
---|
2 | .thumbnails .wrap1 {ldelim} position:relative !important; } |
---|
3 | .wrap1 .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; } |
---|
4 | .wrap1:hover .addCollection {ldelim} display:block; } |
---|
5 | {/html_style} |
---|
6 | |
---|
7 | {if not $NO_AJAX} |
---|
8 | {footer_script require='jquery'} |
---|
9 | jQuery(".addCollection").click(function() {ldelim} |
---|
10 | var toggle_id = jQuery(this).data("id"); |
---|
11 | var $trigger = jQuery(this); |
---|
12 | |
---|
13 | jQuery.ajax({ldelim} |
---|
14 | type: "POST", |
---|
15 | url: "{$ROOT_URL}{$USER_COLLEC_PATH}toggle_image.php", |
---|
16 | data: {ldelim} {if $COL_ID}"col_id": "{$COL_ID}", {/if}"toggle_id": toggle_id } |
---|
17 | }).done(function(msg) {ldelim} |
---|
18 | if (msg == "true") {ldelim} |
---|
19 | $trigger.html('{'Remove from collection'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/image_delete.png" title="{'Remove from collection'|@translate}">'); |
---|
20 | jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) +1); |
---|
21 | } else if (msg == "false") {ldelim} |
---|
22 | {if $COL_ID} |
---|
23 | $trigger.parent(".wrap1").hide("fast", function() {ldelim} $trigger.remove() }); |
---|
24 | if (typeof batchdown_count != 'undefined') batchdown_count-=1; |
---|
25 | {else} |
---|
26 | $trigger.html('{'Add to collection'|@translate} <img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/image_add.png" title="{'Add to collection'|@translate}">'); |
---|
27 | {/if} |
---|
28 | jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) -1); |
---|
29 | } else {ldelim} |
---|
30 | $trigger.html('{'Un unknown error occured'|@translate}'); |
---|
31 | } |
---|
32 | }); |
---|
33 | |
---|
34 | return false; |
---|
35 | }); |
---|
36 | {/footer_script} |
---|
37 | {/if} |
---|
Note: See
TracBrowser
for help on using the repository browser.