diff options
Diffstat (limited to 'js/io/system/coreioapi.js')
-rwxr-xr-x | js/io/system/coreioapi.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 9836f33f..005eabf2 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js | |||
@@ -58,9 +58,9 @@ exports.CoreIoApi = Montage.create(Component, { | |||
58 | handleReady: { | 58 | handleReady: { |
59 | enumerable: false, | 59 | enumerable: false, |
60 | value: function (e) { | 60 | value: function (e) { |
61 | // | 61 | //Removing events |
62 | this.chromeFileSystem.removeEventListener('ready', this, false); | 62 | this.chromeFileSystem.removeEventListener('ready', this, false); |
63 | // | 63 | //Listening for library to be copied event (builds list) |
64 | this.chromeFileSystem.addEventListener('library', this, false); | 64 | this.chromeFileSystem.addEventListener('library', this, false); |
65 | } | 65 | } |
66 | }, | 66 | }, |
@@ -71,10 +71,24 @@ exports.CoreIoApi = Montage.create(Component, { | |||
71 | value: function (e) { | 71 | value: function (e) { |
72 | //Removing events | 72 | //Removing events |
73 | this.chromeFileSystem.removeEventListener('library', this, false); | 73 | this.chromeFileSystem.removeEventListener('library', this, false); |
74 | // | 74 | //Listening for synced library event |
75 | this.ninjaLibrary.addEventListener('sync', this, false); | ||
76 | //Sending library to be synced to chrome | ||
75 | this.ninjaLibrary.synchronize(e._event.ninjaChromeLibrary, this.chromeFileSystem); | 77 | this.ninjaLibrary.synchronize(e._event.ninjaChromeLibrary, this.chromeFileSystem); |
78 | |||
76 | } | 79 | } |
77 | }, | 80 | }, |
81 | //////////////////////////////////////////////////////////////////// | ||
82 | // | ||
83 | handleSync: { | ||
84 | enumerable: false, | ||
85 | value: function (e) { | ||
86 | //Removing events | ||
87 | console.log('Ninja Local Library: Ready'); | ||
88 | this.ninjaLibrary.removeEventListener('sync', this, false); | ||
89 | //TODO: Add sync loading screen logic | ||
90 | } | ||
91 | }, | ||
78 | //////////////////////////////////////////////////////////////////// | 92 | //////////////////////////////////////////////////////////////////// |
79 | // | 93 | // |
80 | _chromeNinjaLibrary: { | 94 | _chromeNinjaLibrary: { |