Fork me on GitHub

Rapport de message :*
 

Mise en place du script dojo Tab pour afficher des onglets et sous-onglets dans un module.

Titre du sujet : Mise en place du script dojo Tab pour afficher des onglets et sous-onglets dans un module.
par theking83 sur 27/12/2006 22:49:45

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.
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

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