[Cartoweb-users] Customize cartoweb with new button

Oliver Christen oliver.christen at camptocamp.com
Tue Mar 23 04:00:37 EST 2010


hi

if you want to show/hide the whole leftbar div, simply put it into another div and add some javascript, either directly in your cartoclient.tpl header in a <script>..</script> tag or in a separate .js file:

<script>
 function toogleleftbarcontainer () {
  var el=document.getElementById('leftbarcontainer');
  if (el.style.display == 'block') {
    el.style.display == 'none';
  } else {
    el.style.display == 'block';    
  }
 }
</script>

...

<div id="leftbarcontainer" onclick="javascript:toogleleftbarcontainer()">
 <div id="leftbar">
  ...
 </div>
</div>

something like that, I let you try and modify as needed

regards
Oliver
  ----- Original Message ----- 
  From: JOALLAND jérémie 
  To: cartoweb-users at lists.maptools.org 
  Sent: Monday, March 22, 2010 4:00 PM
  Subject: [Cartoweb-users] Customize cartoweb with new button


  I am new in Cartoweb and have to customize an existing project.

  I would like to add a new button in order to Show / Hide the Leftbar div (which contains the layers management, export plugin, etc.).

  So when the user will access the cartoweb project he will only see the tools and map, then he can click this new button to show the leftbar to access advanced functionalities to manage layers, export, etc. and he can hide the leftbar by clicking again this bew button.

   

  I can see how to change the design with the cartoclient.tpl, but then I'm lost with the different folders/files and javascript.

   

  So what is the best way to customize my project ?

   

  Thanks,

  Jeremie



------------------------------------------------------------------------------


  _______________________________________________
  Cartoweb-users mailing list
  Cartoweb-users at lists.maptools.org
  http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20100323/ed2ea9dc/attachment.htm 


More information about the Cartoweb-users mailing list