Skip to content

Commit

Permalink
Merge pull request #32 from jmetzger/master
Browse files Browse the repository at this point in the history
Fixed problems with Greebo release
  • Loading branch information
neuralyzer authored Sep 2, 2018
2 parents 0f61937 + 0c729db commit 2ebf381
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
12 changes: 10 additions & 2 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,14 @@ function table_open($maxcols = null, $numrows = null, $pos = null, $classes = NU
$this->_counter['row_counter'] = 0;
$class = 'table';
if($pos !== null) {
$class .= ' '.$this->startSectionEdit($pos, 'table');

$sectionEditStartData = ['target' => 'table'];
if (!defined('SEC_EDIT_PATTERN')) {
// backwards-compatibility for Frusterick Manners (2017-02-19)
$sectionEditStartData = 'table';
}

$class .= ' '.$this->startSectionEdit($pos, $sectionEditStartData);
}
$this->doc .= '<table class="doku_revealjs_table">'.
DOKU_LF;
Expand Down Expand Up @@ -448,8 +455,9 @@ function quote_close() {
* @param string $text text to show
* @param string $language programming language to use for syntax highlighting
* @param string $filename file path label
* @param string $options highlight options - not used
*/
function _highlight($type, $text, $language = null, $filename = null) {
function _highlight($type, $text, $language = null, $filename = null, $options = null) {
global $ID;
global $lang;

Expand Down
9 changes: 8 additions & 1 deletion syntax/background.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,17 @@ public function render($mode, Doku_Renderer $renderer, $data) {
$slide_direction = '';
$conf['plugin']['revealjs']['slides_with_unknown_direction'] = true;
}

$sectionEditStartData = ['target' => 'section'];
if (!defined('SEC_EDIT_PATTERN')) {
// backwards-compatibility for Frusterick Manners (2017-02-19)
$sectionEditStartData = 'section';
}

/* write slide details to page - we need to use a fake header (<h1 style="display:none...) here
to force dokuwiki to show correct section edit highlighting by hoovering the edit button */
$renderer->doc .= DOKU_LF.DOKU_LF.'<h2 style="display:none;" class="' .
$renderer->startSectionEdit($data['position'], 'section', 'Slide '.$renderer->wikipage_slide_number).'"></h2>' . ($this->getConf('show_slide_details') ?
$renderer->startSectionEdit($data['position'], $sectionEditStartData, 'Slide '.$renderer->wikipage_slide_number).'"></h2>' . ($this->getConf('show_slide_details') ?
'<div class="slide-details-hr'.($renderer->wikipage_slide_number == 1 ? ' first-slide' : '').'"></div>' .
($data['background_color'] || $data['background_image'] ?
'<div class="slide-details-background" style='."'".$slide_details_background."'".'></div>' :
Expand Down
11 changes: 9 additions & 2 deletions syntax/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,17 @@ public function render($mode, Doku_Renderer $renderer, $data) {
$level <= $horizontal_slide_level + 1 &&
!$renderer->wikipage_slide_edit_section_open) {
$renderer->wikipage_slide_number += 1;
/* write slide details to page - we need to use a fake header (<h1 style="display:none...) here

$sectionEditStartData = ['target' => 'section'];
if (!defined('SEC_EDIT_PATTERN')) {
// backwards-compatibility for Frusterick Manners (2017-02-19)
$sectionEditStartData = 'section';
}

/* write slide details to page - we need to use a fake header (<h1 style="display:none...) here
to force dokuwiki to show correct section edit highlighting by hoovering the edit button */
$renderer->doc .= DOKU_LF.DOKU_LF.'<h2 style="display:none;" class="' .
$renderer->startSectionEdit($pos, 'section', 'Slide '.$renderer->wikipage_slide_number).'"></h2>' . ($this->getConf('show_slide_details') ?
$renderer->startSectionEdit($pos, $sectionEditStartData, 'Slide '.$renderer->wikipage_slide_number).'"></h2>' . ($this->getConf('show_slide_details') ?
'<div class="slide-details-hr'.($renderer->wikipage_slide_number == 1 ? ' first-slide' : '').'"></div>' .
'<div class="slide-details-text">'.($level <= $horizontal_slide_level?'':'') .
' Slide '.$renderer->wikipage_slide_number.($renderer->wikipage_next_slide_no_footer ? ' no-footer' : '').'</div>' : '');
Expand Down

0 comments on commit 2ebf381

Please sign in to comment.