From 6667cd8743e57a4492cfbcbe1066ea48d444f7a2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 26 Jun 2015 12:57:58 +0200 Subject: changed the whole thing to a real popup --- lib/plugins/styling/admin.php | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'lib/plugins/styling/admin.php') diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index 3c2ab577c..627efbd15 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -11,6 +11,8 @@ if(!defined('DOKU_INC')) die(); class admin_plugin_styling extends DokuWiki_Admin_Plugin { + public $ispopup = false; + /** * @return int sort number in admin menu */ @@ -25,15 +27,6 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { return true; } - /** - * @param string $language - * @return string - */ - public function getMenuText($language) { - $js = $this->getLang('js'); - return $js['menu']; - } - /** * handle the different actions (also called from ajax) */ @@ -49,17 +42,19 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { * Render HTML output, e.g. helpful text and a form */ public function html() { - echo '
'; - ptln('

'.$this->getMenuText('').'

'); - $this->form(false); + $class = 'nopopup'; + if($this->ispopup) $class = 'ispopup'; + + echo '
'; + ptln('

'.$this->getLang('menu').'

'); + $this->form(); echo '
'; } /** * Create the actual editing form - * @param boolean $isajax */ - public function form($isajax) { + public function form() { global $conf; global $ID; define('SIMPLE_TEST', 1); // hack, ideally certain functions should be moved out of css.php @@ -67,8 +62,8 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { $styleini = css_styleini($conf['template'], true); $replacements = $styleini['replacements']; - if($isajax) { - $target = wl($ID, array('do' => 'styling_plugin')); + if($this->ispopup) { + $target = DOKU_BASE.'lib/plugins/styling/popup.php'; } else { $target = wl($ID, array('do' => 'admin', 'page' => 'styling')); } -- cgit v1.2.3