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 name="xml-stylesheet">href="xslt/style1.css" type="text/css"</xsl:processing-instruction>
34 <xsl:variable name="callback"><xsl:value-of select='/doc/callback'/></xsl:variable>
35 <xsl:variable name="title">
36 LX-Office Version <xsl:value-of select='/doc/version'/>
37 - <xsl:value-of select='/doc/name'/>
38 - <xsl:value-of select='/doc/db'/>
40 <!-- <xsl:call-template name="style"/>-->
41 <window title="{$title}">
43 <xsl:call-template name="script"/>
45 <xsl:apply-templates select="menu"/>
46 <xsl:apply-templates select="favorites"/>
49 <vbox id="sidebar" style="overflow:hidden">
51 <xsl:apply-templates mode="tree" select="menu"/>
53 <xsl:call-template name="ArtikelSuche"/>
54 <!--<iframe src="xslt/trans.xml" flex="1" id="uhr"/>-->
56 <splitter state="open" collapse="before" resizeafter="farthest"><grippy/></splitter>
57 <html:iframe id="main_window" src="{$callback}" flex="1" style="border:0px"/>
61 <!-- ******************************************************************* -->
65 <!-- ******************************************************************* -->
66 <xsl:template match="menu"><menubar id="sample-menubar" flex="1"><xsl:apply-templates/></menubar></xsl:template>
67 <!-- ******************************************************************* -->
70 <!-- favorites toolbar -->
71 <!-- ******************************************************************* -->
72 <xsl:template match="favorites">
73 <toolbar id="favoriten" >
74 <xsl:call-template name="specialbuttons"/>
76 <xsl:for-each select="link">
77 <xsl:variable name="name" select="@name"/>
79 <xsl:when test="/*//item[@id=$name]/item">
80 <toolbarbutton type="menu" label="{$name}" tooltiptext="A simple popup" link="{/*//item[@id=$name]/@link}" oncommand="openLink(event)">
81 <image src="image/icons/24x24/{/*//item[@id=$name]/@id}.png" width="24" height="24" />
82 <menupopup id="file-popup">
83 <xsl:apply-templates select="/*//item[@id=$name]/*"/>
88 <toolbarbutton label="{$name}" tooltiptext="A simple popup" link="{/*//item[@id=$name]/@link}" oncommand="openLink(event)" lxid="{/*//item[@id=$name]/@id}">
89 <image src="image/icons/24x24/{/*//item[@id=$name]/@id}.png" width="24" height="24" />
94 <toolbarspring flex="1"/>
95 <xsl:call-template name="searchbox"/>
99 <!-- ******************************************************************* -->
102 <!-- template for the top menu items
103 ********************************************************************************* -->
104 <xsl:template match="item">
106 <xsl:when test="item">
107 <menu id="{@name}_menu" label="{@name}" class="menu-iconic" image="image/icons/16x16/{@id}.png">
108 <menupopup id="file-popup">
109 <xsl:apply-templates/>
114 <menuitem target="{@target}" link="{@link}" label="{@name}" oncommand="openLink(event)" class="menuitem-iconic" image="image/icons/16x16/{@id}.png" lxid="{@id}" onclick="openLinkNewTab(event)"/>
118 <!-- *************************************************************************** -->
121 <!-- templates for the treeview
122 ********************************************************************************** -->
123 <xsl:template match="menu" mode="tree">
125 <label value="Hauptmenue"/>
127 <tree flex="1" onselect="openTreeLink(event)" style="margin:0px;" hidecolumnpicker="true">
129 <treecol hideheader="true" id="menuepunkt" primary="true" flex="1" />
132 <xsl:apply-templates mode="tree"/>
137 <xsl:template match="item" mode="tree">
139 <xsl:when test="item">
140 <treeitem container="true" open="false">
142 <treecell label="{@name}" src="image/icons/16x16/{@id}.png"/>
145 <xsl:apply-templates mode="tree"/>
150 <treeitem link="{@link}">
152 <treecell label="{@name}" src="image/icons/16x16/{@id}.png"/>
158 <!-- *************************************************************************** -->
161 <!-- template fuer die uhr
162 ******************************************************************************** -->
163 <xsl:template name="uhr">
166 <!-- *************************************************************************** -->
170 ******************************************************************************** -->
171 <xsl:template name="script">
172 <html:script type="text/ecmascript">
174 function openLink(event)
176 var path=event.target.getAttribute("link")
177 if(event.target.getAttribute("target")=="_top")
183 var bf=document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml","iframe").item(0)
184 bf.setAttribute("src",path)
188 function openLinkNewTab(event)
190 if(event.button!=1) return
191 var path=event.target.getAttribute("link")
192 if(event.target.getAttribute("target")=="_top")
198 window.open(path,"_new","")
204 function openLinkNewWindow(event)
206 var path=event.target.getAttribute("link")
207 window.open(path,"_blank","")
210 function openTreeLink(event)
212 var tree=event.target
213 var selIndex=tree.currentIndex
214 var item=tree.view.getItemAtIndex(selIndex)
215 var link=item.getAttribute("link")
216 if(link) document.getElementById("main_window").setAttribute("src",link)
219 function updateClock()
222 var sec=d.getSeconds()
223 var min=d.getMinutes()
224 var std=(d.getHours() % 12 ) + min/60
225 document.getElementById("std").setAttribute("transform","rotate("+std*30+",20,20)")
226 document.getElementById("min").setAttribute("transform","rotate("+min*6+",20,20)")
227 document.getElementById("sec").setAttribute("transform","rotate("+sec*6+",20,20)")
232 document.getElementById("main_window").contentWindow.print()
236 var t=document.getElementById("searchboxtext").value
237 document.getElementById("desc").value=t
238 document.getElementById("sb").click()
241 function checkEnter(event){
242 if(event.keyCode==13) doSearch()
244 //setInterval("updateClock()",1000)
246 document.getElementById("main_window").contentWindow.history.back()
248 function MyGoForward(){
249 document.getElementById("main_window").contentWindow.history.forward()
253 <!-- *************************************************************************** -->
255 <!-- special buttons ( logout , print, open new window )
256 **************************************************************************** -->
257 <xsl:template name="specialbuttons">
258 <toolbarbutton image="image/icons/24x24/Batch Printing.png" tooltiptext="hallo" oncommand="PrintW(event)"/>
259 <toolbarbutton image="image/icons/24x24/Neues Fenster.png" tooltip="Neues Fenster" link="menuXML.pl?action=display" target="_top" oncommand="openLinkNewWindow(event)"/>
260 <toolbarbutton label="Logout" link="{/*//item[@id='Programm--Logout']/@link}" target="_top" oncommand="openLink(event)">
261 <image src="image/icons/24x24/Programm--Logout.png" width="24" height="24" />
264 <toolbarbutton label="back" tooltiptext="hallo" oncommand="MyGoBack()"/>
265 <toolbarbutton label="forward" tooltip="Neues Fenster" oncommand="MyGoForward()"/>
267 <!-- *************************************************************************** -->
271 **************************************************************************** -->
272 <xsl:template name="searchbox">
273 <vbox style="padding-top:2px">
276 <textbox height="22px" style="font-size:12px;margin-right:0px" width="200px" id="searchboxtext" onkeypress="checkEnter(event)"/>
277 <toolbarbutton type="toolbar" width="20" height="20" style="padding:5px !important"
278 image="image/icons/16x16/CRM--Schnellsuche.png" flex="0" oncommand="doSearch()"/>
283 <!-- *************************************************************************** -->
286 <!-- hidden form for article search
287 **************************************************************************** -->
288 <xsl:template name="ArtikelSuche">
289 <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">
290 <input name="partnumber" size="20"/>
291 <input name="description" flex="1" id="desc"/>
292 <input name="partsgroup" size="20"/>
293 <input name="make" size="20"/>
294 <input class="submit" type="submit" name="action" value="Weiter" id="sb"/>
295 <div style="display:none" >
296 <input class="submit" type="submit" name="action" value="Top 100"/>
297 <input type="hidden" name="serialnumber" size="20"/>
298 <input type="hidden" name="ean" size="20"/>
299 <input type="hidden" name="searchitems" value="part"/>
300 <input type="hidden" name="title" value="Waren"/>
301 <input type="hidden" name="revers" value="0"/>
302 <input type="hidden" name="lastsort" value=""/>
303 <input type="hidden" name="model" size="20"/>
304 <input type="hidden" name="drawing" size="20"/>
305 <input type="hidden" name="microfiche" size="20"/>
306 <input name="itemstatus" class="radio" type="radio" value="active" checked="true"/>
307 <input name="itemstatus" class="radio" type="radio" value="onhand"/>
308 <input name="itemstatus" class="radio" type="radio" value="short"/>
309 <input name="itemstatus" class="radio" type="radio" value="obsolete"/>
310 <input name="itemstatus" class="radio" type="radio" value="orphaned"/>
311 <input name="bought" class="checkbox" type="checkbox" value="1"/>
312 <input name="sold" class="checkbox" type="checkbox" value="1"/>
313 <input name="onorder" class="checkbox" type="checkbox" value="1"/>
314 <input name="ordered" class="checkbox" type="checkbox" value="1"/>
315 <input name="rfq" class="checkbox" type="checkbox" value="1"/>Anfrage
316 <input name="quoted" class="checkbox" type="checkbox" value="1"/>Angeboten
317 <input type="hidden" name="transdatefrom" id="transdatefrom" size="11" title="dd.mm.yy"/>
318 <input type="button" name="transdatefrom" id="trigger1" value="?"/>
319 <input name="transdateto" id="transdateto" size="11" title="dd.mm.yy"/>
320 <input type="button" name="transdateto" id="trigger2" value="?"/>
321 <input name="l_partnumber" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelnummer
322 <input name="l_description" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelbeschreibung
323 <input name="l_serialnumber" class="checkbox" type="checkbox" value="Y"/>Seriennummer
324 <input name="l_unit" class="checkbox" type="checkbox" value="Y" checked="true"/>Maszeinheit
325 <input name="l_listprice" class="checkbox" type="checkbox" value="Y"/>Listenpreis
326 <input name="l_sellprice" class="checkbox" type="checkbox" value="Y" checked="true"/>Verkaufspreis
327 <input name="l_lastcost" class="checkbox" type="checkbox" value="Y" checked="true"/>Einkaufspreis
328 <input name="l_linetotal" class="checkbox" type="checkbox" value="Y" checked="true"/>Zeilensumme
329 <input name="l_priceupdate" class="checkbox" type="checkbox" value="Y"/>Erneuert am
330 <input name="l_bin" class="checkbox" type="checkbox" value="Y"/>Lagerplatz
331 <input name="l_rop" class="checkbox" type="checkbox" value="Y"/>Mindestlagerbestand
332 <input name="l_weight" class="checkbox" type="checkbox" value="Y"/>Gewicht
333 <input name="l_image" class="checkbox" type="checkbox" value="Y"/>Grafik
334 <input name="l_drawing" class="checkbox" type="checkbox" value="Y"/>Zeichnung
335 <input name="l_microfiche" class="checkbox" type="checkbox" value="Y"/>Mikrofilm
336 <input name="l_partsgroup" class="checkbox" type="checkbox" value="Y"/>Warengruppe
337 <input name="l_subtotal" class="checkbox" type="checkbox" value="Y"/>Zwischensumme
338 <input name="l_soldtotal" class="checkbox" type="checkbox" value="Y"/>Verkaufte Anzahl
339 <input name="l_deliverydate" class="checkbox" type="checkbox" value="Y"/>Lieferdatum
340 <input type="hidden" name="nextsub" value="generate_report"/>
341 <input type="hidden" name="revers" value="0"/>
342 <input type="hidden" name="lastsort" value=""/>
343 <input type="hidden" name="sort" value="description"/>
344 <input type="hidden" name="ndxs_counter" value="0"/>
348 <!-- *************************************************************************** -->