Index: /extensions/BatchDownloader/admin/template/style.css
===================================================================
--- /extensions/BatchDownloader/admin/template/style.css (revision 16625)
+++ /extensions/BatchDownloader/admin/template/style.css (revision 16626)
@@ -32,5 +32,5 @@
}
.table2 .date {
- width:190px;
+ width:200px;
}
.table2 .size {
Index: /extensions/BatchDownloader/include/BatchDownloader.class.php
===================================================================
--- /extensions/BatchDownloader/include/BatchDownloader.class.php (revision 16625)
+++ /extensions/BatchDownloader/include/BatchDownloader.class.php (revision 16626)
@@ -426,4 +426,9 @@
function getDownloadList($url='')
{
+ if ($this->data['nb_images'] == 0)
+ {
+ return ''.l10n('No archive').'';
+ }
+
$out = '';
for ($i=1; $i<=$this->data['nb_zip']; $i++)
@@ -490,9 +495,4 @@
'DATE_CREATION' => format_date($this->data['date_creation'], true),
);
-
- if ($this->data['status'] == 'new')
- {
- $set['U_EDIT_SET'] = BATCH_DOWNLOAD_PUBLIC . 'view&set_id='.$this->data['set_id'];
- }
switch ($this->data['type'])
Index: /extensions/BatchDownloader/include/download.inc.php
===================================================================
--- /extensions/BatchDownloader/include/download.inc.php (revision 16625)
+++ /extensions/BatchDownloader/include/download.inc.php (revision 16626)
@@ -31,5 +31,5 @@
$next_file = $BatchDownloader->createNextArchive();
}
-
+
$set = $BatchDownloader->getSetInfo();
@@ -38,4 +38,9 @@
$set['U_DOWNLOAD'] = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip'];
array_push($page['infos'], sprintf(l10n('The archive is downloading, if the download doesn\'t start automatically please click here'), $set['U_DOWNLOAD']));
+ }
+
+ if ($BatchDownloader->getParam('status') == 'new' and $BatchDownloader->getParam('nb_images') > 0)
+ {
+ $set['U_EDIT_SET'] = BATCH_DOWNLOAD_PUBLIC . 'view&set_id='.$_GET['set_id'];
}
@@ -128,42 +133,13 @@
function batch_download_thumbnails_list_prefilter($content, &$smarty)
{
- // custom style
- $search[0] = '{/html_style}';
- $replace[0] = '.thumbnails .wrap1 {ldelim} position:relative; }
-.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; }
-.wrap1:hover .removeSet {ldelim} display:block; }'
-.$search[0];
-
- // links
- $search[1] = '';
- $replace[1] = $search[1].'
+ // add links
+ $search = '';
+ $replace = $search.'
{strip}
{\'Remove from download set\'|@translate}
{/strip}';
- // AJAX request
- $search[2] = '{/html_style}';
- $replace[2] = $search[2].'
-{footer_script require=\'jquery\'}
-jQuery(".removeSet").click(function() {ldelim}
- var toggle_id = jQuery(this).data("id");
- var $trigger = jQuery(this);
-
- jQuery.ajax({ldelim}
- type: "POST",
- url: "{$BATCH_DOWNLOAD_PATH}remove_image.php",
- data: {ldelim} "set_id": "{$SET_ID}", "toggle_id": toggle_id }
- }).done(function(msg) {ldelim}
- if (msg == "false") {ldelim}
- $trigger.parent(".wrap1").hide("fast", function() {ldelim} $trigger.remove() });
- jQuery(".nbImages").html(jQuery(".nbImages").html() -1);
- } else {ldelim}
- $trigger.html(\'{\'Un unknown error occured\'|@translate}\');
- }
- });
-
- return false;
-});
-{/footer_script}';
+ // custom CSS and AJAX request
+ $content.= file_get_contents(BATCH_DOWNLOAD_PATH.'template/thumbnails_css_js.tpl');
return str_replace($search, $replace, $content);
Index: /extensions/BatchDownloader/template/init_zip.tpl
===================================================================
--- /extensions/BatchDownloader/template/init_zip.tpl (revision 16625)
+++ /extensions/BatchDownloader/template/init_zip.tpl (revision 16626)
@@ -1,5 +1,3 @@
{combine_css path=$BATCH_DOWNLOAD_PATH|@cat:"template/style.css"}
-
-{$MENUBAR}
{if $set.U_DOWNLOAD}
@@ -9,5 +7,12 @@
{/if}
+{if $themeconf.name != "stripped" and $themeconf.parent != "stripped" and $themeconf.name != "simple-grey" and $themeconf.parent != "simple"}
+ {$MENUBAR}
+{else}
+ {assign var="intern_menu" value="true"}
+{/if}