Commit 278185de86ed85255e9ae3ddeb5ce3b01cbf191e
1 parent
53048303
Exists in
master
and in
100 other branches
Upload catalog from ASCII format (#6503)
Showing
3 changed files
with
15 additions
and
25 deletions
Show diff stats
js/app/views/UploadPanelUI.js
... | ... | @@ -70,9 +70,14 @@ Ext.define('amdaUI.UploadPanelUI', { |
70 | 70 | } |
71 | 71 | }); |
72 | 72 | } |
73 | - else { | |
73 | + else { | |
74 | 74 | // EXCEPTION : parameter not found ! |
75 | - myDesktopApp.errorMsg(t.action + "." + t.method + " : No parameter '"+this.tmpNode.get('text')+"' found!"); | |
75 | + if (result.error) { | |
76 | + myDesktopApp.errorMsg(result.error); | |
77 | + } | |
78 | + else { | |
79 | + myDesktopApp.errorMsg(t.action + "." + t.method + " : No parameter '"+this.tmpNode.get('text')+"' found!"); | |
80 | + } | |
76 | 81 | } |
77 | 82 | |
78 | 83 | loadMask.hide(); |
... | ... | @@ -443,38 +448,22 @@ Ext.define('amdaUI.UploadPanelUI', { |
443 | 448 | this.nodeType = 'amdaModel.TimeTableNode'; |
444 | 449 | |
445 | 450 | this.store = Ext.create('Ext.data.Store', { |
446 | - fields: ['value', 'name']/*, | |
447 | - proxy: { | |
448 | - type: 'ajax', | |
449 | - url : 'generic_data/remote_sites.json', | |
450 | - reader: { | |
451 | - type: 'json', | |
452 | - root: 'remote_sites' | |
453 | - } | |
454 | - }, | |
455 | - autoLoad: true*/ | |
451 | + fields: ['value', 'name'] | |
456 | 452 | }); |
457 | 453 | |
458 | 454 | this.radioId = 'ttfrmt'; |
459 | 455 | } |
460 | 456 | else { |
461 | 457 | this.formats = [ |
462 | - { boxLabel: 'VOTable', name: 'catfrmt', inputValue: 'VOT', checked: true }]; | |
458 | + { boxLabel: 'ASCII <img amda_clicktip="ttTimeFormat" style="vertical-align:bottom" src="js/resources/images/16x16/info_mini.png"', name: 'catfrmt', inputValue: 'ASCII', checked: true}, | |
459 | + { boxLabel: 'VOTable', name: 'catfrmt', inputValue: 'VOT'} | |
460 | + ]; | |
463 | 461 | |
464 | 462 | this.localUploadId = 'form-uploadcat'; |
465 | 463 | this.remoteUploadId = 'form-uploadcaturl'; |
466 | 464 | this.nodeType = 'amdaModel.CatalogNode'; |
467 | 465 | this.store = Ext.create('Ext.data.Store', { |
468 | - fields: ['value', 'name']/*, | |
469 | - proxy: { | |
470 | - type: 'ajax', | |
471 | - url : 'generic_data/remote_sites.json', | |
472 | - reader: { | |
473 | - type: 'json', | |
474 | - root: 'remote_sites' | |
475 | - } | |
476 | - }, | |
477 | - autoLoad: true*/ | |
466 | + fields: ['value', 'name'] | |
478 | 467 | }); |
479 | 468 | |
480 | 469 | this.radioId = 'catfrmt'; |
... | ... |
php/classes/AmdaAction.php
php/classes/CatalogMgr.php
... | ... | @@ -223,14 +223,14 @@ class CatalogMgr extends TimeTableMgr |
223 | 223 | |
224 | 224 | public function getUploadedObject($name, $format, $onlyDescription = false) |
225 | 225 | { |
226 | - /*$result = parent::getUploadedObject($name, $format, $onlyDescription); | |
226 | + $result = parent::getUploadedObject($name, $format, $onlyDescription); | |
227 | 227 | if (!isset($result['success']) || !$result['success']) { |
228 | 228 | |
229 | 229 | return array('success' => FALSE, 'error' => 'Error to retrieve catalog info'); |
230 | 230 | } |
231 | 231 | |
232 | 232 | |
233 | - return $result + array('parameters' => $this->getCatalogParamDescription(array('folder' => $folderId, 'name' => $name));*/ | |
233 | + return $result + array('parameters' => $this->getCatalogParamDescription(array('folder' => USERTEMPDIR, 'name' => $name))); | |
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
... | ... |