@ -1 +1 @@ | |||||
<svg xmlns="http://www.w3.org/2000/svg"><symbol id="icon-add-circle" viewBox="0 0 30 30"><title>add-circle</title><path d="M21.27 16.23v-2.461h-5.039V8.73H13.77v5.039H8.731v2.461h5.039v5.039h2.461V16.23h5.039zM15 2.52q5.156 0 8.818 3.662T27.48 15t-3.662 8.818T15 27.48t-8.818-3.662T2.52 15t3.662-8.818T15 2.52z"/></symbol><symbol id="icon-back" viewBox="0 0 30 30"><title>back</title><path d="M12.48 11.25q6.094.879 9.404 4.658t4.365 9.111q-4.512-6.387-13.77-6.387v5.098L3.749 15l8.73-8.73v4.98z"/></symbol><symbol id="icon-build" viewBox="0 0 30 30"><title>build</title><path d="M28.359 23.73q.41.234.381.791t-.498.967l-2.871 2.871q-.879.879-1.758 0L12.246 16.992q-2.109.879-4.482.381t-4.131-2.256q-1.875-1.875-2.344-4.453t.703-4.805L7.5 11.25l3.75-3.75-5.391-5.391q2.227-1.055 4.805-.645t4.453 2.285q1.758 1.758 2.256 4.131t-.381 4.482z"/></symbol><symbol id="icon-delete" viewBox="0 0 30 30"><title>delete</title><path d="M23.73 4.98V7.5H6.269V4.98h4.336l1.289-1.23h6.211l1.289 1.23h4.336zM7.5 23.73v-15h15v15q0 .996-.762 1.758t-1.758.762h-9.961q-.996 0-1.758-.762t-.762-1.758z"/></symbol><symbol id="icon-download" viewBox="0 0 30 30"><title>download</title><path d="M6.27 22.5h17.461v2.52H6.27V22.5zm17.46-11.25L15 19.98l-8.73-8.73h4.98v-7.5h7.5v7.5h4.98z"/></symbol><symbol id="icon-email" viewBox="0 0 30 30"><title>email</title><path d="M25.02 10.02V7.5L15 13.77 4.98 7.5v2.52L15 16.231zm0-5.04q.996 0 1.729.762t.732 1.758v15q0 .996-.732 1.758t-1.729.762H4.981q-.996 0-1.729-.762T2.52 22.5v-15q0-.996.732-1.758t1.729-.762H25.02z"/></symbol><symbol id="icon-eye" viewBox="0 0 30 30"><title>eye</title><path d="M15 11.25q1.523 0 2.637 1.113T18.75 15t-1.113 2.637T15 18.75t-2.637-1.113T11.25 15t1.113-2.637T15 11.25zm0 10.02q2.578 0 4.424-1.846T21.27 15t-1.846-4.424T15 8.73t-4.424 1.846T8.73 15t1.846 4.424T15 21.27zm0-15.645q4.629 0 8.379 2.578T28.77 15q-1.641 4.219-5.391 6.797T15 24.375t-8.379-2.578T1.23 15q1.641-4.219 5.391-6.797T15 5.625z"/></symbol><symbol id="icon-folder" viewBox="0 0 30 30"><title>folder</title><path d="M12.48 4.98L15 7.5h10.02q.996 0 1.729.762t.732 1.758V22.5q0 .996-.732 1.758t-1.729.762H4.981q-.996 0-1.729-.762T2.52 22.5v-15q0-.996.732-1.758t1.729-.762h7.5z"/></symbol><symbol id="icon-move" viewBox="0 0 30 30"><title>move</title><path d="M15 11.25l4.98 5.039-4.98 4.98-1.816-1.758 1.992-1.992H10.02v-2.52h5.156l-1.934-1.992zM25.02 22.5V10.02H4.981V22.5H25.02zm0-15q.996 0 1.729.762t.732 1.758V22.5q0 .996-.732 1.758t-1.729.762H4.981q-.996 0-1.729-.762T2.52 22.5v-15q0-.996.732-1.758t1.729-.762h7.5l2.52 2.52h10.02z"/></symbol><symbol id="icon-secret" viewBox="0 0 30 30"><title>secret</title><path d="M8.73 17.52q.996 0 1.758-.762T11.25 15t-.762-1.758-1.758-.762-1.729.762T6.269 15t.732 1.758 1.729.762zm7.09-5.04h12.949v5.039h-2.52v4.98h-4.98v-4.98H15.82q-.762 2.051-2.842 3.516T8.73 22.5q-3.105 0-5.303-2.197T1.23 15t2.197-5.303T8.73 7.5q2.168 0 4.248 1.465t2.842 3.516z"/></symbol><symbol id="icon-tag" viewBox="0 0 30 30"><title>tag</title><path d="M6.855 8.73q.762 0 1.318-.557t.557-1.318-.557-1.318-1.318-.557-1.318.557-.557 1.318.557 1.318 1.318.557zm19.922 5.743q.703.703.703 1.758t-.703 1.758l-8.789 8.789q-.703.703-1.758.703t-1.758-.703l-11.25-11.25q-.703-.703-.703-1.758V4.981q0-.996.732-1.729T4.98 2.52h8.789q1.055 0 1.758.703z"/></symbol><symbol id="icon-upload" viewBox="0 0 30 30"><title>upload</title><path d="M6.27 22.5h17.461v2.52H6.27V22.5zm4.98-2.52v-7.5H6.27L15 3.75l8.73 8.73h-4.98v7.5h-7.5z"/></symbol></svg> | |||||
<svg xmlns="http://www.w3.org/2000/svg"><symbol id="icon-add-circle" viewBox="0 0 30 30"><title>add-circle</title><path d="M21.27 16.23v-2.461h-5.039V8.73H13.77v5.039H8.731v2.461h5.039v5.039h2.461V16.23h5.039zM15 2.52q5.156 0 8.818 3.662T27.48 15t-3.662 8.818T15 27.48t-8.818-3.662T2.52 15t3.662-8.818T15 2.52z"/></symbol><symbol id="icon-back" viewBox="0 0 30 30"><title>back</title><path d="M12.48 11.25q6.094.879 9.404 4.658t4.365 9.111q-4.512-6.387-13.77-6.387v5.098L3.749 15l8.73-8.73v4.98z"/></symbol><symbol id="icon-build" viewBox="0 0 30 30"><title>build</title><path d="M28.359 23.73q.41.234.381.791t-.498.967l-2.871 2.871q-.879.879-1.758 0L12.246 16.992q-2.109.879-4.482.381t-4.131-2.256q-1.875-1.875-2.344-4.453t.703-4.805L7.5 11.25l3.75-3.75-5.391-5.391q2.227-1.055 4.805-.645t4.453 2.285q1.758 1.758 2.256 4.131t-.381 4.482z"/></symbol><symbol id="icon-checkbox_checked" viewBox="0 0 30 30"><title>checkbox_checked</title><path d="M12.48 21.27l11.25-11.25-1.758-1.816-9.492 9.492-4.453-4.453-1.758 1.758zM23.73 3.75q1.055 0 1.787.732t.732 1.787V23.73q0 1.055-.732 1.787t-1.787.732H6.269q-1.055 0-1.787-.732T3.75 23.73V6.269q0-1.055.732-1.787t1.787-.732H23.73z"/></symbol><symbol id="icon-checkbox" viewBox="0 0 30 30"><title>checkbox</title><path d="M23.73 3.75q.996 0 1.758.762t.762 1.758v17.461q0 .996-.762 1.758t-1.758.762H6.269q-.996 0-1.758-.762t-.762-1.758V6.27q0-.996.762-1.758t1.758-.762H23.73zm0 2.52H6.269v17.461H23.73V6.27z"/></symbol><symbol id="icon-delete" viewBox="0 0 30 30"><title>delete</title><path d="M23.73 4.98V7.5H6.269V4.98h4.336l1.289-1.23h6.211l1.289 1.23h4.336zM7.5 23.73v-15h15v15q0 .996-.762 1.758t-1.758.762h-9.961q-.996 0-1.758-.762t-.762-1.758z"/></symbol><symbol id="icon-download" viewBox="0 0 30 30"><title>download</title><path d="M6.27 22.5h17.461v2.52H6.27V22.5zm17.46-11.25L15 19.98l-8.73-8.73h4.98v-7.5h7.5v7.5h4.98z"/></symbol><symbol id="icon-email" viewBox="0 0 30 30"><title>email</title><path d="M25.02 10.02V7.5L15 13.77 4.98 7.5v2.52L15 16.231zm0-5.04q.996 0 1.729.762t.732 1.758v15q0 .996-.732 1.758t-1.729.762H4.981q-.996 0-1.729-.762T2.52 22.5v-15q0-.996.732-1.758t1.729-.762H25.02z"/></symbol><symbol id="icon-eye" viewBox="0 0 30 30"><title>eye</title><path d="M15 11.25q1.523 0 2.637 1.113T18.75 15t-1.113 2.637T15 18.75t-2.637-1.113T11.25 15t1.113-2.637T15 11.25zm0 10.02q2.578 0 4.424-1.846T21.27 15t-1.846-4.424T15 8.73t-4.424 1.846T8.73 15t1.846 4.424T15 21.27zm0-15.645q4.629 0 8.379 2.578T28.77 15q-1.641 4.219-5.391 6.797T15 24.375t-8.379-2.578T1.23 15q1.641-4.219 5.391-6.797T15 5.625z"/></symbol><symbol id="icon-folder" viewBox="0 0 30 30"><title>folder</title><path d="M12.48 4.98L15 7.5h10.02q.996 0 1.729.762t.732 1.758V22.5q0 .996-.732 1.758t-1.729.762H4.981q-.996 0-1.729-.762T2.52 22.5v-15q0-.996.732-1.758t1.729-.762h7.5z"/></symbol><symbol id="icon-move" viewBox="0 0 30 30"><title>move</title><path d="M15 11.25l4.98 5.039-4.98 4.98-1.816-1.758 1.992-1.992H10.02v-2.52h5.156l-1.934-1.992zM25.02 22.5V10.02H4.981V22.5H25.02zm0-15q.996 0 1.729.762t.732 1.758V22.5q0 .996-.732 1.758t-1.729.762H4.981q-.996 0-1.729-.762T2.52 22.5v-15q0-.996.732-1.758t1.729-.762h7.5l2.52 2.52h10.02z"/></symbol><symbol id="icon-secret" viewBox="0 0 30 30"><title>secret</title><path d="M8.73 17.52q.996 0 1.758-.762T11.25 15t-.762-1.758-1.758-.762-1.729.762T6.269 15t.732 1.758 1.729.762zm7.09-5.04h12.949v5.039h-2.52v4.98h-4.98v-4.98H15.82q-.762 2.051-2.842 3.516T8.73 22.5q-3.105 0-5.303-2.197T1.23 15t2.197-5.303T8.73 7.5q2.168 0 4.248 1.465t2.842 3.516z"/></symbol><symbol id="icon-tag" viewBox="0 0 30 30"><title>tag</title><path d="M6.855 8.73q.762 0 1.318-.557t.557-1.318-.557-1.318-1.318-.557-1.318.557-.557 1.318.557 1.318 1.318.557zm19.922 5.743q.703.703.703 1.758t-.703 1.758l-8.789 8.789q-.703.703-1.758.703t-1.758-.703l-11.25-11.25q-.703-.703-.703-1.758V4.981q0-.996.732-1.729T4.98 2.52h8.789q1.055 0 1.758.703z"/></symbol><symbol id="icon-upload" viewBox="0 0 30 30"><title>upload</title><path d="M6.27 22.5h17.461v2.52H6.27V22.5zm4.98-2.52v-7.5H6.27L15 3.75l8.73 8.73h-4.98v7.5h-7.5z"/></symbol></svg> |
@ -0,0 +1,5 @@ | |||||
<!-- Generated by IcoMoon.io --> | |||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"> | |||||
<title>checkbox</title> | |||||
<path d="M23.73 3.75q0.996 0 1.758 0.762t0.762 1.758v17.461q0 0.996-0.762 1.758t-1.758 0.762h-17.461q-0.996 0-1.758-0.762t-0.762-1.758v-17.461q0-0.996 0.762-1.758t1.758-0.762h17.461zM23.73 6.27h-17.461v17.461h17.461v-17.461z"></path> | |||||
</svg> |
@ -0,0 +1,5 @@ | |||||
<!-- Generated by IcoMoon.io --> | |||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"> | |||||
<title>checkbox_checked</title> | |||||
<path d="M12.48 21.27l11.25-11.25-1.758-1.816-9.492 9.492-4.453-4.453-1.758 1.758zM23.73 3.75q1.055 0 1.787 0.732t0.732 1.787v17.461q0 1.055-0.732 1.787t-1.787 0.732h-17.461q-1.055 0-1.787-0.732t-0.732-1.787v-17.461q0-1.055 0.732-1.787t1.787-0.732h17.461z"></path> | |||||
</svg> |
@ -1,2 +1,26 @@ | |||||
window.axios = require('axios') | window.axios = require('axios') | ||||
window.riot = require('riot') | |||||
window.riot = require('riot') | |||||
// riot-class-names-plugin.js | |||||
/** | |||||
* Convert object class constructs into strings | |||||
* @param {Object} classes - class list as object | |||||
* @returns {string} return only the classes having a truthy value | |||||
*/ | |||||
function classNames(classes) { | |||||
return Object.entries(classes).reduce((acc, item) => { | |||||
const [key, value] = item | |||||
if (value) return [...acc, key] | |||||
return acc | |||||
}, []).join(' ') | |||||
} | |||||
// install the classNames plugin | |||||
riot.install(function(component) { | |||||
// add the classNames helper to all the riot components | |||||
component.classNames = classNames | |||||
return component | |||||
}) |
@ -0,0 +1,59 @@ | |||||
<urban-filemanager-upload> | |||||
<div class="file-upload"> | |||||
<div class="file-upload"> | |||||
<form onsubmit={ } enctype="multipart/form-data"> | |||||
<input name="files[]" type="file" multiple onchange={ handleChange }> | |||||
</form> | |||||
<div class="file-upload__item" each={ file in state.files }> | |||||
{ file.name } / { file.size } | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<script> | |||||
/** | |||||
* | |||||
* parent Directory | |||||
* | |||||
* | |||||
* | |||||
*/ | |||||
export default { | |||||
state: { | |||||
files: [] | |||||
}, | |||||
/** | |||||
* | |||||
* | |||||
* @param Object event | |||||
* | |||||
*/ | |||||
handleChange(event) { | |||||
console.log(event.target.files) | |||||
this.state.files = event.target.files | |||||
this.update() | |||||
} | |||||
handleUpload(event) { | |||||
const config = { | |||||
onUploadProgress: progressEvent => console.log(progressEvent.loaded) | |||||
} | |||||
axios.post('/api/upload/' + id, formData, config) | |||||
.then(function (response) { | |||||
currentObj.success = response.data.success; | |||||
}) | |||||
.catch(function (error) { | |||||
currentObj.output = error; | |||||
}) | |||||
} | |||||
} | |||||
</script> | |||||
</urban-filemanager-upload> |