Fork me on GitHub






Mise en place du script dojo Tab pour afficher des onglets et sous-onglets dans un module.
Régulier
Inscrit: 19/04/2003 11:57
Messages: 276
Voila le premier code que j'ai pondus pour l'index de mon premier module.
<?php
// $Id: index.php,v 1.0 2004/01/01
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>   ... nbsp;   //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

include_once 'header.php';
include_once 
XOOPS_ROOT_PATH.'/header.php';
?>
<script type="text/javascript">
    var djConfig = { isDebug: true };
</script>
<script language="javascript" type="text/javascript" src="js/dojo.js"></script>
<script language="javascript" type="text/javascript">
    dojo.require("dojo.widget.TabContainer");
    dojo.require("dojo.widget.LinkPane");
    dojo.require("dojo.widget.ContentPane");
    dojo.require("dojo.widget.LayoutContainer");
    dojo.require("dojo.widget.Checkbox");
</script>
<style type="text/css">
    .dojoTabPaneWrapper {
    padding : 0px 0px 0px 0px;
    }
</style>
<table class="outline">
    <tr>
        <td>
            <table cellspacing="1" cellpadding="5">
                <tr>
                    <td class="blockContent">
                        <div id="mainTabContainer" dojoType="TabContainer" style="width: 100%; height: 2500" selectedChild="tab1" >
                            <div dojoType="ContentPane" id="tab1" style="display: yes" label="tab1" >
                                <?php
                                Code php ICI
                                ?>
                            </div>
                            <a dojoType="LinkPane" id="tab2" href='include/tab2.html' refreshOnShow="false" style="display: none">tab2</a>
                            <a dojoType="LinkPane" id="tab3" href='include/tab2.html' refreshOnShow="true" style="display: none">tab3</a>
                            <div dojoType="ContentPane" style="background-color:#ECF0F6;" id="tab4" label="tab4" style="display: none">
                                <br />
                                <!-- code html ICI -->
                            </div>
                            <a dojoType="LinkPane" id="tab5" href='include/tab5.html' refreshOnShow="true" style="display: none">tab5</a>
                            <div dojoType="ContentPane" id="tab6" label="tab6" style="display: none">
                                <div id="Layer1" style="position:absolute; left:0%; top:0%; width:100%; height:100%; z-index:1">
                                    <!-- code html ICI -->
                                </div>
                                <div id="subTabContainer" dojoType="TabContainer" label="Sub TabContainer">
                                    <a dojoType="LinkPane" href='../include/subtab1.html' style="display: none">SubTab 1</a>
                                    <a dojoType="LinkPane" href='../include/subtab2.html' selected="true">SubTab 2</a>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <br />
    <?php
    
include_once XOOPS_ROOT_PATH.'/footer.php';
    
?>


Le souci que j'ai c'est cela efface toute trace de tous mes codes.
Alors que l'appelle de ce code dans une page indépendante s'affiche correctement et j'ai tous mes onglets et tous fonctionne très bien.

Donc j'ai dus utiliser une iframe et voila ce que cela donne :
<?php
// $Id: index.php,v 1.0 2004/01/01
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>   ... nbsp;   //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //

include_once 'header.php';
include_once 
XOOPS_ROOT_PATH.'/header.php';
?>
<table class="outline">
    <tr>
        <td>
            <table cellspacing="1" cellpadding="5">
                <tr>
                    <td class="blockTitle">
                        Le Top Du Web Boutique
                    </td>
                </tr>
                <tr>
                    <td class="blockContent">
                        <div align='center'>
                            <iframe STYLE="background-color:#ECF0F6;" src='http://www.monsite.com/modules/monmodule/include/script.php' name=zone1 width=100% height=2500 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>
                        </div>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<br />
<?php
include_once XOOPS_ROOT_PATH.'/footer.php';
?>


Et tous fonctionne bien !!!!
Une personne à une idée du problème.
Je suis autodidacte en codage et j'ai pas tous le savoir requis pour comprendre la ou j'ai foiré :-o

Noter bien : Le code du script dojo tab est identique dans la page afficher dans l'iframe.

Posté le : 27/12/2006 22:49

Cordialement,
Theking83
www.ltdw.net
Partager Twitter Partagez cette article sur GG+
Re: Mise en place du script dojo Tab pour afficher des onglets et sous-onglets dans un module.
Régulier
Inscrit: 19/04/2003 11:57
Messages: 276
:up:

Personne n'a une idée ?
Me suis-je tromper quelque part ?

Posté le : 29/12/2006 03:51

Cordialement,
Theking83
www.ltdw.net
Partager Twitter Partagez cette article sur GG+
Re: Mise en place du script dojo Tab pour afficher des onglets et sous-onglets dans un module.
Supporter Xoops
Inscrit: 09/01/2005 13:37
De Breizh
Messages: 16972
Bonjour,

Un menu avec des onglets peut être fait uniquement avec du css, qui sera moins lourd à charger que dojo

A +

Posté le : 29/12/2006 11:45

La connaissance s'accroît quand on la partage ...
Partager Twitter Partagez cette article sur GG+
Re: Mise en place du script dojo Tab pour afficher des onglets et sous-onglets dans un module.
Régulier
Inscrit: 19/04/2003 11:57
Messages: 276
Et bien en faite il ne fais pas seulement de s'occuper de l'affichage des onglets il permet d'appeler des pages externes de demander ensuite si on veux les appeler ou non à nouveau si on repasse sur le liens et pour finir il gere l'affichage des sous-onglets, avec le même principe.

Et quand je dis pages externes c'est tous type de page html, php, xhtml ou bien tous type de média.

âpres avoir bien chercher sur le net j'ai effectivement fini par trouver la gestion d'onglet avec la gestion de sous-liens c'est presque pareille, mais il n'y a pas toute la gestion de l'affichage ou non des pages qui sont charger et garder de façon à les ré-affichées de nouveau à la demande.

Même si le code de dojo est lourd à charger au début une fois cela fais c'est un grand gain de temps pour la navigation et on n'a pas toute les pages à ré-affichées à chaque fois !! et c'est que l'on gagne en minute les quelques secondes de perdus au début.

C'est comme un site fais en flash en faite, il y a un temps de chargement .... mais une fois cela fais on navigue dans le site tranquillement.

Mon seul souci c'est que je suis pas "un professionnel" du codage j'apprends seul, j'arrive à faire certaine chose moi même et je me surprend chaque jour

J'aimerais seulement comprendre pourquoi a l'intérieur de xoops cela "disparais" alors que sur une page externe cela fonctionne. c'est soit, moi qui est merdouillé quelque part, soit c'est incompatible à l'endroit ou je veux le mettre.

Suis un teigneux et je n'aime pas ne pas comprendre le pourquoi de la chose. En faite LA RAISON logique qui fais que cela fonctionne pas.

De plus je connais ton liens et j'ai le prog depuis un bon moment déjà mais cela ne gere pas les sous-onglet ni les sous-liens quoique pour les sous-liens j'ai un doute.

Posté le : 29/12/2006 21:56

Cordialement,
Theking83
www.ltdw.net
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

20 Personne(s) en ligne (12 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 20 | Plus ...