1 | <xsl:stylesheet version="1.0"
|
---|
2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
3 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
4 | xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
5 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
6 | extension-element-prefixes="java util"
|
---|
7 | exclude-result-prefixes="java util">
|
---|
8 |
|
---|
9 | <xsl:template name="formatmanagerpre">
|
---|
10 |
|
---|
11 | <!-- <xsl:variable name="foo"> -->
|
---|
12 | <!-- <xsl:value-of select="/page/pageRequest/paramList[@name='formatedit']"/> -->
|
---|
13 |
|
---|
14 | <xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='1')]">
|
---|
15 |
|
---|
16 | <!-- Sam2's div code -->
|
---|
17 |
|
---|
18 | <script type="text/javascript" src="interfaces/oran/js/innerxhtml.js"><xsl:text> </xsl:text></script>
|
---|
19 | <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
|
---|
20 |
|
---|
21 | <xsl:call-template name="xml-to-gui-templates">
|
---|
22 | <xsl:with-param name="node-set" select="test"/>
|
---|
23 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
24 | </xsl:call-template>
|
---|
25 |
|
---|
26 | <xsl:variable name="fmt1">
|
---|
27 | <xsl:call-template name="xml-to-string">
|
---|
28 | <xsl:with-param name="node-set" select="//format[@type='browse']"/>
|
---|
29 | </xsl:call-template>
|
---|
30 | </xsl:variable>
|
---|
31 |
|
---|
32 | <xsl:variable name="meta">
|
---|
33 | <xsl:call-template name="xml-to-string">
|
---|
34 | <xsl:with-param name="node-set" select="//metadataSetList"/>
|
---|
35 | </xsl:call-template>
|
---|
36 | </xsl:variable>
|
---|
37 |
|
---|
38 | <style type="text/css">
|
---|
39 | .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
|
---|
40 |
|
---|
41 | .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }
|
---|
42 |
|
---|
43 | .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px;}
|
---|
44 |
|
---|
45 | .resizable { width: 150px; height: 150px; padding: 0.5em; }
|
---|
46 |
|
---|
47 | .block { margin-left: 15px; border-left: dashed 1px black;}
|
---|
48 |
|
---|
49 | .droppable { background-color: #99dd99;}
|
---|
50 | .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
|
---|
51 |
|
---|
52 | <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
|
---|
53 |
|
---|
54 | <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
|
---|
55 | </style>
|
---|
56 |
|
---|
57 | <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
|
---|
58 |
|
---|
59 | <table width="100%" border="1">
|
---|
60 |
|
---|
61 | <td width="75%">
|
---|
62 |
|
---|
63 | <button id="updateFormatStatement" type="button" onclick="updateFormatStatement()">Update Format Statement</button>
|
---|
64 | <button id="saveFormatStatement" type="button" onclick="saveFormatStatement()">Save Format Statement</button>
|
---|
65 |
|
---|
66 | <div id="formatStatement">
|
---|
67 | <div id="formatRoot">
|
---|
68 |
|
---|
69 | <xsl:call-template name="xml-to-gui">
|
---|
70 | <xsl:with-param name="node-set" select="//format"/> <!-- [@type='browse']"/> -->
|
---|
71 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
72 | </xsl:call-template>
|
---|
73 | </div>
|
---|
74 | </div>
|
---|
75 | </td>
|
---|
76 |
|
---|
77 |
|
---|
78 | <td width="25%" valign="top">
|
---|
79 | <h2> Elements to add </h2>
|
---|
80 | <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->
|
---|
81 | <div class="draggable_gsf_template css_gsf_template block" title="gsf:template"><table class="header"><tbody><tr><td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table><table border="1"><tr class="tr"><td class="droppable" width="10px"></td></tr></table></div><br/>
|
---|
82 |
|
---|
83 | <div class="draggable_gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata"><table class="header"><tbody><tr><td class="header">CHOOSE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
|
---|
84 |
|
---|
85 | <div class="draggable_gsf_metadata css_gsf_metadata block" title="gsf:metadata"><table class="header"><tbody><tr><td class="header"><xsl:call-template name="meta-to-combo">
|
---|
86 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
87 | <xsl:with-param name="current" select="ex.Title"/>
|
---|
88 | </xsl:call-template></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
|
---|
89 |
|
---|
90 | <div class="draggable_gsf_link css_gsf_link block" title="gsf:link"><table class="header"><tbody><tr><td class="header">LINK<select>
|
---|
91 | <option value = "document" selected = "document">Document</option>
|
---|
92 | <option value = "classifier">Classifier</option>
|
---|
93 | <option value = "source">Source</option>
|
---|
94 | <option value = "horizontal">Horizontal</option>
|
---|
95 | </select></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
|
---|
96 |
|
---|
97 | <div class="draggable_gsf_switch css_gsf_switch block" title="gsf:switch"><table class="header"><tbody><tr><td class="header">SWITCH</td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
|
---|
98 |
|
---|
99 | <div class="draggable_gsf_when css_gsf_when block" title="gsf:when"><table class="header"><tbody><tr><td class="header">WHEN<xsl:value-of select="@test"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
|
---|
100 |
|
---|
101 | <div class="draggable_gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise"><table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
|
---|
102 |
|
---|
103 | <div class="draggable_gsf_icon css_gsf_icon block" title="gsf:icon"><table class="header"><tbody><tr><td class="header">ICON<select><option value = "document" selected = "document">Document</option><option value = "classifier">Classifier</option><option value = "source">Source</option></select></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
|
---|
104 | <br/>
|
---|
105 | <div class="draggable_gsf_text css_text" title="text"><table class="header"><tbody><tr><td class="header"><input type="text" name="rawtextinput" size="10" value=""/></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
|
---|
106 | <div class="draggable_table css_table" title="gsf:table">NEW TABLE</div>
|
---|
107 | <div class="draggable_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
|
---|
108 | <div class="draggable_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
|
---|
109 |
|
---|
110 | </td>
|
---|
111 | </table>
|
---|
112 |
|
---|
113 | <!--
|
---|
114 | <div id="format">
|
---|
115 | <p>
|
---|
116 | <b>Format string here</b>
|
---|
117 | <i>
|
---|
118 | <xsl:value-of select="$fmt1"/>
|
---|
119 | </i>
|
---|
120 | </p>
|
---|
121 | </div> -->
|
---|
122 | <!-- <p>
|
---|
123 | <i>
|
---|
124 | <xsl:value-of select="$meta"/>
|
---|
125 | </i>
|
---|
126 | </p>
|
---|
127 | </div> -->
|
---|
128 | </xsl:if>
|
---|
129 |
|
---|
130 | <!--<H2>Preview</H2>
|
---|
131 |
|
---|
132 | <div id="my_categories"><xsl:text> </xsl:text></div>
|
---|
133 |
|
---|
134 | <iframe name="preview" id="iframe" width="98%" height="300">Your browser does not support iframes</iframe>
|
---|
135 |
|
---|
136 | <xsl:variable name="preview"> -->
|
---|
137 | <!-- <button type="button" onclick="loadXMLDoc()">Change Content</button> -->
|
---|
138 | </xsl:template>
|
---|
139 |
|
---|
140 | <xsl:template name="formatmanagerpost">
|
---|
141 | <!-- </xsl:variable>
|
---|
142 |
|
---|
143 | <script type="text/javascript">
|
---|
144 | preview_html = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$preview"/><xsl:text disable-output-escaping="yes">';</xsl:text>
|
---|
145 | </script>
|
---|
146 |
|
---|
147 | <div id="result">
|
---|
148 | Here
|
---|
149 | </div>-->
|
---|
150 | </xsl:template>
|
---|
151 | </xsl:stylesheet> |
---|