2015-12-19 01:18:02 +01:00
|
|
|
<script>
|
|
|
|
'use strict';
|
|
|
|
window.Chat = window.Chat || {};
|
|
|
|
Chat.FileSelectionBehavior = {
|
|
|
|
notifyFilesSelection: function(files) {
|
2015-12-23 13:57:13 +01:00
|
|
|
if (!files) {
|
2015-12-19 01:18:02 +01:00
|
|
|
console.log('no files selected...');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
for (var i = 0; i < files.length; i++) {
|
|
|
|
var file = files[i];
|
2015-12-23 13:57:13 +01:00
|
|
|
this.fire('file-selected', {
|
|
|
|
file: file,
|
|
|
|
name: file.name
|
|
|
|
});
|
2015-12-19 01:18:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|