Skip to content

Commit

Permalink
Item11511:Item11512:
Browse files Browse the repository at this point in the history
  * fixed construction of endpoint urls
  * rest handler that that do _not_ return json should not say so



git-svn-id: http://svn.foswiki.org/trunk@13973 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Feb 13, 2012
1 parent 984d3c8 commit de91455
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 @@ -162,9 +162,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+";format="+opts.format,
source: foswiki.getPreference('SCRIPTURL') + '/view/' + foswiki.getPreference('SYSTEMWEB') + "/JQueryAjaxHelper?section=topic;skin=text;contenttype=application/json;baseweb="+opts.baseweb+";format="+opts.format,
select: function(event, ui) {
window.location.href=foswiki.getPreference('SCRIPTURL') + 'view/'+(opts.global?'':opts.baseweb+'/')+ui.item.value;
window.location.href=foswiki.getPreference('SCRIPTURL') + '/view/'+(opts.global?'':opts.baseweb+'/')+ui.item.value;
}
});
});
Expand Down Expand Up @@ -287,7 +287,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;contenttype=application/json',
$.get(foswiki.getPreference('SCRIPTURL') + '/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 de91455

Please sign in to comment.