General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
OfficeImporter
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to your wiki
»
XWiki Space
»
Office Importer
Wiki source code of
Office Importer
Last modified by
Administrator
on 2011/03/02 17:34
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: #set($ok = $xwiki.ssx.use("XWiki.OfficeImporter")) 2: #if($isguest) 3: #error($msg.get("xe.officeimporter.notallowed")) 4: #elseif("$!{oomanager.serverState}" != "Connected") 5: #if($hasAdmin) 6: #error($msg.get("xe.officeimporter.error.adminuser")) 7: #else 8: #error($msg.get("xe.officeimporter.error.normaluser")) 9: #end 10: #else 11: #if($request.page) 12: #set($targetdoc = $xwiki.getDocument($request.page)) 13: #end 14: <div class="office_importer_box"> 15: <form action="$xwiki.getURL('XWiki.OfficeImporterResults','view')" enctype="multipart/form-data" method="post"> 16: <p class="office_importer_document"> 17: <label for="filepath">$msg.get("xe.officeimporter.import.document") : </label> 18: <input id="filepath" type="file" name="filePath" value="" size="40" onchange="javascript:XWiki.officeImporter.populateTargetPageInputField(this.value);"/></p> 19: <h2>$msg.get("xe.officeimporter.import.target")</h2> 20: <p class="office_importer_target"> 21: <label for="targetSpaceInputId" class="inputtext"> 22: <span>$msg.get("xe.officeimporter.import.targetspace") : </span> 23: <input id="targetSpaceInputId" type="text" name="targetSpace" class="suggestSpaces suggested" value="$!{targetdoc.space}"/> 24: </label> 25: <label for="targetPageInputId" class="inputtext"> 26: <span>$msg.get("xe.officeimporter.import.targetpage") : </span> 27: <input id="targetPageInputId" name="targetPage" type="text" value="$!{targetdoc.name}" onchange="javascript:validateUserInputs();"/> 28: </label> 29: <label for="appendContentInputId" id="appenContent" class="radio"> 30: <span>$msg.get("xe.officeimporter.import.appendresult") : </span> 31: <input id="appendContentInputId" name="appendContent" type="checkbox" value="true" /></label> 32: </p> 33: <p class="help_message">$msg.get("xe.officeimporter.import.help.target")</p> 34: <h2>$msg.get("xe.officeimporter.import.styles")</h2> 35: <p class="office_importer_styles"> 36: <label for="filterStylesInputId" class="radio">$msg.get("xe.officeimporter.import.filterstyles") : <input id="filterStylesInputId" name="filterStyles" type="checkbox" value="strict"/></label> 37: </p> 38: <p class="help_message">$msg.get("xe.officeimporter.import.help.styles")</p> 39: <h2>$msg.get("xe.officeimporter.import.splitting")</h2> 40: <div class="office_importer_splittingcontent"> 41: <label for="splitDocumentInputId" class="radio"><span>$msg.get("xe.officeimporter.import.splitting.splitdocument") : </span><input id="splitDocumentInputId" name="splitDocument" type="checkbox" value="true"/></label> 42: <p class="office_importer_splitting"> 43: <label for="headingLevelsToSplitInputId" class="multipleselect"><span>$msg.get("xe.officeimporter.import.splitting.headinglevels") : </span> 44: <select id="headingLevelsToSplitInputId" size="5" multiple="multiple" name="headingLevelsToSplit" class="headingLevelsToSplit">#foreach($h in [1..6]) <option value="${h}">$msg.get("xe.officeimporter.import.splitting.heading")-${h}</option>#end</select> 45: </label> 46: <label for="childPagesNamingMethodInputId" class="select"><span> 47: $msg.get("xe.officeimporter.import.splitting.naming") : </span><select id="childPagesNamingMethodInputId" name="childPagesNamingMethod"><option value="headingNames">$msg.get("xe.officeimporter.import.splitting.naming.headingnames")</option><option value="mainPageNameAndHeading">$msg.get("xe.officeimporter.import.splitting.naming.mainpagenameandheading")</option><option value="mainPageNameAndNumbering">$msg.get("xe.officeimporter.import.splitting.naming.mainpagenameandnumbering")</option></select> 48: </label> 49: </p><p class="help_message">$msg.get("xe.officeimporter.import.help.splitting")</p> 50: <input type="hidden" name="groovyFilter" value="" /> 51: <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> 52: </div> 53: <div class="office_importer_buttons"><span class="buttonwrapper"><input type="submit" value="$msg.get('xe.officeimporter.import.import')" class="button"/></span></div> 54: </form> 55: </div> 56: #end 57: {pre} 58: <script type="text/javascript"> 59: /* <![CDATA[ */ 60: if (typeof(XWiki) == "undefined") { 61: XWiki = new Object(); 62: } 63: if (typeof(XWiki.officeImporter) == 'undefined') { 64: XWiki.officeImporter = new Object(); 65: } 66: XWiki.officeImporter.populateTargetPageInputField = function(fileName) { 67: var dot = fileName.lastIndexOf("."); 68: if (-1 != dot) { 69: fileName = fileName.substring(0, dot); 70: } 71: fileName = fileName.replace(/[\.:]/g, "-"); 72: document.getElementById("targetPageInputId").value = fileName; 73: } 74: /* ]]> */ 75: </script> 76: {/pre}
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox