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