PairDrop/app/elements/file-sharing/file-selection-behavior.html

22 lines
495 B
HTML
Raw Normal View History

2015-12-19 01:18:02 +01:00
<script>
'use strict';
window.Chat = window.Chat || {};
Chat.FileSelectionBehavior = {
notifyFilesSelection: function(files) {
if (!files) {
2015-12-19 01:18:02 +01:00
console.log('no files selected...');
return;
}
2015-12-26 13:33:16 +01:00
this._fileSelected(files[0]); //single select
},
_fileSelected: function(file) {
if (file) {
this.fire('file-selected', {
file: file,
name: file.name
});
2015-12-19 01:18:02 +01:00
}
}
};
</script>