Browse Source

在主页上添加输入URL地址来预览的表单

pull/30/head
Yiding He 3 years ago committed by kl
parent
commit
82c7b59650
  1. 23
      server/src/main/resources/web/index.ftl

23
server/src/main/resources/web/index.ftl

@ -48,6 +48,22 @@
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion">
输入下载地址预览文件
</a>
</h4>
</div>
<div class="panel-body">
<label>文件下载地址<input type="text" id="_url" style="min-width:50em"/></label>
<form action="${baseUrl}onlinePreview" target="_blank" id="preview_by_url" style="display: inline-block">
<input type="hidden" name="url"/>
<input type="submit" value="预览">
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
@ -258,6 +274,13 @@
return data;
});
$('#preview_by_url').submit(function() {
var _url = $("#_url").val();
var urlField = $(this).find('[name=url]');
var b64Encoded = Base64.encode(_url);
urlField.val(b64Encoded);
});
function showLoadingDiv() {
var height = window.document.documentElement.clientHeight - 1;

Loading…
Cancel
Save