78dd776426
Initially a lot of code was copied from another project. This lead to confusing naming conventions.
21 lines
507 B
HTML
21 lines
507 B
HTML
<script>
|
|
'use strict';
|
|
window.Snapdrop = window.Snapdrop || {};
|
|
Snapdrop.FileSelectionBehavior = {
|
|
notifyFilesSelection: function(files) {
|
|
if (!files) {
|
|
console.log('no files selected...');
|
|
return;
|
|
}
|
|
this._fileSelected(files[0]); //single select
|
|
},
|
|
_fileSelected: function(file) {
|
|
if (file) {
|
|
this.fire('file-selected', {
|
|
file: file,
|
|
name: file.name
|
|
});
|
|
}
|
|
}
|
|
};
|
|
</script>
|