ツールチップも設定するように
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4679 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
daaaa91e8b
commit
0c8e1b4e0a
@ -28,12 +28,18 @@ var gLabel = document.getElementById('label');
|
||||
var gEdit = document.getElementById('editor');
|
||||
var gDeck = document.getElementById('deck');
|
||||
|
||||
function trim(aString)
|
||||
{
|
||||
return aString.replace(/^\s+|\s+$/g, '');
|
||||
}
|
||||
|
||||
var title = location.href.split('?')[1];
|
||||
if (title) {
|
||||
title = decodeURIComponent(title);
|
||||
title = trim(decodeURIComponent(title));
|
||||
document.title = title;
|
||||
document.documentElement.setAttribute('title', title);
|
||||
gLabel.value = title;
|
||||
gLabel.setAttribute('tooltiptext', title);
|
||||
gEdit.value = title;
|
||||
}
|
||||
|
||||
@ -48,9 +54,10 @@ function exitEdit()
|
||||
{
|
||||
if (gDeck.selectedIndex == 0) return;
|
||||
|
||||
var old = gLabel.value.replace(/^\s+|\s+$/g, '');
|
||||
var value = gEdit.value.replace(/^\s+|\s+$/g, '');
|
||||
var old = trim(gLabel.value);
|
||||
var value = trim(gEdit.value);
|
||||
document.title = gLabel.value = value;
|
||||
gLabel.setAttribute('tooltiptext', value);
|
||||
document.documentElement.setAttribute('title', value);
|
||||
|
||||
if (value != old)
|
||||
|
@ -7,9 +7,6 @@ page {
|
||||
label {
|
||||
color: -moz-dialogtext;
|
||||
font-family: message-box;
|
||||
}
|
||||
|
||||
label, editor {
|
||||
font-size: large;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user