Skip to content

Instantly share code, notes, and snippets.

@ABM-Dan
Last active January 13, 2016 16:58
Show Gist options
  • Save ABM-Dan/060bc7a1b041a63c871e to your computer and use it in GitHub Desktop.
Save ABM-Dan/060bc7a1b041a63c871e to your computer and use it in GitHub Desktop.
function submitRequest() {
var request = {};
if (query['sort'])
request['sort'] = query['sort'];
if (query['order'])
request['order'] = query['order'];
$.extend(request, query['parameters'], query['filters']);
request = $.param(request);
if ($searchWrap.hasClass('overlay'))
return false;
$searchWrap.addClass('overlay');
if ($.support.pjax) {
$.pjax({url: '/search/?' + request, container: '#search_results'});
} else {
window.location.href = request;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment