1 /***************************************************************
4 * (c) 2010 Steffen Kamper <info@sk-typo3.de>
7 * This script is part of the TYPO3 project. The TYPO3 project is
8 * free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * The GNU General Public License can be found at
14 * http://www.gnu.org/copyleft/gpl.html.
16 * This script is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * This copyright notice MUST APPEAR in all copies of the script!
22 ***************************************************************/
25 * ExtJS for the extension manager.
28 * @author Steffen Kamper <info@sk-typo3.de>
30 * @subpackage extension manager
34 TYPO3
.EM
.Tools = function() {
36 displayLocalExtension: function(extKey
, reload
) {
37 localStore
= Ext
.StoreMgr
.get('localstore');
38 // select local extension list
39 Ext
.getCmp('em-main').setActiveTab(0);
40 if (reload
=== true) {
41 TYPO3
.EM
.Filters
.clearFilters();
42 localStore
.showAction
= extKey
;
43 var search
= Ext
.getCmp('localSearchField');
44 search
.setValue(extKey
);
45 search
.refreshTrigger();
50 uploadExtension: function() {
51 if (Ext
.isObject(TYPO3
.EM
.ExtensionUploadWindowInstance
)) {
52 TYPO3
.EM
.ExtensionUploadWindowInstance
.show();
54 TYPO3
.EM
.ExtensionUploadWindowInstance
= new TYPO3
.EM
.ExtensionUploadWindow().show();
58 renderExtensionTitle: function(record
) {
59 var description
= record
.data
.description
;
60 var value
= record
.data
.title
;
64 if (record
.data
.reviewstate
< 0) {
65 description
+= '<br><br><strong>' + TYPO3
.l10n
.localize('insecureExtension') + '</strong>';
67 return record
.data
.icon
+ ' ' + value
+ ' (v' + record
.data
.version
+ ')';
70 closeImportWindow: function() {
71 TYPO3
.EM
.ImportWindow
.close();
74 refreshMenu: function(record
, installAction
) {
75 if (installAction
== 'import') {
76 Ext
.StoreMgr
.get('repositoryliststore').getById(record
.extkey
).set('exists', 1);
77 TYPO3
.EM
.Tools
.displayLocalExtension(record
.extkey
, true);
79 if (top
.TYPO3ModuleMenu
&& installAction
== 'install') {
80 top
.TYPO3ModuleMenu
.refreshMenu();