Return-Path: Delivered-To: apmail-forrest-dev-archive@www.apache.org Received: (qmail 96412 invoked from network); 25 Nov 2005 07:34:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Nov 2005 07:34:33 -0000 Received: (qmail 58870 invoked by uid 500); 25 Nov 2005 07:34:33 -0000 Delivered-To: apmail-forrest-dev-archive@forrest.apache.org Received: (qmail 58675 invoked by uid 500); 25 Nov 2005 07:34:32 -0000 Mailing-List: contact dev-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@forrest.apache.org List-Id: Delivered-To: mailing list dev@forrest.apache.org Received: (qmail 58664 invoked by uid 99); 25 Nov 2005 07:34:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2005 23:34:32 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [80.67.18.15] (HELO smtprelay03.ispgateway.de) (80.67.18.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2005 23:36:03 -0800 Received: (qmail 32443 invoked from network); 25 Nov 2005 07:34:09 -0000 Received: from unknown (HELO localhost) (305514@[212.59.61.29]) (envelope-sender ) by smtprelay03.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 25 Nov 2005 07:34:09 -0000 Date: Fri, 25 Nov 2005 08:34:04 +0100 From: Ferdinand Soethe X-Priority: 3 (Normal) Message-ID: <945924892.20051125083404@soethe.net> To: dev@forrest.apache.org Subject: Additional features in scales-skin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N A few clients asked for a change in the functionality of Forrest menus. They'd like a menu selection not only to open that menu, but to select an index page at the same time. And while this contradicts the no-reload concept of Forrest menues, it makes a lot of sense in some use cases. So I've added two new features to the scales skin that could check in rather soon: type='openFirstChild' By adding the attribute type='openFirstChild' to a menu element (that is an element that has children) in site.xml, Forrest will now open the page referenced in the first child element when you select the menu. new attribute: 'openURL' To have more flexibilty, you can add the new attribute 'openURL' to the menuelement and specify any URI to open when the menu is clicked. (Drawback here is that this reference can only be a valid URL since this attribute is not yet adjusted like the content of href.) Below I have added that changes required in scales. wdyt? -- Ferdinand Soethe changes to 'book2menu.xsl' --------------------------
  • /

  • changes to 'getMenu.js' ------------------------- function SwitchMenu(obj, thePath) { var open = 'url("'+thePath + 'images/chapter_open.gif")'; var close = 'url("'+thePath + 'images/chapter.gif")'; if(document.getElementById) { var el = document.getElementById(obj); var el2 = document.getElementById(obj+'Title'); var title = document.getElementById(obj+'Title'); var openURL = el2.getAttribute('openURL','false'); if (openURL != '') { // prompt(openURL); window.location = openURL; }else{ if(el.style.display != "block"){ title.style.backgroundImage = open; el.style.display = "block"; }else{ title.style.backgroundImage = close; el.style.display = "none"; } } }// end - if(document.getElementById) }//end - function SwitchMenu(obj)