diff options
Diffstat (limited to 'js/io/system/projectio.js')
-rw-r--r-- | js/io/system/projectio.js | 63 |
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> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No 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 | |||
7 | var FileIo = require("js/io/system/fileio").FileIo; | ||
8 | //////////////////////////////////////////////////////////////////////// | ||
9 | //Exporting as Project I/O | ||
10 | exports.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 | ||