diff options
author | Jose Antonio Marquez Russo | 2012-02-08 15:45:21 -0800 |
---|---|---|
committer | Jose Antonio Marquez Russo | 2012-02-08 15:45:21 -0800 |
commit | fb4fdc82afe9ef62402fa3f2ccb5c291f703c7a8 (patch) | |
tree | 92a796e34530d1a724ddb24ef22e59ffef13c12a /js/mediators/io-mediator.js | |
parent | 5a69d5be181ea98fa842977885ebd8c861dda6ca (diff) | |
parent | ab6f2f7ada39a9b27408575af9a565daf0a9d291 (diff) | |
download | ninja-fb4fdc82afe9ef62402fa3f2ccb5c291f703c7a8.tar.gz |
Merge pull request #3 from ananyasen/FileIO
Setting up io-mediator to add new functionality.
Diffstat (limited to 'js/mediators/io-mediator.js')
-rw-r--r-- | js/mediators/io-mediator.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 76f78a7d..fbabd780 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js | |||
@@ -20,8 +20,8 @@ exports.IoMediator = Montage.create(require("montage/ui/component").Component, { | |||
20 | // | 20 | // |
21 | 21 | ||
22 | 22 | ||
23 | var returnObj = null; //like {"type": "js", "name": "filename", "source": "test file content", "uri": "/fs/fsd/"} | 23 | var returnObj = null; //like {"uri": "/gfdg/gdf/dfg.js", "success": true,...} |
24 | callback.operation.call(callback.thisScope, returnObj); | 24 | callback(returnObj); |
25 | } | 25 | } |
26 | }, | 26 | }, |
27 | //////////////////////////////////////////////////////////////////// | 27 | //////////////////////////////////////////////////////////////////// |
@@ -45,7 +45,7 @@ exports.IoMediator = Montage.create(require("montage/ui/component").Component, { | |||
45 | fileType = file.uri.substr(file.uri.lastIndexOf('.') + 1); | 45 | fileType = file.uri.substr(file.uri.lastIndexOf('.') + 1); |
46 | } | 46 | } |
47 | returnObj = {"type": ""+fileType, "name": ""+filename, "source": fileContent, "uri": file.uri}; | 47 | returnObj = {"type": ""+fileType, "name": ""+filename, "source": fileContent, "uri": file.uri}; |
48 | callback.operation.call(callback.thisScope, returnObj); | 48 | callback(returnObj); |
49 | } | 49 | } |
50 | }, | 50 | }, |
51 | //////////////////////////////////////////////////////////////////// | 51 | //////////////////////////////////////////////////////////////////// |