Skip to content
Snippets Groups Projects
Commit b1a864fe authored by Andreas Gohr's avatar Andreas Gohr
Browse files

fix keeping the current page

parent 9fb99099
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,9 @@ class action_plugin_styler extends DokuWiki_Action_Plugin {
$event->preventDefault();
$event->stopPropagation();
global $ID;
$ID = getID();
/** @var admin_plugin_styler $hlp */
$hlp = plugin_load('admin', 'styler');
$hlp->form(true);
......
......@@ -61,7 +61,6 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin {
public function form($isajax) {
global $conf;
global $ID;
$tpl = $conf['template'];
define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php
require_once(DOKU_INC.'lib/exe/css.php');
$styleini = css_styleini($conf['template'], true);
......
......@@ -4,7 +4,7 @@ jQuery(function () {
// user openend the admin page, set cookie and redirect
if (jQuery('#plugin__styler').length) {
DokuCookie.setValue('styler_plugin', 1);
document.location.href = DOKU_BASE;
document.location.href = document.location.href.replace(/do=admin/, '');
}
// The Styler Dialog is currently enabled, display it here and apply the preview styles
......@@ -15,7 +15,8 @@ jQuery(function () {
$dialog.load(
DOKU_BASE + '/lib/exe/ajax.php',
{
'call': 'plugin_styler'
'call': 'plugin_styler',
'id': JSINFO.id
},
function () {
// load the preview template
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment