Dotclear

Changeset 547


Ignore:
Timestamp:
11/05/08 01:00:33 (15 years ago)
Author:
Tomtom33
google:author:
tbouron
Message:

Passage en 1.0-RC2 : Ajout de la surcouche Ajax pour la prévisualisation

Location:
plugins/dlManager
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/dlManager/_define.php

    r544 r547  
    2828     /* Description*/                "Download manager with a public page and a widget", 
    2929     /* Author */                    "Moe (http://gniark.net/), Osku and Tomtom (http://blog.zenstyle.fr)", 
    30      /* Version */                   '1.0-RC1', 
     30     /* Version */                   '1.0-RC2', 
    3131     /* Permissions */               'admin' 
    3232); 
  • plugins/dlManager/_prepend.php

    r533 r547  
    2929          '^media(/.+)?$',array('dlManagerPageDocument','page')); 
    3030$core->url->register('mediaplayer','mediaplayer', 
    31           '^mediaplayer/([0-9]+)?$',array('dlManagerPageDocument','player')); 
     31          '^mediaplayer/([0-9]+(/js)?)?$',array('dlManagerPageDocument','player')); 
    3232$core->url->register('download','download', 
    3333          '^download/([0-9]+)$',array('dlManagerPageDocument','wrapper')); 
  • plugins/dlManager/_public.php

    r544 r547  
    163163 
    164164          $_ctx =& $GLOBALS['_ctx']; 
    165            
    166165 
    167166          # exit if the public_path (and Media root) doesn't exist 
    168167          if (!is_dir($core->blog->public_path)) {self::p404();} 
    169168                     
    170           $file = $core->media->getFile($args); 
     169          $file = $core->media->getFile(str_replace('/js','',$args)); 
    171170           
    172171          if ((empty($file->file)) || (!is_readable($file->file))) 
     
    207206               dirname(__FILE__).'/default-templates/'); 
    208207 
    209           self::serveDocument('media_player.html','text/html'); 
     208          if (preg_match('#^.*\/js$#',$args)) { 
     209               self::serveDocument('media_player_js.html','text/html'); 
     210          }  
     211          else { 
     212               self::serveDocument('media_player.html','text/html'); 
     213          } 
    210214     } 
    211215      
  • plugins/dlManager/default-templates/media.html

    r544 r547  
    2323     .size {white-space:pre;} 
    2424     .number {text-align:right;} 
     25     .TB_overlayMacFFBGHack {background: url({{tpl:BlogURL}}pf=dlManager/default-templates/macFFBgHack.png) repeat;} 
    2526  </style> 
    2627 
     28  <link rel="stylesheet" href="{{tpl:BlogURL}}pf=dlManager/default-templates/thickbox.css" type="text/css" media="screen" /> 
     29 
    2730  {{tpl:include src="_head.html"}} 
     31 
     32  <script type="text/javascript"> 
     33     $(document).ready(function () {  
     34          var tb_pathToImage = "{{tpl:BlogURL}}pf=dlManager/default-templates/loadingAnimation.gif"; 
     35          $("a.thickbox").each(function() { 
     36               $(this).attr("href",this.href+"/js"); 
     37          }); 
     38     }); 
     39  </script> 
     40  <script type="text/javascript" src="{{tpl:BlogURL}}pf=dlManager/default-templates/thickbox.js"></script> 
    2841</head> 
    2942 
     
    125138                         <!-- # image files --> 
    126139                         <tpl:DLMItemIf media_type="image"> 
    127                               <a href="{{tpl:DLMItemPlayerURL}}" class="preview" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 
     140                              <a href="{{tpl:DLMItemPlayerURL}}" class="preview thickbox" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 
    128141                                   <img src="{{tpl:BlogQmarkURL}}pf=dlManager/images/image.png" alt="{{tpl:lang Preview}}" /> 
    129142                              </a> 
     
    131144                         <!-- # mp3 and flv files --> 
    132145                         <tpl:DLMItemIf operator="or" type="audio/mpeg3,video/x-flv"> 
    133                               <a href="{{tpl:DLMItemPlayerURL}}" class="preview" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 
     146                              <a href="{{tpl:DLMItemPlayerURL}}" class="preview thickbox" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 
    134147                                   <img src="{{tpl:BlogQmarkURL}}pf=dlManager/images/control_play.png" alt="{{tpl:lang Preview}}" /> 
    135148                              </a> 
     
    137150                         <!-- # zip files --> 
    138151                         <tpl:DLMItemIf type="application/zip"> 
    139                               <a href="{{tpl:DLMItemPlayerURL}}" class="preview" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 
     152                              <a href="{{tpl:DLMItemPlayerURL}}" class="preview thickbox" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 
    140153                                   <img src="{{tpl:BlogQmarkURL}}pf=dlManager/images/briefcase.png" alt="{{tpl:lang Preview}}" /> 
    141154                              </a> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map