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:include href="xml-to-gui.xsl"/>
|
---|
10 | <xsl:include href="xml-to-gui-templates.xsl"/>
|
---|
11 |
|
---|
12 | <xsl:template name="formatmanagerpre">
|
---|
13 |
|
---|
14 | <!-- <xsl:variable name="foo"> -->
|
---|
15 | <!-- <xsl:value-of select="/page/pageRequest/paramList[@name='formatedit']"/> -->
|
---|
16 |
|
---|
17 | <!--<xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='1')]">-->
|
---|
18 |
|
---|
19 | <!-- Sam2's div code -->
|
---|
20 |
|
---|
21 | <script type="text/javascript" src="interfaces/oran/js/innerxhtml.js"><xsl:text> </xsl:text></script>
|
---|
22 | <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
|
---|
23 |
|
---|
24 | <xsl:call-template name="xml-to-gui-templates">
|
---|
25 | <xsl:with-param name="node-set" select="test"/>
|
---|
26 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
27 | </xsl:call-template>
|
---|
28 |
|
---|
29 | <xsl:variable name="fmt1">
|
---|
30 | <xsl:call-template name="xml-to-string">
|
---|
31 | <xsl:with-param name="node-set" select="//format[@type='browse']"/>
|
---|
32 | </xsl:call-template>
|
---|
33 | </xsl:variable>
|
---|
34 |
|
---|
35 | <xsl:variable name="meta">
|
---|
36 | <xsl:call-template name="xml-to-string">
|
---|
37 | <xsl:with-param name="node-set" select="//metadataSetList"/>
|
---|
38 | </xsl:call-template>
|
---|
39 | </xsl:variable>
|
---|
40 |
|
---|
41 | <style type="text/css">
|
---|
42 | .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
|
---|
43 |
|
---|
44 | .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }
|
---|
45 |
|
---|
46 | .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px;}
|
---|
47 |
|
---|
48 | .resizable { width: 150px; height: 150px; padding: 0.5em; }
|
---|
49 |
|
---|
50 | .block { margin-left: 15px; border-left: dashed 1px black;}
|
---|
51 |
|
---|
52 | .droppable { background-color: #99dd99;}
|
---|
53 | .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
|
---|
54 |
|
---|
55 | .elementToolBox {position: fixed; top: 25%; right: 0px; background: none repeat scroll 0% 0% white; width: 250px; }
|
---|
56 |
|
---|
57 | <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
|
---|
58 |
|
---|
59 | <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
|
---|
60 | </style>
|
---|
61 |
|
---|
62 | <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
|
---|
63 |
|
---|
64 | <table width="100%" border="1">
|
---|
65 |
|
---|
66 | <td width="75%">
|
---|
67 |
|
---|
68 | <button id="updateFormatStatement" type="button" onclick="updateFormatStatement()">Update Format Statement</button>
|
---|
69 | <button id="saveFormatStatement" type="button" onclick="saveFormatStatement()">Save Format Statement</button>
|
---|
70 |
|
---|
71 | <div id="formatStatement">
|
---|
72 | <div id="formatRoot">
|
---|
73 |
|
---|
74 | <xsl:call-template name="xml-to-gui">
|
---|
75 | <xsl:with-param name="node-set" select="//format"/> <!-- [@type='browse']"/> -->
|
---|
76 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
77 | </xsl:call-template>
|
---|
78 | </div>
|
---|
79 | </div>
|
---|
80 | </td>
|
---|
81 |
|
---|
82 |
|
---|
83 | <td class="elementToolBox">
|
---|
84 | <h2> Elements to add </h2>
|
---|
85 | <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->
|
---|
86 | <div class="draggable_gsf_template css_gsf_template block" title="gsf:template">
|
---|
87 | <table class="header">
|
---|
88 | <tbody>
|
---|
89 | <tr>
|
---|
90 | <td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td>
|
---|
91 | <td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
92 | <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
|
---|
93 | </tr>
|
---|
94 | </tbody>
|
---|
95 | </table>
|
---|
96 | <table border="1">
|
---|
97 | <tr class="tr">
|
---|
98 | <td class="droppable" width="10px"></td>
|
---|
99 | </tr>
|
---|
100 | </table>
|
---|
101 | </div>
|
---|
102 | <br/>
|
---|
103 |
|
---|
104 | <div class="draggable_gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata">
|
---|
105 | <table class="header">
|
---|
106 | <tbody>
|
---|
107 | <tr>
|
---|
108 | <td class="header">CHOOSE</td>
|
---|
109 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td>
|
---|
110 | <td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td>
|
---|
111 | </tr>
|
---|
112 | </tbody>
|
---|
113 | </table>
|
---|
114 | </div>
|
---|
115 |
|
---|
116 | <div class="draggable_gsf_metadata css_gsf_metadata block" title="gsf:metadata">
|
---|
117 | <table class="header">
|
---|
118 | <tbody>
|
---|
119 | <tr>
|
---|
120 | <td class="header">
|
---|
121 | <xsl:call-template name="meta-to-combo">
|
---|
122 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
123 | <xsl:with-param name="current" select="ex.Title"/>
|
---|
124 | </xsl:call-template>
|
---|
125 | </td>
|
---|
126 | <td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td>
|
---|
127 | </tr>
|
---|
128 | </tbody>
|
---|
129 | </table>
|
---|
130 | </div>
|
---|
131 |
|
---|
132 | <div class="draggable_gsf_link css_gsf_link block" title="gsf:link">
|
---|
133 | <table class="header">
|
---|
134 | <tbody>
|
---|
135 | <tr>
|
---|
136 | <td class="header">LINK<select>
|
---|
137 | <option value = "document" selected = "document">Document</option>
|
---|
138 | <option value = "classifier">Classifier</option>
|
---|
139 | <option value = "source">Source</option>
|
---|
140 | <option value = "horizontal">Horizontal</option>
|
---|
141 | </select></td>
|
---|
142 | <td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
143 | <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
|
---|
144 | </tr>
|
---|
145 | </tbody>
|
---|
146 | </table>
|
---|
147 | </div>
|
---|
148 |
|
---|
149 | <div class="draggable_gsf_switch css_gsf_switch block" title="gsf:switch">
|
---|
150 | <table class="header">
|
---|
151 | <tbody>
|
---|
152 | <tr>
|
---|
153 | <td class="header">SWITCH</td>
|
---|
154 | <td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
155 | <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
|
---|
156 | </tr>
|
---|
157 | </tbody>
|
---|
158 | </table>
|
---|
159 | </div>
|
---|
160 |
|
---|
161 | <div class="draggable_gsf_when css_gsf_when block" title="gsf:when">
|
---|
162 | <table class="header">
|
---|
163 | <tbody>
|
---|
164 | <tr>
|
---|
165 | <td class="header">WHEN<xsl:value-of select="@test"/></td>
|
---|
166 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
167 | <td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td>
|
---|
168 | </tr>
|
---|
169 | </tbody>
|
---|
170 | </table>
|
---|
171 | </div>
|
---|
172 |
|
---|
173 | <div class="draggable_gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise">
|
---|
174 | <table class="header">
|
---|
175 | <tbody>
|
---|
176 | <tr>
|
---|
177 | <td class="header">OTHERWISE</td>
|
---|
178 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
179 | <td><a href="#" class="ui-icon ui-icon-closethick"/></td>
|
---|
180 | </tr>
|
---|
181 | </tbody>
|
---|
182 | </table>
|
---|
183 | </div>
|
---|
184 |
|
---|
185 | <div class="draggable_gsf_icon css_gsf_icon block" title="gsf:icon">
|
---|
186 | <table class="header">
|
---|
187 | <tbody>
|
---|
188 | <tr>
|
---|
189 | <td class="header">ICON<select>
|
---|
190 | <option value = "document" selected = "document">Document</option>
|
---|
191 | <option value = "classifier">Classifier</option>
|
---|
192 | <option value = "source">Source</option>
|
---|
193 | </select></td>
|
---|
194 | <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
|
---|
195 | </tr>
|
---|
196 | </tbody>
|
---|
197 | </table>
|
---|
198 | </div>
|
---|
199 | <br/>
|
---|
200 | <div class="draggable_gsf_text css_text" title="text">
|
---|
201 | <table class="header">
|
---|
202 | <tbody>
|
---|
203 | <tr>
|
---|
204 | <td class="header"><input type="text" name="rawtextinput" size="10" value=""/></td>
|
---|
205 | <td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td>
|
---|
206 | </tr>
|
---|
207 | </tbody>
|
---|
208 | </table>
|
---|
209 | </div>
|
---|
210 | <div class="draggable_table css_table" title="gsf:table">NEW TABLE</div>
|
---|
211 | <div class="draggable_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
|
---|
212 | <div class="draggable_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
|
---|
213 |
|
---|
214 | </td>
|
---|
215 | </table>
|
---|
216 |
|
---|
217 | <!--
|
---|
218 | <div id="format">
|
---|
219 | <p>
|
---|
220 | <b>Format string here</b>
|
---|
221 | <i>
|
---|
222 | <xsl:value-of select="$fmt1"/>
|
---|
223 | </i>
|
---|
224 | </p>
|
---|
225 | </div> -->
|
---|
226 | <!-- <p>
|
---|
227 | <i>
|
---|
228 | <xsl:value-of select="$meta"/>
|
---|
229 | </i>
|
---|
230 | </p>
|
---|
231 | </div> -->
|
---|
232 | <!--</xsl:if>-->
|
---|
233 |
|
---|
234 | <!--<H2>Preview</H2>
|
---|
235 |
|
---|
236 | <div id="my_categories"><xsl:text> </xsl:text></div>
|
---|
237 |
|
---|
238 | <iframe name="preview" id="iframe" width="98%" height="300">Your browser does not support iframes</iframe>
|
---|
239 |
|
---|
240 | <xsl:variable name="preview"> -->
|
---|
241 | <!-- <button type="button" onclick="loadXMLDoc()">Change Content</button> -->
|
---|
242 | </xsl:template>
|
---|
243 |
|
---|
244 | <xsl:template name="formatmanagerpost">
|
---|
245 | <!-- </xsl:variable>
|
---|
246 |
|
---|
247 | <script type="text/javascript">
|
---|
248 | preview_html = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$preview"/><xsl:text disable-output-escaping="yes">';</xsl:text>
|
---|
249 | </script>
|
---|
250 |
|
---|
251 | <div id="result">
|
---|
252 | Here
|
---|
253 | </div>-->
|
---|
254 | </xsl:template>
|
---|
255 | </xsl:stylesheet>
|
---|