You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Bruno Busco <br...@gmail.com> on 2010/02/21 02:04:25 UTC
Re: svn commit: r912269 - in /ofbiz/trunk/themes/tomahawk:
includes/appbarOpen.ftl webapp/tomahawk/css/style.css webapp/tomahawk/js/dropdown.js
oops,
sorry, you are right. I'll do better next time.
-Bruno
2010/2/21 Adam Heath <do...@brainfood.com>:
> buscob@apache.org wrote:
>> Author: buscob
>> Date: Sun Feb 21 00:56:11 2010
>> New Revision: 912269
>>
>> URL: http://svn.apache.org/viewvc?rev=912269&view=rev
>> Log:
>> Better dropdown menu handling in tomahawk theme.
>> The menus are not shown during page loading.
>> Replaced hide/show toggling with explicit hide/show commands so that the menu status cannot be accidentally swapped.
>>
>> Modified:
>> ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl
>> ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css
>> ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js
>>
>> Modified: ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl?rev=912269&r1=912268&r2=912269&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl (original)
>> +++ ofbiz/trunk/themes/tomahawk/includes/appbarOpen.ftl Sun Feb 21 00:56:11 2010
>> @@ -37,7 +37,7 @@
>> <h2>${uiLabelMap.CommonApplications}</h2>
>> <ul>
>> <li>
>> - <ul><li><ul class="primary">
>> + <ul class="main"><li><ul class="primary">
>> <#-- Primary Applications -->
>> <#list displayApps as display>
>> <#assign thisApp = display.getContextRoot()>
>>
>> Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css?rev=912269&r1=912268&r2=912269&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css (original)
>> +++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css Sun Feb 21 00:56:11 2010
>> @@ -1149,18 +1149,6 @@
>> background-color:#1b1919;
>> }
>>
>> -bb#app-navigation ul li ul {
>> -background-color: #006699;
>> -border-bottom: solid 5px #003366;
>> -border-right: solid 4px #003366;
>> -}
>> -
>> -bb.menu_selected #app-navigation ul li ul {
>> -background-color: #131212;
>> -border-bottom: solid 5px #131212;
>> -border-right: solid 4px #131212;
>> -}
>> -
>> #main-navigation ul li ul li a,
>> #app-navigation ul li ul li a {
>> display:block;
>> @@ -1192,6 +1180,11 @@
>> background-color:#403f40;
>> }
>>
>> +#main-navigation ul.main,
>> +#app-navigation li ul{
>> +display:none;
>> +}
>> +
>> /* ============================ */
>> /* ===== Screenlet Styles ===== */
>> /* ============================ */
>>
>> 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=912269&r1=912268&r2=912269&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js (original)
>> +++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/js/dropdown.js Sun Feb 21 00:56:11 2010
>> @@ -18,32 +18,30 @@
>> */
>>
>> var DropDownMenu = Class.create();
>> +
>> DropDownMenu.prototype = {
>> - initialize: function(menuElement) {
>> + initialize: function(menuElement) {
>> var menuTitle = $A(menuElement.getElementsByTagName("h2")).first();
>> +
>> menuElement.childElements().each(function(node){
>> - // if there is a submenu
>> - var submenu = $A(node.getElementsByTagName("ul")).first();
>> - if(submenu != null){
>> - // make sub-menu invisible
>> - Element.extend(submenu).setStyle({display: 'none'});
>> - // toggle the visibility of the submenu
>> - if (menuTitle != null) {
>> - menuTitle.onmouseover = menuTitle.onmouseout = function(){Element.toggle(submenu);};
>> - menuTitle = null;
>> - }
>> - node.onmouseover = node.onmouseout = function(){Element.toggle(submenu);};
>> + // if there is a submenu
>> + var submenu = $A(node.getElementsByTagName("ul")).first();
>> + if(submenu != null){
>> + // make sub-menu invisible
>> + Element.hide(submenu);
>> + // toggle the visibility of the submenu
>> + if (menuTitle != null) {
>> + menuTitle.onmouseover = function(){Element.extend(submenu).setStyle({display: 'block'});};
>> + menuTitle.onmouseout = function(){Element.hide(submenu);};
>> }
>> + node.onmouseover = function(){Element.extend(submenu).setStyle({display: 'block'});};
>> + node.onmouseout = function(){Element.hide(submenu);};
>> + }
>> });
>> }
>> };
>>
>> -Event.observe(window, "load", function(){
>> -
>> -});
>> -
>> document.observe('dom:loaded', function(){
>> - var mainmenu = new DropDownMenu($('main-navigation'));
>> - var appmenu = new DropDownMenu($('app-navigation'));
>> + var mainmenu = new DropDownMenu($('main-navigation'));
>> + var appmenu = new DropDownMenu($('app-navigation'));
>> });
>> -u
>
> You reformatted this file while changing the logic. This makes it
> hard to see what actually changed. Please don't do formatting fixes
> at the same time as other changes.
>
>