mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-30 03:29:14 -04:00
Rename global variable 'Chat' to 'Snapdrop'
Initially a lot of code was copied from another project. This lead to confusing naming conventions.
This commit is contained in:
parent
7ed10a7ba4
commit
78dd776426
15 changed files with 24 additions and 24 deletions
|
@ -1,8 +1,8 @@
|
|||
<link rel="import" href="file-selection-behavior.html">
|
||||
<script>
|
||||
'use strict';
|
||||
window.Chat = window.Chat || {};
|
||||
Chat.FileButtonBehaviorImpl = {
|
||||
window.Snapdrop = window.Snapdrop || {};
|
||||
Snapdrop.FileButtonBehaviorImpl = {
|
||||
get fileInput() {
|
||||
var fileInput = Polymer.dom(this).querySelector('.fileInput');
|
||||
if (!fileInput) {
|
||||
|
@ -33,5 +33,5 @@ Chat.FileButtonBehaviorImpl = {
|
|||
}.bind(this), false);
|
||||
}
|
||||
};
|
||||
Chat.FileButtonBehavior = [Chat.FileButtonBehaviorImpl, Chat.FileSelectionBehavior];
|
||||
Snapdrop.FileButtonBehavior = [Snapdrop.FileButtonBehaviorImpl, Snapdrop.FileSelectionBehavior];
|
||||
</script>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
'use strict';
|
||||
Polymer({
|
||||
is: 'file-button',
|
||||
behaviors: [Chat.FileButtonBehavior]
|
||||
behaviors: [Snapdrop.FileButtonBehavior]
|
||||
});
|
||||
</script>
|
||||
</dom-module>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<link rel="import" href="file-selection-behavior.html">
|
||||
<script>
|
||||
'use strict';
|
||||
window.Chat = window.Chat || {};
|
||||
Chat.FileDropBehaviorImpl = {
|
||||
window.Snapdrop = window.Snapdrop || {};
|
||||
Snapdrop.FileDropBehaviorImpl = {
|
||||
attached: function() {
|
||||
var dropZone = this;
|
||||
|
||||
|
@ -44,5 +44,5 @@ document.body.addEventListener('drop', function(event) {
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
});
|
||||
Chat.FileDropBehavior = [Chat.FileDropBehaviorImpl, Chat.FileSelectionBehavior];
|
||||
Snapdrop.FileDropBehavior = [Snapdrop.FileDropBehaviorImpl, Snapdrop.FileSelectionBehavior];
|
||||
</script>
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
<link rel="import" href="file-button-behavior.html">
|
||||
<script>
|
||||
'use strict';
|
||||
Chat.FileInputBehavior = [Chat.FileDropBehavior,Chat.FileButtonBehavior];
|
||||
Snapdrop.FileInputBehavior = [Snapdrop.FileDropBehavior,Snapdrop.FileButtonBehavior];
|
||||
</script>
|
|
@ -48,7 +48,7 @@
|
|||
(function() {
|
||||
Polymer({
|
||||
is: 'file-receiver',
|
||||
behaviors: [Chat.SoundNotificationBehavior],
|
||||
behaviors: [Snapdrop.SoundNotificationBehavior],
|
||||
attached: function() {
|
||||
this.async(function() {
|
||||
app.conn.addEventListener('file-offer', function(e) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
'use strict';
|
||||
window.Chat = window.Chat || {};
|
||||
Chat.FileSelectionBehavior = {
|
||||
window.Snapdrop = window.Snapdrop || {};
|
||||
Snapdrop.FileSelectionBehavior = {
|
||||
notifyFilesSelection: function(files) {
|
||||
if (!files) {
|
||||
console.log('no files selected...');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue