[Cartoweb-users] I: Cartoweb-users Digest, Vol 47, Issue 16

Bruno Friedmann bruno at ioda-net.ch
Fri Mar 27 03:08:24 EST 2009


Simone Frigerio wrote:
> Hi Bruno,
> I just created a new div for the second tab, exactly the same of the first one (with aim of future change in the content) . But in this case text and figures exceed the space for the tab and the scroll bar is not present.
> 
> In "leftbar" setup I add a <li id "Activities"
>   <div id="leftbar">
>     <div>
>       <ul id="tabnav2">
>         <li id="label2"><a href="javascript:ontop(2);enableTool('pdfrotate')">{t}Print{/t}</a></li>
>         <li id="label4"><a href="javascript:ontop(4)">{t}Data{/t}</a></li>
>         <li id="label6"><a href="javascript:ontop(6)">{t}What can I do?{/t}</a></li>
> 	<li id="label8"><a href="javascript:ontop(8)">{t}Activities{/t}</a></li>
> 
> And the div fo "What cna I do?", that is the old "help" tab, was exactly duplicated. 
> The page has two separated tabs, first is original, the second appears with same text but over the predefined lenght of the tab, without scroll bar.
> 
> Thanks again.
> Simone
> 
> 
> 
>  
> 
> Message: 2
> Date: Wed, 25 Mar 2009 11:00:35 +0100
> From: Bruno Friedmann <bruno at ioda-net.ch>
> Subject: Re: [Cartoweb-users] Tabs in cartoclient.tpl
> Cc: cartoweb <cartoweb-users at lists.maptools.org>
> Message-ID: <49CA00C3.3030302 at ioda-net.ch>
> Content-Type: text/plain; charset=UTF-8
> 
> In your main tpl you will have a div (like for help) and you build your content inside, or prefer an external tpl.
> It's quiet an easy task.
> 
> Simone Frigerio wrote:
>> Hi,
>> I would want to duplicate the tab "help" that is present in left bar and modify the text inside. The aim is to have an "help" support and "activities" support about my project. The structure I'm trying to do is exactly the same, I have only to change the content. 
>>
>> In cartoclient.tpl is possible to create a copy of "help" tab:
>> <li id="label6"><a href="javascript:ontop(6)">{t}Help{/t}</a></li>
>> <li id="label8"><a href="javascript:ontop(8)">{t}Activities{/t}</a></li> 
>>
>> How can I modify the second tab?
>> Thanks
>> Simone
>>
>> International Institute for Geo-Information Science and Earth Observation (ITC)
>> Chamber of Commerce: 410 27 560
>>
>> E-mail disclaimer
>> The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission.
>>

To be working your left menu should be like this one

      <div style="width:210px;">
        <ul class="tabnav" id="tabnav2">
          <li id="label6"><a href="javascript:ontop(6)">&copy;</a></li>
          <li id="label7"><a href="javascript:ontop(7)">Draw</a></li>

          <li id="label4"><a href="javascript:ontop(4)">Print</a></li>
          <li id="label3"><a href="javascript:ontop(3)">Docs</a></li>
        </ul>
        <ul class="tabnav" id="tabnav1">
          <li id="label1"><a href="javascript:ontop(1)">Search</a></li>
          <li id="label2"><a href="javascript:ontop(2)">Query</a></li>
          <li id="label5"><a href="javascript:ontop(5)">Help</a></li>

        </ul>
      </div>

As you can see each number should be present with no hole in numbering.
(Some  js limitation)
Order doesn't matter.
Be sure you don't have two times the same id for the label it's important on DOM tree.

you certainly have to adjust the corresponding css to make it working like you want (and content)
perhaps it would be nice to have a short tag name and add a title property to the a link.



I'll cc'ing the answer to the carto list.


-- 

     Bruno Friedmann


More information about the Cartoweb-users mailing list