IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Reproduire un comportement


Sujet :

JavaScript

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éprouvé

    Inscrit en
    Juin 2005
    Messages
    1 155
    Détails du profil
    Informations forums :
    Inscription : Juin 2005
    Messages : 1 155
    Par défaut Reproduire un comportement
    Hello les gens;
    Je voudrais reproduire le même comportement sur l'exemple des liens sur ce treeview, sachant que celui ci est généré par une balise qui ne supporte pas d'évènement "onclick" ou quelque chose de ce genre.
    Tout est fait par le biais du css au travers de la balise <A> :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    A          {color : #000000; text-decoration : none; }
    A:Visited  {color : #000000; text-decoration : none; }
    A:Active   {color : #000000; text-decoration : none; }
    A:Hover    {color : #000000; text-decoration : none; }
    ...
    La pseudo class appliquée sur ce treeview chez moi est:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
     * Style for the fixed header collection example.
     */
    TABLE.COL {
    	cell-spacing: 2px;
    	background-color : #000000;
     
    }
    TH.COL {
    	color      : #FFFFFF;
    	background-color : #274465;
    	font-weight: bold;
    	padding : 2px;
     
    }
    TD.COL {
    	background-color :  #336699;
     
    }
    Il faudrait donc y rajouter un:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    .COL A {
       color: red;
    ...
    }
    Pourriez-vous m'aider svp ? Merci pour toutes vos contributions.

  2. #2
    Inactif
    Profil pro
    Inscrit en
    Mars 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2010
    Messages : 63
    Par défaut
    ce "treeview" il est généré comment ? par quel framework ?
    tu ne peux pas le sortir de ton chapeau comme ça.

    Ca donne quoi en code généré ton treeview ?

  3. #3
    Membre éprouvé

    Inscrit en
    Juin 2005
    Messages
    1 155
    Détails du profil
    Informations forums :
    Inscription : Juin 2005
    Messages : 1 155
    Par défaut
    Merci d'avoir répondu aussi vite.
    ce "treeview" il est généré comment ? par quel framework ?
    struts-layout 1.3
    Ca donne quoi en code généré ton treeview ?
    Voila ce que j'ai sur ma jsp:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    <div id="treeAndNodesBills"><layout:panel height="20" key="Factures"
    	bundle="labelScreen" styleClass="COL">
    	<layout:treeview align="left" name="billMenu" width="200" />
    </layout:panel></div>
    En somme un div avec dedans notre balise treeview. billMenu quand à lui est

    une collection présente dans la requête.

    Voici le résultat:
    imagik.fr

    Enfin voila le source produit:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
    <div id="treeAndNodesBills"><table cellspacing="0" cellpadding="0" border="0" class="COL"><tr><td valign="top"><table cellspacing="1" cellpadding="1" border="0" width="100%">
    <tr><th align="center" class="COL">Factures</th></tr>
    <tr><td class="COL"><table width="100%"	border="0">
     
    	<tr><td valign="top" colspan="2"><table cellspacing="0" cellpadding="0" border="0" align="left" width="200" class="PANEL"><tr><td valign="top"><table cellspacing="1" cellpadding="1" border="0" width="100%">
    <tr><td><table border="0" cellspacing="0" cellpadding="0" width="100%" id="treeViewbillMenu">
    <tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><a href="javascript://" onclick="return changeTree('billMenu*DA','/FacturationWeb/images						/treeNodeOpen.gif','/FacturationWeb/images						/treeNodeClose.gif');" target="treeFrame"><img src="/FacturationWeb/images						/treeNodeClose.gif" id="treeViewImagebillMenu*DA" border="0" width="16" height="22" align="middle"></a></td><td valign="top" colspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="1"></td><td class="PANEL1">DA</td><td align="right" nowrap></td></tr><tr><td valign="top" colspan="2" id="treeViewbillMenu*DA" style="display:none;"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture01</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture11</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture21</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture31</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture41</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture51</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture61</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture71</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture81</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" width="16"><img src="/FacturationWeb/images						/treeItemLast.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture91</a></td><td align="right" nowrap></td></tr></table></td></tr></table></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><a href="javascript://" onclick="return changeTree('billMenu*DAOPCVM','/FacturationWeb/images						/treeNodeOpen.gif','/FacturationWeb/images						/treeNodeClose.gif');" target="treeFrame"><img src="/FacturationWeb/images						/treeNodeClose.gif" id="treeViewImagebillMenu*DAOPCVM" border="0" width="16" height="22" align="middle"></a></td><td valign="top" colspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="1"></td><td class="PANEL1">DAOPCVM</td><td align="right" nowrap></td></tr><tr><td valign="top" colspan="2" id="treeViewbillMenu*DAOPCVM" style="display:none;"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture10</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture20</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture30</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture40</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture50</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture60</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture70</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture80</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture90</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" width="16"><img src="/FacturationWeb/images						/treeItemLast.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture100</a></td><td align="right" nowrap></td></tr></table></td></tr></table></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><a href="javascript://" onclick="return changeTree('billMenu*CT','/FacturationWeb/images						/treeNodeOpen.gif','/FacturationWeb/images						/treeNodeClose.gif');" target="treeFrame"><img src="/FacturationWeb/images						/treeNodeClose.gif" id="treeViewImagebillMenu*CT" border="0" width="16" height="22" align="middle"></a></td><td valign="top" colspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="1"></td><td class="PANEL1">CT</td><td align="right" nowrap></td></tr><tr><td valign="top" colspan="2" id="treeViewbillMenu*CT" style="display:none;"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture100</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture200</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture300</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture400</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture500</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture600</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture700</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture800</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture900</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" width="16"><img src="/FacturationWeb/images						/treeItemLast.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture1000</a></td><td align="right" nowrap></td></tr></table></td></tr></table></td></tr><tr><td valign="top" height="100%" width="16"><a href="javascript://" onclick="return changeTree('billMenu*CTEUROCLEAR','/FacturationWeb/images						/treeNodeOpenLast.gif','/FacturationWeb/images						/treeNodeCloseLast.gif');" target="treeFrame"><img src="/FacturationWeb/images						/treeNodeCloseLast.gif" id="treeViewImagebillMenu*CTEUROCLEAR" border="0" width="16" height="22" align="middle"></a></td><td valign="top" colspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="1"></td><td class="PANEL1">CTEUROCLEAR</td><td align="right" nowrap></td></tr><tr><td valign="top" colspan="2" id="treeViewbillMenu*CTEUROCLEAR" style="display:none;"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture1000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture2000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture3000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture4000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture5000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture6000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture7000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture8000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" style="background-image: url(/FacturationWeb/images						/treeLine.gif); background-repeat: repeat-y; " width="16"><img src="/FacturationWeb/images						/treeItem.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture9000</a></td><td align="right" nowrap></td></tr><tr><td valign="top" height="100%" width="16"><img src="/FacturationWeb/images						/treeItemLast.gif" border="0" width="16" height="22"></td><td width="1"></td><td class="PANEL2"><a href="comTree.aspx" class="PANEL3">Facture10000</a></td><td align="right" nowrap></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table>
    </td></tr>
     
    </table></td></tr>
    </table></td></tr></table>
    </div>
    Ce que j'aimerais reproduire comme comportement, c'est "juste" les

    background des liens cliqués qui se voient changer de couleur, tandis que

    les autres retrouvent leurs attributs (couleurs) normaux.

Discussions similaires

  1. Reproduire le comportement d'un TextBox
    Par HuZimA dans le forum VB.NET
    Réponses: 1
    Dernier message: 10/01/2014, 14h51
  2. open avec comport
    Par Goldocrack dans le forum C++Builder
    Réponses: 6
    Dernier message: 15/04/2009, 08h12
  3. [Sybase] Comportement bizarre d'une table
    Par sdozias dans le forum Sybase
    Réponses: 4
    Dernier message: 03/02/2004, 10h39
  4. [Free Pascal] Comportement de Exec
    Par néo333 dans le forum Free Pascal
    Réponses: 3
    Dernier message: 01/11/2003, 17h46
  5. Réponses: 2
    Dernier message: 22/09/2003, 11h23

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo