Implementing image download dialog behaviors
This commit is contained in:
1 parent
56093a9d68
commit
98480d134b
11 files changed
+190
-219
No files matched your search
+26
-49
@@ -4,7 +4,8 @@
|
||||
class='themed'
|
||||
dialogClass='modal-lg'
|
||||
formClass='form-themed'
|
||||
confirmLabel='Download'
|
||||
confirmLabel='Download Image'
|
||||
confirmCallback=instance.getConfirmCallback
|
||||
cancelLabel='Cancel'
|
||||
id='imageDownloadDialog'
|
||||
schema=instance.schema
|
||||
@@ -16,8 +17,8 @@
|
||||
<table class="full-width">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-right p-r-1">Width</td>
|
||||
<td>{{>inputText key='width'}}</td>
|
||||
<td class="text-right p-r-1 nowrap">Image width (px)</td>
|
||||
<td>{{>inputNumber key='width' min="1" max="16384"}}</td>
|
||||
<td class="p-l-1" rowspan="2">
|
||||
<button class="btn btn-secondary js-keep-aspect {{#if keepAspect}}active{{/if}}" title="Keep aspect ratio">
|
||||
<i class="fa fa-chain{{#unless keepAspect}}-broken{{/unless}}"></i>
|
||||
@@ -25,8 +26,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right p-r-1">Height</td>
|
||||
<td>{{>inputText key='height'}}</td>
|
||||
<td class="text-right p-r-1 nowrap">Image height (px)</td>
|
||||
<td>{{>inputNumber key='height' min="1" max="16384"}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -40,56 +41,32 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right p-r-1">File type</td>
|
||||
<td>{{>inputSelect key='type'}}</td>
|
||||
<td>{{>inputSelect key='type' hideSearch=true}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-3">{{>inputCheckbox key='showAnnotations'}}</div>
|
||||
<div class="col-lg-3">
|
||||
<table class="full-width">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-right" colspan="2">{{>inputCheckbox key='showAnnotations'}}</td>
|
||||
</tr>
|
||||
{{#if showQuality}}
|
||||
<tr>
|
||||
<td class="text-right p-r-1 nowrap">Image quality (%)</td>
|
||||
<td>{{>inputNumber key='quality' min="1" max="100"}}</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport-element hidden"></div>
|
||||
<img class="viewport-preview" />
|
||||
<div class="image-preview card-round m-t-2 text-center">
|
||||
<h4 class="m-t-0">Image Preview</h4>
|
||||
<img class="viewport-preview" />
|
||||
</div>
|
||||
{{/dialogForm}}
|
||||
<!--
|
||||
<dialog id="downloadDialog">
|
||||
{{#form id='downloadDialogForm' schema=instance.schema api=instance.api}}
|
||||
<div class="instructions">Please specify the dimensions, filename, and desired type for the output image.</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input type="text" id="fileName" class="form-control fileName" aria-label="File name input">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle extension" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">png</button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="#">png</a>
|
||||
<a class="dropdown-item" href="#">jpeg</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check col-sm-4">
|
||||
<label class="form-check-label">
|
||||
<input type="checkbox" class="form-check-input"> Show Annotations
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="width" class="col-sm-2 col-form-label">Width (px):</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" name="width" id="width" class="form-control" value="300"/>
|
||||
</div>
|
||||
<label for="height" class="col-sm-2 col-form-label">Height (px):</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" name="height" id="height" class="form-control" value="200"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="previewElement"></div>
|
||||
<div class="form-group button-holder row">
|
||||
<button class="btn btn-danger col-sm-offset-2 col-sm-3 cancel">cancel</button>
|
||||
<button class="btn btn-primary col-sm-offset-2 col-sm-3 download">download</button>
|
||||
</div>
|
||||
{{/form}}
|
||||
</dialog>
|
||||
-->
|
||||
</template>
|
||||
Reference in new issue
Block a user