PairDrop/app/elements/file-sharing/file-selection-behavior.html
Robin Linus 78dd776426 Rename global variable 'Chat' to 'Snapdrop'
Initially a lot of code was copied from another project. This lead to confusing naming conventions.
2016-10-17 01:40:50 +02:00

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>