2017-06-23 06:43:53 +02:00
|
|
|
<div class="panel">
|
|
|
|
<h2>Publish</h2>
|
2017-08-20 21:01:52 +02:00
|
|
|
<div class="row" style="overflow:auto; height: 100%;">
|
|
|
|
<div class="col-left" id="file-selection-area">
|
|
|
|
<div id="drop-zone" ondrop="drop_handler(event);" ondragover="dragover_handler(event);" ondragend="dragend_handler(event)">
|
|
|
|
<p>Drag and drop your file here, or choose your file below.</p>
|
2017-09-20 23:39:20 +02:00
|
|
|
<div class="info-message info-message--failure" id="input-error-file-selection" hidden="true"></div>
|
2017-08-20 21:01:52 +02:00
|
|
|
<input type="file" id="siofu_input" name="file" accept="video/*,image/*" onchange="previewAndStageFile(event.target.files[0])" enctype="multipart/form-data"/>
|
|
|
|
</div>
|
|
|
|
<div id="asset-preview-holder"></div>
|
2017-06-11 03:33:03 +02:00
|
|
|
</div>
|
2017-08-20 21:01:52 +02:00
|
|
|
<div class="col-right">
|
|
|
|
<div id="publish-active-area">
|
2017-09-19 17:47:24 +02:00
|
|
|
<div class="stop-float">
|
|
|
|
<p>
|
2017-09-20 20:36:20 +02:00
|
|
|
<div id="input-error-claim-name" class="info-message info-message--failure" hidden="true"></div>
|
2017-09-19 17:47:24 +02:00
|
|
|
Spee.ch/
|
2017-09-19 21:54:23 +02:00
|
|
|
<input type="text" id="claim-name-input" class="input-text input-text--primary" placeholder="your-url-here" oninput="checkClaimName(event.target.value)">
|
2017-09-20 00:39:54 +02:00
|
|
|
<span id="input-success-claim-name" class="info-message info-message--success"></span>
|
2017-09-19 17:47:24 +02:00
|
|
|
</p>
|
2017-08-20 21:01:52 +02:00
|
|
|
</div>
|
2017-09-19 17:47:24 +02:00
|
|
|
<div class="stop-float">
|
2017-09-21 01:04:58 +02:00
|
|
|
{{> channelSelection}}
|
2017-09-19 17:47:24 +02:00
|
|
|
</div>
|
2017-08-20 21:01:52 +02:00
|
|
|
<div class="stop-float">
|
2017-09-19 17:47:24 +02:00
|
|
|
{{> publishDetails}}
|
2017-08-20 21:01:52 +02:00
|
|
|
</div>
|
|
|
|
<p>
|
2017-09-19 17:47:24 +02:00
|
|
|
<div class="input-error" id="input-error-publish-submit" hidden="true"></div>
|
|
|
|
<button id="publish-submit" onclick="publishSelectedImage(event)">Publish</button>
|
|
|
|
<button onclick="resetPublishArea()">Reset</button>
|
2017-08-20 21:01:52 +02:00
|
|
|
</p>
|
2017-07-23 03:01:17 +02:00
|
|
|
</div>
|
2017-06-11 03:33:03 +02:00
|
|
|
</div>
|
2017-06-10 05:39:07 +02:00
|
|
|
</div>
|
2017-06-22 19:08:41 +02:00
|
|
|
</div>
|
2017-07-28 23:39:39 +02:00
|
|
|
|
|
|
|
<script type="text/javascript" >
|
|
|
|
function resetPublishArea (){
|
|
|
|
// reset file selection area
|
|
|
|
document.getElementById('file-selection-area').innerHTML = `<div id="drop-zone" ondrop="drop_handler(event);" ondragover="dragover_handler(event);" ondragend="dragend_handler(event)">
|
|
|
|
<p>Drag and drop your file here, or choose your file below.</p>
|
2017-09-20 23:39:20 +02:00
|
|
|
<div class="info-message info-message--failure" id="input-error-file-selection" hidden="true"></div>
|
2017-07-28 23:39:39 +02:00
|
|
|
<input type="file" id="siofu_input" name="file" accept="video/*,image/*" onchange="previewAndStageFile(event.target.files[0])" enctype="multipart/form-data"/>
|
|
|
|
</div>
|
|
|
|
<div id="asset-preview-holder"></div>`;
|
2017-08-21 01:56:37 +02:00
|
|
|
// reset inputs
|
2017-07-28 23:39:39 +02:00
|
|
|
document.getElementById('claim-name-input').value = '';
|
2017-08-21 01:56:37 +02:00
|
|
|
document.getElementById('publish-title').value = '';
|
|
|
|
document.getElementById('publish-description').value = '';
|
|
|
|
document.getElementById('publish-nsfw').checked = false;
|
|
|
|
// remove staged files
|
2017-07-28 23:39:39 +02:00
|
|
|
stagedFiles = null;
|
|
|
|
// clear any errors
|
|
|
|
document.getElementById('input-error-file-selection').innerHTML = '';
|
|
|
|
document.getElementById('input-error-claim-name').innerHTML = '';
|
|
|
|
document.getElementById('input-error-publish-submit').innerHTML = '';
|
2017-09-20 00:39:54 +02:00
|
|
|
document.getElementById('input-success-claim-name').hidden = true;
|
2017-07-28 23:39:39 +02:00
|
|
|
}
|
2017-08-01 19:23:08 +02:00
|
|
|
</script>
|