You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by bu...@apache.org on 2010/02/24 15:53:40 UTC

svn commit: r915812 - in /ofbiz/trunk/themes/tomahawk: includes/appbarClose.ftl webapp/tomahawk/js/dropdown.js

Author: buscob
Date: Wed Feb 24 14:53:40 2010
New Revision: 915812

URL: http://svn.apache.org/viewvc?rev=915812&view=rev
Log:
A patch from Sascha Rodekamp, "Tomahawk Menu Loading", https://issues.apache.org/jira/browse/OFBIZ-3494

Modified:
    ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
    ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js

Modified: ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl?rev=915812&r1=915811&r2=915812&view=diff
==============================================================================
--- ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl (original)
+++ ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Wed Feb 24 14:53:40 2010
@@ -88,3 +88,8 @@
 </div>
 <div class="clear">
 </div>
+
+<script>
+  var mainmenu = new DropDownMenu($('main-navigation'));
+  var appmenu = new DropDownMenu($('app-navigation'));
+</script>

Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js?rev=915812&r1=915811&r2=915812&view=diff
==============================================================================
--- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js (original)
+++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js Wed Feb 24 14:53:40 2010
@@ -39,9 +39,4 @@
       }
     });
   }
-};
-
-document.observe('dom:loaded', function(){
-  var mainmenu = new DropDownMenu($('main-navigation'));
-  var appmenu = new DropDownMenu($('app-navigation'));
-});
+};
\ No newline at end of file



Re: svn commit: r915812 - in /ofbiz/trunk/themes/tomahawk: includes/appbarClose.ftl webapp/tomahawk/js/dropdown.js

Posted by Adam Heath <do...@brainfood.com>.
Bruno Busco wrote:
> Adam,
> thank you for the insight.
> 
> The patch, actually, was only intended to have the menu working while
> the page is loaded. I resolved the menu hiding during the page loading
> with CSS as you suggest, in a previous commit.
> I will test on IE and see what you say ASAP. At least I will check it
> tomorrow on the Apache demo server that is one of the slowest server I
> can ever have OFBiz running on. ;-)

It's not the speed of the remote server, it's the speed of the connection.

We use www.browsercam.com.  $500/year, gives you
win95/98/2000/xp/vista/nt3.5/nt4.0/linux/osx(lots of varieties), all
sorts of browsers, with/out flash.  You get a remote vnc connection.

Re: svn commit: r915812 - in /ofbiz/trunk/themes/tomahawk: includes/appbarClose.ftl webapp/tomahawk/js/dropdown.js

Posted by Bruno Busco <br...@gmail.com>.
Adam,
thank you for the insight.

The patch, actually, was only intended to have the menu working while
the page is loaded. I resolved the menu hiding during the page loading
with CSS as you suggest, in a previous commit.
I will test on IE and see what you say ASAP. At least I will check it
tomorrow on the Apache demo server that is one of the slowest server I
can ever have OFBiz running on. ;-)

-Bruno


2010/2/24 Adam Heath <do...@brainfood.com>:
> Bruno Busco wrote:
>> FF 3.5.8
>
> It won't work in all IEs, sometimes.
>
> You can't manipulate or search the dom in some IEs until the dom is
> loaded.  It may work fine locally, but that's because you have super
> fast access to the server.
>
> There are plenty of google searches about this.
>
> If the menu needs to be hidden at page load time, then doing it thru
> css is the correct way.
>
> If you want to start using the menu before the page is loaded, then
> doing it thru css is the correct approach, and not doing it at all
> with javascript.  Of course, in this case, then the sub-menus have to
> be children of the parent, so that you can match on the :hover of the
> parent, and change the display.
>
>>
>> 2010/2/24 Adam Heath <do...@brainfood.com>:
>>> buscob@apache.org wrote:
>>>> Author: buscob
>>>> Date: Wed Feb 24 14:53:40 2010
>>>> New Revision: 915812
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=915812&view=rev
>>>> Log:
>>>> A patch from Sascha Rodekamp, "Tomahawk Menu Loading", https://issues.apache.org/jira/browse/OFBIZ-3494
>>>>
>>>> Modified:
>>>>     ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
>>>>     ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
>>>>
>>>> Modified: ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl?rev=915812&r1=915811&r2=915812&view=diff
>>>> ==============================================================================
>>>> --- ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl (original)
>>>> +++ ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Wed Feb 24 14:53:40 2010
>>>> @@ -88,3 +88,8 @@
>>>>  </div>
>>>>  <div class="clear">
>>>>  </div>
>>>> +
>>>> +<script>
>>>> +  var mainmenu = new DropDownMenu($('main-navigation'));
>>>> +  var appmenu = new DropDownMenu($('app-navigation'));
>>>> +</script>
>>>>
>>>> Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js?rev=915812&r1=915811&r2=915812&view=diff
>>>> ==============================================================================
>>>> --- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js (original)
>>>> +++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js Wed Feb 24 14:53:40 2010
>>>> @@ -39,9 +39,4 @@
>>>>        }
>>>>      });
>>>>    }
>>>> -};
>>>> -
>>>> -document.observe('dom:loaded', function(){
>>>> -  var mainmenu = new DropDownMenu($('main-navigation'));
>>>> -  var appmenu = new DropDownMenu($('app-navigation'));
>>>> -});
>>>> +};
>>>> \ No newline at end of file
>>> What browsers did you test this in?
>>>
>>>
>
>

Re: svn commit: r915812 - in /ofbiz/trunk/themes/tomahawk: includes/appbarClose.ftl webapp/tomahawk/js/dropdown.js

