diff options
Diffstat (limited to 'js/io/system')
-rwxr-xr-x | js/io/system/coreioapi.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 4407d59a..6b803f22 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js | |||
@@ -47,7 +47,7 @@ exports.CoreIoApi = Montage.create(Component, { | |||
47 | return true; | 47 | return true; |
48 | } else { | 48 | } else { |
49 | //Inactive | 49 | //Inactive |
50 | if (!this._cloudDialogOpen || this.application.ninja) { | 50 | if (!this._cloudDialogOpen && this.application.ninja) { |
51 | this.showCloudDialog(); | 51 | this.showCloudDialog(); |
52 | } | 52 | } |
53 | return false; | 53 | return false; |
@@ -72,10 +72,12 @@ exports.CoreIoApi = Montage.create(Component, { | |||
72 | enumerable: false, | 72 | enumerable: false, |
73 | value: function () { | 73 | value: function () { |
74 | // | 74 | // |
75 | this._cloudDialogOpen = true; | ||
76 | // | ||
75 | this._cloudDialogComponents.blackout = document.createElement('div'); | 77 | this._cloudDialogComponents.blackout = document.createElement('div'); |
76 | this._cloudDialogComponents.blackout.style.width = '100%'; | 78 | this._cloudDialogComponents.blackout.style.width = '100%'; |
77 | this._cloudDialogComponents.blackout.style.height = '100%'; | 79 | this._cloudDialogComponents.blackout.style.height = '100%'; |
78 | this._cloudDialogComponents.blackout.style.background = 'rgba(0, 0, 0, .6)'; | 80 | this._cloudDialogComponents.blackout.style.background = '-webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,.65) 0%, rgba(0,0,0,0.8) 80%)'; |
79 | this.application.ninja.popupManager.addPopup(this._cloudDialogComponents.blackout); | 81 | this.application.ninja.popupManager.addPopup(this._cloudDialogComponents.blackout); |
80 | // | 82 | // |
81 | //////////////////////////////////////////////////// | 83 | //////////////////////////////////////////////////// |
@@ -93,28 +95,31 @@ exports.CoreIoApi = Montage.create(Component, { | |||
93 | this._cloudDialogComponents.dialog.addEventListener('firstDraw', this, false); | 95 | this._cloudDialogComponents.dialog.addEventListener('firstDraw', this, false); |
94 | } | 96 | } |
95 | }, | 97 | }, |
96 | 98 | //////////////////////////////////////////////////////////////////// | |
99 | // | ||
97 | handleFirstDraw: { | 100 | handleFirstDraw: { |
98 | value: function (e) { | 101 | value: function (e) { |
99 | if (e._target._element.className === 'cloud_popup') { | 102 | if (e._target._element.className === 'cloud_popup') { |
100 | this._cloudDialogComponents.dialog.removeEventListener('firstDraw', this, false); | 103 | this._cloudDialogComponents.dialog.removeEventListener('firstDraw', this, false); |
101 | // | 104 | // |
102 | this._cloudDialogComponents.popup = this.application.ninja.popupManager.createPopup(this._cloudDialogComponents.dialog.element, {x: '200px', y: '200px'}); | 105 | this._cloudDialogComponents.popup = this.application.ninja.popupManager.createPopup(this._cloudDialogComponents.dialog.element, {x: '50%', y: '50%'}); |
103 | this._cloudDialogComponents.popup.addEventListener('firstDraw', this, false); | 106 | this._cloudDialogComponents.popup.addEventListener('firstDraw', this, false); |
104 | } else { | 107 | } else { |
105 | // | 108 | // |
106 | this._cloudDialogComponents.dialog.element.style.opacity = 1; | 109 | this._cloudDialogComponents.dialog.element.style.opacity = 1; |
107 | this._cloudDialogComponents.popup.element.style.opacity = 1; | 110 | this._cloudDialogComponents.popup.element.style.opacity = 1; |
111 | this._cloudDialogComponents.popup.element.style.margin = '-100px 0px 0px -190px'; | ||
108 | } | 112 | } |
109 | } | 113 | } |
110 | }, | 114 | }, |
111 | |||
112 | |||
113 | //////////////////////////////////////////////////////////////////// | 115 | //////////////////////////////////////////////////////////////////// |
114 | // | 116 | // |
115 | hideCloudDialog: { | 117 | hideCloudDialog: { |
116 | enumerable: false, | 118 | enumerable: false, |
117 | value: function () { | 119 | value: function () { |
120 | // | ||
121 | this.application.ninja.popupManager.removePopup(this._cloudDialogComponents.blackout); | ||
122 | this.application.ninja.popupManager.removePopup(this._cloudDialogComponents.popup.element); | ||
118 | } | 123 | } |
119 | }, | 124 | }, |
120 | //////////////////////////////////////////////////////////////////// | 125 | //////////////////////////////////////////////////////////////////// |