Skip to content

Commit

Permalink
Item13898: use getScriptUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Jan 6, 2016
1 parent 08e6036 commit dd130a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions JQueryPlugin/data/System/JQueryAjaxHelper.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ jQuery(function($){
var $this = $(this),
opts = $.extend({}, $this.metadata());
$this.autocomplete({
source: foswiki.getPreference('SCRIPTURL') + '/view/' + foswiki.getPreference('SYSTEMWEB') + "/JQueryAjaxHelper?section=topic;skin=text;contenttype=application/json;baseweb="+opts.baseweb,
source: foswiki.getScriptUrl('view', foswiki.getPreference('SYSTEMWEB'), 'JQueryAjaxHelper') + "?section=topic;skin=text;contenttype=application/json;baseweb="+opts.baseweb,
select: function(event, ui) {
window.location.href=foswiki.getPreference('SCRIPTURL') + '/view/'+(opts.global?'':opts.baseweb+'/')+ui.item.value;
window.location.href=foswiki.getScriptUrl('view', (opts.global?'':opts.baseweb+''), ui.item.value);
}
});
});
Expand Down Expand Up @@ -291,7 +291,7 @@ or later).
<script type=\"text/javascript\">
jQuery(function($){
$(\"#%ID%\").click(function() {
$.get(foswiki.getPreference('SCRIPTURL') + '/view/' + foswiki.getPreference('SYSTEMWEB') + '/JQueryAjaxHelper?section=query;source=%SOURCE%;query=%QUERY%;skin=text',
$.get(foswiki.getScriptUrl('view', foswiki.getPreference('SYSTEMWEB'), 'JQueryAjaxHelper', '?section=query;source=%SOURCE%;query=%QUERY%;skin=text'),
function(data) {
// This is the function that will be executed when the
// data is fetched
Expand Down

0 comments on commit dd130a3

Please sign in to comment.