From 1daf146c849a0a8dbd2b61b14218c9a39bdee3a7 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 3 Feb 2012 17:22:48 -0800 Subject: added editor tab save while switching code view tabs, integrated new file dialog with io mediator to open the new file in a new tab Signed-off-by: Ananya Sen --- js/mediators/io-mediator.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 8d0a671e..3d75771f 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -11,14 +11,17 @@ var Montage = require("montage/core/core").Montage, ProjectIo = require("js/io/system/projectio").ProjectIo; //////////////////////////////////////////////////////////////////////// // -exports.IoMediator = Montage.create(Object.prototype, { +exports.IoMediator = Montage.create(require("montage/ui/component").Component, { //////////////////////////////////////////////////////////////////// // fileNew: { enumerable: false, - value: function (file, template, callback) { + value: function (file, template, callback, callbackScope) { // - + + + var returnObj = null; //like {"type": "js", "name": "filename", "source": "test file content", "uri": "/fs/fsd/"} + callback.call(callbackScope, returnObj); } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3