1 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
 
   2     xmlns:html="http://www.w3.org/1999/xhtml" 
 
   3     xmlns:svg="http://www.w3.org/2000/svg"
 
   4     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   5 <xsl:output media-type="application/vnd.mozilla.xul+xml"/>
 
   6 <xsl:template match="/">
 
   8     <xsl:when test="system-property('xsl:vendor')='Transformiix'">
 
  10       <xsl:apply-templates/>
 
  13       <xsl:apply-templates mode="html"/>
 
  18 <xsl:template match="doc" mode="html">
 
  19   <html xmlns="http://www.w3.org/1999/xhtml">
 
  21       <meta http-equiv="refresh" content="2;url=menuv3.pl?action=display"/>
 
  24 Ihr Browser unterstuetzt kein XUL!<br/>
 
  25 wenn die automatische weiterleitung nicht funktioniert klicken sie <a href="menuv3.pl?action=display">hier</a>
 
  30 <!-- main document structure -->
 
  31 <!-- ******************************************************************* -->
 
  32 <xsl:template match="doc">
 
  33 <xsl:processing-instruction
 
  34 name="xml-stylesheet">href="xslt/style1.css" type="text/css"</xsl:processing-instruction>
 
  37       LX-Office Version <xsl:value-of select='/doc/version'/> 
 
  38       - <xsl:value-of select='/doc/name'/> 
 
  39       - <xsl:value-of select='/doc/db'/>
 
  41    <!-- <xsl:call-template name="style"/>-->
 
  42     <xsl:call-template name="script"/>
 
  44       <xsl:apply-templates select="menu"/>
 
  45       <xsl:apply-templates select="favorites"/>
 
  48       <vbox id="sidebar" style="overflow:hidden">
 
  50         <xsl:apply-templates mode="tree" select="menu"/>
 
  52         <xsl:call-template name="ArtikelSuche"/>
 
  53         <!--<iframe src="xslt/trans.xml" flex="1" id="uhr"/>-->
 
  56           <html:iframe id="main_window" src="{/*//item[@id='Programm--Version']/@link}" flex="1" style="border:0px"/>
 
  60 <!-- ******************************************************************* -->
 
  64 <!-- ******************************************************************* -->
 
  65 <xsl:template match="menu"><menubar id="sample-menubar" flex="1"><xsl:apply-templates/></menubar></xsl:template>
 
  66 <!-- ******************************************************************* -->
 
  69 <!-- favorites toolbar -->
 
  70 <!-- ******************************************************************* -->
 
  71 <xsl:template match="favorites">
 
  72   <toolbar id="favoriten" >
 
  73     <xsl:call-template name="specialbuttons"/>
 
  75     <xsl:for-each select="link">
 
  76       <xsl:variable name="name" select="@name"/>
 
  78         <xsl:when test="/*//item[@id=$name]/item">
 
  79           <toolbarbutton type="menu" label="{$name}" tooltiptext="A simple popup" link="{/*//item[@id=$name]/@link}" oncommand="openLink(event)">
 
  80             <image src="image/icons/24x24/{/*//item[@id=$name]/@id}.png" width="24" height="24" />
 
  81             <menupopup id="file-popup">
 
  82               <xsl:apply-templates select="/*//item[@id=$name]/*"/>
 
  87           <toolbarbutton label="{$name}" tooltiptext="A simple popup" link="{/*//item[@id=$name]/@link}" oncommand="openLink(event)" lxid="{/*//item[@id=$name]/@id}">
 
  88             <image src="image/icons/24x24/{/*//item[@id=$name]/@id}.png" width="24" height="24" />
 
  93     <toolbarspring flex="1"/>
 
  94     <xsl:call-template name="searchbox"/>
 
  98 <!-- ******************************************************************* -->
 
 101 <!-- template for the top menu items
 
 102 *********************************************************************************  -->
 
 103 <xsl:template match="item"><xsl:choose><xsl:when test="item"><menu id="{@name}_menu" label="{@name}" class="menu-iconic" image="image/icons/16x16/{@id}.png"><menupopup id="file-popup"><xsl:apply-templates/></menupopup></menu></xsl:when><xsl:otherwise><menuitem target="{@target}" link="{@link}" label="{@name}" oncommand="openLink(event)" class="menuitem-iconic" image="image/icons/16x16/{@id}.png" lxid="{@id}" onclick="openLinkNewTab(event)"/></xsl:otherwise></xsl:choose></xsl:template>
 
 104 <!-- ***************************************************************************  -->
 
 107 <!-- templates for the treeview 
 
 108 **********************************************************************************   -->
 
 109 <xsl:template match="menu" mode="tree">
 
 111 <label value="Hauptmenue"/>
 
 113   <tree flex="1" onselect="openTreeLink(event)" style="margin:0px;" hidecolumnpicker="true">
 
 115         <treecol hideheader="true" id="menuepunkt"  primary="true" flex="1" />
 
 118       <xsl:apply-templates mode="tree"/>
 
 123 <xsl:template match="item" mode="tree">
 
 125     <xsl:when test="item">
 
 126         <treeitem container="true" open="false">
 
 128             <treecell label="{@name}" src="image/icons/16x16/{@id}.png"/>
 
 131             <xsl:apply-templates mode="tree"/>
 
 136     <treeitem link="{@link}">
 
 138         <treecell label="{@name}" src="image/icons/16x16/{@id}.png"/>
 
 144 <!-- ***************************************************************************  -->
 
 147 <!-- template fuer die uhr
 
 148 ********************************************************************************  -->
 
 149 <xsl:template name="uhr">
 
 152 <!-- ***************************************************************************  -->
 
 156 ********************************************************************************  -->
 
 157 <xsl:template name="script">
 
 158   <html:script type="text/ecmascript">
 
 160   function openLink(event)
 
 162     var path=event.target.getAttribute("link")
 
 163     if(event.target.getAttribute("target")=="_top")
 
 169         var bf=document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","iframe").item(0)
 
 170         bf.setAttribute("src",path)
 
 174   function openLinkNewTab(event)
 
 176     if(event.button!=1) return
 
 177     var path=event.target.getAttribute("link")
 
 178     if(event.target.getAttribute("target")=="_top")
 
 184 window.open(path,"_new","")
 
 190   function openLinkNewWindow(event)
 
 192       var path=event.target.getAttribute("link")
 
 193       window.open(path,"_new","")
 
 196   function openTreeLink(event)
 
 198       var tree=event.target
 
 199       var selIndex=tree.currentIndex
 
 200       var item=tree.view.getItemAtIndex(selIndex)
 
 201       var link=item.getAttribute("link")
 
 202       if(link) document.getElementById("main_window").setAttribute("src",link)
 
 205   function updateClock()
 
 208       var sec=d.getSeconds() 
 
 209       var min=d.getMinutes() 
 
 210       var std=(d.getHours() % 12 ) + min/60
 
 211       document.getElementById("std").setAttribute("transform","rotate("+std*30+",20,20)")
 
 212       document.getElementById("min").setAttribute("transform","rotate("+min*6+",20,20)")
 
 213       document.getElementById("sec").setAttribute("transform","rotate("+sec*6+",20,20)")
 
 218       document.getElementById("main_window").contentWindow.print()
 
 222   var t=document.getElementById("searchboxtext").value
 
 223   document.getElementById("desc").value=t
 
 224   document.getElementById("sb").click()
 
 227   function checkEnter(event){
 
 228   if(event.keyCode==13) doSearch()
 
 230   //setInterval("updateClock()",1000)
 
 232 document.getElementById("main_window").contentWindow.history.back()
 
 234   function MyGoForward(){
 
 235 document.getElementById("main_window").contentWindow.history.forward()
 
 239 <!-- ***************************************************************************  -->
 
 241 <!-- special buttons ( logout , print, open new window )
 
 242 ****************************************************************************  -->
 
 243 <xsl:template name="specialbuttons">
 
 244   <toolbarbutton image="image/icons/24x24/Batch Printing.png" tooltiptext="hallo" oncommand="PrintW(event)"/>
 
 245   <toolbarbutton image="image/icons/24x24/Neues Fenster.png" tooltip="Neues Fenster" link="menuXML.pl?action=display" target="_top" oncommand="openLinkNewWindow(event)"/>
 
 246   <toolbarbutton label="Logout" link="{/*//item[@id='Programm--Logout']/@link}" target="_top" oncommand="openLink(event)">
 
 247     <image src="image/icons/24x24/Programm--Logout.png" width="24" height="24" />
 
 250  <toolbarbutton label="back" tooltiptext="hallo" oncommand="MyGoBack()"/>
 
 251   <toolbarbutton label="forward" tooltip="Neues Fenster" oncommand="MyGoForward()"/>
 
 253 <!-- ***************************************************************************  -->
 
 257 ****************************************************************************  -->
 
 258 <xsl:template name="searchbox">
 
 259 <vbox style="padding-top:2px">
 
 262     <textbox height="22px" style="font-size:12px;margin-right:0px" width="200px" id="searchboxtext" onkeypress="checkEnter(event)"/>
 
 263 <toolbarbutton type="toolbar" width="20" height="20" style="padding:5px !important"
 
 264 image="image/icons/16x16/CRM--Schnellsuche.png" flex="0" oncommand="doSearch()"/>
 
 269 <!-- ***************************************************************************  -->
 
 272 <!-- hidden form for article search
 
 273 ****************************************************************************  -->
 
 274 <xsl:template name="ArtikelSuche">
 
 275   <form id="aform" method="post" action="ic.pl" xmlns="http://www.w3.org/1999/xhtml" target="main_window" style="font-family:arial;font-size:12px;display:none">
 
 276   <input name="partnumber" size="20"/>
 
 277   <input name="description" flex="1" id="desc"/>
 
 278   <input name="partsgroup" size="20"/>
 
 279   <input name="make" size="20"/>
 
 280   <input class="submit" type="submit" name="action" value="Weiter" id="sb"/>
 
 281   <div style="display:none" >    
 
 282   <input class="submit" type="submit" name="action" value="Top 100"/> 
 
 283     <input type="hidden" name="serialnumber" size="20"/>  
 
 284     <input type="hidden" name="ean" size="20"/>     
 
 285     <input type="hidden" name="searchitems" value="part"/>
 
 286     <input type="hidden" name="title" value="Waren"/>
 
 287     <input type="hidden" name="revers" value="0"/>
 
 288     <input type="hidden" name="lastsort" value=""/>
 
 289     <input type="hidden" name="model" size="20"/>
 
 290     <input type="hidden" name="drawing" size="20"/>
 
 291     <input type="hidden" name="microfiche" size="20"/>
 
 292     <input  name="itemstatus" class="radio" type="radio" value="active" checked="true"/>
 
 293     <input name="itemstatus" class="radio" type="radio" value="onhand"/>
 
 294     <input  name="itemstatus" class="radio" type="radio" value="short"/>
 
 295     <input  name="itemstatus" class="radio" type="radio" value="obsolete"/>
 
 296     <input  name="itemstatus" class="radio" type="radio" value="orphaned"/>
 
 297     <input  name="bought" class="checkbox" type="checkbox" value="1"/>
 
 298     <input  name="sold" class="checkbox" type="checkbox" value="1"/>
 
 299     <input  name="onorder" class="checkbox" type="checkbox" value="1"/>
 
 300     <input  name="ordered" class="checkbox" type="checkbox" value="1"/>
 
 301     <input  name="rfq" class="checkbox" type="checkbox" value="1"/>Anfrage
 
 302     <input  name="quoted" class="checkbox" type="checkbox" value="1"/>Angeboten  
 
 303     <input type="hidden" name="transdatefrom" id="transdatefrom" size="11" title="dd.mm.yy"/>
 
 304     <input  type="button" name="transdatefrom" id="trigger1" value="?"/> 
 
 305     <input name="transdateto" id="transdateto" size="11" title="dd.mm.yy"/>
 
 306     <input type="button" name="transdateto" id="trigger2" value="?"/>
 
 307     <input name="l_partnumber" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelnummer
 
 308     <input name="l_description" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelbeschreibung
 
 309     <input name="l_serialnumber" class="checkbox" type="checkbox" value="Y"/>Seriennummer
 
 310     <input name="l_unit" class="checkbox" type="checkbox" value="Y" checked="true"/>Maszeinheit
 
 311     <input name="l_listprice" class="checkbox" type="checkbox" value="Y"/>Listenpreis
 
 312     <input name="l_sellprice" class="checkbox" type="checkbox" value="Y" checked="true"/>Verkaufspreis
 
 313     <input name="l_lastcost" class="checkbox" type="checkbox" value="Y" checked="true"/>Einkaufspreis
 
 314     <input name="l_linetotal" class="checkbox" type="checkbox" value="Y" checked="true"/>Zeilensumme
 
 315     <input name="l_priceupdate" class="checkbox" type="checkbox" value="Y"/>Erneuert am
 
 316     <input name="l_bin" class="checkbox" type="checkbox" value="Y"/>Lagerplatz
 
 317     <input name="l_rop" class="checkbox" type="checkbox" value="Y"/>Mindestlagerbestand
 
 318     <input name="l_weight" class="checkbox" type="checkbox" value="Y"/>Gewicht
 
 319     <input name="l_image" class="checkbox" type="checkbox" value="Y"/>Grafik
 
 320     <input name="l_drawing" class="checkbox" type="checkbox" value="Y"/>Zeichnung
 
 321     <input name="l_microfiche" class="checkbox" type="checkbox" value="Y"/>Mikrofilm
 
 322     <input name="l_partsgroup" class="checkbox" type="checkbox" value="Y"/>Warengruppe
 
 323     <input name="l_subtotal" class="checkbox" type="checkbox" value="Y"/>Zwischensumme
 
 324     <input name="l_soldtotal" class="checkbox" type="checkbox" value="Y"/>Verkaufte Anzahl
 
 325     <input name="l_deliverydate" class="checkbox" type="checkbox" value="Y"/>Lieferdatum
 
 326     <input type="hidden" name="nextsub" value="generate_report"/>
 
 327     <input type="hidden" name="revers" value="0"/>
 
 328     <input type="hidden" name="lastsort" value=""/>
 
 329     <input type="hidden" name="sort" value="description"/>
 
 330     <input type="hidden" name="ndxs_counter" value="0"/>
 
 334 <!-- ***************************************************************************  -->