Skip to content

Commit 83d9260

Browse files
committed
mouse over title for text input box
1 parent 07e3810 commit 83d9260

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

plugin.info.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
base tocselect
22
author Myron Turner
33
4-
date 2016-12-25
4+
date 2016-12-26
55
name tocselect
66
desc Adds textbox and namespace/wiki:id index for installing tables of contents in page or side bar
77
url https://www.dokuwiki.org/plugin:tocselect

script.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
},
2828
'html'
2929
);
30-
30+
jQuery("li").off("click").click(function(){
31+
var a = jQuery("#selectoc_id");
32+
a.attr('title',a.attr('value'));
33+
});
3134
jQuery("#tocseltoggle img").off("click").click(function(){
3235
jQuery("#setctoc_out").toggle();
3336
var dir = DOKU_BASE + 'lib/plugins/tocselect/img/';
@@ -41,17 +44,23 @@
4144
});
4245

4346
});
47+
function ini_textbox(name){
48+
var a =jQuery("#selectoc_id");
49+
a.attr('title',name);
50+
}
4451
var dom = document.getElementById("selectoc_id");
4552
if(dom && dom.value.match(/curID/)) {
4653
dom.value = JSINFO['id'];
4754
jQuery( "#selectoc_btn" ).click();
55+
ini_textbox(JSINFO['id']);
4856
}
4957
else {
5058
var cval = tocsel_getCookie('tocselect');
5159
if(cval && document.getElementById("selectoc_id")) {
5260
cval = cval.replace(/%3A/g,':');
5361
document.getElementById("selectoc_id").value = cval;
5462
jQuery( "#selectoc_btn" ).click();
63+
ini_textbox(cval);
5564
}
5665
}
5766
});

syntax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function render($mode, Doku_Renderer $renderer, $data) {
5858
list($state,$wikid) = $data;
5959
$renderer->doc .='<div class="tocsel_right">';
6060
$renderer->doc .='<span class="clickerdir tocselb hx1_5" title="' . $rootopen . '" onclick="tocsel_updatetoc(\':*\');">'. $nsroot.'</span><br />';
61-
$renderer->doc .= '<DIV><FORM><input type="button" value="' . $select. '" id="selectoc_btn" name="selectoc_btn" /> <INPUT type="text" id="selectoc_id" name="selectoc_id" value="'.$wikid .'"></FORM></DIV>';
61+
$renderer->doc .= '<DIV><FORM><input type="button" value="' . $select. '" id="selectoc_btn" name="selectoc_btn" /> <INPUT type="text" title="wiki:id" id="selectoc_id" name="selectoc_id" value="'.$wikid .'"></FORM></DIV>';
6262
$renderer->doc .= '<div id="tocseltoggle"><img src="' . TOCSEL_DIR. 'img/open.png"></div ><span class="tocsel_title">' . $lang['toc'] .'</span><div id = "setctoc_out"></div>';
6363
$renderer->doc .='</div>';
6464
return true;

0 commit comments

Comments
 (0)