From c5e3524cdbab38d5ff7d1463480ea243f7f1ec39 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Thu, 30 Oct 2014 11:11:49 -0400 Subject: [PATCH] Fix issue VUFIND-1039 --- themes/bootstrap3/js/record.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index c7b3fb7b1ea..17f989f5fad 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -165,10 +165,11 @@ function registerTabEvents() { function ajaxLoadTab(tabid) { var id = $('.hiddenId')[0].value; - var parts = document.URL.split(path+"/"); - var urlparts = parts[1].split("/"); + var parts = document.URL.split("/"); + // Grab the part of the url that is the Controller and Record ID + var urlroot = document.URL.match(new RegExp('/[^/]+/'+id+'/')); $.ajax({ - url: path + '/' + urlparts[0] + '/'+id+'/AjaxTab', + url: path + urlroot[0] + 'AjaxTab', type: 'POST', data: {tab: tabid}, success: function(data) { -- GitLab