aboutsummaryrefslogtreecommitdiff
path: root/js/io
diff options
context:
space:
mode:
authorAnanya Sen2012-07-23 17:01:14 -0700
committerAnanya Sen2012-07-23 17:01:14 -0700
commit48d9ed19573a07c68da305d14ca6ab3a04d31d64 (patch)
treeb4bf6c48c7fdade2cf531d84cac3359489d38405 /js/io
parentc07a7a9d11bc8299fa9686544b18840cc8e640c2 (diff)
parentafc7ad4f240fdf7890a79c2d4d7f8eb2e7c30a34 (diff)
downloadninja-48d9ed19573a07c68da305d14ca6ab3a04d31d64.tar.gz
Merge branch 'refs/heads/Jose-Document' into Document
Diffstat (limited to 'js/io')
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/io/ui/cloudpopup.reel/cloudpopup.js14
2 files changed, 13 insertions, 3 deletions
diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json
index bbf53144..6b74b04f 100644
--- a/js/io/system/ninjalibrary.json
+++ b/js/io/system/ninjalibrary.json
@@ -1,6 +1,6 @@
1{ 1{
2 "libraries": [ 2 "libraries": [
3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.11.2.1"}, 3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.11.2.1"},
4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.6.0.4"} 4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.6.0.5"}
5 ] 5 ]
6} \ No newline at end of file 6} \ No newline at end of file
diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js
index 200eb703..914b2105 100755
--- a/js/io/ui/cloudpopup.reel/cloudpopup.js
+++ b/js/io/ui/cloudpopup.reel/cloudpopup.js
@@ -117,11 +117,21 @@ exports.CloudPopup = Montage.create(Component, {
117 downloadCloudApp: { 117 downloadCloudApp: {
118 enumerable: false, 118 enumerable: false,
119 value: function() { 119 value: function() {
120 //Creating an empty anchor to link to download file
121 var link = document.createElement('a'), evt = document.createEvent("MouseEvents");
122 link.download = 'Ninja-Local-Cloud';
123 this.element.appendChild(link);
124 //Creating a fake click event to init file download
125 evt.initMouseEvent("click", true, true, window, 1, 0, 0, 0, 0,false, false, false, false, 0, null);
126 //Setting proper download file based on OS
120 if(this._os === 'mac') { 127 if(this._os === 'mac') {
121 location.href = '/ninja_localcloud_for_mac.zip'; 128 link.href = '/ninja_localcloud_for_mac.zip';
129 link.dispatchEvent(evt);
122 } else if (this._os === 'windows') { 130 } else if (this._os === 'windows') {
123 location.href = '/ninja_localcloud_for_windows.zip'; 131 link.href = '/ninja_localcloud_for_windows.zip';
132 link.dispatchEvent(evt);
124 } else { 133 } else {
134 //Alerting user their OS is not supported
125 alert('Your operating system is not supported by the Ninja Local Cloud App.'); 135 alert('Your operating system is not supported by the Ninja Local Cloud App.');
126 } 136 }
127 } 137 }