Skip to content
Snippets Groups Projects
Commit c798b23b authored by Andreas Gohr's avatar Andreas Gohr
Browse files

rely on jQuery UI's dialog methods for toggling the linkwizard FS#2394

parent 2fe6daea
No related branches found
No related tags found
No related merge requests found
...@@ -35,13 +35,12 @@ var dw_linkwiz = { ...@@ -35,13 +35,12 @@ var dw_linkwiz = {
) )
.parent() .parent()
.attr('id','link__wiz') .attr('id','link__wiz')
.addClass('a11y')
.css({ .css({
'position': 'absolute', 'position': 'absolute',
'top': (pos.top+20)+'px', 'top': (pos.top+20)+'px',
'left': (pos.left+80)+'px' 'left': (pos.left+80)+'px'
}) })
.show() .hide()
.appendTo('div.dokuwiki'); .appendTo('div.dokuwiki');
dw_linkwiz.textArea = $editor[0]; dw_linkwiz.textArea = $editor[0];
...@@ -283,7 +282,7 @@ var dw_linkwiz = { ...@@ -283,7 +282,7 @@ var dw_linkwiz = {
*/ */
show: function(){ show: function(){
dw_linkwiz.selection = getSelection(dw_linkwiz.textArea); dw_linkwiz.selection = getSelection(dw_linkwiz.textArea);
dw_linkwiz.$wiz.removeClass('a11y'); dw_linkwiz.$wiz.show();
dw_linkwiz.$entry.focus(); dw_linkwiz.$entry.focus();
dw_linkwiz.autocomplete(); dw_linkwiz.autocomplete();
}, },
...@@ -292,7 +291,7 @@ var dw_linkwiz = { ...@@ -292,7 +291,7 @@ var dw_linkwiz = {
* Hide the link wizard * Hide the link wizard
*/ */
hide: function(){ hide: function(){
dw_linkwiz.$wiz.addClass('a11y'); dw_linkwiz.$wiz.hide();
dw_linkwiz.textArea.focus(); dw_linkwiz.textArea.focus();
}, },
...@@ -300,7 +299,7 @@ var dw_linkwiz = { ...@@ -300,7 +299,7 @@ var dw_linkwiz = {
* Toggle the link wizard * Toggle the link wizard
*/ */
toggle: function(){ toggle: function(){
if(dw_linkwiz.$wiz.hasClass('a11y')){ if(dw_linkwiz.$wiz.css('display') == 'none'){
dw_linkwiz.show(); dw_linkwiz.show();
}else{ }else{
dw_linkwiz.hide(); dw_linkwiz.hide();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment