From: Jan Schneider Date: Tue, 24 Aug 2010 15:55:36 +0000 (+0200) Subject: Fix ajax-loading of changelog. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c901e17d38d648b61bec98b45ccc764788b492b9;p=horde.git Fix ajax-loading of changelog. --- diff --git a/chora/annotate.php b/chora/annotate.php index cb769cc69..19aff86cc 100644 --- a/chora/annotate.php +++ b/chora/annotate.php @@ -50,7 +50,7 @@ $extraLink = sprintf('%s | %s', Horde::addScriptFile('annotate.js', 'chora'); $js_vars = array( - 'ANNOTATE_URL' => (string)Horde_Util::addParameter(Horde::applicationUrl('annotate.php'), array('actionID' => 'log', 'f' => $where, 'rev' => ''), null, false), + 'ANNOTATE_URL' => (string)Horde::applicationUrl('annotate.php', true)->add(array('actionID' => 'log', 'f' => $where, 'rev' => '')), 'loading_text' => _("Loading...") ); diff --git a/chora/js/annotate.js b/chora/js/annotate.js index 479d7f5c6..e4bd30c8d 100644 --- a/chora/js/annotate.js +++ b/chora/js/annotate.js @@ -1,29 +1,22 @@ /** * Chora annotate.php javascript code. * - * @author Michael Slusarz + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. * - * See the enclosed file COPYING for license information (LGPL). If you - * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. + * @author Michael Slusarz */ var Chora_Annotate = { showLog: function(e) { - var elt = e.element(), rev, newelt; - if (!elt.hasClassName('logdisplay')) { - elt = elt.up('SPAN.logdisplay'); - if (!elt) { - return; - } + var elt = e.findElement('span.logdisplay'), rev, newelt; + if (!elt) { + return; } - e.stop(); - - rev = elt.hide().up('TD').down('A').readAttribute('rev'); - newelt = new Element('TD', { colspan: 5 }).insert(Chora.loading_text); - - elt.up('TR').insert({ after: new Element('TR', { className: 'logentry' }).insert(newelt) }); - + rev = elt.hide().up('td').down('a').readAttribute('rev'); + newelt = new Element('td', { colspan: 5 }).insert(Chora.loading_text); + elt.up('tr').insert({ after: new Element('tr', { className: 'logentry' }).insert(newelt) }); new Ajax.Updater(newelt, Chora.ANNOTATE_URL + '=' + rev); } };