Posted by Adam Heath <do...@brainfood.com>.
Bruno Busco wrote:
> FF 3.5.8

It won't work in all IEs, sometimes.

You can't manipulate or search the dom in some IEs until the dom is
loaded.  It may work fine locally, but that's because you have super
fast access to the server.

There are plenty of google searches about this.

If the menu needs to be hidden at page load time, then doing it thru
css is the correct way.

If you want to start using the menu before the page is loaded, then
doing it thru css is the correct approach, and not doing it at all
with javascript.  Of course, in this case, then the sub-menus have to
be children of the parent, so that you can match on the :hover of the
parent, and change the display.

> 
> 2010/2/24 Adam Heath <do...@brainfood.com>:
>> buscob@apache.org wrote:
>>> Author: buscob
>>> Date: Wed Feb 24 14:53:40 2010
>>> New Revision: 915812
>>>
>>> URL: http://svn.apache.org/viewvc?rev=915812&view=rev
>>> Log:
>>> A patch from Sascha Rodekamp, "Tomahawk Menu Loading", https://issues.apache.org/jira/browse/OFBIZ-3494
>>>
>>> Modified:
>>>     ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
>>>     ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
>>>
>>> Modified: ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl?rev=915812&r1=915811&r2=915812&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl (original)
>>> +++ ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Wed Feb 24 14:53:40 2010
>>> @@ -88,3 +88,8 @@
>>>  </div>
>>>  <div class="clear">
>>>  </div>
>>> +
>>> +<script>
>>> +  var mainmenu = new DropDownMenu($('main-navigation'));
>>> +  var appmenu = new DropDownMenu($('app-navigation'));
>>> +</script>
>>>
>>> Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js?rev=915812&r1=915811&r2=915812&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js (original)
>>> +++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js Wed Feb 24 14:53:40 2010
>>> @@ -39,9 +39,4 @@
>>>        }
>>>      });
>>>    }
>>> -};
>>> -
>>> -document.observe('dom:loaded', function(){
>>> -  var mainmenu = new DropDownMenu($('main-navigation'));
>>> -  var appmenu = new DropDownMenu($('app-navigation'));
>>> -});
>>> +};
>>> \ No newline at end of file
>> What browsers did you test this in?
>>
>>


Re: svn commit: r915812 - in /ofbiz/trunk/themes/tomahawk: includes/appbarClose.ftl webapp/tomahawk/js/dropdown.js

Posted by Bruno Busco <br...@gmail.com>.
FF 3.5.8

2010/2/24 Adam Heath <do...@brainfood.com>:
> buscob@apache.org wrote:
>> Author: buscob
>> Date: Wed Feb 24 14:53:40 2010
>> New Revision: 915812
>>
>> URL: http://svn.apache.org/viewvc?rev=915812&view=rev
>> Log:
>> A patch from Sascha Rodekamp, "Tomahawk Menu Loading", https://issues.apache.org/jira/browse/OFBIZ-3494
>>
>> Modified:
>>     ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
>>     ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
>>
>> Modified: ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl?rev=915812&r1=915811&r2=915812&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl (original)
>> +++ ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Wed Feb 24 14:53:40 2010
>> @@ -88,3 +88,8 @@
>>  </div>
>>  <div class="clear">
>>  </div>
>> +
>> +<script>
>> +  var mainmenu = new DropDownMenu($('main-navigation'));
>> +  var appmenu = new DropDownMenu($('app-navigation'));
>> +</script>
>>
>> Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js?rev=915812&r1=915811&r2=915812&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js (original)
>> +++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js Wed Feb 24 14:53:40 2010
>> @@ -39,9 +39,4 @@
>>        }
>>      });
>>    }
>> -};
>> -
>> -document.observe('dom:loaded', function(){
>> -  var mainmenu = new DropDownMenu($('main-navigation'));
>> -  var appmenu = new DropDownMenu($('app-navigation'));
>> -});
>> +};
>> \ No newline at end of file
>
> What browsers did you test this in?
>
>

Re: svn commit: r915812 - in /ofbiz/trunk/themes/tomahawk: includes/appbarClose.ftl webapp/tomahawk/js/dropdown.js

Posted by Adam Heath <do...@brainfood.com>.
buscob@apache.org wrote:
> Author: buscob
> Date: Wed Feb 24 14:53:40 2010
> New Revision: 915812
> 
> URL: http://svn.apache.org/viewvc?rev=915812&view=rev
> Log:
> A patch from Sascha Rodekamp, "Tomahawk Menu Loading", https://issues.apache.org/jira/browse/OFBIZ-3494
> 
> Modified:
>     ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
>     ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
> 
> Modified: ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl?rev=915812&r1=915811&r2=915812&view=diff
> ==============================================================================
> --- ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl (original)
> +++ ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Wed Feb 24 14:53:40 2010
> @@ -88,3 +88,8 @@
>  </div>
>  <div class="clear">
>  </div>
> +
> +<script>
> +  var mainmenu = new DropDownMenu($('main-navigation'));
> +  var appmenu = new DropDownMenu($('app-navigation'));
> +</script>
> 
> Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js?rev=915812&r1=915811&r2=915812&view=diff
> ==============================================================================
> --- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js (original)
> +++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js Wed Feb 24 14:53:40 2010
> @@ -39,9 +39,4 @@
>        }
>      });
>    }
> -};
> -
> -document.observe('dom:loaded', function(){
> -  var mainmenu = new DropDownMenu($('main-navigation'));
> -  var appmenu = new DropDownMenu($('app-navigation'));
> -});
> +};
> \ No newline at end of file

What browsers did you test this in?