Fixed context for getting ajax results
This commit is contained in:
parent
0c6c4bab01
commit
f7d85beb60
|
@ -171,7 +171,17 @@
|
|||
};
|
||||
|
||||
$.querywidget.updateSearch = function () {
|
||||
var query = portal_url + "/@@querybuilder_html_results?";
|
||||
var context_url = (function() {
|
||||
var baseUrl, pieces;
|
||||
baseUrl = $('base').attr('href');
|
||||
if (!baseUrl) {
|
||||
pieces = window.location.href.split('/');
|
||||
pieces.pop();
|
||||
baseUrl = pieces.join('/');
|
||||
}
|
||||
return baseUrl;
|
||||
})();
|
||||
var query = context_url + "/@@querybuilder_html_results?";
|
||||
var querylist = [];
|
||||
var items = $('.QueryWidget .queryindex');
|
||||
if (!items.length) {
|
||||
|
@ -201,7 +211,7 @@
|
|||
break;
|
||||
}
|
||||
|
||||
$.get(portal_url + '/@@querybuildernumberofresults?' + querylist.join('&'),
|
||||
$.get(context_url + '/@@querybuildernumberofresults?' + querylist.join('&'),
|
||||
{},
|
||||
function (data) { results.html(data); });
|
||||
});
|
||||
|
|
Reference in New Issue