From 4a3793e9cc498219d246e543a55b543e1b4fb708 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 30 Jan 2012 11:21:15 -0800
Subject: CSSPanel Updates - Add new original CSS error icon
---
js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css
index ff70b5b6..27d19e58 100644
--- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css
+++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css
@@ -400,7 +400,7 @@
.nj-css-error:not(.nj-css-no-error) {
background-repeat: no-repeat;
background-position: 3px 2px;
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAMtJREFUGJV1kM0KAXEUxc/SWh7MM0zJE3gQCxM2EpJ8bEiNjWHhBWYjYkUkRdQoGde5f2Q03PrV6ZzTrXuB0MgQiU0ba0U1/k3gwBYXoqj+WeKG2LaBgwxYJEbTixa7yMyLLPlLw6xATS9SXDWx25cZ7sYG1ep9b3OR8h3cTyUWtyMylnMNcqGn2WdbHQs94FqFnPtxg2r1NHsfkTx0EMiEG7IMpy2D0fSOPWbsgD/zzEtoik323hP75THTDvJpVHIW5I1t4aaEPe08AF+CuEXWXJtHAAAAAElFTkSuQmCC);
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAALCAYAAABGbhwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowMzYyMERFNTQwNzMxMUUxQTREQ0IxQTRGNEI2MTE3RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowMzYyMERFNjQwNzMxMUUxQTREQ0IxQTRGNEI2MTE3RiI%2BIDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjAzNjIwREUzNDA3MzExRTFBNERDQjFBNEY0QjYxMTdGIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAzNjIwREU0NDA3MzExRTFBNERDQjFBNEY0QjYxMTdGIi8%2BIDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY%2BIDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8%2Bc4fwegAAAWpJREFUeNo8kLtLA0EQxr%2B9l3lcDAaCBsEqEOysBFEQsRAsRVCEpBREsbIUSxtBrAxEewsrK8VHQIhK%2FoIUUVJIQFFjYi65XDZ36%2Bz5GFgWZr75fjPDhBD4C%2BucjWgaphjQdTgK%2FfPi5a%2FGpPDtjEVjERyqKlag%2FlY8gHPsfzSwPbQgbDyfIs6vURa3EKK8Jf6jmhUy51yiWDlBUDED2NF0JKGQS3IPVn4ATXqIL0EYJgwD42YQG4quE45EggOtCwbWrUM1Ej%2F0jkXDAYaOtOa6iIH2YSQOBugPj4KN3aFdnIThkprynoeUYjtwIRO0hCLxiU3wp12odgl0AXhUa3VQ0xoWCqEApiNhEpFzt7Tm%2F4Tzo9kGvtq4UjNzqJB1mswURvNoqayP57V7KcB7HfZnE8v%2BHYtZtmiGcBzqQ1TSZUPP85HVlo1MfCaX94WPpSO83qwO6wbWCTtBQocoD70eDgZncw3Z%2BC3AAFMzlxlnnpevAAAAAElFTkSuQmCC);
opacity: 0.5;
}
.nj-editing.nj-css-error {
--
cgit v1.2.3
From 13ceef38109c0e851fcc499c361e651384f67b99 Mon Sep 17 00:00:00 2001
From: John Mayhew
Date: Mon, 30 Jan 2012 13:24:47 -0800
Subject: Removed unused images and reduced the size of the larger image files
used for shaders.
---
assets/images/BasePlatformA01_AO.png | Bin 65754 -> 0 bytes
assets/images/BasePlatformA01_DM.png | Bin 70207 -> 0 bytes
assets/images/BoxA01_AO.png | Bin 62516 -> 0 bytes
assets/images/BoxA01_DM.png | Bin 54892 -> 0 bytes
assets/images/Grunge.png | Bin 2174259 -> 0 bytes
assets/images/LabelFrame.tga | Bin 12306 -> 0 bytes
assets/images/MArmBaseN_DM.png | Bin 136280 -> 0 bytes
assets/images/MArmBaseN_NM.png | Bin 109974 -> 0 bytes
assets/images/MArmTopN_DM.png | Bin 136902 -> 0 bytes
assets/images/MArmTopN_NM.png | Bin 97275 -> 0 bytes
assets/images/MArm_AO.png | Bin 157336 -> 0 bytes
assets/images/MBaseWallA01_AO.png | Bin 134056 -> 0 bytes
assets/images/MBaseWallA01_DM.png | Bin 136022 -> 0 bytes
assets/images/MBaseWallA01_GM.png | Bin 26051 -> 0 bytes
assets/images/MBase_AO.png | Bin 165449 -> 0 bytes
assets/images/MCoreBase_DM.png | Bin 130589 -> 0 bytes
assets/images/MCoreBase_GM.png | Bin 9853 -> 0 bytes
assets/images/MEjectorBaseN_DM.png | Bin 119768 -> 0 bytes
assets/images/MEjectorBaseN_NM.png | Bin 57808 -> 0 bytes
assets/images/MRingBaseN_DM.png | Bin 107671 -> 0 bytes
assets/images/MRingBaseN_NM.png | Bin 94852 -> 0 bytes
assets/images/MSquareBaseN_DM.png | Bin 76400 -> 0 bytes
assets/images/MWall_AO.png | Bin 108536 -> 0 bytes
assets/images/MWall_DM.png | Bin 133125 -> 0 bytes
assets/images/MWall_GM.png | Bin 9294 -> 0 bytes
assets/images/MWall_NM.png | Bin 89287 -> 0 bytes
assets/images/Ref.png | Bin 13632 -> 0 bytes
assets/images/Spec.png | Bin 2321526 -> 0 bytes
assets/images/black.tga | Bin 210 -> 0 bytes
assets/images/cube.png | Bin 34506 -> 0 bytes
assets/images/cubelight_Glow.png | Bin 3635 -> 0 bytes
assets/images/cubelight_spec.png | Bin 33249 -> 0 bytes
assets/images/default_white.png | Bin 90 -> 0 bytes
assets/images/droid.png | Bin 885 -> 0 bytes
assets/images/env.png | Bin 85724 -> 0 bytes
assets/images/femaleRobot.png | Bin 2857 -> 0 bytes
assets/images/femaleRobot_Glow.png | Bin 2855 -> 0 bytes
assets/images/lightRack.png | Bin 2857 -> 0 bytes
assets/images/lightRack_Glow.png | Bin 2857 -> 0 bytes
assets/images/metal.png | Bin 2366049 -> 696663 bytes
assets/images/particle-star.png | Bin 3665 -> 0 bytes
assets/images/quilt01.png | Bin 572888 -> 0 bytes
assets/images/quilt01_E.png | Bin 3273 -> 0 bytes
assets/images/quilt01_N.png | Bin 116034 -> 0 bytes
assets/images/quilt02.png | Bin 391471 -> 0 bytes
assets/images/quilt02_E.png | Bin 3273 -> 0 bytes
assets/images/quilt02_N.png | Bin 34939 -> 0 bytes
assets/images/white.tga | Bin 236 -> 0 bytes
48 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 assets/images/BasePlatformA01_AO.png
delete mode 100644 assets/images/BasePlatformA01_DM.png
delete mode 100644 assets/images/BoxA01_AO.png
delete mode 100644 assets/images/BoxA01_DM.png
delete mode 100644 assets/images/Grunge.png
delete mode 100644 assets/images/LabelFrame.tga
delete mode 100644 assets/images/MArmBaseN_DM.png
delete mode 100644 assets/images/MArmBaseN_NM.png
delete mode 100644 assets/images/MArmTopN_DM.png
delete mode 100644 assets/images/MArmTopN_NM.png
delete mode 100644 assets/images/MArm_AO.png
delete mode 100644 assets/images/MBaseWallA01_AO.png
delete mode 100644 assets/images/MBaseWallA01_DM.png
delete mode 100644 assets/images/MBaseWallA01_GM.png
delete mode 100644 assets/images/MBase_AO.png
delete mode 100644 assets/images/MCoreBase_DM.png
delete mode 100644 assets/images/MCoreBase_GM.png
delete mode 100644 assets/images/MEjectorBaseN_DM.png
delete mode 100644 assets/images/MEjectorBaseN_NM.png
delete mode 100644 assets/images/MRingBaseN_DM.png
delete mode 100644 assets/images/MRingBaseN_NM.png
delete mode 100644 assets/images/MSquareBaseN_DM.png
delete mode 100644 assets/images/MWall_AO.png
delete mode 100644 assets/images/MWall_DM.png
delete mode 100644 assets/images/MWall_GM.png
delete mode 100644 assets/images/MWall_NM.png
delete mode 100644 assets/images/Ref.png
delete mode 100644 assets/images/Spec.png
delete mode 100644 assets/images/black.tga
delete mode 100644 assets/images/cube.png
delete mode 100644 assets/images/cubelight_Glow.png
delete mode 100644 assets/images/cubelight_spec.png
delete mode 100644 assets/images/default_white.png
delete mode 100644 assets/images/droid.png
delete mode 100644 assets/images/env.png
delete mode 100644 assets/images/femaleRobot.png
delete mode 100644 assets/images/femaleRobot_Glow.png
delete mode 100644 assets/images/lightRack.png
delete mode 100644 assets/images/lightRack_Glow.png
delete mode 100644 assets/images/particle-star.png
delete mode 100644 assets/images/quilt01.png
delete mode 100644 assets/images/quilt01_E.png
delete mode 100644 assets/images/quilt01_N.png
delete mode 100644 assets/images/quilt02.png
delete mode 100644 assets/images/quilt02_E.png
delete mode 100644 assets/images/quilt02_N.png
delete mode 100644 assets/images/white.tga
diff --git a/assets/images/BasePlatformA01_AO.png b/assets/images/BasePlatformA01_AO.png
deleted file mode 100644
index 11f74245..00000000
Binary files a/assets/images/BasePlatformA01_AO.png and /dev/null differ
diff --git a/assets/images/BasePlatformA01_DM.png b/assets/images/BasePlatformA01_DM.png
deleted file mode 100644
index f367ccb7..00000000
Binary files a/assets/images/BasePlatformA01_DM.png and /dev/null differ
diff --git a/assets/images/BoxA01_AO.png b/assets/images/BoxA01_AO.png
deleted file mode 100644
index 60a88883..00000000
Binary files a/assets/images/BoxA01_AO.png and /dev/null differ
diff --git a/assets/images/BoxA01_DM.png b/assets/images/BoxA01_DM.png
deleted file mode 100644
index cc6f6165..00000000
Binary files a/assets/images/BoxA01_DM.png and /dev/null differ
diff --git a/assets/images/Grunge.png b/assets/images/Grunge.png
deleted file mode 100644
index 49ff48e9..00000000
Binary files a/assets/images/Grunge.png and /dev/null differ
diff --git a/assets/images/LabelFrame.tga b/assets/images/LabelFrame.tga
deleted file mode 100644
index 7e3326bd..00000000
Binary files a/assets/images/LabelFrame.tga and /dev/null differ
diff --git a/assets/images/MArmBaseN_DM.png b/assets/images/MArmBaseN_DM.png
deleted file mode 100644
index 6845b555..00000000
Binary files a/assets/images/MArmBaseN_DM.png and /dev/null differ
diff --git a/assets/images/MArmBaseN_NM.png b/assets/images/MArmBaseN_NM.png
deleted file mode 100644
index 5009b0ec..00000000
Binary files a/assets/images/MArmBaseN_NM.png and /dev/null differ
diff --git a/assets/images/MArmTopN_DM.png b/assets/images/MArmTopN_DM.png
deleted file mode 100644
index ef3511b3..00000000
Binary files a/assets/images/MArmTopN_DM.png and /dev/null differ
diff --git a/assets/images/MArmTopN_NM.png b/assets/images/MArmTopN_NM.png
deleted file mode 100644
index 489c92db..00000000
Binary files a/assets/images/MArmTopN_NM.png and /dev/null differ
diff --git a/assets/images/MArm_AO.png b/assets/images/MArm_AO.png
deleted file mode 100644
index be27c8cb..00000000
Binary files a/assets/images/MArm_AO.png and /dev/null differ
diff --git a/assets/images/MBaseWallA01_AO.png b/assets/images/MBaseWallA01_AO.png
deleted file mode 100644
index d68e4209..00000000
Binary files a/assets/images/MBaseWallA01_AO.png and /dev/null differ
diff --git a/assets/images/MBaseWallA01_DM.png b/assets/images/MBaseWallA01_DM.png
deleted file mode 100644
index 02a31e16..00000000
Binary files a/assets/images/MBaseWallA01_DM.png and /dev/null differ
diff --git a/assets/images/MBaseWallA01_GM.png b/assets/images/MBaseWallA01_GM.png
deleted file mode 100644
index 726453ae..00000000
Binary files a/assets/images/MBaseWallA01_GM.png and /dev/null differ
diff --git a/assets/images/MBase_AO.png b/assets/images/MBase_AO.png
deleted file mode 100644
index 12d763da..00000000
Binary files a/assets/images/MBase_AO.png and /dev/null differ
diff --git a/assets/images/MCoreBase_DM.png b/assets/images/MCoreBase_DM.png
deleted file mode 100644
index 4d0ec6dd..00000000
Binary files a/assets/images/MCoreBase_DM.png and /dev/null differ
diff --git a/assets/images/MCoreBase_GM.png b/assets/images/MCoreBase_GM.png
deleted file mode 100644
index 81d464ec..00000000
Binary files a/assets/images/MCoreBase_GM.png and /dev/null differ
diff --git a/assets/images/MEjectorBaseN_DM.png b/assets/images/MEjectorBaseN_DM.png
deleted file mode 100644
index 1832c522..00000000
Binary files a/assets/images/MEjectorBaseN_DM.png and /dev/null differ
diff --git a/assets/images/MEjectorBaseN_NM.png b/assets/images/MEjectorBaseN_NM.png
deleted file mode 100644
index 4f7560d3..00000000
Binary files a/assets/images/MEjectorBaseN_NM.png and /dev/null differ
diff --git a/assets/images/MRingBaseN_DM.png b/assets/images/MRingBaseN_DM.png
deleted file mode 100644
index f8a4aebe..00000000
Binary files a/assets/images/MRingBaseN_DM.png and /dev/null differ
diff --git a/assets/images/MRingBaseN_NM.png b/assets/images/MRingBaseN_NM.png
deleted file mode 100644
index c9242acb..00000000
Binary files a/assets/images/MRingBaseN_NM.png and /dev/null differ
diff --git a/assets/images/MSquareBaseN_DM.png b/assets/images/MSquareBaseN_DM.png
deleted file mode 100644
index 5576eff0..00000000
Binary files a/assets/images/MSquareBaseN_DM.png and /dev/null differ
diff --git a/assets/images/MWall_AO.png b/assets/images/MWall_AO.png
deleted file mode 100644
index e5d5a684..00000000
Binary files a/assets/images/MWall_AO.png and /dev/null differ
diff --git a/assets/images/MWall_DM.png b/assets/images/MWall_DM.png
deleted file mode 100644
index b735de01..00000000
Binary files a/assets/images/MWall_DM.png and /dev/null differ
diff --git a/assets/images/MWall_GM.png b/assets/images/MWall_GM.png
deleted file mode 100644
index 2cd56c3d..00000000
Binary files a/assets/images/MWall_GM.png and /dev/null differ
diff --git a/assets/images/MWall_NM.png b/assets/images/MWall_NM.png
deleted file mode 100644
index 2650bc07..00000000
Binary files a/assets/images/MWall_NM.png and /dev/null differ
diff --git a/assets/images/Ref.png b/assets/images/Ref.png
deleted file mode 100644
index 226e4200..00000000
Binary files a/assets/images/Ref.png and /dev/null differ
diff --git a/assets/images/Spec.png b/assets/images/Spec.png
deleted file mode 100644
index 76658540..00000000
Binary files a/assets/images/Spec.png and /dev/null differ
diff --git a/assets/images/black.tga b/assets/images/black.tga
deleted file mode 100644
index 69124ff0..00000000
Binary files a/assets/images/black.tga and /dev/null differ
diff --git a/assets/images/cube.png b/assets/images/cube.png
deleted file mode 100644
index 6cb3ef82..00000000
Binary files a/assets/images/cube.png and /dev/null differ
diff --git a/assets/images/cubelight_Glow.png b/assets/images/cubelight_Glow.png
deleted file mode 100644
index 4f8c922f..00000000
Binary files a/assets/images/cubelight_Glow.png and /dev/null differ
diff --git a/assets/images/cubelight_spec.png b/assets/images/cubelight_spec.png
deleted file mode 100644
index 5cfe820b..00000000
Binary files a/assets/images/cubelight_spec.png and /dev/null differ
diff --git a/assets/images/default_white.png b/assets/images/default_white.png
deleted file mode 100644
index cca49ba7..00000000
Binary files a/assets/images/default_white.png and /dev/null differ
diff --git a/assets/images/droid.png b/assets/images/droid.png
deleted file mode 100644
index 9cba133e..00000000
Binary files a/assets/images/droid.png and /dev/null differ
diff --git a/assets/images/env.png b/assets/images/env.png
deleted file mode 100644
index 72bba813..00000000
Binary files a/assets/images/env.png and /dev/null differ
diff --git a/assets/images/femaleRobot.png b/assets/images/femaleRobot.png
deleted file mode 100644
index 30b153b4..00000000
Binary files a/assets/images/femaleRobot.png and /dev/null differ
diff --git a/assets/images/femaleRobot_Glow.png b/assets/images/femaleRobot_Glow.png
deleted file mode 100644
index 1141f521..00000000
Binary files a/assets/images/femaleRobot_Glow.png and /dev/null differ
diff --git a/assets/images/lightRack.png b/assets/images/lightRack.png
deleted file mode 100644
index 30b153b4..00000000
Binary files a/assets/images/lightRack.png and /dev/null differ
diff --git a/assets/images/lightRack_Glow.png b/assets/images/lightRack_Glow.png
deleted file mode 100644
index 30b153b4..00000000
Binary files a/assets/images/lightRack_Glow.png and /dev/null differ
diff --git a/assets/images/metal.png b/assets/images/metal.png
index d753bec4..ab36aaac 100644
Binary files a/assets/images/metal.png and b/assets/images/metal.png differ
diff --git a/assets/images/particle-star.png b/assets/images/particle-star.png
deleted file mode 100644
index 7da25295..00000000
Binary files a/assets/images/particle-star.png and /dev/null differ
diff --git a/assets/images/quilt01.png b/assets/images/quilt01.png
deleted file mode 100644
index 9c14865f..00000000
Binary files a/assets/images/quilt01.png and /dev/null differ
diff --git a/assets/images/quilt01_E.png b/assets/images/quilt01_E.png
deleted file mode 100644
index 2dbafd27..00000000
Binary files a/assets/images/quilt01_E.png and /dev/null differ
diff --git a/assets/images/quilt01_N.png b/assets/images/quilt01_N.png
deleted file mode 100644
index 801cd09d..00000000
Binary files a/assets/images/quilt01_N.png and /dev/null differ
diff --git a/assets/images/quilt02.png b/assets/images/quilt02.png
deleted file mode 100644
index 4b1bf2ed..00000000
Binary files a/assets/images/quilt02.png and /dev/null differ
diff --git a/assets/images/quilt02_E.png b/assets/images/quilt02_E.png
deleted file mode 100644
index 2dbafd27..00000000
Binary files a/assets/images/quilt02_E.png and /dev/null differ
diff --git a/assets/images/quilt02_N.png b/assets/images/quilt02_N.png
deleted file mode 100644
index 136d1008..00000000
Binary files a/assets/images/quilt02_N.png and /dev/null differ
diff --git a/assets/images/white.tga b/assets/images/white.tga
deleted file mode 100644
index a40a0a2b..00000000
Binary files a/assets/images/white.tga and /dev/null differ
--
cgit v1.2.3
From 2f61dfca4466661e1ea23888675a86b601b58c63 Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Mon, 30 Jan 2012 14:35:11 -0800
Subject: Setting up new file
Adding base functionality to creating files.
---
js/io/system/coreioapi.js | 64 ++++++++++++------
js/io/system/fileio.js | 169 +++++++++++++++++++++++++++++++++++-----------
2 files changed, 175 insertions(+), 58 deletions(-)
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index 1585fc33..a10063f5 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -7,7 +7,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
/* /////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
NOTES:
-These methods should only be access through the file and project IO classes.
////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////// */
var Montage = require("montage/core/core").Montage,
@@ -20,22 +19,29 @@ exports.CoreIoApi = Montage.create(Component, {
deserializedFromTemplate: {
enumerable: false,
value: function () {
- ////////////////////////////////////////////////////////////
-
- //TODO: Add logic for getting rooUrl from local storage
-
- ////////////////////////////////////////////////////////////
-
-
-
- //Checking for status of I/O API
- this.ioDetected = this.isActive();
- //TODO: Add welcome screen logic, probably externally
+ //Checking for local storage of URL for IO
+ if (window.localStorage['ioRootUrl']) {
+ //Getting URL from local storage
+ this.rootUrl = window.localStorage['ioRootUrl'];
+ //Checks for IO API to be active
+ this.ioServiceDetected = this.isIoServiceActive();
+ //
+ console.log('FileIO: localStorage URL detected | IO Service Detected: '+ this.ioServiceDetected);
+ //
+ } else {
+ //TODO: Remove, automatically prompt user on welcome
+ this.rootUrl = 'http://localhost:16380';
+ //TODO: Changed to false, welcome screen prompts user
+ this.ioServiceDetected = this.isIoServiceActive();
+ //
+ console.log('FileIO: localStorage URL NOT detected | IO Service Detected: '+ this.ioServiceDetected);
+ //
+ }
}
},
////////////////////////////////////////////////////////////////////
//Method to check status of I/O API, will return false if not active
- isActive: {
+ isIoServiceActive: {
enumerable: false,
value: function () {
//Doing a directory root check, a 200 status means running
@@ -47,27 +53,27 @@ exports.CoreIoApi = Montage.create(Component, {
}
},
////////////////////////////////////////////////////////////////////
- //Root API URL
- _ioDetected: {
+ //
+ _ioServiceDetected: {
enumerable: false,
value: false
},
////////////////////////////////////////////////////////////////////
- //
- ioDetected: {
+ //Checking for service availability on boot
+ ioServiceDetected: {
enumerable: false,
get: function() {
- return this._ioDetected;
+ return this._ioServiceDetected;
},
set: function(value) {
- this._ioDetected = value;
+ this._ioServiceDetected = value;
}
},
////////////////////////////////////////////////////////////////////
//Root API URL
_rootUrl: {
enumerable: false,
- value: 'http://localhost:16380'
+ value: null
},
////////////////////////////////////////////////////////////////////
//
@@ -78,6 +84,24 @@ exports.CoreIoApi = Montage.create(Component, {
},
set: function(value) {
this._rootUrl = value;
+ window.localStorage["ioRootUrl"] = value;
+ }
+ },
+ ////////////////////////////////////////////////////////////////////
+ //API service URL
+ _apiServiceURL: {
+ enumerable: false,
+ value: '/'
+ },
+ ////////////////////////////////////////////////////////////////////
+ //
+ apiServiceURL: {
+ enumerable: false,
+ get: function() {
+ return this.rootUrl+this._apiServiceURL;
+ },
+ set: function(value) {
+ this._apiServiceURL = value;
}
},
////////////////////////////////////////////////////////////////////
diff --git a/js/io/system/fileio.js b/js/io/system/fileio.js
index 1d76a91b..b3158a68 100755
--- a/js/io/system/fileio.js
+++ b/js/io/system/fileio.js
@@ -3,22 +3,139 @@ This file contains proprietary software owned by Motorola Mobility, Inc.
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
*/
+/* /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////
+NOTES:
-//Required modules
-var Serializer = require("montage/core/serializer").Serializer;
+ For newFile, only the 'uri' is required, if contents is empty, such
+ empty file will be created. 'contents' should be a string to be saved
+ as the file. 'contentType' is the mime type of the file.
+
+////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////// */
+//
+var Montage = require("montage/core/core").Montage,
+ CoreIoApi = require("js/io/system/coreioapi").CoreIoApi;
+////////////////////////////////////////////////////////////////////////
//Exporting as File I/O
-exports.FileIo = (require("montage/core/core").Montage).create(Object.prototype, {
- /*
-create: {
- enumerable: true,
- value: function (type) {
- //
- }
- },
-*/
+exports.FileIo = Montage.create(Object.prototype, {
////////////////////////////////////////////////////////////////////
- //
- open: {
+ //newFile Object (*required): {uri*, contents, contentType}
+ //Return codes
+ // 204: File exists | 400: File exists | 404: File does not exists
+ // 201: File succesfully created | 500: Unknown | undefined: Unknown
+ newFile: {
+ enumerable: true,
+ value: function(file) {
+ //Checking for API to be available
+ if (!CoreIoApi.isIoServiceActive()) {
+ //API not available, no IO action taken
+ return null;
+ }
+ //Peforming check for file to exist
+ var check = CoreIoApi.fileExists(file.uri), status, create;
+ //Upon successful check, handling results
+ if (check.success) {
+ //Handling status of check
+ switch (check.status) {
+ case 204:
+ //Storing status to be returned (for UI handling)
+ status = check.status;
+ break;
+ case 404:
+ //File does not exists, ready to be created
+ create = CoreIoApi.createFile(file);
+ //Storing status to be returned (for UI handling)
+ if (create.success) {
+ status = check.status;
+ }
+ break;
+ default:
+ //Unknown Error
+ break;
+ }
+ } else {
+ //Unknown Error
+ }
+ //Returning resulting code
+ return status;
+ }
+ },
+ readFile: {
+ enumerable: true,
+ value: function() {
+ //
+ }
+ },
+ saveFile: {
+ enumerable: true,
+ value: function() {
+ //
+ }
+ },
+ copyFile: {
+ enumerable: true,
+ value: function() {
+ //
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /*
+open: {
enumerable: true,
value: function(doc, type, uri, server) {
//
@@ -70,32 +187,7 @@ create: {
enumerable: true,
value: function(type, id, components) {
- /*
-
- GETS HTML IN LOADED DOCUMENT
- document.getElementById('userDocument').contentDocument.documentElement.outerHTML
-
- GETS HTML IN