removed description from show when not present

This commit is contained in:
bill bittner 2017-10-24 10:46:46 -07:00
parent 97b05bbacf
commit c053688299
3 changed files with 16 additions and 14 deletions

View file

@ -67,6 +67,10 @@ p, h3 {
font-size: x-large;
}
.p--no-top {
margin-top: 0px;
}
.input-text--large, .textarea--large, .title-show, .description-show {
font-size: 1.5rem;
}

View file

@ -79,7 +79,7 @@
uploader.addEventListener('progress', function(event){
var percent = event.bytesLoaded / event.file.size * 100;
updatePublishStatus('<p>File is loading to server</p>')
updateUploadPercent(`<p>${percent.toFixed(2)}%</p>`)
updateUploadPercent(`<p class="blue">${percent.toFixed(2)}%</p>`)
});
/* socket.io message listeners */
socket.on('publish-update', function(msg){
@ -127,14 +127,14 @@
function addInputValuesToFileMetaData(event) {
// get values from inputs
const name = document.getElementById('claim-name-input').value;
const title = document.getElementById('publish-title').value;
const description = document.getElementById('publish-description').value;
const license = document.getElementById('publish-license').value;
const name = document.getElementById('claim-name-input').value.trim();
const title = document.getElementById('publish-title').value.trim();
const description = document.getElementById('publish-description').value.trim();
const license = document.getElementById('publish-license').value.trim();
const nsfw = document.getElementById('publish-nsfw').checked;
const anonymous = document.getElementById('anonymous-select').checked;
const channel = document.getElementById('channel-name-select').value;
const thumbnail = document.getElementById('claim-thumbnail-input').value;
const channel = document.getElementById('channel-name-select').value.trim();
const thumbnail = document.getElementById('claim-thumbnail-input').value.trim();
// set values on file meta data
event.file.meta.name = name;
event.file.meta.title = title;

View file

@ -1,8 +1,6 @@
{{#ifConditional fileInfo.description '!==' ''}}
<div class="row row--wide row--short">
<p class="label">{{fileInfo.description}}</p>
</div>
{{/ifConditional}}
{{#if fileInfo.description}}
<p class="p--no-top">{{fileInfo.description}}</p>
{{/if}}
<div class="row row--wide">
<div id="show-short-link">
@ -40,7 +38,7 @@
</div>
<div id="show-share-buttons">
<div class="row row--wide row--short">
<div class="row row--padded row--wide">
<div class="column column--2 column--sml-10">
<span class="label">Share:</span>
</div><div class="column column--8 column--sml-10">
@ -66,7 +64,7 @@
<a class="label" id="show-details-toggle" href="#" onclick="toggleSection(event)" data-open="false" data-openlabel="[less]" data-closedlabel="[more]" data-slaveelementid="show-details">[more]</a>
</div>
<div id="show-details" hidden="true">
<div id="show-details" class="row row--padded row--wide" hidden="true">
<div id="show-claim-name">
<div class="column column--2 column--sml-10">
<span class="label">Name:</span>