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"); G::header("Location: pluginsMain");
die; die;
} }
catch ( Exception $e ){ catch (Exception $e) {
$G_PUBLISH = new Publisher; $_SESSION['__PLUGIN_ERROR__'] = $e->getMessage();
$aMessage['MESSAGE'] = $e->getMessage(); G::header('Location: pluginsMain');
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage ); die();
G::RenderPage('publishBlank', 'blank');
} }

View File

@@ -23,20 +23,18 @@
* *
*/ */
$oHeadPublisher =& headPublisher::getSingleton(); $headPublisher =& headPublisher::getSingleton();
$headPublisher->addExtJsScript('setup/pluginsMain', false);
$oHeadPublisher->addExtJsScript('setup/pluginsMain', false ); //adding a javascript file .js $translations = G::getTranslations(array(
//$oHeadPublisher->addContent('setup/main'); //adding a html file .html.
$translations = G::getTranslations(Array(
'ID_CONFIGURE', 'ID_STATUS', 'ID_DELETE', 'ID_IMPORT', 'ID_SELECT', 'ID_CONFIGURE', 'ID_STATUS', 'ID_DELETE', 'ID_IMPORT', 'ID_SELECT',
'ID_STATUS', 'ID_ACTIVATE', 'ID_DEACTIVATE', 'ID_STATUS', 'ID_ACTIVATE', 'ID_DEACTIVATE', 'ID_PLUGINS',
'ID_SELECT', 'ID_NO_SELECTION_WARNING', 'ID_MSG_REMOVE_PLUGIN', 'ID_SELECT', 'ID_NO_SELECTION_WARNING', 'ID_MSG_REMOVE_PLUGIN',
'ID_TITLE', 'ID_VERSION', 'ID_STATUS', 'ID_TITLE', 'ID_VERSION', 'ID_DESCRIPTION', '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' 'ID_STATUS', 'ID_PLUGIN_CANT_DELETE', 'ID_XPDL_IMPORT', 'ID_DISABLE', 'ID_ENABLE', 'ID_CONFIRM'
)); ));
$oHeadPublisher->assign('TRANSLATIONS', $translations); $headPublisher->assign('TRANSLATIONS', $translations);
G::RenderPage('publish', 'extJs'); 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, autoScroll: true,
items: [Grid] items: [Grid]
}); });
if (typeof(__PLUGIN_ERROR__) !== 'undefined') {
PMExt.notify(_('ID_PLUGINS'), __PLUGIN_ERROR__);
}
}); });