Permalink
Browse files

Item13898: use getScriptUrl

  • Loading branch information...
1 parent 08e6036 commit dd130a3594af4ae55172357411efa2a13aed5ecb @gac410 gac410 committed Jan 6, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 JQueryPlugin/data/System/JQueryAjaxHelper.txt
@@ -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);
}
});
});
@@ -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

0 comments on commit dd130a3

Please sign in to comment.