Hi Willington,

Thanks for this enhancement !

I think you should try to make this functionality as a plugin. Then more 
people will be able to use it.

There are instructions in the wiki, and if you need help, I could try to 
help you.

And I'm not sure you really need to reload the all window. Maybe just 
call "pmLayout_init" js function after modifying the values with your 
cookie's one (for isntance "Layout.MapWestWidth = $_COOKIE['PM_TOC_WIDE']").

Thomas

Willington Siabato a écrit :
> OK pMapper People, Finally it's done.
>
> Probably some of you will improve this first version, but this do what it
> has to do.
> Next ones are the files list you must modify to create the TOC effect and
> the new codelines yuo should include.
>
> File ----- mapserver.js
> Line: 480
> /**
>  * Hide/Unhide TOC
>  */
> function hideTOC () {
> //    var TOCStatus = PM_XAJAX_LOCATION + 'x_hideTOC.php?' +SID;
> //    hideTOCUpdate(TOCStatus);
> //    pmLayout_init();
>       window.location.reload();
> }
>
> File ----- php_config.php
> Line: 40
> "TOC"       => array(_p("Hide/Unhide TOC"), "hideTOC"),
>
>
> File ----- ___startup_config.php
> Line: 327
> /**
>  * Hide/Unhide TOC
>  */
> $PM_HIDE_TOC = "visible";
>
> if(!isset($_COOKIE['PM_TOC_WIDE'])) {
>       setcookie("PM_TOC_WIDE", 0, time()+3600,"/","");
>       $PM_TOC_WIDE = 0;
> } else {
>       $PM_TOC_WIDE = $_COOKIE['PM_TOC_WIDE']; 
> }
>
> if ($PM_TOC_WIDE == 240) {
>       $PM_TOC_WIDE = 0;
>       setcookie("PM_TOC_WIDE", 0, time()+3600,"/","");
> } else {
>       $PM_TOC_WIDE = 240;
>       setcookie("PM_TOC_WIDE", 240, time()+3600,"/","");
> }
>
> Line: 378
> /**
>  * Write vars to session
>  */
> $_SESSION['PM_HIDE_TOC']         = $PM_HIDE_TOC;
> $_SESSION['PM_TOC_WIDE']         = $PM_TOC_WIDE;
>
>
> File ----- js_config.php
> Line: Change Line 52 (Layout.EastWidth   = 240;) by
>
> Layout.EastWidth   = <?php echo $TocWide; ?>//240;
>
> If you want to improve spaces after resizes TOC probably you can change this
> as well:
>
> File ----- js_config.php
> Line: Change Margins block values by
> // Margins
> Layout.MarginOuterVertW  = 6;
> Layout.MarginOuterVertE  = 6 //4;
> Layout.MarginInnerVertW  = 0;
> Layout.MarginInnerVertE  = 6;
> Layout.MarginOuterHorizN = 8;
> Layout.MarginOuterHorizS = 10;
> Layout.MarginInnerHoriz  = 6;
>
> Ans that´s all. So easy. Ok People, if you need something else, please do
> not hesitate to contact me.
> As you can see, I used cookies to make the function. So, the browser needs
> cookies. Probably it is not the best way but.....!!!
>
> Please do not forget to include the image for this new function in the image
> foder, it must be named TOC_off. I have a nice want here if you want it.
>
> -----
> Willington!!!
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to