[*] BO : #PSTEST-1157 - Ajax deletion of virtual file

This commit is contained in:
tDidierjean
2012-04-17 08:07:35 +00:00
parent 88f2c7944a
commit 63f2e924d3
5 changed files with 134 additions and 56 deletions
+26
View File
@@ -2578,5 +2578,31 @@ class AdminControllerCore extends Controller
return $this->context->smarty->createTemplate($this->context->smarty->getTemplateDir(0).$tpl_name, $this->context->smarty);
}
/**
* Shortcut to set up a json success payload
*
* @param $message success message
*/
public function jsonConfirmation($message)
{
$this->json = true;
$this->confirmations[] = $message;
if ($this->status === '')
$this->status = 'ok';
}
/**
* Shortcut to set up a json error payload
*
* @param $message error message
*/
public function jsonError($message)
{
$this->json = true;
$this->errors[] = $message;
if ($this->status === '')
$this->status = 'error';
}
}