Re: Feedback about migration of web

Vincent Brabant <[email protected]> Thu, 10 Mar 2005 21:06:59 +0100
Newsgroups gmane.comp.java.netbeans.webteam,gmane.spam.detected
Message-ID <[email protected]>
Vincent Brabant a écrit :

>>
>>> Concerning the problem of the left menu, I think I can help you to 
>>> solve  it in place of copy the .js in every directory.
>>>
>>> We can in a Javascript include another Javascript.
>>
>>
>>
>> OK ... I'm not sure I understand though.
>
>
> It's true that my explanation is not clear enough. When I will 
> success, I will send you by mail.
>
Ok. I got it.
Let me explain.

So, now, in your template, you have somewhere something like

<!-- Start left menu -->
<SCRIPT LANGUAGE="javascript" SRC="left-nav.js"></SCRIPT>
<!-- End left menu -->

The first solution you have is the following

    You have to replace this line with the following :
    <!-- Start left menu -->
    <SCRIPT LANGUAGE="javascript" SRC="/left-nav.js"></SCRIPT>
    <!-- End left menu -->

    Then, every page will ALWAYS have a left-nav.js

    If I want a left-nav by directory, I have to add the following line
    on top of the /left-nav.js:

        document.write('<SCRIPT LANGUAGE="javascript"
        SRC="local-left-nav.js"></SCRIPT>');

    And you will have a left navigation that is working like on the
    fr.netbeans.org, before the migration.
    Because today, I am the only one that is using the dynamic left menu,
    If you change
    <SCRIPT LANGUAGE="javascript" SRC="left-nav.js"></SCRIPT>
    by
    <SCRIPT LANGUAGE="javascript" SRC="/left-nav.js"></SCRIPT>
    the left navigation in fr.netbeans.org will be fixed.
    And all other modules will have the left menu appearing FOR EVERY
    PAGE, WITHOUT ANY OTHER MODIFICATION.


The second solution you have is the following:

    You will have to replace the line by the following:

    <!-- Start left menu -->
    <SCRIPT LANGUAGE="javascript" SRC="local-left-nav.js"></SCRIPT>
    <SCRIPT LANGUAGE="javascript" SRC="/left-nav.js"></SCRIPT>
    <!-- End left menu -->

    The left-nav.js doesn't change. And contains what is global to every
    page of your project.

    The local-left-nav.js can contains what you want like the
    left-nav.js but will be different for each directory.


Personnaly, I prefer the first solution and I will explain why:
1. it's easier for you: just add a / in the tempate for all modules.
2. it's easier for me. I have nothing to change. And the fr.netbeans.org 
website will be fixed when you will fix the template.
3. it's more flexible than the second one because the module owner can 
add the following line

    document.write('<SCRIPT LANGUAGE="javascript"
    SRC="local-left-nav.js"></SCRIPT>');

where he want, and you can even have multiple level.

On fr.netbeans.org, I success to split the left menu in THREE part
The first part is depending of the current page.
The second part is depending of the current directory
The third part is depending of the module.

One example that is working now (because I do a temporary fixe only for 
that page) :
In http://fr.netbeans.org/edi/index.html,

fr
_______________
Search            ->Go
_______________
Links
_______
-> English
-------------------
NetBeans IDE 4.1
-------------------
NetBeans IDE 4.0
-------------------
NetBeans IDE 3.6
-------------------
NetBeans IDE 3.5
-------------------
NetBeans IDE 3.4
-------------------
NetBeans IDE 3.3
-------------------
NetBeans IDE 3.2
-------------------
NetBeans IDE 3.1
-------------------
About NetBeans
-------------------
NetBeans Products
-------------------
Netbeans EDI
-------------------
Bookshelf
-------------------
Wiki
-------------------

>>
>>> P.S All my work of left menu seems to be lost for fr.netbeans.org. I 
>>> hope you will be able to help me to solve it.
>>
>>
>>
>> ! :-(  I'm sorry Vincent, I knew fr. would be special but didn't know 
>> exactly what was required.  Pls let me know how I can help.
>
By implementing proposal one
In your template, replace

<!-- Start left menu -->
<SCRIPT LANGUAGE="javascript" SRC="left-nav.js"></SCRIPT>
<!-- End left menu -->

by

<!-- Start left menu -->
<SCRIPT LANGUAGE="javascript" SRC="/left-nav.js"></SCRIPT>
<!-- End left menu -->



>
> By saying me exactly how the new implementation has been said 
> comparing to the preceding one.
>
> If I have well understand, you are now referencing to a .js (in place 
> of ..inc) in your template.
> And the reference to the JS is something like include "xxx.js" and is 
> now always relative to the current page
> But if you put something like include "\xxx.js", we include the xxx.js 
> that is always on top of www directory.
>
> Imagine now that, in your template, you have something like:
>
> <!-- Start left menu -->
> include "xxx.js"
> include "\xxx.js"
> <!-- End left menu -->
> It means that it will add, at first position the local left menu, and 
> in second position, the global left menu.
>
> It should works.
>
> I will try on fr.netbeans.org and give you more feedback.
>
>
>>
>>> If I remember well, The layout for www website is not the same as 
>>> the layout of the other modules website. I would like to propose 
>>> something to add in the modules website layout, to also have the 
>>> list of other language.
>>
>>
>>
>> This is the proposal you made some time ago, right ?  I have it
>> still waiting for me in my Inbox.
>
>
> Really, I though I sended it to you, But I will (re)send you asap 
> then. (Surely  this evening).
>
>
Also another nice enhancement I did for my project but it's not anymore 
possible now:
in the left-nav.inc, I modified the following line :

    <div class="moduletitle">Fr</div>

by

    <div class="moduletitle"><a href="/">Fr</a></div>

So, it was easy for the user to come back, by one click/ to the root of 
the projet.
but, now, it seems that this line migrated to the template.
Could you do the same modification in the template, so every project 
will profit of that nice modification ?
Thanks a lot.

-- 

Vincent Brabant
----------------
http://fr.netbeans.org/