summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/css.php2
-rw-r--r--lib/plugins/acl/script.js1
-rw-r--r--lib/plugins/config/settings/config.metadata.php4
-rw-r--r--lib/scripts/behaviour.js2
-rw-r--r--lib/scripts/edit.js9
-rw-r--r--lib/scripts/editor.js1
-rw-r--r--lib/scripts/helpers.js19
-rw-r--r--lib/scripts/media.js19
-rw-r--r--lib/scripts/page.js6
-rw-r--r--lib/scripts/toolbar.js29
-rw-r--r--lib/scripts/tree.js20
-rw-r--r--lib/scripts/tw-sack.js1
-rw-r--r--lib/tpl/dokuwiki/css/basic.css4
-rw-r--r--lib/tpl/dokuwiki/detail.php30
-rw-r--r--lib/tpl/dokuwiki/main.php32
15 files changed, 104 insertions, 75 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 1e662c64a..768c8eda4 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -314,7 +314,7 @@ function css_datauri($match){
$data = base64_encode(file_get_contents($local));
}
if($data){
- $url = 'data:image/'.$ext.';base64,'.$data;
+ $url = '\'data:image/'.$ext.';base64,'.$data.'\'';
}else{
$url = $base.$url;
}
diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js
index c3763dc8d..0abb80d67 100644
--- a/lib/plugins/acl/script.js
+++ b/lib/plugins/acl/script.js
@@ -61,6 +61,7 @@ var dw_acl = {
*/
loadinfo: function () {
jQuery('#acl__info')
+ .attr('role', 'alert')
.html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="..." />')
.load(
DOKU_BASE + 'lib/plugins/acl/ajax.php',
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index ec549d6b4..2fb08037d 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -20,7 +20,8 @@
* 'numericopt' - like above, but accepts empty values
* 'onoff' - checkbox input, setting output 0|1
* 'multichoice' - select input (single choice), setting output with quotes, required _choices parameter
- * 'email' - text input, input must conform to email address format
+ * 'email' - text input, input must conform to email address format, supports optional '_multiple'
+ * parameter for multiple comma separated email addresses
* 'password' - password input, minimal input validation, setting output text in quotes, maybe encoded
* according to the _code parameter
* 'dirchoice' - as multichoice, selection choices based on folders found at location specified in _dir
@@ -58,6 +59,7 @@
* '_code' - encoding method to use, accepted values: 'base64','uuencode','plain'. defaults to plain.
* '_min' - minimum numeric value, optional for 'numeric' and 'numericopt', ignored by others
* '_max' - maximum numeric value, optional for 'numeric' and 'numericopt', ignored by others
+ * '_multiple' - bool, allow multiple comma separated email values; optional for 'email', ignored by others
*
* @author Chris Smith <chris@jalakai.co.uk>
*/
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index f1c46bf4c..85ddf503e 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -5,6 +5,7 @@
* @author Adrian Lang <mail@adrianlang.de>
*/
jQuery.fn.dw_hide = function(fn) {
+ this.attr('aria-expanded', 'false');
return this.slideUp('fast', fn);
};
@@ -15,6 +16,7 @@ jQuery.fn.dw_hide = function(fn) {
* @author Adrian Lang <mail@adrianlang.de>
*/
jQuery.fn.dw_show = function(fn) {
+ this.attr('aria-expanded', 'true');
return this.slideDown('fast', fn);
};
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 5a5e829bd..b1dbff683 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -23,7 +23,7 @@ function createToolButton(icon,label,key,id,classname){
$btn.addClass(classname);
}
- $btn.attr('title', label);
+ $btn.attr('title', label).attr('aria-controls', 'wiki__text');
if(key){
$btn.attr('title', label + ' ['+key.toUpperCase()+']')
.attr('accessKey', key);
@@ -40,6 +40,7 @@ function createToolButton(icon,label,key,id,classname){
icon = DOKU_BASE + 'lib/images/toolbar/' + icon;
}
$ico.attr('src', icon);
+ $ico.attr('alt', '');
$ico.attr('width', 16);
$ico.attr('height', 16);
$btn.append($ico);
@@ -76,6 +77,7 @@ function createPicker(id,props,edid){
function $makebutton(title) {
var $btn = jQuery(document.createElement('button'))
.addClass('pickerbutton').attr('title', title)
+ .attr('aria-controls', edid)
.bind('click', bind(pickerInsert, title, edid))
.appendTo($picker);
return $btn;
@@ -93,6 +95,7 @@ function createPicker(id,props,edid){
}
jQuery(document.createElement('img'))
.attr('src', item)
+ .attr('alt', '')
.appendTo($makebutton(key));
}else if (typeof item == 'string'){
// a list of text -> treat as text picker
@@ -132,9 +135,9 @@ function pickerInsert(text,edid){
function addBtnActionSignature($btn, props, edid) {
if(typeof SIG != 'undefined' && SIG != ''){
$btn.bind('click', bind(insertAtCarret,edid,SIG));
- return true;
+ return edid;
}
- return false;
+ return '';
}
/**
diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js
index 042e34608..2c0924eb7 100644
--- a/lib/scripts/editor.js
+++ b/lib/scripts/editor.js
@@ -65,6 +65,7 @@ var dw_editor = {
], function (_, img) {
jQuery(document.createElement('IMG'))
.attr('src', DOKU_BASE+'lib/images/' + img[0] + '.gif')
+ .attr('alt', '')
.click(img[1])
.appendTo($ctl);
});
diff --git a/lib/scripts/helpers.js b/lib/scripts/helpers.js
index d6f36967d..632c4bff2 100644
--- a/lib/scripts/helpers.js
+++ b/lib/scripts/helpers.js
@@ -3,25 +3,6 @@
*/
/**
- * Very simplistic Flash plugin check, probably works for Flash 8 and higher only
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function hasFlash(version){
- var ver = 0;
- try{
- if(navigator.plugins != null && navigator.plugins.length > 0){
- ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];
- }else{
- ver = (new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))
- .GetVariable("$version").split(' ')[1].split(',')[0];
- }
- }catch(e){ }
-
- return ver >= version;
-}
-
-/**
* A PHP-style substr_replace
*
* Supports negative start and length and omitting length, but not
diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 182d5fefe..8ca21ecab 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -921,23 +921,4 @@ var dw_mediamanager = {
}
};
-// moved from helpers.js temporarily here
-/**
- * Very simplistic Flash plugin check, probably works for Flash 8 and higher only
- *
- */
-function hasFlash(version){
- var ver = 0, axo;
- try{
- if(navigator.plugins !== null && navigator.plugins.length > 0){
- ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];
- }else{
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
- ver = axo.GetVariable("$version").split(' ')[1].split(',')[0];
- }
- }catch(e){ }
-
- return ver >= version;
-}
-
jQuery(dw_mediamanager.init);
diff --git a/lib/scripts/page.js b/lib/scripts/page.js
index 4ab0bf9b5..7b4958d82 100644
--- a/lib/scripts/page.js
+++ b/lib/scripts/page.js
@@ -62,7 +62,9 @@ dw_page = {
$fndiv = jQuery(document.createElement('div'))
.attr('id', popup_id)
.addClass('insitu-footnote JSpopup')
- .mouseleave(function () {jQuery(this).hide();});
+ .attr('aria-hidden', 'true')
+ .mouseleave(function () {jQuery(this).hide().attr('aria-hidden', 'true');})
+ .attr('role', 'tooltip');
jQuery('.dokuwiki:first').append($fndiv);
}
@@ -97,7 +99,7 @@ dw_page = {
content = content.replace(/\bid=(['"])([^"']+)\1/gi,'id="insitu__$2');
// now put the content into the wrapper
- dw_page.insituPopup(this, 'insitu__fn').html(content).show();
+ dw_page.insituPopup(this, 'insitu__fn').html(content).show().attr('aria-hidden', 'false');
},
/**
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 6d75215e0..5fc4d835e 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -52,8 +52,13 @@ function initToolbar(tbid,edid,tb, allowblock){
// type is a init function -> execute it
actionFunc = 'addBtnAction'+val.type.charAt(0).toUpperCase()+val.type.substring(1);
if( jQuery.isFunction(window[actionFunc]) ){
- if(window[actionFunc]($btn, val, edid)){
+ var pickerid = window[actionFunc]($btn, val, edid);
+ if(pickerid !== ''){
$toolbar.append($btn);
+ $btn.attr('aria-controls', pickerid);
+ if (actionFunc === 'addBtnActionPicker') {
+ $btn.attr('aria-haspopup', 'true');
+ }
}
return;
}
@@ -190,16 +195,17 @@ function tb_autohead(btn, props, edid){
*/
function addBtnActionPicker($btn, props, edid) {
var pickerid = 'picker'+(pickercounter++);
- createPicker(pickerid, props, edid);
+ var picker = createPicker(pickerid, props, edid);
+ jQuery(picker).attr('aria-hidden', 'true');
$btn.click(
function() {
pickerToggle(pickerid,$btn);
- return false;
+ return '';
}
);
- return true;
+ return pickerid;
}
/**
@@ -215,22 +221,26 @@ function addBtnActionLinkwiz(btn, props, edid) {
dw_linkwiz.init(jQuery('#'+edid));
jQuery(btn).click(function(){
dw_linkwiz.toggle();
- return false;
+ return '';
});
- return true;
+ return 'link__wiz';
}
/**
- * Show/Hide a previosly created picker window
+ * Show/Hide a previously created picker window
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function pickerToggle(pickerid,$btn){
var $picker = jQuery('#' + pickerid),
pos = $btn.offset();
- $picker.toggleClass('a11y')
- .offset({left: pos.left+3, top: pos.top+$btn[0].offsetHeight+3});
+ if ($picker.hasClass('a11y')) {
+ $picker.removeClass('a11y').attr('aria-hidden', 'false');
+ } else {
+ $picker.addClass('a11y').attr('aria-hidden', 'true');
+ }
+ $picker.offset({left: pos.left+3, top: pos.top+$btn[0].offsetHeight+3});
}
/**
@@ -252,4 +262,5 @@ function fixtxt(str){
jQuery(function () {
initToolbar('tool__bar','wiki__text',toolbar);
+ jQuery('#tool__bar').attr('role', 'toolbar');
});
diff --git a/lib/scripts/tree.js b/lib/scripts/tree.js
index 96763053d..c4e1da3f7 100644
--- a/lib/scripts/tree.js
+++ b/lib/scripts/tree.js
@@ -14,6 +14,12 @@ jQuery.fn.dw_tree = function(overrides) {
init: function () {
this.$obj.delegate(this.toggle_selector, 'click', this,
this.toggle);
+ jQuery('ul:first', this.$obj).attr('role', 'tree');
+ jQuery('ul', this.$obj).not(':first').attr('role', 'group');
+ jQuery('li', this.$obj).attr('role', 'treeitem');
+ jQuery('li.open > ul', this.$obj).attr('aria-expanded', 'true');
+ jQuery('li.closed > ul', this.$obj).attr('aria-expanded', 'false');
+ jQuery('li.closed', this.$obj).attr('aria-live', 'assertive');
},
/**
@@ -35,8 +41,14 @@ jQuery.fn.dw_tree = function(overrides) {
$listitem = $clicky.closest('li');
$sublist = $listitem.find('ul').first();
opening = $listitem.hasClass('closed');
- $listitem.toggleClass('open closed');
dw_tree.toggle_display($clicky, opening);
+ if ($sublist.is(':visible')) {
+ $listitem.removeClass('open').addClass('closed');
+ $sublist.attr('aria-expanded', 'false');
+ } else {
+ $listitem.removeClass('closed').addClass('open');
+ $sublist.attr('aria-expanded', 'true');
+ }
// if already open, close by hiding the sublist
if (!opening) {
@@ -48,6 +60,8 @@ jQuery.fn.dw_tree = function(overrides) {
$sublist.hide();
if (typeof data !== 'undefined') {
$sublist.html(data);
+ $sublist.parent().attr('aria-busy', 'false').removeAttr('aria-live');
+ jQuery('li.closed', $sublist).attr('aria-live', 'assertive');
}
if ($listitem.hasClass('open')) {
// Only show if user didn’t close the list since starting
@@ -63,11 +77,11 @@ jQuery.fn.dw_tree = function(overrides) {
}
//prepare the new ul
- $sublist = jQuery('<ul class="idx"/>');
+ $sublist = jQuery('<ul class="idx" role="group"/>');
$listitem.append($sublist);
timeout = window.setTimeout(
- bind(show_sublist, '<li><img src="' + DOKU_BASE + 'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'), dw_tree.throbber_delay);
+ bind(show_sublist, '<li aria-busy="true"><img src="' + DOKU_BASE + 'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'), dw_tree.throbber_delay);
dw_tree.load_data(function (data) {
window.clearTimeout(timeout);
diff --git a/lib/scripts/tw-sack.js b/lib/scripts/tw-sack.js
index cc988f5be..b0e570151 100644
--- a/lib/scripts/tw-sack.js
+++ b/lib/scripts/tw-sack.js
@@ -2,6 +2,7 @@
/* ©2005 Gregory Wild-Smith */
/* www.twilightuniverse.com */
/* Software licenced under a modified X11 licence, see documentation or authors website for more details */
+/* @deprecated */
function sack(file){
this.AjaxFailedAlert = "Your browser does not support the enhanced functionality of this website, and therefore you will have an experience that differs from the intended one.\n";
diff --git a/lib/tpl/dokuwiki/css/basic.css b/lib/tpl/dokuwiki/css/basic.css
index ad04f7c41..3e0306448 100644
--- a/lib/tpl/dokuwiki/css/basic.css
+++ b/lib/tpl/dokuwiki/css/basic.css
@@ -402,7 +402,7 @@ button,
.qq-upload-button {
color: #333;
background-color: #eee;
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc4MjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0VFRUVFRSIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0NDQ0NDQyIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnODI0KSIgLz4KPC9zdmc+);
+ background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc4MjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0VFRUVFRSIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0NDQ0NDQyIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnODI0KSIgLz4KPC9zdmc+');
background: -moz-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%);
background: -webkit-linear-gradient(top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%);
background: -o-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #eeeeee 99%, #cccccc 99%);
@@ -440,7 +440,7 @@ button:focus,
.qq-upload-button:hover {
border-color: #999;
background-color: #ddd;
- background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2NzAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0RERERERCIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0JCQkJCQiIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnNjcwKSIgLz4KPC9zdmc+);
+ background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2NzAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGNEY0RjQiIG9mZnNldD0iMC4zIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0RERERERCIgb2Zmc2V0PSIwLjk5Ii8+PHN0b3Agc3RvcC1jb2xvcj0iI0JCQkJCQiIgb2Zmc2V0PSIuOTkiLz4KPC9saW5lYXJHcmFkaWVudD4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNnNjcwKSIgLz4KPC9zdmc+');
background: -moz-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%);
background: -webkit-linear-gradient(top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%);
background: -o-linear-gradient( top, #ffffff 0%, #f4f4f4 30%, #dddddd 99%, #bbbbbb 99%);
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php
index d2ed530a3..7e46231d3 100644
--- a/lib/tpl/dokuwiki/detail.php
+++ b/lib/tpl/dokuwiki/detail.php
@@ -28,8 +28,8 @@ header('X-UA-Compatible: IE=edge,chrome=1');
<body>
<!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
- <div id="dokuwiki__site"><div id="dokuwiki__top"
- class="dokuwiki site mode_<?php echo $ACT ?>">
+ <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
+ echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
<?php include('tpl_header.php') ?>
@@ -109,16 +109,32 @@ header('X-UA-Compatible: IE=edge,chrome=1');
<h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
<div class="tools">
<ul>
- <?php // View in media manager; @todo: transfer logic to backend
+ <?php
+ $data = array();
+
+ // View in media manager; @todo: transfer logic to backend
$imgNS = getNS($IMG);
$authNS = auth_quickaclcheck("$imgNS:*");
if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
$mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
- echo '<li><a href="'.$mmURL.'" class="mediaManager"><span>'.$lang['img_manager'].'</span></a></li>';
+ $data['mediaManager'] = '<li><a href="'.$mmURL.'" class="mediaManager"><span>'.$lang['img_manager'].'</span></a></li>';
}
- ?>
- <?php // Back to [ID]; @todo: transfer logic to backend
- echo '<li><a href="'.wl($ID).'" class="back"><span>'.$lang['img_backto'].' '.$ID.'</span></a></li>';
+
+ // Back to [ID]; @todo: transfer logic to backend
+ $data['img_backto'] = '<li><a href="'.wl($ID).'" class="back"><span>'.$lang['img_backto'].' '.$ID.'</span></a></li>';
+
+ // the page tools can be ammended through a custom plugin hook
+ // if you're deriving from this template and your design is close enough to
+ // the dokuwiki template you might want to trigger a DOKUWIKI event instead
+ // of using $conf['tpl'] here
+ $hook = 'TEMPLATE_'.strtoupper($conf['tpl']).'_PAGETOOLS_DISPLAY';
+ $evt = new Doku_Event($hook, $data);
+ if($evt->advise_before()){
+ foreach($evt->data as $k => $html) echo $html;
+ }
+ $evt->advise_after();
+ unset($data);
+ unset($evt);
?>
</ul>
</div>
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 43a0c0da7..9e507d86d 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -27,9 +27,8 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<body>
<!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
- <div id="dokuwiki__site"><div id="dokuwiki__top"
- class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'showSidebar' : '';
- ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
+ <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
+ echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
<?php include('tpl_header.php') ?>
@@ -75,12 +74,27 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<div class="tools">
<ul>
<?php
- tpl_action('edit', 1, 'li', 0, '<span>', '</span>');
- tpl_action('revert', 1, 'li', 0, '<span>', '</span>');
- tpl_action('revisions', 1, 'li', 0, '<span>', '</span>');
- tpl_action('backlink', 1, 'li', 0, '<span>', '</span>');
- tpl_action('subscribe', 1, 'li', 0, '<span>', '</span>');
- tpl_action('top', 1, 'li', 0, '<span>', '</span>');
+ $data = array(
+ 'edit' => tpl_action('edit', 1, 'li', 1, '<span>', '</span>'),
+ 'revert' => tpl_action('revert', 1, 'li', 1, '<span>', '</span>'),
+ 'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'),
+ 'backlink' => tpl_action('backlink', 1, 'li', 1, '<span>', '</span>'),
+ 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'),
+ 'top' => tpl_action('top', 1, 'li', 1, '<span>', '</span>')
+ );
+
+ // the page tools can be ammended through a custom plugin hook
+ // if you're deriving from this template and your design is close enough to
+ // the dokuwiki template you might want to trigger a DOKUWIKI event instead
+ // of using $conf['tpl'] here
+ $hook = 'TEMPLATE_'.strtoupper($conf['tpl']).'_PAGETOOLS_DISPLAY';
+ $evt = new Doku_Event($hook, $data);
+ if($evt->advise_before()){
+ foreach($evt->data as $k => $html) echo $html;
+ }
+ $evt->advise_after();
+ unset($data);
+ unset($evt);
?>
</ul>
</div>