Changeset 16626
- Timestamp:
- Jul 11, 2012, 6:45:20 PM (12 years ago)
- Location:
- extensions/BatchDownloader
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/admin/template/style.css
r16622 r16626 32 32 } 33 33 .table2 .date { 34 width: 190px;34 width:200px; 35 35 } 36 36 .table2 .size { -
extensions/BatchDownloader/include/BatchDownloader.class.php
r16622 r16626 426 426 function getDownloadList($url='') 427 427 { 428 if ($this->data['nb_images'] == 0) 429 { 430 return '<b>'.l10n('No archive').'</b>'; 431 } 432 428 433 $out = ''; 429 434 for ($i=1; $i<=$this->data['nb_zip']; $i++) … … 490 495 'DATE_CREATION' => format_date($this->data['date_creation'], true), 491 496 ); 492 493 if ($this->data['status'] == 'new')494 {495 $set['U_EDIT_SET'] = BATCH_DOWNLOAD_PUBLIC . 'view&set_id='.$this->data['set_id'];496 }497 497 498 498 switch ($this->data['type']) -
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); -
extensions/BatchDownloader/template/init_zip.tpl
r16609 r16626 1 1 {combine_css path=$BATCH_DOWNLOAD_PATH|@cat:"template/style.css"} 2 3 {$MENUBAR}4 2 5 3 {if $set.U_DOWNLOAD} … … 9 7 {/if} 10 8 9 {if $themeconf.name != "stripped" and $themeconf.parent != "stripped" and $themeconf.name != "simple-grey" and $themeconf.parent != "simple"} 10 {$MENUBAR} 11 {else} 12 {assign var="intern_menu" value="true"} 13 {/if} 11 14 <div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}"> 15 {if $intern_menu}{$MENUBAR}{/if} 16 12 17 <div class="titrePage"> 13 18 <ul class="categoryActions"></ul> -
extensions/BatchDownloader/template/view.tpl
r16609 r16626 1 {$MENUBAR} 1 {if $themeconf.name != "stripped" and $themeconf.parent != "stripped" and $themeconf.name != "simple-grey" and $themeconf.parent != "simple"} 2 {$MENUBAR} 3 {else} 4 {assign var="intern_menu" value="true"} 5 {/if} 6 <div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}"> 7 {if $intern_menu}{$MENUBAR}{/if} 2 8 3 <div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}"> 4 <div class="titrePage{if isset($chronology.TITLE)} calendarTitleBar{/if}"> 9 <div class="titrePage"> 5 10 <ul class="categoryActions"></ul> 6 11 <h2>{$TITLE}</h2> … … 11 16 {/if} 12 17 13 <p> 18 {if $set} 19 <fieldset> 14 20 <h3>{$set.NAME}</h3> 15 21 {if $set.COMMENT}<blockquote>{$set.COMMENT}</blockquote>{/if} 16 {'Nb images'|@translate}: <span class="nbImages">{$set.NB_IMAGES}</span> 17 </p> 22 {assign var="nb_images" value='<span class="nbImagesSet">'|@cat:$set.NB_IMAGES|@cat:'</span>'} 23 {'%d photos'|@translate|replace:'%d':'%s'|sprintf:$nb_images} 24 </fieldset> 18 25 19 26 … … 22 29 {$THUMBNAILS} 23 30 </ul> 31 {else} 32 {'This download set is empty'|@translate} 24 33 {/if} 25 34 … … 27 36 28 37 <p style="text-align:center;font-weight:bold;margin:20px;"><a href="{$U_INIT_ZIP}" rel="nofollow">{'Return to download page'|@translate}</a></p> 38 {/if} 29 39 30 40 </div>{* <!-- content --> *}
Note: See TracChangeset
for help on using the changeset viewer.