Topic: Insert bouton

Je souhaite mettre 3 boutons allant vers un lien ( Cette Semaine; Classement; Genres) dans mon HeadTitle, je sais que je dois les mettre entre les balises <span> mais en revanche je ne connais pas le codage pour intégrer les boutons fournis dans le package (button-light et le button-simple).
Peut tu me repondre assez rapidement.
GRAND MERCI pour ton aide (soit un peu plus préc!s stp)

Re: Insert bouton

Well guys, this forum is English not French wink
I'll do it in English for other users: alex wants to add 3 tabs in the header and wants to know how to achieve this wondering how to use provided button styles.

Alex, you should not attempt to use "waHeadTitle" to achieve this, instead consider the following sample (from WebApp.Net Demo):

<div id="iHeader">

<div class="iItem" id="tab1">
        <div class="iTab">
            <ul id="list">
                <li><a href="#">Simple</a></li>
                <li><a href="#">Image</a></li>
                <li><a href="async-tab.xml" rev="async"><span>Async</span></a></li>
            </ul>
        </div>
        <a href="#" class="iBAction iRightButton" onclick="return tabs(0)"><img src="WebApp/Img/less.png" alt="Hide" /></a>
    </div>
</div>

</div>

This code indicates that tabs can be displayed in the header, but are hidden by default by the parent container which has a "iItem" class.
Here, we have 3 tabs and a button (also hidden since it is in the same container) to hide them.

To set the size of each tab we use the following style:

.iTab {margin-right:55px}
.iTab li { width:33%}
.iTab li:first-child { width:34%}

First is a margin to let place for the hide button, then LI size to fit the 100% parent UL. This is, of course, just an example since you don't want to apply this style to all "iTab" (you should add #tab1 before each line to fix this)

Now We have the page loaded but no tab displayed!
To display them, take a look at the "tabs(s)" javascript function (WebApp.Net Demo source), it calls WA.Header(!s, "tab1"); which show or hide an header item (hidding/showing also default title and buttons).

So now:

- If you want to show them with user action add a link to your page with a call to WA.Header(...)
- If you want to show them at start up use the "load" event
- If you want to show them after a page slide use the "endslide" event.

I know they are not documented yet, but feel free to ask if you don't understand how events work.

Re: Insert bouton

Of course, you can also remove the "iItem" container and show directly all tabs, but in this case you cannot layer titles