aboutsummaryrefslogtreecommitdiff
path: root/js/io/system/projectio.js
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/io/system/projectio.js
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/io/system/projectio.js')
-rw-r--r--js/io/system/projectio.js63
1 files changed, 63 insertions, 0 deletions
diff --git a/js/io/system/projectio.js b/js/io/system/projectio.js
new file mode 100644
index 00000000..822fd385
--- /dev/null
+++ b/js/io/system/projectio.js
@@ -0,0 +1,63 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var FileIo = require("js/io/system/fileio").FileIo;
8////////////////////////////////////////////////////////////////////////
9//Exporting as Project I/O
10exports.ProjectIo = (require("montage/core/core").Montage).create(Object.prototype, {
11 ////////////////////////////////////////////////////////////////////
12 //
13 create: {
14 enumerable: false,
15 value: function () {
16 }
17 },
18 ////////////////////////////////////////////////////////////////////
19 //
20 open: {
21 enumerable: false,
22 value: function(e) {
23 //TODO: Add functionality
24 console.log('ProjectIO: open');
25 }
26 },
27 ////////////////////////////////////////////////////////////////////
28 //
29 save: {
30 enumerable: false,
31 value: function(type, id, components) {
32 //
33 var rObj;
34 //
35 switch (type) {
36 case 'montageapp':
37 //
38 var css = FileIo.save('css', id);
39 var html = FileIo.save('html', id, components);
40 //
41 rObj = {html: html, css: css};
42 break;
43 default:
44 break;
45 }
46 //
47 return rObj;
48 }
49 },
50 ////////////////////////////////////////////////////////////////////
51 //
52 saveAs: {
53 enumerable: false,
54 value: function(e) {
55 //TODO: Add functionality
56 console.log('ProjectIO: saveAs');
57 }
58 }
59 ////////////////////////////////////////////////////////////////////
60 ////////////////////////////////////////////////////////////////////
61});
62////////////////////////////////////////////////////////////////////////
63//////////////////////////////////////////////////////////////////////// \ No newline at end of file