summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2008-10-12 20:16:38 +0200
committerAnika Henke <anika@selfthinker.org>2008-10-12 20:16:38 +0200
commit07493d0546e04d6abc0c398b7e360139a58891a8 (patch)
treec74ad8eb2a6363320678f3267aff583edc233128 /lib/scripts
parent704fb05441638874171cd9bdb2e3c6dcb0de0823 (diff)
downloadrpg-07493d0546e04d6abc0c398b7e360139a58891a8.tar.gz
rpg-07493d0546e04d6abc0c398b7e360139a58891a8.tar.bz2
removed 'ALT+' from all titles of elements with accesskeys (FS#1172)
darcs-hash:20081012181638-f7d6d-d4614321134f78fc176688d8aaf9d9acccf1952e.gz
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/edit.js2
-rw-r--r--lib/scripts/script.js56
2 files changed, 8 insertions, 50 deletions
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 80bb7a507..1c3df1ef8 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -20,7 +20,7 @@ function createToolButton(icon,label,key,id){
btn.className = 'toolbutton';
btn.title = label;
if(key){
- btn.title += ' [ALT+'+key.toUpperCase()+']';
+ btn.title += ' ['+key.toUpperCase()+']';
btn.accessKey = key;
}
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index 8c9327b1f..3d21f580d 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -21,48 +21,6 @@ if (clientPC.indexOf('opera')!=-1) {
var toolbar = '';
/**
- * Rewrite the accesskey tooltips to be more browser and OS specific.
- *
- * Accesskey tooltips are still only a best-guess of what will work
- * on well known systems.
- *
- * @author Ben Coburn <btcoburn@silicodon.net>
- */
-function updateAccessKeyTooltip() {
- // determin tooltip text (order matters)
- var tip = 'ALT+'; //default
- if (is_macos) { tip = 'CTRL+'; }
- if (is_opera) { tip = 'SHIFT+ESC '; }
- // add other cases here...
-
- // do tooltip update
- if (tip=='ALT+') { return; }
- var exp = /\[ALT\+/i;
- var rep = '['+tip;
-
- var elements = document.getElementsByTagName('a');
- for (var i=0; i<elements.length; i++) {
- if (elements[i].accessKey.length==1 && elements[i].title.length>0) {
- elements[i].title = elements[i].title.replace(exp, rep);
- }
- }
-
- elements = document.getElementsByTagName('input');
- for (var i=0; i<elements.length; i++) {
- if (elements[i].accessKey.length==1 && elements[i].title.length>0) {
- elements[i].title = elements[i].title.replace(exp, rep);
- }
- }
-
- elements = document.getElementsByTagName('button');
- for (var i=0; i<elements.length; i++) {
- if (elements[i].accessKey.length==1 && elements[i].title.length>0) {
- elements[i].title = elements[i].title.replace(exp, rep);
- }
- }
-}
-
-/**
* Handy shortcut to document.getElementById
*
* This function was taken from the prototype library
@@ -542,12 +500,12 @@ function checkWindowsShares() {
var elems = getElementsByClass('windows',document,'a');
if(elems){
for(var i=0; i<elems.length; i++){
- var share = elems[i];
- addEvent(share,'click',function(){
- if(document.all == null) {
- alert(LANG['nosmblinks']);
- }
- });
+ var share = elems[i];
+ addEvent(share,'click',function(){
+ if(document.all == null) {
+ alert(LANG['nosmblinks']);
+ }
+ });
}
}
}
@@ -558,5 +516,5 @@ function checkWindowsShares() {
* Michael Klier <chi@chimeric.de>
*/
addInitEvent(function(){
- checkWindowsShares();
+ checkWindowsShares();
});