Last change
on this file since 26235 was
25932,
checked in by mistic100, 11 years ago
|
update for Piwigo 2.6 + code cleaning + fix unable to cancel set during generation
|
File size:
1.2 KB
|
Rev | Line | |
---|
[25932] | 1 | {html_style}{literal} |
---|
| 2 | #thumbnails li { position:relative !important;display:inline-block; } |
---|
| 3 | li .removeSet { 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 !important;color:#eee;white-space:nowrap; } |
---|
| 4 | li:hover .removeSet { display:block !important; } |
---|
| 5 | {/literal}{/html_style} |
---|
[16626] | 6 | |
---|
| 7 | {footer_script require='jquery'} |
---|
[25932] | 8 | jQuery(".removeSet").click(function() { |
---|
[16626] | 9 | var toggle_id = jQuery(this).data("id"); |
---|
| 10 | var $trigger = jQuery(this); |
---|
[25932] | 11 | |
---|
| 12 | jQuery.ajax({ |
---|
[16626] | 13 | type: "POST", |
---|
[23323] | 14 | url: "{$ROOT_URL}index.php", |
---|
[25932] | 15 | data: { |
---|
[23323] | 16 | action: "bd_remove_image", |
---|
| 17 | set_id: "{$SET_ID}", |
---|
| 18 | toggle_id: toggle_id |
---|
| 19 | }, |
---|
[25932] | 20 | success: function(msg) { |
---|
| 21 | if (msg == "ok") { |
---|
| 22 | $trigger.parent("li").hide("fast", function() { |
---|
[23359] | 23 | jQuery(this).remove(); |
---|
| 24 | if (typeof GThumb != "undefined") GThumb.build(); |
---|
| 25 | }); |
---|
[25932] | 26 | |
---|
[23323] | 27 | jQuery(".nbImagesSet").html(parseInt(jQuery(".nbImagesSet").html()) -1); |
---|
| 28 | } |
---|
[25932] | 29 | else { |
---|
| 30 | $trigger.html('{'Un unknown error occured'|translate}'); |
---|
| 31 | } |
---|
[23323] | 32 | }, |
---|
[25932] | 33 | error: function() { |
---|
| 34 | $trigger.html('{'Un unknown error occured'|translate}'); |
---|
[16626] | 35 | } |
---|
| 36 | }); |
---|
[25932] | 37 | |
---|
[16626] | 38 | return false; |
---|
| 39 | }); |
---|
| 40 | {/footer_script} |
---|
Note: See
TracBrowser
for help on using the repository browser.