You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2005/10/13 15:37:08 UTC
svn commit: r320768 - in /lenya/trunk/src/webapp/lenya:
resources/css/xulmenu.xml xslt/menu/menu2xsltwithxul.xsl
xslt/menu/menu2xul.xsl
Author: michi
Date: Thu Oct 13 06:36:55 2005
New Revision: 320768
URL: http://svn.apache.org/viewcvs?rev=320768&view=rev
Log:
thanks to Ilhan Parmaksiz and Gregor Imboden the Lenya XUL menus have been greatly improved
Modified:
lenya/trunk/src/webapp/lenya/resources/css/xulmenu.xml
lenya/trunk/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl
lenya/trunk/src/webapp/lenya/xslt/menu/menu2xul.xsl
Modified: lenya/trunk/src/webapp/lenya/resources/css/xulmenu.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/resources/css/xulmenu.xml?rev=320768&r1=320767&r2=320768&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/css/xulmenu.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/css/xulmenu.xml Thu Oct 13 06:36:55 2005
@@ -22,82 +22,41 @@
@import url("chrome://global/skin/");
-->
-<!--
-window, page, dialog, wizard {
- background-color: #C7D0D9;
- font: message-box;
-}
--->
-
-#lenya-content-box {
- background-color: white;
- <!--font: caption; -->
- font-size-adjust: 0.5;
-}
-
-#lenya-logo {
- width: 115px;
- height: 36px;
- margin-left: 25px;
- margin-right: 5px;
-}
-
-#lenya-menubar {
- padding-top: 5px;
- background-image: url(<xsl:value-of select="concat($contextprefix, '/lenya/menu/images/grau-bg.gif')"/>);
-}
-
-#lenya-xul-menubar {
- <!-- -moz-border-radius-topright: 1000px; -->
- background-image: url(<xsl:value-of select="concat($contextprefix, '/lenya/menu/images/grau-bg2.gif')"/>);
- background-color: red;
-}
-
-
-<!--tab {-->
- <!--background-color: red;--> <!-- does not work - it only works in the real mozilla with the modern theme not with the classic theme -->
-<!-- font-family: Verdana, sans-serif;
- font-size: 80%;
- font-weight: bold;
- color: #838383;-->
- <!--color: black;-->
-
- <!-- copy from modern theme -->
-<!-- margin: 0px;
- border: 3px solid;
- border-bottom-width: 3px;
- -moz-border-top-colors: #B1B1B1 #CFCFCF #E4E4E4;
- -moz-border-right-colors: #B1B1B1 #CFCFCF #E4E4E4;
- -moz-border-bottom-colors: #B1B1B1 #CFCFCF #E4E4E4;>
- -moz-border-left-colors: #000000 #90A0B0 #B1B1B1;
- -moz-border-radius-topleft: 3px;
- -moz-border-radius-topright: 3px;
- padding: 1px 3px;
-
-
-
- background-color: #E5F5F8;
-
-}-->
-
-<!--tab[selected="true"] {
- -moz-border-top-colors: #000000 #DFE2E6 #D0D7DD;
- -moz-border-right-colors: #000000 #BAC2CD #C1C9D3;
- -moz-border-bottom-colors: #E5F5F8;
- -moz-border-left-colors: #000000 #DFE2E6 #D0D7DD;
- background-color: #E5F5F8;
- color: red;
-}-->
-
-<!--
-menubar {
- background-color: #E5F5F8;
- border-bottom: solid 1px #B1B1B1;
+window {
+
}
-menupopup {
- background-color: #E5F5F8;
+#lenya-xul-menubar vbox {
+ background-color: inherit;
}
--->
+
+#lenya-info {
+ float: right;
+ margin: 9px 10px 0px 0px;
+ font-size: 11px;
+ font-family: Arial, "Lucida Grande", Verdana, Helvetica, sans-serif;
+ line-height: 1;
+}
+
+tabbox {
+ padding-top: 3px;
+ background-color: #ababab;
+ color: #ffffff;
+}
+
+tab {
+ vertical-align: middle;
+ font: bold 10px/1.0 Arial, Verdana, sans-serif; text-transform: uppercase;
+}
+
+tabs {
+
+ margin-left: 3px;
+}
+
+description {
+
+}
+
</css>
Modified: lenya/trunk/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl?rev=320768&r1=320767&r2=320768&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl Thu Oct 13 06:36:55 2005
@@ -14,123 +14,108 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xso="http://apache.org/cocoon/lenya/xslt/1.0"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- >
-
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="area"/>
-<xsl:param name="documentid"/>
-
-<xsl:namespace-alias stylesheet-prefix="xso" result-prefix="xsl"/>
-
-<xsl:output method="xml" indent="yes"/>
-
-<xsl:template match="/">
-
- <xso:stylesheet version="1.0"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- >
- <!--
- exclude-result-prefixes="xhtml">
- -->
- <!--
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"-->
-<!-- exclude-result-prefixes="xhtml"-->
-
- <xso:output method="xml" indent="yes"/>
-
- <xsl:if test="$area != 'live'">
-
- <xso:template match="/">
-<!--
- <xso:processing-instruction name="xml-stylesheet">
- href="chrome://global/skin/" type="text/css"
- </xso:processing-instruction>
--->
-
- <xso:processing-instruction name="xml-stylesheet">
- href="<xsl:value-of select="$contextprefix"/>/lenya/css/xulmenu.css" type="text/css"
- </xso:processing-instruction>
-
- <xso:apply-templates select="xhtml:html/xhtml:head/xhtml:link"/>
-
- <xul:window
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-
- <!-- TODO does not work !!! -->
- <!--xso:attribute name="title"><xsl:value-of select="concat('Apache Lenya - ', $publicationid, ' - ', $area, ' - ', $documentid, ' - ')"/><xso:value-of select="xhtml:html/xhtml:head/xhtml:title"/></xso:attribute-->
-
- <xul:script type="application/x-javascript">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xso="http://apache.org/cocoon/lenya/xslt/1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0">
+
+ <xsl:param name="area"/>
+ <xsl:param name="contextprefix"/>
+ <xsl:param name="publicationid"/>
+ <xsl:param name="documenturl"/>
+
+ <xsl:namespace-alias stylesheet-prefix="xso" result-prefix="xsl"/>
+ <xsl:output method="xml" indent="yes"/>
+
+ <xsl:template match="/">
+
+ <xso:stylesheet xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" version="1.0">
+
+ <xso:output method="xml" indent="yes"/>
+ <xsl:if test="$area != 'live'">
+
+ <xso:template match="/">
+ <xso:processing-instruction name="xml-stylesheet">
+ href="<xsl:value-of select="$contextprefix"/>/lenya/css/xulmenu.css" type="text/css"
+ </xso:processing-instruction>
+
+ <xso:apply-templates select="xhtml:html/xhtml:head/xhtml:link"/>
+
+ <xul:window xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="fixTabSelection();fixTitle()">
+
+ <xso:attribute name="title">
+ <xsl:value-of select="concat('Apache Lenya - ', $publicationid, ' - ', $area, ' - ', $documenturl, ' - ')"/>
+ </xso:attribute>
+
+ <xul:script type="application/x-javascript">
function loadURL(event) {
var url = event.target.getAttribute('value');
if (url) window.location = url;
}
- </xul:script>
- <xsl:apply-templates select="xul:hbox[@id = 'lenya-menubar']"/>
- <xul:spacer flex="1" />
- <xul:box style="overflow: auto;" flex="100" id="lenya-content-box">
+ </xul:script>
+
+ <!-- Workaround for the tab' non working select attribute -->
+ <xul:script type="application/x-javascript">
+ function fixTabSelection() {
+ var item = document.getElementById('lenya-xul-tabbox');
+ var label = item.selectedTab.getAttribute('label').toLowerCase();
+ while (label != '<xsl:value-of select="$area"/>' && item.selectedTab.nextSibling!=null) {
+ item._tabs.advanceSelectedTab(0);
+ label = item.selectedTab.getAttribute('label').toLowerCase();
+ }
+ }
+ </xul:script>
+
+ <!-- Workaround for the windows' non working title attribute -->
+ <xul:script type="application/x-javascript">
+ function fixTitle() {
+ document.title = '<xsl:value-of select="concat('Apache Lenya | ', $publicationid, ' | ', $area, ' | ', $documenturl, ' | ')"/>';
+ }
+ </xul:script>
+
+ <xsl:apply-templates select="xul:*"/>
+ <xul:spacer flex="1"/>
+ <xul:box style="overflow: auto;" flex="100" id="lenya-content-box">
<xul:vbox flex="1">
- <xhtml:html>
- <xso:apply-templates select="xhtml:html/xhtml:body"/>
- </xhtml:html>
+ <xhtml:html>
+ <xso:apply-templates select="xhtml:html/xhtml:body"/>
+ </xhtml:html>
</xul:vbox>
- </xul:box>
- </xul:window>
- </xso:template>
-
- <!-- TODO: I think only type="text/css" should be transformed into xml-stylesheet ... -->
- <!-- TODO: Copy all attributes! -->
- <xso:template match="xhtml:link">
- <xso:processing-instruction name="xml-stylesheet">
- href="<xso:value-of select="@href"/>" type="<xso:value-of select="@type"/>"
- </xso:processing-instruction>
- </xso:template>
-
- </xsl:if>
-
- <xso:template match="xhtml:*">
- <xso:element>
- <xsl:attribute name="name">{local-name()}</xsl:attribute>
- <xso:apply-templates select="@*|node()"/>
- </xso:element>
- </xso:template>
-
-
- <xso:template match="@*|node()">
- <xso:copy>
- <xso:apply-templates select="@*|node()"/>
- </xso:copy>
- </xso:template>
-
- </xso:stylesheet>
-
-</xsl:template>
-
-
-
-<xsl:template match="xhtml:*">
- <xsl:element name="{local-name()}">
- <xsl:apply-templates select="@*|node()"/>
- </xsl:element>
-</xsl:template>
-
-
-<xsl:template match="@*|node()">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()"/>
- </xsl:copy>
-</xsl:template>
+ </xul:box>
+ </xul:window>
+ </xso:template>
+
+ <xso:template match="xhtml:link">
+ <xso:processing-instruction name="xml-stylesheet">
+ href="<xso:value-of select="@href"/>" type="<xso:value-of select="@type"/>"
+ </xso:processing-instruction>
+ </xso:template>
+
+ </xsl:if>
+
+ <xso:template match="xhtml:*">
+ <xso:element>
+ <xsl:attribute name="name">{local-name()}</xsl:attribute>
+ <xso:apply-templates select="@*|node()"/>
+ </xso:element>
+ </xso:template>
+
+ <xso:template match="@*|node()">
+ <xso:copy>
+ <xso:apply-templates select="@*|node()"/>
+ </xso:copy>
+ </xso:template>
+
+ </xso:stylesheet>
+ </xsl:template>
+
+ <xsl:template match="xhtml:*">
+ <xsl:element name="{local-name()}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
-
</xsl:stylesheet>
Modified: lenya/trunk/src/webapp/lenya/xslt/menu/menu2xul.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/xslt/menu/menu2xul.xsl?rev=320768&r1=320767&r2=320768&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/menu/menu2xul.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/menu/menu2xul.xsl Thu Oct 13 06:36:55 2005
@@ -15,230 +15,186 @@
limitations under the License.
-->
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
- xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
- xmlns:menu="http://apache.org/cocoon/lenya/menubar/1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- >
-
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="documentarea"/>
-<xsl:param name="completearea"/>
-<xsl:param name="documenturl"/>
-<xsl:param name="documentid"/>
-<xsl:param name="userid"/>
-<xsl:param name="servertime"/>
-<xsl:param name="workflowstate"/>
-<xsl:param name="islive"/>
-
-<xsl:variable name="image-prefix"><xsl:value-of select="$contextprefix"/>/lenya/menu/images</xsl:variable>
-
-<xsl:template match="menu:menu">
-
- <xul:hbox id="lenya-menubar" style="background-image: url({$contextprefix}/lenya/menu/images/grau-bg2.gif);">
- <xul:vbox flex="100">
- <xul:image src="{$image-prefix}/frame-bg_oben.gif" width="100%" height="4" />
-
- <xul:hbox flex="100">
- <xul:image src="{$image-prefix}/blau_anfang_oben.gif"/>
-
- <xul:vbox flex="100">
- <xul:hbox>
-
- <!-- ADMIN TAB -->
- <xsl:if test="not(menu:tabs/menu:tab[@label = 'admin']/@show = 'false')">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0" xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0" xmlns:menu="http://apache.org/cocoon/lenya/menubar/1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" version="1.0">
+
+ <xsl:param name="contextprefix"/>
+ <xsl:param name="publicationid"/>
+ <xsl:param name="area"/>
+ <xsl:param name="documentarea"/>
+ <xsl:param name="completearea"/>
+ <xsl:param name="documenturl"/>
+ <xsl:param name="documentid"/>
+ <xsl:param name="userid"/>
+ <xsl:param name="servertime"/>
+ <xsl:param name="workflowstate"/>
+ <xsl:param name="islive"/>
+ <xsl:param name="usecase"/>
+
+ <xsl:variable name="image-prefix"><xsl:value-of select="$contextprefix"/>/lenya/menu/images</xsl:variable>
+
+ <xsl:template match="menu:menu">
+ <xul:spacer style="height: 0px"/>
+
+ <xul:tabbox id="lenya-xul-tabbox">
+ <xul:tabs>
+ <xsl:for-each select="menu:tabs/menu:tab[@show='true']">
+ <xsl:call-template name="area-tab">
+ <xsl:with-param name="tab-area" select="@label"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:if test="not(menu:tabs/menu:tab[@label='admin']/@show='false')">
<xsl:call-template name="area-tab">
<xsl:with-param name="tab-area">admin</xsl:with-param>
</xsl:call-template>
- </xsl:if>
-
- <!-- INFO/SITE TAB -->
- <xsl:variable name="info-area">
- <xsl:text>info-</xsl:text>
- <xsl:choose>
- <xsl:when test="$documentarea = 'admin'">authoring</xsl:when>
- <xsl:otherwise><xsl:value-of select="$documentarea"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:if test="not(menu:tabs/menu:tab[@label = 'info']/@show = 'false')">
+ </xsl:if>
+ <xsl:if test="not(menu:tabs/menu:tab[@label='info']/@show='false')">
+ <!--<xsl:if test="not(menu:tabs/menu:tab[@label='site']/@show='false') and $area='admin'">-->
<xsl:call-template name="area-tab">
- <xsl:with-param name="tab-area" select="$info-area"/>
- <xsl:with-param name="tab-area-prefix">info</xsl:with-param>
+ <xsl:with-param name="tab-area">authoring</xsl:with-param>
</xsl:call-template>
</xsl:if>
-
- <!-- AUTHORING TAB -->
<xsl:call-template name="area-tab">
<xsl:with-param name="tab-area">authoring</xsl:with-param>
</xsl:call-template>
-
- <!-- STAGING TAB -->
- <xsl:if test="menu:tabs/menu:tab[@label = 'staging']/@show = 'true'">
- <xsl:call-template name="area-tab">
- <xsl:with-param name="tab-area">staging</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-
- <!-- LIVE TAB -->
- <xsl:if test="not(menu:tabs/menu:tab[@label = 'live']/@show = 'false')">
+ <xsl:if test="not(menu:tabs/menu:tab[@label='live']/@show='false')">
<xsl:call-template name="area-tab">
<xsl:with-param name="tab-area">live</xsl:with-param>
<xsl:with-param name="target">_blank</xsl:with-param>
</xsl:call-template>
</xsl:if>
-
- <xul:image src="{$contextprefix}/lenya/menu/images/grau-bg2.gif" flex="100"/>
-
- </xul:hbox>
- <xul:image width="100%" src="{$image-prefix}/unten.gif" />
- </xul:vbox>
-
- </xul:hbox>
- <xul:menubar oncommand="loadURL(event);" grippyhidden="true" id="lenya-xul-menubar" flex="100"
- style="background-image: url({$contextprefix}/lenya/menu/images/menu-bg_2.gif); font-family: verdana, helvetica, sans-serif; font-size: 10pt;">
- <xsl:apply-templates select="menu:menus/menu:menu" mode="menu"/>
- </xul:menubar>
- </xul:vbox>
- <!--xul:vbox>
- <xul:image src="{$image-prefix}/lenya_unten.gif" />
- </xul:vbox-->
- </xul:hbox>
-
-</xsl:template>
-
+ <xul:box flex="350">
+ <xul:vbox flex="1"/>
+ <xul:box>
+ <xul:description id="lenya-info">
+ <xsl:attribute name="value"><xsl:call-template name="workflow"/>User: <xsl:value-of select="$userid"/> | ServerTime: <xsl:value-of select="$servertime"/></xsl:attribute>
+ </xul:description>
+ </xul:box>
+ </xul:box>
+ </xul:tabs>
+ </xul:tabbox>
+
+ <xul:vbox flex="1" id="lenya-xul-menubar">
+ <xul:toolbox>
+ <xul:menubar id="menubar">
+ <xsl:apply-templates select="menu:menus/menu:menu" mode="menu"/>
+ <xul:spacer flex="1"/>
+ <xul:box style="width: 8px; height: 22px;"/>
+ <xul:image id="statusImage"
+ src="{$image-prefix}/apache-lenya_logo_black.png"
+ style="width: 146px; height: 23px;"
+ onmouseover="setWindowCursorTmp('pointer');"
+ onmouseout="restoreWindowCursor();"
+ onclick="window.open('http://lenya.org');"
+ tooltiptext="Visit lenya.org"
+ />
+ </xul:menubar>
+ </xul:toolbox>
+</xul:vbox>
+
+ </xsl:template>
<xsl:template name="area-tab">
<xsl:param name="tab-area"/>
<xsl:param name="tab-area-prefix" select="$tab-area"/>
<xsl:param name="target" select="'_self'"/>
-
<xsl:variable name="tab-documenturl">
<xsl:choose>
- <!-- index.html for link from/to admin area -->
- <xsl:when test="$tab-area = 'admin' or $documentarea = 'admin'">/index.html</xsl:when>
- <xsl:when test="starts-with($completearea, 'info') and $documentid = '/'">/index.html</xsl:when>
- <xsl:otherwise><xsl:value-of select="$documenturl"/></xsl:otherwise>
+ <xsl:when test="$tab-area = 'admin'">/index.html</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$documenturl"/>
+ </xsl:otherwise>
</xsl:choose>
</xsl:variable>
-
<xsl:variable name="selected">
- <xsl:choose>
- <xsl:when test="starts-with($completearea, $tab-area-prefix)">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="tab-image-url">
- <xsl:choose>
- <xsl:when test="starts-with($completearea, $tab-area-prefix)"><xsl:value-of select="concat($image-prefix, '/', $tab-area-prefix, '_active.gif')"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="concat($image-prefix, '/', $tab-area-prefix, '_inactive.gif')"/></xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="$area=$tab-area">true</xsl:when>
+ <xsl:otherwise>false</xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
-
-
<xsl:variable name="tab-label">
- <xsl:choose>
- <xsl:when test="$tab-area = 'info-authoring'">site</xsl:when>
- <xsl:otherwise><xsl:value-of select="$tab-area"/></xsl:otherwise>
- </xsl:choose>
+ <xsl:value-of select="translate($tab-area,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
</xsl:variable>
-
-
- <!--xul:tab label="{$tab-label}"
- onclick="window.location = '{$contextprefix}/{$publicationid}/{$tab-area}{normalize-space($tab-documenturl)}';"
- id="lenya-xul-{$tab-area-prefix}-tab"
- image="{$tab-image-url}"
- selected="{$selected}"/-->
-
- <xul:image label=""
- onclick="window.location = '{$contextprefix}/{$publicationid}/{$tab-area}{normalize-space($tab-documenturl)}';"
- id="lenya-xul-{$tab-area-prefix}-tab"
- src="{$tab-image-url}"/>
-
-
+ <xul:tab label="{$tab-label}" onclick="window.location = '{$contextprefix}/{$publicationid}/{$tab-area}{normalize-space($tab-documenturl)}';" id="lenya-xul-{$tab-area-prefix}-tab" selected="{$selected}"/>
</xsl:template>
-
<xsl:template name="workflow">
- <i18n:text>Workflow State</i18n:text>: <b class="lenya-menubar-highlight"><i18n:text><xsl:value-of select="$workflowstate"/></i18n:text></b>
- <xsl:text>  |  </xsl:text>
- <xsl:if test="$islive = 'false'"><i18n:text>not</i18n:text> </xsl:if>
- <i18n:text>live</i18n:text><xsl:text>  |</xsl:text>
- </xsl:template>
+ <i18n:text>Workflow StateHELLO</i18n:text>: <b class="lenya-menubar-highlight"><i18n:text><xsl:value-of select="$workflowstate"/></i18n:text> |</b>
+
+ <xsl:if test="$islive = 'false'">
+ <i18n:text>not</i18n:text> 
+ </xsl:if>
+ <i18n:text>live</i18n:text>
+
+ <xsl:text>|</xsl:text>
+ </xsl:template>
+
+<!--
+ <xsl:template name="workflow">
+ <li id="info-state"><i18n:text>Workflow State</i18n:text>: <span id="workflow-state"><i18n:text><xsl:value-of select="$workflowstate"/></i18n:text></span></li>
+
+ <li id="info-live">
+ <xsl:choose>
+ <xsl:when test="$islive = 'false'">
+ <i18n:text>not live</i18n:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <i18n:text>live</i18n:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+ </xsl:template>
+-->
<xsl:template match="menu:menu" mode="menu">
- <xsl:if test="menu:block">
- <xul:menu label="{@name}">
- <xul:menupopup style="background-image: url({$contextprefix}/lenya/menu/images/bottombg.gif);">
- <xsl:apply-templates select="menu:block[not(@info = 'false') and starts-with($completearea, 'info') or not(@*[local-name() = $completearea] = 'false') and not(starts-with($completearea, 'info'))]" mode="menu"/>
- </xul:menupopup>
- </xul:menu>
- </xsl:if>
+ <xul:menu label="{@name}">
+ <xul:menupopup>
+ <xsl:apply-templates select="menu:block[not(@*[local-name()=$area]='false')]" mode="menu"/>
+ </xul:menupopup>
+ </xul:menu>
</xsl:template>
-
- <!-- match blocks with not area='false' -->
<xsl:template match="menu:block" mode="menu">
- <!-- * is menu and item -->
- <xsl:apply-templates select="*[not(@info = 'false') and starts-with($completearea, 'info') or not(@*[local-name() = $completearea] = 'false') and not(starts-with($completearea, 'info'))]" mode="menu"/>
-
+ <xsl:apply-templates select="menu:item" mode="menu"/>
<xsl:if test="position() != last()">
<xul:menuseparator/>
</xsl:if>
</xsl:template>
-
- <!-- match items with not area='false' -->
+
<xsl:template match="menu:item" mode="menu">
<xsl:choose>
<xsl:when test="@href">
- <xul:menuitem label="{.}">
-
- <!-- For whatever reason the value, event, loadURL mechanism doesn't work anymore -->
- <!--
- <xsl:attribute name="value">
- -->
+ <xul:menuitem>
<xsl:attribute name="oncommand">
- window.location = '<xsl:value-of select="@href"/>
- <xsl:apply-templates select="@*[local-name() != 'href']"/>
- <xsl:text/>
- <xsl:if test="starts-with($completearea, 'info-')">
- <xsl:choose>
- <xsl:when test="contains(@href, '?')"><xsl:text>&</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>?</xsl:text></xsl:otherwise>
- </xsl:choose>
- <xsl:text>lenya.area=info</xsl:text>
- </xsl:if>'
+ window.location = '<xsl:value-of select="@href"/><xsl:apply-templates select="@*[local-name()!='href']"/>'
+ </xsl:attribute>
+ <xsl:attribute name="label">
+ <xsl:value-of select="text()"/>
</xsl:attribute>
+ <xsl:apply-templates select="menu:message"/>
</xul:menuitem>
</xsl:when>
<xsl:otherwise>
- <xul:menuitem label="{.}" disabled="true"/>
+ <xul:menuitem disabled="true">
+ <xsl:attribute name="label">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="menu:message"/>
+ </xul:menuitem>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
-
- <xsl:template match="menu:item/@uc:usecase">
- <xsl:text/>
- <xsl:choose>
- <xsl:when test="contains(../@href, '?')">&</xsl:when>
- <xsl:otherwise>?</xsl:otherwise>
- </xsl:choose>
- <xsl:text/>lenya.usecase=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
+ <xsl:template match="menu:message">
+ <xsl:attribute name="tooltiptext">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
</xsl:template>
- <xsl:template match="menu:item/@uc:step">
- <xsl:text/>&lenya.step=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
+ <xsl:template match="menu:item/@uc:usecase"><xsl:text/><xsl:choose><xsl:when test="contains(../@href, '?')">&</xsl:when><xsl:otherwise>?</xsl:otherwise></xsl:choose><xsl:text/>lenya.usecase=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
</xsl:template>
- <xsl:template match="menu:item/@*[not(namespace-uri() = 'http://apache.org/cocoon/lenya/usecase/1.0')]"><xsl:copy-of select="."/></xsl:template>
-
+ <xsl:template match="menu:item/@wf:event"/>
+ <xsl:template match="menu:item/@uc:step"><xsl:text/>&lenya.step=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
+ </xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org