Changeset 2968

Show
Ignore:
Timestamp:
07/25/08 12:05:58 (4 weeks ago)
Author:
gcroes
Message:

Interface de la barre d'ajout des éléments, ajout de modules "éléments" histoire de voir la barre d'outils complète

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/project/modules/devel/cms3/heading/templates/headingelements.admin.tpl

    r2960 r2968  
    1 <table> 
    2 <tr> 
    3 <td style="border: 1px solid #000"> 
    4 <ul style="list-style: none; padding: 0px;"> 
     1<div> 
     2chemin > chemin > chemin 
     3</div> 
     4 
     5<div style="height: 65px; margin-left: 30%; margin-right: 30%"> 
    56{foreach from=$ppo->arHeadingElementTypes key=id item=headingElementType} 
    6 <li class="headingElementTypeImage"> 
    7  <img src="{copixresource path=$headingElementType.image}" alt="{$headingElementType.caption}" /> 
    8 </li> 
     7 <ul style="float: left;margin: 0px;padding:0px"> 
     8  <li style="list-style-type: none;display: block;margin: 0px;padding:0px;"> 
     9   <img id="img_{$id}" width="40" height="40" class="headingElementTypeImage" src="{copixresource path=$headingElementType.image}" alt="{$headingElementType.caption}" /> 
     10  </li>   
     11 </ul> 
    912{/foreach} 
    10 </ul> 
    11 </td> 
    12 <td valign="top"> 
    13 Contenu 
    14 </td> 
    15 </tr> 
    16 </table> 
     13</div> 
     14 
    1715 
    1816{copixhtmlheader kind="jsdomreadycode"} 
    1917{literal} 
     18 
     19var FXArray = new Array (); 
     20var fxStartParams = {'duration':300, 'wait': false}; 
     21var fxStopParams = {'duration':1000, 'wait': false}; 
    2022    $$('.headingElementTypeImage').each (function (el){ 
    21        el.setStyle ('opacity', 0.7); 
     23       el.setStyle ('opacity', 0.5); 
    2224       el.addEvents({ 
    2325        mouseenter: function(){ 
    24             var fxparams = {'duration':250, 'wait': false}; 
    25             var fx1 = new Fx.Style(this,'opacity', fxparams); 
    26             fx1.start (1); 
     26           startFXArray (this.id); 
    2727        }, 
    2828        mouseleave: function(){ 
    29             var fxparams = {'duration':250, 'wait': false}; 
    30             var fx1 = new Fx.Style(this,'opacity', fxparams); 
    31             fx1.start (0.7); 
     29            stopFxArray (this.id); 
    3230        } 
    3331      }) 
    3432    }); 
     33     
     34    function startFXArray (idElement){ 
     35       if (! FXArray[idElement]){ 
     36          FXArray[idElement] = new Array (); 
     37       }else{ 
     38          FXArray[idElement][0].stop (); 
     39          FXArray[idElement][1].stop (); 
     40          FXArray[idElement][2].stop (); 
     41       } 
     42 
     43       FXArray[idElement][0] = new Fx.Style(document.getElementById (idElement),'opacity', fxStartParams);      
     44       FXArray[idElement][1] = new Fx.Style(document.getElementById (idElement),'width', fxStartParams);        
     45       FXArray[idElement][2] = new Fx.Style(document.getElementById (idElement),'height', fxStartParams);       
     46 
     47       FXArray[idElement][0].start (1); 
     48       FXArray[idElement][1].start (64); 
     49       FXArray[idElement][2].start (64);        
     50    } 
     51     
     52    function stopFxArray (idElement){ 
     53       if (! FXArray[idElement]){ 
     54          FXArray[idElement] = new Array (); 
     55       }else{ 
     56          FXArray[idElement][0].stop (); 
     57          FXArray[idElement][1].stop (); 
     58          FXArray[idElement][2].stop (); 
     59       } 
     60 
     61       FXArray[idElement][0] = new Fx.Style(document.getElementById (idElement),'opacity', fxStopParams); 
     62       FXArray[idElement][1] = new Fx.Style(document.getElementById (idElement),'width', fxStopParams);     
     63       FXArray[idElement][2] = new Fx.Style(document.getElementById (idElement),'height', fxStopParams);        
     64 
     65       FXArray[idElement][0].start (0.5); 
     66       FXArray[idElement][1].start (40); 
     67       FXArray[idElement][2].start (40);        
     68    } 
    3569{/literal} 
    3670{/copixhtmlheader}