Commit 73beb15b2aa49ca9713bed8aba225dc86bfcece1
1 parent
6d3c8804
Exists in
master
and in
52 other branches
#10178 First Step
Showing
1 changed file
with
36 additions
and
7 deletions
Show diff stats
js/app/views/TimeSelectorUI.js
... | ... | @@ -159,7 +159,9 @@ Ext.define('amdaUI.TimeSelectorUI', { |
159 | 159 | notifyOver : function(ddSource, e, data) |
160 | 160 | { |
161 | 161 | if ((data.records[0].get('globalStart') != null) && (data.records[0].get('globalStop') != null) |
162 | - && data.records[0].get('globalStart') != 'depending on mission' && data.records[0].get('isParameter')) | |
162 | + && data.records[0].get('globalStart') != 'depending on mission' && data.records[0].get('isParameter') | |
163 | + || data.records[0].get('nodeType') == 'timeTable' || data.records[0].get('nodeType') == 'sharedtimeTable' | |
164 | + || data.records[0].get('nodeType') == 'catalog' || data.records[0].get('nodeType') == 'sharedcatalog' ) | |
163 | 165 | // if ((data.records[0].get('nodeType') == 'myDataParam' || data.records[0].get('nodeType') == 'localParam') |
164 | 166 | // && data.records[0].get('isParameter')) |
165 | 167 | { |
... | ... | @@ -172,17 +174,44 @@ Ext.define('amdaUI.TimeSelectorUI', { |
172 | 174 | notifyDrop : function(ddSource, e, data) |
173 | 175 | { |
174 | 176 | if (!this.valid) return false; |
175 | - | |
177 | + | |
176 | 178 | var explorerModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.explorer.id); |
177 | 179 | if (!explorerModule) |
178 | 180 | return false; |
179 | 181 | var targetModuleId = explorerModule.getPinedModule(); |
180 | 182 | var targetModule = myDesktopApp.getLoadedModule(targetModuleId); |
181 | - | |
182 | - targetModule.getUiContent().setTimeFromData({ start : data.records[0].get('globalStart'), | |
183 | - stop : data.records[0].get('globalStop')}); | |
184 | - me.updateDuration(); | |
185 | - return true; | |
183 | + | |
184 | + var surveyStart = ""; | |
185 | + var surveyStop = ""; | |
186 | + | |
187 | + if( !data.records[0].get('isParameter') && data.records[0].get('nodeType') == 'timeTable' | |
188 | + || data.records[0].get('nodeType') == 'sharedtimeTable'|| data.records[0].get('nodeType') == 'catalog' | |
189 | + || data.records[0].get('nodeType') == 'sharedcatalog') | |
190 | + { | |
191 | + AmdaAction.getObject(data.records[0].get('id'), data.records[0].get('nodeType'), function (result, remoteEvent) { | |
192 | + surveyStart = result['surveyStart']; | |
193 | + surveyStop = result['surveyStop']; | |
194 | + if(surveyStart.substring(19,23) == "" && surveyStop.substring(19,23) == "") | |
195 | + { | |
196 | + surveyStart += '.000Z'; | |
197 | + surveyStop += ".000Z"; | |
198 | + } | |
199 | + surveyStart = '2008/01/01 01:00:00.000'; | |
200 | + surveyStop = '2008/01/02 01:00:00.000'; | |
201 | + console.log(surveyStart + " " + surveyStop); | |
202 | + targetModule.getUiContent().setTimeFromData({ start : surveyStart, stop : surveyStop}); | |
203 | + }, this); | |
204 | + return true; | |
205 | + } | |
206 | + else{ | |
207 | + console.log(data.records[0].get('globalStart')); | |
208 | + | |
209 | + targetModule.getUiContent().setTimeFromData({ start : data.records[0].get('globalStart'), | |
210 | + stop : data.records[0].get('globalStop')}); | |
211 | + me.updateDuration(); | |
212 | + return true; | |
213 | + | |
214 | + } | |
186 | 215 | } |
187 | 216 | }); |
188 | 217 | } |
... | ... |