Skip to content
Snippets Groups Projects
Commit 484716d0 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Merge pull request #290 from TriCollegeLibraries/ajaxtab

Move slash from regex to url var. Fixes eternal spinner when there's no terminal slash.
parents 30841bce 477639c4
No related merge requests found
...@@ -151,12 +151,12 @@ function registerTabEvents() { ...@@ -151,12 +151,12 @@ function registerTabEvents() {
function ajaxLoadTab(tabid) { function ajaxLoadTab(tabid) {
var id = $('.hiddenId')[0].value; var id = $('.hiddenId')[0].value;
// Grab the part of the url that is the Controller and Record ID // Grab the part of the url that is the Controller and Record ID
var urlroot = document.URL.match(new RegExp('/[^/]+/'+id)) + "/"; var urlroot = document.URL.match(new RegExp('/[^/]+/'+id));
if(urlroot == "null/") { if(urlroot == "null/") {
return true; return true;
} }
$.ajax({ $.ajax({
url: path + urlroot + 'AjaxTab', url: path + urlroot + '/AjaxTab',
type: 'POST', type: 'POST',
data: {tab: tabid}, data: {tab: tabid},
success: function(data) { success: function(data) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment