Commit 048b4d7789b2c7765ea87c50dfdc28ed81597231
1 parent
d18b535d
Exists in
master
and in
112 other branches
catalogs +
Showing
3 changed files
with
26 additions
and
17 deletions
Show diff stats
js/app/views/CatalogUI.js
... | ... | @@ -19,6 +19,13 @@ Ext.define('amdaUI.CatalogUI', { |
19 | 19 | if (this.object) this.loadObject(); |
20 | 20 | }, |
21 | 21 | |
22 | + setObject : function (object) { | |
23 | + // set object | |
24 | + this.object = object; | |
25 | + | |
26 | + // load object into view | |
27 | + this.loadObject(); | |
28 | + }, | |
22 | 29 | |
23 | 30 | /** |
24 | 31 | * set params description into this.object |
... | ... | @@ -184,16 +191,16 @@ Ext.define('amdaUI.CatalogUI', { |
184 | 191 | } |
185 | 192 | else |
186 | 193 | { |
187 | - var typeTT = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.tt.id).linkedNode.data.nodeType; | |
194 | + var typeTT = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id).linkedNode.data.nodeType; | |
188 | 195 | if (this.object.get('id') == '') |
189 | 196 | { |
190 | 197 | //Init empty cache |
191 | - //AmdaAction.initTTCache(onAfterInit); | |
198 | + AmdaAction.initTTCache(this.isCatalog, onAfterInit); | |
192 | 199 | } |
193 | 200 | else |
194 | 201 | { |
195 | 202 | //From existing TT file |
196 | - //AmdaAction.initTTCacheFromTT(this.object.get('id'), typeTT, onAfterInit); | |
203 | + AmdaAction.initTTCacheFromTT(this.object.get('id'), 'catalog', onAfterInit); | |
197 | 204 | } |
198 | 205 | } |
199 | 206 | }, |
... | ... |
php/classes/AmdaAction.php
... | ... | @@ -603,6 +603,9 @@ class AmdaAction { |
603 | 603 | case 'timeTable' : |
604 | 604 | case 'sharedtimeTable' : |
605 | 605 | $objectMgr = new TimeTableMgr(); |
606 | + break; | |
607 | + case 'catalog' : | |
608 | + $objectMgr = new CatalogMgr(); | |
606 | 609 | break; |
607 | 610 | case 'condition' : |
608 | 611 | case 'request' : |
... | ... | @@ -940,27 +943,26 @@ class AmdaAction { |
940 | 943 | |
941 | 944 | return $result; |
942 | 945 | } |
943 | - public function initTTCache() | |
946 | + | |
947 | + public function initTTCache($isCatalog = false) | |
944 | 948 | { |
945 | - $cacheMgr = new TimeTableCacheMgr(); | |
949 | + if (!$isCatalog) $cacheMgr = new TimeTableCacheMgr(); | |
950 | + else $cacheMgr = new CatalogCacheMgr(); | |
951 | + | |
946 | 952 | return $cacheMgr->initTTCache(); |
947 | 953 | } |
948 | 954 | |
949 | -// public function initCatalogGridFromTmpObject($folderId, $name) | |
950 | -// { | |
951 | -// $objMgr = new CatalogMgr(); | |
952 | -// return $objMgr->initCatalogGridFromTmpObject($folderId, $name); | |
953 | -// } | |
954 | 955 | |
955 | 956 | public function initTTCacheFromTT($id, $type) |
956 | 957 | { |
957 | - $cacheMgr = new TimeTableCacheMgr(); | |
958 | + if ($type == 'catalog') $cacheMgr = new CatalogCacheMgr(); | |
959 | + else $cacheMgr = new TimeTableCacheMgr(); | |
960 | + | |
958 | 961 | return $cacheMgr->initFromTT($id, $type); |
959 | 962 | } |
960 | 963 | |
961 | 964 | public function initTTCacheFromTmpObject($folderId, $name, $isCatalog = false) |
962 | 965 | { |
963 | - error_reporting(E_ERROR | E_WARNING | E_PARSE); | |
964 | 966 | if (!$isCatalog) $cacheMgr = new TimeTableCacheMgr(); |
965 | 967 | |
966 | 968 | else $cacheMgr = new CatalogCacheMgr(); |
... | ... |
php/config.php
... | ... | @@ -268,18 +268,18 @@ $API = array( |
268 | 268 | ), |
269 | 269 | 'loadTTIntervals'=>array( |
270 | 270 | 'len'=>1 |
271 | + ), | |
272 | + 'saveTTCacheIntervalsInTT'=>array( | |
273 | + 'len'=>1 | |
271 | 274 | ), |
272 | - 'saveTTCacheIntervalsInTT'=>array( | |
273 | - 'len'=>1 | |
274 | - ), | |
275 | 275 | 'initTTCache' => array ( |
276 | - 'len'=>0 | |
276 | + 'len'=>1 | |
277 | 277 | ) , |
278 | 278 | 'initTTCacheFromTT' => array( |
279 | 279 | 'len'=>2 |
280 | 280 | ), |
281 | 281 | 'initTTCacheFromTmpObject' => array( |
282 | - 'len'=>2 | |
282 | + 'len'=>3 | |
283 | 283 | ), |
284 | 284 | 'initTTCacheFromUploadedFile' => array( |
285 | 285 | 'len'=>2 |
... | ... |