[24139] | 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"
|
---|
[24243] | 6 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
[24139] | 7 | extension-element-prefixes="java util"
|
---|
| 8 | exclude-result-prefixes="java util">
|
---|
| 9 |
|
---|
| 10 | <xsl:include href="xml-to-gui.xsl"/>
|
---|
| 11 | <xsl:include href="xml-to-gui-templates.xsl"/>
|
---|
[24420] | 12 |
|
---|
| 13 | <xsl:output method="html" omit-xml-declaration="yes"/>
|
---|
[24139] | 14 |
|
---|
| 15 | <xsl:template name="formatmanagerpre">
|
---|
| 16 |
|
---|
| 17 | <!-- <xsl:variable name="foo"> -->
|
---|
| 18 | <!-- <xsl:value-of select="/page/pageRequest/paramList[@name='formatedit']"/> -->
|
---|
| 19 |
|
---|
| 20 | <!--<xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='1')]">-->
|
---|
| 21 |
|
---|
| 22 | <!-- Sam2's div code -->
|
---|
| 23 |
|
---|
[24202] | 24 | <script type="text/javascript" src="interfaces/oran/js/jquery-1.4.2.js"><xsl:text> </xsl:text></script>
|
---|
[24421] | 25 | <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8.15/ui/jquery-ui-1.8.15.custom.js"><xsl:text> </xsl:text></script>
|
---|
[24202] | 26 | <script type="text/javascript" src="interfaces/oran/js/jquery.selectboxes.js"><xsl:text> </xsl:text></script>
|
---|
[24139] | 27 | <script type="text/javascript" src="interfaces/oran/js/innerxhtml.js"><xsl:text> </xsl:text></script>
|
---|
[24202] | 28 | <script type="text/javascript" src="interfaces/oran/js/jquery.xml.js"><xsl:text> </xsl:text></script>
|
---|
[24139] | 29 | <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
|
---|
| 30 |
|
---|
| 31 | <xsl:call-template name="xml-to-gui-templates">
|
---|
| 32 | <xsl:with-param name="node-set" select="test"/>
|
---|
| 33 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
| 34 | </xsl:call-template>
|
---|
| 35 |
|
---|
| 36 | <xsl:variable name="fmt1">
|
---|
| 37 | <xsl:call-template name="xml-to-string">
|
---|
| 38 | <xsl:with-param name="node-set" select="//format[@type='browse']"/>
|
---|
| 39 | </xsl:call-template>
|
---|
| 40 | </xsl:variable>
|
---|
| 41 |
|
---|
| 42 | <xsl:variable name="meta">
|
---|
| 43 | <xsl:call-template name="xml-to-string">
|
---|
| 44 | <xsl:with-param name="node-set" select="//metadataSetList"/>
|
---|
| 45 | </xsl:call-template>
|
---|
| 46 | </xsl:variable>
|
---|
| 47 |
|
---|
| 48 | <style type="text/css">
|
---|
[24417] | 49 |
|
---|
[24139] | 50 | .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
|
---|
| 51 |
|
---|
| 52 | .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }
|
---|
| 53 |
|
---|
[24420] | 54 | .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px; }
|
---|
[24139] | 55 |
|
---|
| 56 | .resizable { width: 150px; height: 150px; padding: 0.5em; }
|
---|
| 57 |
|
---|
[24417] | 58 | .indent { margin-left: 15px; }
|
---|
[24139] | 59 | .block { margin-left: 15px; border-left: dashed 1px black;}
|
---|
| 60 |
|
---|
| 61 | .droppable { background-color: #99dd99;}
|
---|
| 62 | .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
|
---|
| 63 |
|
---|
[24202] | 64 | #XSLTcode {width: 99%; }
|
---|
| 65 |
|
---|
[24417] | 66 | .elementToolBox {position: fixed; top: 25%; right: 0px; background: white; border: 2px solid; padding: 10px 10px 10px 0px;}
|
---|
| 67 |
|
---|
| 68 | .elementToolBoxHeader { font-weight:bold; }
|
---|
| 69 |
|
---|
[24243] | 70 | .visible {display: block;}
|
---|
| 71 | .hidden {display: none;}
|
---|
[24139] | 72 | <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
|
---|
| 73 |
|
---|
| 74 | <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
|
---|
| 75 | </style>
|
---|
| 76 |
|
---|
| 77 | <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
|
---|
| 78 |
|
---|
| 79 | <table width="100%" border="1">
|
---|
| 80 |
|
---|
[24202] | 81 | <td width="100%">
|
---|
| 82 | <xsl:choose>
|
---|
| 83 | <xsl:when test="/page/pageRequest/@action = 'd'">
|
---|
| 84 | <!-- TOC on or off -->
|
---|
| 85 | <xsl:choose>
|
---|
[24243] | 86 | <xsl:when test="/page/pageResponse/format[@type='display']/gsf:option[@name='TOC']/@value='true'">
|
---|
[24202] | 87 | <input type="checkbox" name="TOC" checked="checked" onclick="displayTOC(this)">Display Table of Contents (set to true)</input>
|
---|
| 88 | </xsl:when>
|
---|
| 89 | <xsl:otherwise>
|
---|
| 90 | <input type="checkbox" name="TOC" onclick="displayTOC(this)">Display Table of Contents (set to false)</input>
|
---|
| 91 | </xsl:otherwise>
|
---|
| 92 | </xsl:choose> <br/>
|
---|
[24139] | 93 |
|
---|
[24202] | 94 | <!-- book cover image on or off -->
|
---|
| 95 | <xsl:choose>
|
---|
[24243] | 96 | <xsl:when test="/page/pageResponse/format[@type='display']/gsf:option[@name='coverImage']/@value='true'">
|
---|
[24202] | 97 | <input type="checkbox" name="bookCover" checked="checked" onclick="displayBookCover(this)">Display Book Cover Image (set to true)</input>
|
---|
| 98 | </xsl:when>
|
---|
| 99 | <xsl:otherwise>
|
---|
| 100 | <input type="checkbox" name="bookCover" onclick="displayBookCover(this)">Display Book Cover Image (set to false)</input>
|
---|
| 101 | </xsl:otherwise>
|
---|
| 102 | </xsl:choose> <br/>
|
---|
[24139] | 103 |
|
---|
[24202] | 104 | <textarea id="XSLTcode" rows="5">
|
---|
| 105 | The XSLT code for the relevant part of the page will be displayed here.
|
---|
| 106 | </textarea>
|
---|
| 107 | <!-- What are we doing? It might be possible to tweak saveFormatStatement() if we are only dealing with format stuff but are we? -->
|
---|
| 108 | <br/>
|
---|
| 109 | <table>
|
---|
| 110 | <td>
|
---|
| 111 | <button id="saveDocumentChanges" type="button" onclick="saveDocumentChanges()">Save Changes</button>
|
---|
| 112 | </td>
|
---|
| 113 | <td>
|
---|
| 114 | <form>
|
---|
| 115 | <input name="documentChanges" type="radio" id="applyToDocument" value="document" checked="true"/>Apply to this document only
|
---|
| 116 | <input name="documentChanges" type="radio" id="applyToCollection" value="collection" />Apply to collection
|
---|
| 117 | </form>
|
---|
| 118 | </td>
|
---|
| 119 | </table>
|
---|
| 120 | </xsl:when>
|
---|
| 121 | <xsl:otherwise>
|
---|
| 122 | <table>
|
---|
| 123 | <td>
|
---|
| 124 | <button id="updateFormatStatement" type="button" onclick="updateFormatStatement()">Update Format Statement</button>
|
---|
| 125 | </td>
|
---|
| 126 | <td>
|
---|
| 127 | <button id="saveFormatStatement" type="button" onclick="saveFormatStatement()">Save Format Statement</button>
|
---|
| 128 | </td>
|
---|
| 129 | <td>
|
---|
| 130 | <form>
|
---|
| 131 | <input name="classifiers" type="radio" id="applyToThis" value="this" checked="true"/>This Classifier
|
---|
| 132 | <input name="classifiers" type="radio" id="applyToAll" value="all" />All Classifiers
|
---|
| 133 | </form>
|
---|
| 134 | </td>
|
---|
| 135 | </table>
|
---|
[24139] | 136 |
|
---|
[24202] | 137 | <div id="formatStatement">
|
---|
| 138 | <div id="formatRoot">
|
---|
| 139 | <xsl:call-template name="xml-to-gui">
|
---|
| 140 | <xsl:with-param name="node-set" select="//format"/> <!-- [@type='browse']"/> -->
|
---|
| 141 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
| 142 | </xsl:call-template>
|
---|
| 143 | </div>
|
---|
| 144 | </div>
|
---|
| 145 | </xsl:otherwise>
|
---|
| 146 | </xsl:choose>
|
---|
| 147 | </td>
|
---|
| 148 | </table>
|
---|
[24139] | 149 |
|
---|
[24202] | 150 | <div class="elementToolBox">
|
---|
[24417] | 151 | <p class="indent elementToolBoxHeader">Elements to add</p>
|
---|
[24139] | 152 | <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->
|
---|
| 153 | <div class="draggable_gsf_template css_gsf_template block" title="gsf:template">
|
---|
| 154 | <table class="header">
|
---|
| 155 | <tbody>
|
---|
| 156 | <tr>
|
---|
| 157 | <td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td>
|
---|
[24420] | 158 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
| 159 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick">[x]</a></td>
|
---|
[24139] | 160 | </tr>
|
---|
| 161 | </tbody>
|
---|
| 162 | </table>
|
---|
| 163 | </div>
|
---|
| 164 |
|
---|
| 165 | <div class="draggable_gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata">
|
---|
| 166 | <table class="header">
|
---|
| 167 | <tbody>
|
---|
| 168 | <tr>
|
---|
| 169 | <td class="header">CHOOSE</td>
|
---|
[24420] | 170 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td>
|
---|
| 171 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick" title="Click me to remove"/></td>
|
---|
[24139] | 172 | </tr>
|
---|
| 173 | </tbody>
|
---|
| 174 | </table>
|
---|
| 175 | </div>
|
---|
| 176 |
|
---|
| 177 | <div class="draggable_gsf_metadata css_gsf_metadata block" title="gsf:metadata">
|
---|
| 178 | <table class="header">
|
---|
| 179 | <tbody>
|
---|
| 180 | <tr>
|
---|
[24420] | 181 | <td class="header" style="font-size: 0.8em;">METADATA</td>
|
---|
[24417] | 182 | <td class="header" id="metadataSelector">
|
---|
| 183 | <!--<xsl:call-template name="meta-to-combo">
|
---|
[24139] | 184 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
| 185 | <xsl:with-param name="current" select="ex.Title"/>
|
---|
[24417] | 186 | </xsl:call-template>-->
|
---|
[24139] | 187 | </td>
|
---|
[24420] | 188 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick" title="Click me to remove"/></td>
|
---|
[24139] | 189 | </tr>
|
---|
| 190 | </tbody>
|
---|
| 191 | </table>
|
---|
| 192 | </div>
|
---|
| 193 |
|
---|
| 194 | <div class="draggable_gsf_link css_gsf_link block" title="gsf:link">
|
---|
| 195 | <table class="header">
|
---|
| 196 | <tbody>
|
---|
| 197 | <tr>
|
---|
[24420] | 198 | <td class="header">LINK</td>
|
---|
| 199 | <td class="header"><select>
|
---|
[24139] | 200 | <option value = "document" selected = "document">Document</option>
|
---|
| 201 | <option value = "classifier">Classifier</option>
|
---|
| 202 | <option value = "source">Source</option>
|
---|
| 203 | <option value = "horizontal">Horizontal</option>
|
---|
| 204 | </select></td>
|
---|
[24420] | 205 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
| 206 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick">[x]</a></td>
|
---|
[24139] | 207 | </tr>
|
---|
| 208 | </tbody>
|
---|
| 209 | </table>
|
---|
| 210 | </div>
|
---|
| 211 |
|
---|
| 212 | <div class="draggable_gsf_switch css_gsf_switch block" title="gsf:switch">
|
---|
| 213 | <table class="header">
|
---|
| 214 | <tbody>
|
---|
| 215 | <tr>
|
---|
| 216 | <td class="header">SWITCH</td>
|
---|
[24420] | 217 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
| 218 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick">[x]</a></td>
|
---|
[24139] | 219 | </tr>
|
---|
| 220 | </tbody>
|
---|
| 221 | </table>
|
---|
| 222 | </div>
|
---|
| 223 |
|
---|
| 224 | <div class="draggable_gsf_when css_gsf_when block" title="gsf:when">
|
---|
| 225 | <table class="header">
|
---|
| 226 | <tbody>
|
---|
| 227 | <tr>
|
---|
[24420] | 228 | <td class="header">WHEN <xsl:value-of select="@test"/></td>
|
---|
| 229 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
| 230 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick"/></td>
|
---|
[24139] | 231 | </tr>
|
---|
| 232 | </tbody>
|
---|
| 233 | </table>
|
---|
| 234 | </div>
|
---|
| 235 |
|
---|
| 236 | <div class="draggable_gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise">
|
---|
| 237 | <table class="header">
|
---|
| 238 | <tbody>
|
---|
| 239 | <tr>
|
---|
| 240 | <td class="header">OTHERWISE</td>
|
---|
[24420] | 241 | <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
|
---|
| 242 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick"/></td>
|
---|
[24139] | 243 | </tr>
|
---|
| 244 | </tbody>
|
---|
| 245 | </table>
|
---|
| 246 | </div>
|
---|
| 247 |
|
---|
| 248 | <div class="draggable_gsf_icon css_gsf_icon block" title="gsf:icon">
|
---|
| 249 | <table class="header">
|
---|
| 250 | <tbody>
|
---|
| 251 | <tr>
|
---|
[24420] | 252 | <td class="header">ICON</td>
|
---|
| 253 | <td class="header"><select>
|
---|
[24417] | 254 | <option value="document" selected="document">Document</option>
|
---|
| 255 | <option value="classifier">Classifier</option>
|
---|
| 256 | <option value="source">Source</option>
|
---|
[24139] | 257 | </select></td>
|
---|
[24420] | 258 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick">[x]</a></td>
|
---|
[24139] | 259 | </tr>
|
---|
| 260 | </tbody>
|
---|
| 261 | </table>
|
---|
| 262 | </div>
|
---|
[24417] | 263 | <div class="draggable_gsf_text css_text block" title="text">
|
---|
[24139] | 264 | <table class="header">
|
---|
| 265 | <tbody>
|
---|
| 266 | <tr>
|
---|
[24420] | 267 | <td class="header">TEXT</td>
|
---|
[24139] | 268 | <td class="header"><input type="text" name="rawtextinput" size="10" value=""/></td>
|
---|
[24420] | 269 | <td class="header"><a href="#" class="ui-icon ui-icon-closethick"/></td>
|
---|
[24139] | 270 | </tr>
|
---|
| 271 | </tbody>
|
---|
| 272 | </table>
|
---|
| 273 | </div>
|
---|
[24417] | 274 | <div class="draggable_table css_table block" title="gsf:table">
|
---|
| 275 | <table class="header">
|
---|
| 276 | <tbody>
|
---|
| 277 | <tr>
|
---|
| 278 | <td class="header">NEW TABLE</td>
|
---|
| 279 | </tr>
|
---|
| 280 | </tbody>
|
---|
| 281 | </table>
|
---|
| 282 | </div>
|
---|
| 283 | <div class="draggable_tr css_tr block" title="gsf:table">
|
---|
| 284 | <table class="header">
|
---|
| 285 | <tbody>
|
---|
| 286 | <tr>
|
---|
| 287 | <td class="header">NEW TABLE ROW</td>
|
---|
| 288 | </tr>
|
---|
| 289 | </tbody>
|
---|
| 290 | </table>
|
---|
| 291 | </div>
|
---|
| 292 | <div class="draggable_td css_td block" title="gsf:table">
|
---|
| 293 | <table class="header">
|
---|
| 294 | <tbody>
|
---|
| 295 | <tr>
|
---|
| 296 | <td class="header">NEW TABLE COLUMN</td>
|
---|
| 297 | </tr>
|
---|
| 298 | </tbody>
|
---|
| 299 | </table>
|
---|
| 300 | </div>
|
---|
[24202] | 301 | </div>
|
---|
[24139] | 302 |
|
---|
| 303 | <!--
|
---|
| 304 | <div id="format">
|
---|
| 305 | <p>
|
---|
| 306 | <b>Format string here</b>
|
---|
| 307 | <i>
|
---|
| 308 | <xsl:value-of select="$fmt1"/>
|
---|
| 309 | </i>
|
---|
| 310 | </p>
|
---|
| 311 | </div> -->
|
---|
| 312 | <!-- <p>
|
---|
| 313 | <i>
|
---|
| 314 | <xsl:value-of select="$meta"/>
|
---|
| 315 | </i>
|
---|
| 316 | </p>
|
---|
| 317 | </div> -->
|
---|
| 318 | <!--</xsl:if>-->
|
---|
| 319 |
|
---|
| 320 | <!--<H2>Preview</H2>
|
---|
| 321 |
|
---|
| 322 | <div id="my_categories"><xsl:text> </xsl:text></div>
|
---|
| 323 |
|
---|
| 324 | <iframe name="preview" id="iframe" width="98%" height="300">Your browser does not support iframes</iframe>
|
---|
| 325 |
|
---|
| 326 | <xsl:variable name="preview"> -->
|
---|
| 327 | <!-- <button type="button" onclick="loadXMLDoc()">Change Content</button> -->
|
---|
| 328 | </xsl:template>
|
---|
| 329 |
|
---|
| 330 | <xsl:template name="formatmanagerpost">
|
---|
| 331 | <!-- </xsl:variable>
|
---|
| 332 |
|
---|
| 333 | <script type="text/javascript">
|
---|
| 334 | preview_html = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$preview"/><xsl:text disable-output-escaping="yes">';</xsl:text>
|
---|
| 335 | </script>
|
---|
| 336 |
|
---|
| 337 | <div id="result">
|
---|
| 338 | Here
|
---|
| 339 | </div>-->
|
---|
| 340 | </xsl:template>
|
---|
| 341 | </xsl:stylesheet>
|
---|