Changeset 21206


Ignore:
Timestamp:
Mar 5, 2013, 1:04:50 PM (11 years ago)
Author:
mistic100
Message:

-define body_id and fix breadcrumb
-fix edit page with simple and gthumb+

Location:
extensions/BatchDownloader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/include/download.inc.php

    r17915 r21206  
    137137{
    138138  // add links
    139   $search = '<span class="wrap1">';
    140   $replace = $search.'
     139  $search = '#(<li>|<li class="gthumb">)#';
     140  $replace = '$1
    141141{strip}<a class="removeSet" href="{$U_VIEW}&amp;remove={$thumbnail.id}" data-id="{$thumbnail.id}" rel="nofollow">
    142142{\'Remove from download set\'|@translate}&nbsp;<img src="{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/image_delete.png" title="{\'Remove from download set\'|@translate}">
     
    146146  $content.= file_get_contents(BATCH_DOWNLOAD_PATH.'template/thumbnails_css_js.tpl');
    147147
    148   return str_replace($search, $replace, $content);
     148  return preg_replace($search, $replace, $content);
    149149}
    150150
  • extensions/BatchDownloader/include/events.inc.php

    r20138 r21206  
    1313    if (check_download_access() === false) access_denied();
    1414   
     15    add_event_handler('loc_begin_page_header', 'batch_download_page_header');
     16   
    1517    $page['section'] = 'download';
    16     $page['title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].l10n('Batch Downloader').$conf['level_separator'];
     18    $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].l10n('Batch Downloader').$conf['level_separator'];
     19    $page['title'] = l10n('Batch Downloader');
    1720   
    1821    switch (@$tokens[1])
     
    2023      case 'init_zip':
    2124        $page['sub_section'] = 'init_zip';
    22         $page['title'].= l10n('Generate ZIP');
     25        $page['section_title'].= l10n('Generate ZIP');
    2326        break;
    2427      case 'view':
    2528        $page['sub_section'] = 'view';
    26         $page['title'].= l10n('Edit the set');
     29        $page['section_title'].= l10n('Edit the set');
    2730        break;
    2831      default:
     
    3033    }
    3134  }
     35}
     36
     37function batch_download_page_header()
     38{
     39  global $page;
     40  $page['body_id'] = 'theBatchDownloader';
    3241}
    3342
  • extensions/BatchDownloader/template/thumbnails_css_js.tpl

    r17177 r21206  
    11{html_style}
    2 .thumbnails  .wrap1 {ldelim} position:relative; }
    3 .wrap1 .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:10px;z-index:100;color:#eee;white-space:nowrap; }
    4 .wrap1:hover .removeSet {ldelim} display:block;
     2#thumbnails li {ldelim} position:relative !important;display:inline-block; }
     3li .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:10px;z-index:100 !important;color:#eee;white-space:nowrap; }
     4li:hover .removeSet {ldelim} display:block !important; }
    55{/html_style}
    66
     
    1616  }).done(function(msg) {ldelim}
    1717    if (msg == "false") {ldelim}
    18       $trigger.parent(".wrap1").hide("fast", function() {ldelim} $trigger.remove() });
     18      $trigger.parent("li").hide("fast", function() {ldelim} $trigger.remove() });
    1919      jQuery(".nbImagesSet").html(parseInt(jQuery(".nbImagesSet").html()) -1);
    2020    } else {ldelim}
Note: See TracChangeset for help on using the changeset viewer.