81 lines
2.1 KiB
HTML
81 lines
2.1 KiB
HTML
<div id="community-edit-form " class="uk-container">
|
|
<div class="entity-title uk-article-title">Edit your community</div>
|
|
|
|
<div> <p> Name: <input placeholder="OpenAIRE" type="text" class="uk-input uk-width-medium"/> </p>
|
|
<p> Description: <input placeholder="description" type="text" class="uk-input uk-width-medium"/> </p>
|
|
<p> Logo: </p>
|
|
|
|
<div class="js-upload uk-placeholder uk-text-center uk-width-medium">
|
|
<div uk-form-custom>
|
|
<span uk-icon="icon: cloud-upload"></span>
|
|
<input type="file">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
var bar = document.getElementById('js-progressbar');
|
|
|
|
UIkit.upload('.js-upload', {
|
|
|
|
url: '',
|
|
multiple: true,
|
|
|
|
beforeSend: function () {
|
|
console.log('beforeSend', arguments);
|
|
},
|
|
beforeAll: function () {
|
|
console.log('beforeAll', arguments);
|
|
},
|
|
load: function () {
|
|
console.log('load', arguments);
|
|
},
|
|
error: function () {
|
|
console.log('error', arguments);
|
|
},
|
|
complete: function () {
|
|
console.log('complete', arguments);
|
|
},
|
|
|
|
loadStart: function (e) {
|
|
console.log('loadStart', arguments);
|
|
|
|
bar.removeAttribute('hidden');
|
|
bar.max = e.total;
|
|
bar.value = e.loaded;
|
|
},
|
|
|
|
progress: function (e) {
|
|
console.log('progress', arguments);
|
|
|
|
bar.max = e.total;
|
|
bar.value = e.loaded;
|
|
},
|
|
|
|
loadEnd: function (e) {
|
|
console.log('loadEnd', arguments);
|
|
|
|
bar.max = e.total;
|
|
bar.value = e.loaded;
|
|
},
|
|
|
|
completeAll: function () {
|
|
console.log('completeAll', arguments);
|
|
|
|
setTimeout(function () {
|
|
bar.setAttribute('hidden', 'hidden');
|
|
}, 1000);
|
|
|
|
alert('Upload Completed');
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|