1 pièce(s) jointe(s)
UI Accordion et Tabs sur la même page, rendu
Bonjour à tous
J''ai un problème bizarre et je me demande si l'un d'entre vous l'aurait déja rencontré, ou saurait me venir en aide.
J'utilise Accordion avec succès pour créer un menu à gauche.
je souhaite utiliser sur certaines pages le widget Tabs, et j'obtiens un comportement graphique assez bizarre que je n'arrive pas à résoudre :calim2:
la hauteur de la partie entête des Tabs correspond exactement à la hauteur du menu accordion à gauche.
Ou plutôt il apparait que la hauteur de cet header est calculé de telle façon que le bas de cette boite corresponde au bas de la boite "accordéon"
en pièce jointe on peut voir une image du résultat
J'ai bien vu quelques pistes qui évoquait l'ordre dans lequel les widgets étaient sélectionnés, mais que j'essaie un ordre ou l'autre, cela n'a pas d'influence.
Je vous joins le code source ci-dessous, sans les contenus qui me paraissent inutiles:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<script type="text/javascript" src="/lib/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/lib/js/jquery-ui-1.8.4.custom.min.js"></script>
<link type="text/css" href="/personnalisation/styles/style.css" rel="stylesheet" />
<link type="text/css" href="/personnalisation/styles/style_perso.css" rel="stylesheet" />
<link type="text/css" href="/personnalisation/styles/positions.css" rel="stylesheet" />
<link type="text/css" href="/personnalisation/styles/jqueryui_css/custom-theme/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
</head>
<body>
<div id="boxcentre">
<div id="boxhaut">
<!-- debut bannière-->
<div id="flash_banner">
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0" id="A123456" width="1093" height="96">
[...]
</object>
</div>
<div id="login_box">
<div class="textbanc">
<p> Bonjour</p>
[...]
</div>
</div>
<!-- fin bannière-->
</div>
<div id="boxgauche">
<script type="text/javascript">
$(document).ready(function(){
// Accordion
$("#accordion").accordion({ header: "h3"});
$("#accordion").accordion('option', 'autoHeight', true);
$("#onglets").tabs();
});
</script>
<div id="accordion">
<div>
<h3><a href="#">Espace Collaboratif</a></h3>
<div>
<p><a href="../../dynamic/nvelle_mediatheque/Mediatheque.asp?Lang=FR">Médiathèque</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/Search.asp?Lang=FR">Recherche</a></p>
<p><a href="../../dynamic/Workflow/liste-document-suivi.asp?Lang=FR">Suivi de projet</a></p>
</div>
</div>
<div>
<h3><a href="#">Sections SFTP</a></h3>
<div>
<p><a href="../../dynamic/nvelle_mediatheque/mass_loading2.asp?Lang=FR&index_ftp=0">PLV</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/mass_loading2.asp?Lang=FR&index_ftp=1">PRINT</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/mass_loading2.asp?Lang=FR&index_ftp=2">WEB</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/mass_loading2.asp?Lang=FR&index_ftp=3">CREA</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/mass_loading2.asp?Lang=FR&index_ftp=4">SPORT</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/mass_loading2.asp?Lang=FR&index_ftp=5">PUB</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/mass_loading2.asp?Lang=FR&index_ftp=6">COM</a></p>
</div>
</div>
<div>
<h3><a href="#">Gestion des accès</a></h3>
<div>
<p><a href="../../dynamic/EspClient/GestionProfils.asp?Lang=FR">Gestion des profils</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/ListeDossier.asp?folder_id=null&Lang=FR">Gestion des répertoires</a></p>
<p><a href="../../dynamic/groupes/liste_groupes.asp?Lang=FR">Gestion des groupes</a></p>
<p><a href="../../dynamic/nvelle_mediatheque/Edit_label_fields.asp?Lang=FR">Gestion des libellés</a></p>
</div>
</div>
<div>
<h3><a href="#">Fiche signalétique</a></h3>
<div>
<p><a href="../../dynamic/EspClient/FicheSignaletique1.asp?Lang=FR">Vos informations</a></p>
</div>
</div>
</div>
</div>
<div id="boxcontenu">
<script language="javascript">
/*** Fonction de validation de search_form ***/
function Search()
{ var action0;
action0 ='Search';
if (!document.search_form.search_type[0].checked)
{
action0 ='Label_Search';
}
window.document.search_form.action="./MediathequeRecherche2.asp?action0="+ action0 +"&SousDossier=";
window.document.search_form.submit()
}
function change_filename() {
var document_name;
//document_name = document.search_form.Pays.options[document.search_form.Pays.selectedIndex].value +' ' + document.search_form.Region.options[document.search_form.Region.selectedIndex].value +' ' + document.search_form.Ville.options[document.search_form.Ville.selectedIndex].value +' ' + document.search_form.NomTransmission.options[document.search_form.NomTransmission.selectedIndex].value +' ' + document.search_form.ServiceTransmission.options[document.search_form.ServiceTransmission.selectedIndex].value +' ' + document.search_form.NotesUtilisateur.options[document.search_form.NotesUtilisateur.selectedIndex].value
//document_name = document.search_form.Pays.options[document.search_form.Pays.selectedIndex].value ;
document_name = (document.search_form.Pays.options[document.search_form.Pays.selectedIndex].value.indexOf("--")>=0 ?'':document.search_form.Pays.options[document.search_form.Pays.selectedIndex].value)
//document_name +=(document_name && document.search_form.Region.options[document.search_form.Region.selectedIndex].value ? '%' : '') + document.search_form.Region.options[document.search_form.Region.selectedIndex].value;
document_name +=(document_name && document.search_form.Region.options[document.search_form.Region.selectedIndex].value ? '%' : '') + (document.search_form.Region.options[document.search_form.Region.selectedIndex].value.indexOf("--")>=0 ?'':document.search_form.Region.options[document.search_form.Region.selectedIndex].value);
document_name +=(document_name && document.search_form.Ville.options[document.search_form.Ville.selectedIndex].value ? '%' : '') + (document.search_form.Ville.options[document.search_form.Ville.selectedIndex].value.indexOf("--")>=0 ?'':document.search_form.Ville.options[document.search_form.Ville.selectedIndex].value);
document_name +=(document_name && document.search_form.NomTransmission.options[document.search_form.NomTransmission.selectedIndex].value ? '%' : '') + (document.search_form.NomTransmission.options[document.search_form.NomTransmission.selectedIndex].value.indexOf("--")>=0 ?'':document.search_form.NomTransmission.options[document.search_form.NomTransmission.selectedIndex].value);
document_name +=(document_name && document.search_form.ServiceTransmission.options[document.search_form.ServiceTransmission.selectedIndex].value ? '%' : '') + (document.search_form.ServiceTransmission.options[document.search_form.ServiceTransmission.selectedIndex].value.indexOf("--")>=0 ?'':document.search_form.ServiceTransmission.options[document.search_form.ServiceTransmission.selectedIndex].value);
document_name +=(document_name && document.search_form.NotesUtilisateur.options[document.search_form.NotesUtilisateur.selectedIndex].value ? '%' : '') + (document.search_form.NotesUtilisateur.options[document.search_form.NotesUtilisateur.selectedIndex].value.indexOf("--")>=0 ?'':document.search_form.NotesUtilisateur.options[document.search_form.NotesUtilisateur.selectedIndex].value);
if (document_name){
document.search_form.search_type[1].checked = true;
}
else
{
document.search_form.search_type[0].checked = true;
}
document.getElementById('document_name').innerHTML = document_name.replace ('%',' ');
document.search_form.document_name.value=document_name;
}
/*$(function() {
$("#onglets").tabs();
});*/
</script>
<form method="post" action="javascript:Search()" name="search_form" id="search_form">
<div>
<div id="onglets">
<ul>
<li><a href="#onglets-1">Recherche simple</a></li>
<li><a href="#onglets-2">Recherche avancée</a></li>
</ul>
<div id="onglets-1">
<div id="editable_content" class="ui-widget">
<div class="textegras">Effectuez votre recherche en utilisant :</div>
<div class="texte">
<input type="radio" name="search_type" checked value="filename">
<select name="SelectB">
<option value="Contains" >Contient</option>
<option value="DoesNotContain" >Ne contient pas</option>
<option value="Eq" >Vaut</option>
<option value="IsNot" >Ne vaut pas</option>
<option value="SW" >Commence par</option>
<option value="EW" >Fini par</option>
</select>
<input type="text" name="SelectC" value="" size="15" style="border: 1 solid #E86A01 HEIGHT: 24px; WIDTH: 150px">
</div>
<div class="textegras">Ou</div>
<div class="texte"><input type="radio" name="search_type" value="libellé">un ou plusieurs attributs</div>
<div id="recherche_libellé">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="texte">Type de document <br />
<select name="Pays" onChange="change_filename()"><option value="">Tous</option>[...]</select></td>
<td class="texte">Evénement <br />
<select name="Ville" onChange="change_filename()"><option value="">Tous</option><option value="BOOSTER">BOOSTER</option>[...]</select></td>
</tr>
<tr>
<td class="texte">Version / Déclinaison <br />
<select name="NomTransmission" onChange="change_filename()"><option value="">Tous</option><option value="#01">#01</option>[...]</select></td>
<td class="texte">Origine / Source <br />
<select name="ServiceTransmission" onChange="change_filename()"><option value="">Tous</option>[...]</select></td>
<td class="texte">Date / Emission <br />
<select name="NotesUtilisateur" onChange="change_filename()"><option value="">Tous</option>[...]</select></td>
</tr>
<tr>
<td class="titreorange" colspan="3">Recherche proposée :
<div id="document_name" class="textegras"></div><input type="hidden" name ="document_name" value="" /></td>
</tr>
</table>
</div>
<div class="textegrasviolet">Afficher les résultats par
<input type="radio" name="RadioSelectB" value = "Text" >Texte
<input type="radio" name="RadioSelectB" value ="Thumbnails" checked >Vignettes
</div>
<div align="center">
<a id="Chercher" href="#">Chercher</a>
<script type="text/javascript">
$(function() {
$("#Chercher").button();
$("#Chercher").click(function() { Search();; });
$("#Chercher").addClass("");
});
</script>
<a id="Effacer" href="#">Effacer</a>
<script type="text/javascript">
$(function() {
$("#Effacer").button();
$("#Effacer").click(function() { document.search_form.reset();; });
$("#Effacer").addClass("");
});
</script>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="3" height="6"><IMG SRC="../../lib/images/espaceur.gif" BORDER="0"></td>
</tr>
<tr>
<td align="center" height="40">
<a id="Recherche_simple" href="./Search2.asp?lang=FR">Recherche simple</a>
<script type="text/javascript">
$(function() {
$("#Recherche_simple").button();
$("#Recherche_simple").click(function() { ; });
$("#Recherche_simple").addClass("textegrasviolet");
});
</script>
</td>
<td align="center" height="40">
<a id="Recherche_avancée" href="./AdvancedSearch2.asp?lang=FR">Recherche avancée</a>
<script type="text/javascript">
$(function() {
$("#Recherche_avancée").button();
$("#Recherche_avancée").click(function() { ; });
$("#Recherche_avancée").addClass("textegrasviolet");
});
</script>
</td>
</tr>
<tr>
<td colspan="3" height="6"><IMG SRC="../../lib/images/espaceur.gif" BORDER="0"></td>
</tr>
</table>
</div>
</div>
<div id="onglets-2">
truc
</div>
</div>
<input type="hidden" name="IDRep" value="">
</div>
</form>
</div> <!-- fin de la box contenu-->
</div> <!-- fin de la box centre-->
</body>
</html> |
Pour l'instant le second onglet ne contient que le mot "truc".
De toute façon ce n'est pas le contenu de chaque onglet qui semble avoir d'influence.
Par contre, ajouter par exemple des <br /> avant <div id="onglets"> décale bien la partie onglet, réduit sa taille en hauteur, mais le bottom des entêtes onglets reste aligné à au bottom de la partie accordéon
merci d'avance de votre aide