BUG 8953 Menu para importar plugins desaparece cuando se importa un archivo...

- Al mostrar el mensaje de error se estaba usando simplemente un formulario normal
- Se cambio el comportamiento cuando existen errores al importar un plugin, se esta redireccionando de nuevo al listado de plugins disponibles y se muestra un mensaje en ExtJS con el error
This commit is contained in:
Julio Cesar Laura
2012-04-19 09:37:10 -04:00
parent 1328dbfec2
commit 6b83af23fe
3 changed files with 47 additions and 46 deletions

View File

@@ -157,9 +157,8 @@ try {
G::header("Location: pluginsMain");
die;
}
catch ( Exception $e ){
$G_PUBLISH = new Publisher;
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage('publishBlank', 'blank');
catch (Exception $e) {
$_SESSION['__PLUGIN_ERROR__'] = $e->getMessage();
G::header('Location: pluginsMain');
die();
}

View File

@@ -23,20 +23,18 @@
*
*/
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('setup/pluginsMain', false ); //adding a javascript file .js
//$oHeadPublisher->addContent('setup/main'); //adding a html file .html.
$translations = G::getTranslations(Array(
'ID_CONFIGURE', 'ID_STATUS', 'ID_DELETE', 'ID_IMPORT', 'ID_SELECT',
'ID_STATUS', 'ID_ACTIVATE', 'ID_DEACTIVATE',
'ID_SELECT', 'ID_NO_SELECTION_WARNING', 'ID_MSG_REMOVE_PLUGIN',
'ID_TITLE', 'ID_VERSION', 'ID_STATUS', 'ID_TITLE', 'ID_VERSION', 'ID_DESCRIPTION',
'ID_STATUS', 'ID_PLUGIN_CANT_DELETE', 'ID_XPDL_IMPORT', 'ID_DISABLE', 'ID_ENABLE', 'ID_CONFIRM'
));
$oHeadPublisher->assign('TRANSLATIONS', $translations);
G::RenderPage('publish', 'extJs');
$headPublisher =& headPublisher::getSingleton();
$headPublisher->addExtJsScript('setup/pluginsMain', false);
$translations = G::getTranslations(array(
'ID_CONFIGURE', 'ID_STATUS', 'ID_DELETE', 'ID_IMPORT', 'ID_SELECT',
'ID_STATUS', 'ID_ACTIVATE', 'ID_DEACTIVATE', 'ID_PLUGINS',
'ID_SELECT', 'ID_NO_SELECTION_WARNING', 'ID_MSG_REMOVE_PLUGIN',
'ID_TITLE', 'ID_VERSION', 'ID_STATUS', 'ID_TITLE', 'ID_VERSION', 'ID_DESCRIPTION',
'ID_STATUS', 'ID_PLUGIN_CANT_DELETE', 'ID_XPDL_IMPORT', 'ID_DISABLE', 'ID_ENABLE', 'ID_CONFIRM'
));
$headPublisher->assign('TRANSLATIONS', $translations);
if (isset($_SESSION['__PLUGIN_ERROR__'])) {
$headPublisher->assign('__PLUGIN_ERROR__', $_SESSION['__PLUGIN_ERROR__']);
unset($_SESSION['__PLUGIN_ERROR__']);
}
G::RenderPage('publish', 'extJs');

View File

@@ -178,6 +178,10 @@ Ext.onReady(function(){
autoScroll: true,
items: [Grid]
});
if (typeof(__PLUGIN_ERROR__) !== 'undefined') {
PMExt.notify(_('ID_PLUGINS'), __PLUGIN_ERROR__);
}
});