summaryrefslogtreecommitdiff
path: root/lib/plugins/styling/admin.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2015-06-26 12:57:58 +0200
committerAndreas Gohr <andi@splitbrain.org>2015-06-26 12:57:58 +0200
commit6667cd8743e57a4492cfbcbe1066ea48d444f7a2 (patch)
tree3c420d60f9497a747ad887c5be1d948bb3d8b762 /lib/plugins/styling/admin.php
parent86c97e91e4aa9ed17ed75df279181e4b61353c7c (diff)
downloadrpg-6667cd8743e57a4492cfbcbe1066ea48d444f7a2.tar.gz
rpg-6667cd8743e57a4492cfbcbe1066ea48d444f7a2.tar.bz2
changed the whole thing to a real popup
Diffstat (limited to 'lib/plugins/styling/admin.php')
-rw-r--r--lib/plugins/styling/admin.php27
1 files changed, 11 insertions, 16 deletions
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
*/
@@ -26,15 +28,6 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin {
}
/**
- * @param string $language
- * @return string
- */
- public function getMenuText($language) {
- $js = $this->getLang('js');
- return $js['menu'];
- }
-
- /**
* handle the different actions (also called from ajax)
*/
public function handle() {
@@ -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 '<div id="plugin__styling">';
- ptln('<h1>'.$this->getMenuText('').'</h1>');
- $this->form(false);
+ $class = 'nopopup';
+ if($this->ispopup) $class = 'ispopup';
+
+ echo '<div id="plugin__styling" class="'.$class.'">';
+ ptln('<h1>'.$this->getLang('menu').'</h1>');
+ $this->form();
echo '</div>';
}
/**
* 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'));
}