mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Enable PDF section editor
This commit is contained in:
parent
61d0086337
commit
7fde947a52
6 changed files with 118 additions and 20 deletions
|
@ -1,3 +1,37 @@
|
|||
{{#section/base-editor-inline document=document folder=folder page=page tip="Select PDF to render" isDirty=(action "isDirty") onCancel=(action "onCancel") onAction=(action "onAction")}}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="new-space-name">PDF</label>
|
||||
{{input type="text" class="form-control mousetrap" placeholder="click upload button below" value=pdfName readonly=true}}
|
||||
<small class="form-text text-muted">First PDF uploaded will be used</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="new-space-name">Preview Height</label>
|
||||
{{input type="number" class="form-control mousetrap" placeholder="e.g. 700" value=pdfOption.height}}
|
||||
<small class="form-text text-muted">How tall is the PDF preview?</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="new-space-name">Start Page</label>
|
||||
{{input type="number" class="form-control mousetrap" placeholder="e.g. 1" value=pdfOption.startPage}}
|
||||
<small class="form-text text-muted">The first page to display</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="new-space-name">Sidebar</label>
|
||||
<select onchange={{action "onSetSidebar" value="target.value"}} class="form-control">
|
||||
<option value="none" selected={{is-equal pdfOption.sidebar 'none'}}>
|
||||
None
|
||||
</option>
|
||||
<option value="bookmarks" selected={{is-equal pdfOption.sidebar 'bookmarks'}}>
|
||||
Bookmarks
|
||||
</option>
|
||||
<option value="thumbs" selected={{is-equal pdfOption.sidebar 'thumbs'}}>
|
||||
Thumbnails
|
||||
</option>
|
||||
</select>
|
||||
<small class="form-text text-muted">Optionally, set sidebar content</small>
|
||||
</div>
|
||||
|
||||
{{/section/base-editor-inline}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="non-printable">
|
||||
<iframe frameborder="0" onmousewheel=""
|
||||
width="100%"
|
||||
height={{viewHeight}}
|
||||
src="/pdfjs/web/viewer.html?file={{pdfUrl}}#zoom=page-width&page={{startPage}}&pagemode={{pageMode}}">
|
||||
height={{pdfOption.height}}
|
||||
src="/pdfjs/web/viewer.html?file={{pdfUrl}}#zoom=page-width&page={{pdfOption.startPage}}&pagemode={{pdfOption.sidebar}}">
|
||||
</iframe>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue