/**
* Call action (mark as fav, archive, delete, etc.)
*/
- public function action($action, Url $url, $id = 0, $import = FALSE)
+ public function action($action, Url $url, $id = 0, $import = FALSE, $autoclose = FALSE)
{
switch ($action)
{
}
if (!$import) {
- Tools::redirect('?view=home');
+ if ($autoclose == TRUE) {
+ Tools::redirect('?view=home');
+ } else {
+ Tools::redirect('?view=home&autoclose=true');
+ }
}
break;
case 'delete':
<link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/messages.css" media="all">
<link rel="stylesheet" href="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/css/print.css" media="print">
<script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/jquery-2.0.3.min.js"></script>
+ <script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/autoClose.js"></script>
\ No newline at end of file
--- /dev/null
+$(document).ready(function() {
+ current_url = window.location.href
+ if (current_url.match("&autoclose=true")) {
+ window.close();
+ }
+});
\ No newline at end of file