From 3e23cbfd875afb466e6c6e506bb8675bfd09286f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Aug 2009 13:40:56 +0200 Subject: More Link wizard cleanup Ignore-this: 100b66fbe26d82dfd6cffba751cf6992 darcs-hash:20090814114056-7ad00-f5dc711f467f9f6d8904bb6b08d7daac4e675ec2.gz --- lib/exe/ajax.php | 4 +++- lib/images/close.png | Bin 820 -> 1345 bytes lib/images/up.png | Bin 0 -> 376 bytes lib/scripts/linkwiz.js | 11 +++++++++-- lib/tpl/default/_linkwiz.css | 8 +++++++- 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 lib/images/up.png (limited to 'lib') diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 53ff3882c..d0321c285 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -242,6 +242,8 @@ function ajax_index(){ /** * List matching namespaces and pages for the link wizard + * + * @author Andreas Gohr */ function ajax_linkwiz(){ global $conf; @@ -335,7 +337,7 @@ function ajax_linkwiz(){ if($item['type'] == 'u'){ - $name = 'back to upper'; + $name = $lang['upperns']; }else{ $name = htmlspecialchars($item['id']); } diff --git a/lib/images/close.png b/lib/images/close.png index 06c1cf41f..e1b498c14 100644 Binary files a/lib/images/close.png and b/lib/images/close.png differ diff --git a/lib/images/up.png b/lib/images/up.png new file mode 100644 index 000000000..557d5e6a9 Binary files /dev/null and b/lib/images/up.png differ diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js index ce4b6b101..9183ba492 100644 --- a/lib/scripts/linkwiz.js +++ b/lib/scripts/linkwiz.js @@ -33,8 +33,8 @@ linkwiz = { linkwiz.wiz.innerHTML = ''+ - '
Link:
'+ + LANG['linkwiz']+''+ + '
'+LANG['linkto']+'
'+ ''; textArea.form.parentNode.appendChild(linkwiz.wiz); linkwiz.textArea = textArea; @@ -59,6 +59,12 @@ linkwiz = { if(e.keyCode == 37 || e.keyCode == 39){ //left/right return true; //ignore } + if(e.keyCode == 27){ + linkwiz.hide(); + e.preventDefault(); + e.stopPropagation(); + return false; + } if(e.keyCode == 38){ //Up linkwiz.select(linkwiz.selected -1); e.preventDefault(); @@ -248,6 +254,7 @@ linkwiz = { */ hide: function(){ linkwiz.wiz.style['display'] = 'none'; + linkwiz.textArea.focus(); }, /** diff --git a/lib/tpl/default/_linkwiz.css b/lib/tpl/default/_linkwiz.css index 9ae61bffe..79d1d4a8b 100644 --- a/lib/tpl/default/_linkwiz.css +++ b/lib/tpl/default/_linkwiz.css @@ -9,11 +9,11 @@ overflow: hidden; border: 1px solid __border__; background-color: __background_neu__; + text-align: center; } #link__wiz_header { background-color: __background_alt__; - text-align: center; height: 16px; margin-bottom: 5px; } @@ -30,6 +30,12 @@ overflow: auto; border: 1px solid __border__; margin: 3px auto; + text-align: left; +} + +#link__wiz_result div.type_u { + padding: 3px 3px 3px 22px; + background: transparent url(../../images/up.png) 3px 3px no-repeat; } #link__wiz_result div.type_f { -- cgit v1.2.3