From dbdc46c71a9973cd5f8f149073fd39d781f9e4a7 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 24 Oct 2017 11:34:23 +0100 Subject: [PATCH] Revert "MEDIUM: Update plugin folded to v2017-05-30" This reverts commit ff7e25de215d795ef618b2ab15cf91775f8a661d. --- public_html/lib/plugins/folded/action.php | 27 -------- .../lib/plugins/folded/conf/default.php | 4 +- .../lib/plugins/folded/conf/metadata.php | 2 - .../lib/plugins/folded/lang/cs/lang.php | 19 ++++-- .../lib/plugins/folded/lang/cs/settings.php | 9 --- .../lib/plugins/folded/lang/de/lang.php | 4 +- .../lib/plugins/folded/lang/de/settings.php | 2 - .../lib/plugins/folded/lang/en/lang.php | 4 +- .../lib/plugins/folded/lang/en/settings.php | 2 - .../lib/plugins/folded/lang/fa/lang.php | 11 ---- .../lib/plugins/folded/lang/fa/settings.php | 9 --- .../lib/plugins/folded/lang/fr/lang.php | 4 +- .../lib/plugins/folded/lang/fr/settings.php | 5 +- .../lib/plugins/folded/lang/no/lang.php | 19 ++++-- .../lib/plugins/folded/lang/no/settings.php | 9 --- .../lib/plugins/folded/lang/tr/lang.php | 21 +++--- .../lib/plugins/folded/lang/tr/settings.php | 10 --- .../folded/pagetools-close-open-sprite.png | Bin 369 -> 0 bytes .../lib/plugins/folded/plugin.info.txt | 2 +- public_html/lib/plugins/folded/script.js | 43 +------------ public_html/lib/plugins/folded/style.css | 22 ------- public_html/lib/plugins/folded/syntax/div.php | 17 ++--- .../lib/plugins/folded/syntax/header.php | 60 ------------------ .../lib/plugins/folded/syntax/span.php | 17 ++--- 24 files changed, 53 insertions(+), 269 deletions(-) delete mode 100644 public_html/lib/plugins/folded/lang/cs/settings.php delete mode 100644 public_html/lib/plugins/folded/lang/fa/lang.php delete mode 100644 public_html/lib/plugins/folded/lang/fa/settings.php delete mode 100644 public_html/lib/plugins/folded/lang/no/settings.php delete mode 100644 public_html/lib/plugins/folded/lang/tr/settings.php delete mode 100644 public_html/lib/plugins/folded/pagetools-close-open-sprite.png delete mode 100644 public_html/lib/plugins/folded/syntax/header.php diff --git a/public_html/lib/plugins/folded/action.php b/public_html/lib/plugins/folded/action.php index 5333f375..3c3b097a 100644 --- a/public_html/lib/plugins/folded/action.php +++ b/public_html/lib/plugins/folded/action.php @@ -18,7 +18,6 @@ class action_plugin_folded extends DokuWiki_Action_Plugin { */ function register(Doku_Event_Handler $controller) { $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'addhidereveal'); - $controller->register_hook('TEMPLATE_PAGETOOLS_DISPLAY', 'BEFORE', $this, 'add_button', array()); } /** @@ -38,30 +37,4 @@ class action_plugin_folded extends DokuWiki_Action_Plugin { 'reveal' => $reveal ); } - - /** - * Add 'fold/unfold all'-button to pagetools - * - * @param Doku_Event $event - * @param mixed $param not defined - */ - public function add_button(&$event, $param) { - global $ID, $REV; - - if($this->getConf('show_fold_unfold_all_button') && $event->data['view'] == 'main') { - $params = array('do' => 'fold_unfold_all'); - if($REV) $params['rev'] = $REV; - - // insert button at position before last (up to top) - $event->data['items'] = array_slice($event->data['items'], 0, -1, true) + - array('fold_unfold_all' => - '
  • ' - .'' - .''.$this->getLang('fold_unfold_all_button').'' - .'' - .'
  • ' - ) + - array_slice($event->data['items'], -1 , 1, true); - } - } } diff --git a/public_html/lib/plugins/folded/conf/default.php b/public_html/lib/plugins/folded/conf/default.php index 4dd5801d..d129325f 100644 --- a/public_html/lib/plugins/folded/conf/default.php +++ b/public_html/lib/plugins/folded/conf/default.php @@ -5,6 +5,4 @@ * @author Christopher Smith */ $conf['hide'] = ''; // hide tooltip, if empty will use localised string -$conf['reveal'] = ''; // reveal tooltip, if empty will use localised string -$conf['unfold_default'] = 0; // unfold all text per default -$conf['show_fold_unfold_all_button'] = 1; // show a button in the pagetool-area that folds/unfolds all texts of the current page +$conf['reveal'] = ''; // reveal tooltip, if empty will use localised string \ No newline at end of file diff --git a/public_html/lib/plugins/folded/conf/metadata.php b/public_html/lib/plugins/folded/conf/metadata.php index 758ce243..797bea31 100644 --- a/public_html/lib/plugins/folded/conf/metadata.php +++ b/public_html/lib/plugins/folded/conf/metadata.php @@ -6,5 +6,3 @@ */ $meta['hide'] = array('string'); $meta['reveal'] = array('string'); -$meta['unfold_default'] = array('onoff'); -$meta['show_fold_unfold_all_button'] = array('onoff'); diff --git a/public_html/lib/plugins/folded/lang/cs/lang.php b/public_html/lib/plugins/folded/lang/cs/lang.php index 1e351374..01bea12d 100644 --- a/public_html/lib/plugins/folded/lang/cs/lang.php +++ b/public_html/lib/plugins/folded/lang/cs/lang.php @@ -1,11 +1,16 @@ + * @author Esther Brunner */ -$lang['reveal'] = 'zobrazit'; -$lang['reveallong'] = 'zobrazit skrytý obsah'; -$lang['hide'] = 'skrýt'; -$lang['hidelong'] = 'skrýt obsah'; + +// custom language strings for the plugin +$lang['reveal'] = 'zobrazit'; +$lang['reveallong'] = 'zobrazit skrytý obsah'; + +$lang['hide'] = 'skrýt'; +$lang['hidelong'] = 'skrýt obsah'; + +//Setup VIM: ex: et ts=2 enc=utf-8 : \ No newline at end of file diff --git a/public_html/lib/plugins/folded/lang/cs/settings.php b/public_html/lib/plugins/folded/lang/cs/settings.php deleted file mode 100644 index 4aa36083..00000000 --- a/public_html/lib/plugins/folded/lang/cs/settings.php +++ /dev/null @@ -1,9 +0,0 @@ - - */ -$lang['hide'] = 'Zasunout skrývací nabídku
    (nechat prázdné pro použití přeložených textů)'; -$lang['reveal'] = 'Vysunout skrývací nabídku
    (nechat prázdné pro použití přeložených textů)'; diff --git a/public_html/lib/plugins/folded/lang/de/lang.php b/public_html/lib/plugins/folded/lang/de/lang.php index 28006287..a0dbe0cf 100644 --- a/public_html/lib/plugins/folded/lang/de/lang.php +++ b/public_html/lib/plugins/folded/lang/de/lang.php @@ -13,6 +13,4 @@ $lang['reveallong'] = 'zeige den eingeklappten Inhalt'; $lang['hide'] = 'zuklappen'; $lang['hidelong'] = 'verberge den Inhalt'; -$lang['fold_unfold_all_button'] = 'Alles aus-/einklappen'; - -//Setup VIM: ex: et ts=2 enc=utf-8 : +//Setup VIM: ex: et ts=2 enc=utf-8 : \ No newline at end of file diff --git a/public_html/lib/plugins/folded/lang/de/settings.php b/public_html/lib/plugins/folded/lang/de/settings.php index ac39b5a2..21601fcd 100644 --- a/public_html/lib/plugins/folded/lang/de/settings.php +++ b/public_html/lib/plugins/folded/lang/de/settings.php @@ -9,5 +9,3 @@ // for the configuration manager $lang['hide'] = 'Tooltip zum Zuklappen
    (Feld leer lassen um den Standardwert zu nutzen)'; $lang['reveal'] = 'Tooltip zum Aufklappen
    (Feld leer lassen um den Standardwert zu nutzen)'; -$lang['unfold_default'] = 'Standardmäßig alles aufklappen'; -$lang['show_fold_unfold_all_button'] = 'Button zum Zuklappen/Aufklappen aller Text der aktuellen Seite anzeigen'; diff --git a/public_html/lib/plugins/folded/lang/en/lang.php b/public_html/lib/plugins/folded/lang/en/lang.php index c87a86a7..68f230b6 100644 --- a/public_html/lib/plugins/folded/lang/en/lang.php +++ b/public_html/lib/plugins/folded/lang/en/lang.php @@ -13,6 +13,4 @@ $lang['reveallong'] = 'reveal hidden content'; $lang['hide'] = 'hide'; $lang['hidelong'] = 'hide content'; -$lang['fold_unfold_all_button'] = 'Fold/unfold all'; - -//Setup VIM: ex: et ts=2 enc=utf-8 : +//Setup VIM: ex: et ts=2 enc=utf-8 : \ No newline at end of file diff --git a/public_html/lib/plugins/folded/lang/en/settings.php b/public_html/lib/plugins/folded/lang/en/settings.php index 25f64cb4..c537eced 100644 --- a/public_html/lib/plugins/folded/lang/en/settings.php +++ b/public_html/lib/plugins/folded/lang/en/settings.php @@ -9,5 +9,3 @@ // for the configuration manager $lang['hide'] = 'Folding tooltip to hide
    (leave empty to use localised string)'; $lang['reveal'] = 'Folding tooltip to reveal
    (leave empty to use localised string)'; -$lang['unfold_default'] = 'Unfold everything by default'; -$lang['show_fold_unfold_all_button'] = 'Show a button in the pagetool-area that folds/unfolds all texts of the current page'; diff --git a/public_html/lib/plugins/folded/lang/fa/lang.php b/public_html/lib/plugins/folded/lang/fa/lang.php deleted file mode 100644 index 267fd019..00000000 --- a/public_html/lib/plugins/folded/lang/fa/lang.php +++ /dev/null @@ -1,11 +0,0 @@ - - */ -$lang['reveal'] = 'آشکارسازی'; -$lang['reveallong'] = 'آشکارسازی محتوای پنهان'; -$lang['hide'] = 'مخفی‌سازی'; -$lang['hidelong'] = 'مخفی‌سازی محتوا'; diff --git a/public_html/lib/plugins/folded/lang/fa/settings.php b/public_html/lib/plugins/folded/lang/fa/settings.php deleted file mode 100644 index c2e86e49..00000000 --- a/public_html/lib/plugins/folded/lang/fa/settings.php +++ /dev/null @@ -1,9 +0,0 @@ - - */ -$lang['hide'] = 'جاسازی راهنمای ابزار برای مخفی کردن
    (خالی گذاشتن برای استفاده از رشته محلی)'; -$lang['reveal'] = 'جاسازی راهنمای ابزار برای آشکار کردن
    (خالی گذاشتن برای استفاده از رشته محلی)'; diff --git a/public_html/lib/plugins/folded/lang/fr/lang.php b/public_html/lib/plugins/folded/lang/fr/lang.php index 1ebd3659..c9bd8c6a 100644 --- a/public_html/lib/plugins/folded/lang/fr/lang.php +++ b/public_html/lib/plugins/folded/lang/fr/lang.php @@ -2,13 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Esther Brunner * @author Fabrice Dejaigher - * @author Schplurtz le Déboulonné */ $lang['reveal'] = 'révéler'; $lang['reveallong'] = 'révéler le contenu masqué'; $lang['hide'] = 'masquer'; $lang['hidelong'] = 'masquer le contenu'; -$lang['fold_unfold_all_button'] = 'Tout plier/déplier'; diff --git a/public_html/lib/plugins/folded/lang/fr/settings.php b/public_html/lib/plugins/folded/lang/fr/settings.php index e1a4be7f..f9e9011f 100644 --- a/public_html/lib/plugins/folded/lang/fr/settings.php +++ b/public_html/lib/plugins/folded/lang/fr/settings.php @@ -2,11 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Fabrice Dejaigher - * @author Schplurtz le Déboulonné */ $lang['hide'] = 'Contenu de l\'infobulle de l\'élément à masquer.
    (laissez vide pour utiliser la chaîne localisée)'; $lang['reveal'] = 'Contenu de l\'infobulle de l\'élément à révéler.
    (laissez vide pour utiliser la chaîne localisée)'; -$lang['unfold_default'] = 'Tout déplier par défaut'; -$lang['show_fold_unfold_all_button'] = 'Ajouter un bouton dans la zone des outils de page pour plier et déplier tous les textes de la page courante'; diff --git a/public_html/lib/plugins/folded/lang/no/lang.php b/public_html/lib/plugins/folded/lang/no/lang.php index f1871b56..0101f689 100644 --- a/public_html/lib/plugins/folded/lang/no/lang.php +++ b/public_html/lib/plugins/folded/lang/no/lang.php @@ -1,11 +1,16 @@ + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Matthias Schulte */ -$lang['reveal'] = 'vis'; -$lang['reveallong'] = 'vis skjult innhold '; -$lang['hide'] = 'skjul'; -$lang['hidelong'] = 'skjul innhold'; + +// custom language strings for the plugin +$lang['reveal'] = 'vis'; +$lang['reveallong'] = 'vis skjult innhold '; + +$lang['hide'] = 'skjul'; +$lang['hidelong'] = 'skjul innhold'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file diff --git a/public_html/lib/plugins/folded/lang/no/settings.php b/public_html/lib/plugins/folded/lang/no/settings.php deleted file mode 100644 index f51fb679..00000000 --- a/public_html/lib/plugins/folded/lang/no/settings.php +++ /dev/null @@ -1,9 +0,0 @@ - - */ -$lang['hide'] = 'Infoboble for å skjule
    (la stå tom for å bruke oversatt tekst)'; -$lang['reveal'] = 'Infoboble for å vise
    (la stå tom for å bruke oversatt tekst)'; diff --git a/public_html/lib/plugins/folded/lang/tr/lang.php b/public_html/lib/plugins/folded/lang/tr/lang.php index 1974263f..6605f55c 100644 --- a/public_html/lib/plugins/folded/lang/tr/lang.php +++ b/public_html/lib/plugins/folded/lang/tr/lang.php @@ -1,13 +1,16 @@ - * @author Mustafa Icer + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Chris Smith */ -$lang['reveal'] = 'göster'; -$lang['reveallong'] = 'gizlenen içeriği göster'; -$lang['hide'] = 'gizle'; -$lang['hidelong'] = 'içeriği gizle'; -$lang['fold_unfold_all_button'] = 'katla/tüm katlamalari aç'; + +// custom language strings for the plugin +$lang['reveal'] = 'göster'; +$lang['reveallong'] = 'gizlenen içeri?i göster'; + +$lang['hide'] = 'gizle'; +$lang['hidelong'] = 'içeri?i gizle'; + +//Setup VIM: ex: et ts=2 enc=utf-8 : \ No newline at end of file diff --git a/public_html/lib/plugins/folded/lang/tr/settings.php b/public_html/lib/plugins/folded/lang/tr/settings.php deleted file mode 100644 index 1b199157..00000000 --- a/public_html/lib/plugins/folded/lang/tr/settings.php +++ /dev/null @@ -1,10 +0,0 @@ - - */ -$lang['unfold_default'] = 'standart olarak tüm katlamalari aç'; -$lang['show_fold_unfold_all_button'] = 'tüm sayfanin yazılarını katlamak/katlamalari açmak icin, -pagetool sayfasında buton göster'; diff --git a/public_html/lib/plugins/folded/pagetools-close-open-sprite.png b/public_html/lib/plugins/folded/pagetools-close-open-sprite.png deleted file mode 100644 index ceb85b4fc1e51eebd0282713ecef7d8d5ec16c66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 369 zcmeAS@N?(olHy`uVBq!ia0vp^azGr#!3-p4sEfSqx-lIW+&^ zgM|kl?%aE5!J&r>4?Wzq@6hgjhZh}wv}ga}B}X3ZJ#b{-!K2HMKH7Ka=!#>H4;(tS z^4Q~phmWm3{`k<5V~36&KYaA~(PJl$9XomK_{n1@P98sT>cq)YCr?4ZX&^Xr=1lJ@ z;e4Pw8B2ovf*Bm1-ADs*lDyqr7&=&GJ%Aj}0*}aI1_o|n5N2eUHAey{$X?><>&pIs zTZ}`N>*S1>Q$Qg */ -// must be run within DokuWiki -if(!defined('DOKU_INC')) die(); +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'syntax.php'); // maintain a global count of the number of folded elements in the page, // this allows each to be uniquely identified @@ -60,20 +61,12 @@ class syntax_plugin_folded_div extends DokuWiki_Syntax_Plugin { switch ($state){ case DOKU_LEXER_ENTER: $plugin_folded_count++; - if ($this->getConf('unfold_default')) { - $renderer->doc .= '

    '; - } else { - $renderer->doc .= '

    '; - } + $renderer->doc .= '

    '; if ($cdata) $renderer->doc .= ' '.$renderer->cdata($cdata); - if ($this->getConf('unfold_default')) { - $renderer->doc .= '

    '; - } else { - $renderer->doc .= '