Skip to content
Snippets Groups Projects
Commit 477639c4 authored by Anna Headley's avatar Anna Headley
Browse files

Move slash from regex to url var. Fixes eternal spinner when there's no

terminal slash.
parent 4192cf5a
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