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">
6 <xsl:template match="/">
10 <!-- main document structure -->
11 <!-- ******************************************************************* -->
12 <xsl:template match="doc">
13 <xsl:processing-instruction
14 name="xml-stylesheet">href="xslt/style1.css" type="text/css"</xsl:processing-instruction>
17 LX-Office Version <xsl:value-of select='/doc/version'/>
18 - <xsl:value-of select='/doc/name'/>
19 - <xsl:value-of select='/doc/db'/>
21 <!-- <xsl:call-template name="style"/>-->
22 <xsl:call-template name="script"/>
24 <xsl:apply-templates select="menu"/>
25 <xsl:apply-templates select="favorites"/>
28 <vbox id="sidebar" style="overflow:hidden">
30 <xsl:apply-templates mode="tree"/>
32 <xsl:call-template name="ArtikelSuche"/>
33 <!--<iframe src="xslt/trans.xml" flex="1" id="uhr"/>-->
36 <html:iframe id="main_window" src="{/*//item[@id='Programm--Version']/@link}" flex="1" style="border:0px"/>
40 <!-- ******************************************************************* -->
44 <!-- ******************************************************************* -->
45 <xsl:template match="menu">
46 <!--<div style="background:grey">-->
47 <menubar id="sample-menubar">
48 <xsl:apply-templates/>
52 <!-- ******************************************************************* -->
55 <!-- favorites toolbar -->
56 <!-- ******************************************************************* -->
57 <xsl:template match="favorites">
58 <toolbar id="favoriten" >
59 <xsl:call-template name="specialbuttons"/>
61 <xsl:for-each select="link">
62 <xsl:variable name="name" select="@name"/>
64 <xsl:when test="/*//item[@id=$name]/item">
65 <toolbarbutton type="menu" label="{$name}" tooltiptext="A simple popup" link="{/*//item[@id=$name]/@link}" oncommand="openLink(event)">
66 <image src="image/icons/24x24/{/*//item[@id=$name]/@id}.png" width="24" height="24" />
67 <menupopup id="file-popup">
68 <xsl:apply-templates select="/*//item[@id=$name]/*"/>
73 <toolbarbutton label="{$name}" tooltiptext="A simple popup" link="{/*//item[@id=$name]/@link}" oncommand="openLink(event)" lxid="{/*//item[@id=$name]/@id}">
74 <image src="image/icons/24x24/{/*//item[@id=$name]/@id}.png" width="24" height="24" />
79 <toolbarspring flex="1"/>
80 <xsl:call-template name="searchbox"/>
84 <!-- ******************************************************************* -->
87 <!-- template for the top menu items
88 ********************************************************************************* -->
89 <xsl:template match="item">
91 <xsl:when test="item">
92 <menu id="{@name}_menu" label="{@name}" class="menu-iconic" image="image/icons/16x16/{@id}.png">
93 <menupopup id="file-popup">
94 <xsl:apply-templates/>
99 <menuitem target="{@target}" link="{@link}" label="{@name}" oncommand="openLink(event)" class="menuitem-iconic" image="image/icons/16x16/{@id}.png" lxid="{@id}" onclick="openLinkNewTab(event)"/>
103 <!-- *************************************************************************** -->
106 <!-- templates for the treeview
107 ********************************************************************************** -->
108 <xsl:template match="menu" mode="tree">
110 <label value="Hauptmenue"/>
112 <tree flex="1" onselect="openTreeLink(event)" style="margin:0px;" hidecolumnpicker="true">
114 <treecol hideheader="true" id="menuepunkt" primary="true" flex="1" />
117 <xsl:apply-templates mode="tree"/>
122 <xsl:template match="item" mode="tree">
124 <xsl:when test="item">
125 <treeitem container="true" open="false">
127 <treecell label="{@name}" src="image/icons/16x16/{@id}.png"/>
130 <xsl:apply-templates mode="tree"/>
135 <treeitem link="{@link}">
137 <treecell label="{@name}" src="image/icons/16x16/{@id}.png"/>
143 <!-- *************************************************************************** -->
146 <!-- template für die uhr
147 ******************************************************************************** -->
148 <xsl:template name="uhr">
151 <!-- *************************************************************************** -->
155 ******************************************************************************** -->
156 <xsl:template name="script">
157 <html:script type="text/ecmascript">
159 function openLink(event)
161 var path=event.target.getAttribute("link")
162 if(event.target.getAttribute("target")=="_top")
168 var bf=document.getElementsByTagName("iframe").item(0)
169 bf.setAttribute("src",path)
173 function openLinkNewTab(event)
175 if(event.button!=1) return
176 var path=event.target.getAttribute("link")
177 if(event.target.getAttribute("target")=="_top")
183 window.open(path,"_new","")
189 function openLinkNewWindow(event)
191 var path=event.target.getAttribute("link")
192 window.open(path,"_new","")
195 function openTreeLink(event)
197 var tree=event.target
198 var selIndex=tree.currentIndex
199 var item=tree.view.getItemAtIndex(selIndex)
200 var link=item.getAttribute("link")
201 if(link) document.getElementById("main_window").setAttribute("src",link)
204 function updateClock()
207 var sec=d.getSeconds()
208 var min=d.getMinutes()
209 var std=(d.getHours() % 12 ) + min/60
210 document.getElementById("std").setAttribute("transform","rotate("+std*30+",20,20)")
211 document.getElementById("min").setAttribute("transform","rotate("+min*6+",20,20)")
212 document.getElementById("sec").setAttribute("transform","rotate("+sec*6+",20,20)")
217 document.getElementById("main_window").contentWindow.print()
221 var t=document.getElementById("searchboxtext").value
222 document.getElementById("desc").value=t
223 document.getElementById("sb").click()
226 function checkEnter(event){
227 if(event.keyCode==13) doSearch()
229 //setInterval("updateClock()",1000)
233 <!-- *************************************************************************** -->
235 <!-- special buttons ( logout , print, open new window )
236 **************************************************************************** -->
237 <xsl:template name="specialbuttons">
238 <toolbarbutton image="image/icons/24x24/Batch Printing.png" tooltiptext="hallo" oncommand="PrintW(event)"/>
239 <toolbarbutton image="image/icons/24x24/Neues Fenster.png" tooltip="Neues Fenster" link="menuXML.pl?action=display&login={/doc/login}&password={/doc/password}" target="_top" oncommand="openLinkNewWindow(event)"/>
240 <toolbarbutton label="Logout" link="{/*//item[@id='Programm--Logout']/@link}" target="_top" oncommand="openLink(event)">
241 <image src="image/icons/24x24/Programm--Logout.png" width="24" height="24" />
244 <!-- *************************************************************************** -->
248 **************************************************************************** -->
249 <xsl:template name="searchbox">
250 <vbox style="padding-top:5px">
253 <textbox height="22px" style="font-size:12px;margin-right:0px" width="200px" id="searchboxtext" onkeypress="checkEnter(event)"/>
254 <toolbarbutton type="toolbar" width="20" height="20" style="padding:5px !important"
255 image="xslt/images/16x16/CRM--Schnellsuche.png" flex="0" oncommand="doSearch()"/>
260 <!-- *************************************************************************** -->
263 <!-- hidden form for article search
264 **************************************************************************** -->
265 <xsl:template name="ArtikelSuche">
266 <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">
267 <input name="partnumber" size="20"/>
268 <input name="description" flex="1" id="desc"/>
269 <input name="partsgroup" size="20"/>
270 <input name="make" size="20"/>
271 <input class="submit" type="submit" name="action" value="Weiter" id="sb"/>
272 <div style="display:none" >
273 <input class="submit" type="submit" name="action" value="Top 100"/>
274 <input type="hidden" name="serialnumber" size="20"/>
275 <input type="hidden" name="ean" size="20"/>
276 <input type="hidden" name="searchitems" value="part"/>
277 <input type="hidden" name="title" value="Waren"/>
278 <input type="hidden" name="revers" value="0"/>
279 <input type="hidden" name="lastsort" value=""/>
280 <input type="hidden" name="model" size="20"/>
281 <input type="hidden" name="drawing" size="20"/>
282 <input type="hidden" name="microfiche" size="20"/>
283 <input name="itemstatus" class="radio" type="radio" value="active" checked="true"/>
284 <input name="itemstatus" class="radio" type="radio" value="onhand"/>
285 <input name="itemstatus" class="radio" type="radio" value="short"/>
286 <input name="itemstatus" class="radio" type="radio" value="obsolete"/>
287 <input name="itemstatus" class="radio" type="radio" value="orphaned"/>
288 <input name="bought" class="checkbox" type="checkbox" value="1"/>
289 <input name="sold" class="checkbox" type="checkbox" value="1"/>
290 <input name="onorder" class="checkbox" type="checkbox" value="1"/>
291 <input name="ordered" class="checkbox" type="checkbox" value="1"/>
292 <input name="rfq" class="checkbox" type="checkbox" value="1"/>Anfrage
293 <input name="quoted" class="checkbox" type="checkbox" value="1"/>Angeboten
294 <input type="hidden" name="transdatefrom" id="transdatefrom" size="11" title="dd.mm.yy"/>
295 <input type="button" name="transdatefrom" id="trigger1" value="?"/>
296 <input name="transdateto" id="transdateto" size="11" title="dd.mm.yy"/>
297 <input type="button" name="transdateto" id="trigger2" value="?"/>
298 <input name="l_partnumber" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelnummer
299 <input name="l_description" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelbeschreibung
300 <input name="l_serialnumber" class="checkbox" type="checkbox" value="Y"/>Seriennummer
301 <input name="l_unit" class="checkbox" type="checkbox" value="Y" checked="true"/>Maßeinheit
302 <input name="l_listprice" class="checkbox" type="checkbox" value="Y"/>Listenpreis
303 <input name="l_sellprice" class="checkbox" type="checkbox" value="Y" checked="true"/>Verkaufspreis
304 <input name="l_lastcost" class="checkbox" type="checkbox" value="Y" checked="true"/>Einkaufspreis
305 <input name="l_linetotal" class="checkbox" type="checkbox" value="Y" checked="true"/>Zeilensumme
306 <input name="l_priceupdate" class="checkbox" type="checkbox" value="Y"/>Erneuert am
307 <input name="l_bin" class="checkbox" type="checkbox" value="Y"/>Lagerplatz
308 <input name="l_rop" class="checkbox" type="checkbox" value="Y"/>Mindestlagerbestand
309 <input name="l_weight" class="checkbox" type="checkbox" value="Y"/>Gewicht
310 <input name="l_image" class="checkbox" type="checkbox" value="Y"/>Grafik
311 <input name="l_drawing" class="checkbox" type="checkbox" value="Y"/>Zeichnung
312 <input name="l_microfiche" class="checkbox" type="checkbox" value="Y"/>Mikrofilm
313 <input name="l_partsgroup" class="checkbox" type="checkbox" value="Y"/>Warengruppe
314 <input name="l_subtotal" class="checkbox" type="checkbox" value="Y"/>Zwischensumme
315 <input name="l_soldtotal" class="checkbox" type="checkbox" value="Y"/>Verkaufte Anzahl
316 <input name="l_deliverydate" class="checkbox" type="checkbox" value="Y"/>Lieferdatum
317 <input type="hidden" name="nextsub" value="generate_report"/>
318 <input type="hidden" name="login" value="{/doc/login}"/>
319 <input type="hidden" name="password" value="{/doc/password}"/>
320 <input type="hidden" name="revers" value="0"/>
321 <input type="hidden" name="lastsort" value=""/>
322 <input type="hidden" name="sort" value="description"/>
323 <input type="hidden" name="ndxs_counter" value="0"/>
327 <!-- *************************************************************************** -->