Changeset 16626 for extensions/BatchDownloader/include/download.inc.php
- Timestamp:
- Jul 11, 2012, 6:45:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/include/download.inc.php
r16609 r16626 31 31 $next_file = $BatchDownloader->createNextArchive(); 32 32 } 33 33 34 34 $set = $BatchDownloader->getSetInfo(); 35 35 … … 38 38 $set['U_DOWNLOAD'] = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip']; 39 39 array_push($page['infos'], sprintf(l10n('The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'), $set['U_DOWNLOAD'])); 40 } 41 42 if ($BatchDownloader->getParam('status') == 'new' and $BatchDownloader->getParam('nb_images') > 0) 43 { 44 $set['U_EDIT_SET'] = BATCH_DOWNLOAD_PUBLIC . 'view&set_id='.$_GET['set_id']; 40 45 } 41 46 … … 128 133 function batch_download_thumbnails_list_prefilter($content, &$smarty) 129 134 { 130 // custom style 131 $search[0] = '{/html_style}'; 132 $replace[0] = '.thumbnails .wrap1 {ldelim} position:relative; } 133 .removeSet {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:0.8em; } 134 .wrap1:hover .removeSet {ldelim} display:block; }' 135 .$search[0]; 136 137 // links 138 $search[1] = '<span class="wrap1">'; 139 $replace[1] = $search[1].' 135 // add links 136 $search = '<span class="wrap1">'; 137 $replace = $search.' 140 138 {strip}<a class="removeSet" href="{$U_VIEW}&remove={$thumbnail.id}" data-id="{$thumbnail.id}" rel="nofollow"> 141 139 {\'Remove from download set\'|@translate} <img src="{$BATCH_DOWNLOAD_PATH}template/image_delete.png" title="{\'Remove from download set\'|@translate}"> 142 140 </a>{/strip}'; 143 141 144 // AJAX request 145 $search[2] = '{/html_style}'; 146 $replace[2] = $search[2].' 147 {footer_script require=\'jquery\'} 148 jQuery(".removeSet").click(function() {ldelim} 149 var toggle_id = jQuery(this).data("id"); 150 var $trigger = jQuery(this); 151 152 jQuery.ajax({ldelim} 153 type: "POST", 154 url: "{$BATCH_DOWNLOAD_PATH}remove_image.php", 155 data: {ldelim} "set_id": "{$SET_ID}", "toggle_id": toggle_id } 156 }).done(function(msg) {ldelim} 157 if (msg == "false") {ldelim} 158 $trigger.parent(".wrap1").hide("fast", function() {ldelim} $trigger.remove() }); 159 jQuery(".nbImages").html(jQuery(".nbImages").html() -1); 160 } else {ldelim} 161 $trigger.html(\'{\'Un unknown error occured\'|@translate}\'); 162 } 163 }); 164 165 return false; 166 }); 167 {/footer_script}'; 142 // custom CSS and AJAX request 143 $content.= file_get_contents(BATCH_DOWNLOAD_PATH.'template/thumbnails_css_js.tpl'); 168 144 169 145 return str_replace($search, $replace, $content);
Note: See TracChangeset
for help on using the changeset viewer.