From 6ee3abf21621e8c0fef678543f56b75082183d31 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 22 Oct 2015 09:51:45 -0400 Subject: [PATCH] More robust AJAX tab handling. - Added another test case. --- .../src/VuFindTest/Mink/RecordTest.php | 30 +++++++++++++++---- tests/data/weird_ids.mrc | 2 +- themes/bootstrap3/js/record.js | 16 ++++++---- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php index e7c2d70a134..0d9432da559 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php @@ -42,14 +42,17 @@ class RecordTest extends \VuFindTest\Unit\MinkTestCase /** * Test record tabs for a particular ID. * - * @param Session $session Session - * @param string $id ID to load + * @param Session $session Session + * @param string $id ID to load + * @param bool $encodeId Should we URL encode the ID? * * @return void */ - protected function tryRecordTabsOnId(Session $session, $id) + protected function tryRecordTabsOnId(Session $session, $id, $encodeId = true) { - $url = $this->getVuFindUrl('/Record/' . str_replace('+', '%20', urlencode($id))); + $url = $this->getVuFindUrl( + '/Record/' . ($encodeId ? rawurlencode($id) : $id) + ); $session->visit($url); $this->assertEquals(200, $session->getStatusCode()); $page = $session->getPage(); @@ -77,15 +80,30 @@ class RecordTest extends \VuFindTest\Unit\MinkTestCase } /** - * Test that record tabs work with a "weird" ID. + * Test that record tabs work with an ID with a space in it. * * @return void */ - public function testRecordTabsOnWeirdId() + public function testRecordTabsOnSpacedId() { $session = $this->getMinkSession(); $session->start(); $this->tryRecordTabsOnId($session, 'dot.dash-underscore__3.space suffix'); $session->stop(); } + + /** + * Test that record tabs work with an ID with a plus in it. + * + * @return void + */ + public function testRecordTabsOnPlusId() + { + $session = $this->getMinkSession(); + $session->start(); + // Skip encoding on this one, because Zend Framework doesn't URL encode + // plus signs in route segments! + $this->tryRecordTabsOnId($session, 'theplus+andtheminus-', false); + $session->stop(); + } } diff --git a/tests/data/weird_ids.mrc b/tests/data/weird_ids.mrc index 20acb7a0b10..dfce3ed8026 100644 --- a/tests/data/weird_ids.mrc +++ b/tests/data/weird_ids.mrc @@ -1 +1 @@ -01284cam a2200265 4500001001700000005001700017006001900034007001500053008004100068035002500109040004000134100003100174245009600205250002200301260005200323300002500375500003200400500005500432510004700487533017000534655001400704655002300718856023500741710004200976|||pipe|||"quote20080305102831.0m | j | cr||n||||||||n810807s1783 enk|||| s 00| ||eng d a(CStRLIN)ESTCT130270 aUk-EScUk-ESdCStRLINdThomson Gale1 aBurney, Fanny,d1752-1840.10aEvelinah[electronic resource],bor, the history of a young lady's entrance into the world. aA new edition. .. aLondon :bprinted for T. and W. Lowndes,c1783. a3v.,plates ;c12â°. aAnonymous. By Fanny Burney. aReproduction of original from the British Library.4 aEnglish Short Title Catalog,cESTCT130270. aElectronic reproduction.bFarmington Hills, Mich. :cThomson Gale,d2003.nAvailable via the World Wide Web.nAccess limited by licensing agreements7s2003 miunns 7aWeird IDs 7aThe Study Of P|pes40uhttp://ezproxy.villanova.edu/login?URL=http://galenet.galegroup.com/servlet/ECCO?c=1&stp=Author&ste=11&af=BN&ae=T130270&tiPG=1&dd=0&dc=flc&docNum=CW113616354&vrsn=1.0&srchtp=a&d4=0.33&n=10&SU=0LRK&locID=vill_mainzFull text online2_aEighteenth Century Collections Online01686cam a2200445Ia 4500001003200000005001700032008004100049035002400090040007000114015001900184016001800203016001900221020001500240020001800255035002100273050002400294084001500318084001500333049000900348090002000357245019200377260017500569300002600744440005100770504004100821590001500862650002100877650002600898650003400924650001900958655001400977655005200991700003401043700002101077700001601098700002501114938004201139938004701181994001201228dot.dash-underscore__3.colon:1820080305121136.0070910s2007 ne b 000 0 eng d a(OCoLC)ocn170922267 aYDXCPcYDXCPdBAKERdOHXdZCLdUKMdBTCTAdCDXdOCLCQdNLGGCdPVU aGBA7832352bnb7 a0139532802Uk7 aB07121102bccb a9041126201 a9789041126207 a(OCoLC)170922267 4aHG1615.5b.G56 2007 a83.502bcl a85.632bcl aPVUM aK2b.U446 v. 6300aGlobalization and employment relations in retail banking /ceditor, Roger Blanpain ; guest editors, Leanne Cutcher, Jim Kitay, and Nick Wailes ; contributors, Leanne Cutcher ... [et al.]. aAlphen aan den Rijn, the Netherlands :bKluwer Law International ;aFrederick, MD :bSold and distributed in North, Central and South America by Aspen Publishers,cc2007. axiv, 154 p. ;c24 cm. 0aBulletin of comparative labour relations ;v63 aIncludes bibliographical references. aMarch08eco 0aBank management. 0aIndustrial relations. 0aBank employeesxLabor unions. 0aGlobalization. 7aWeird IDs 7aThe Study and Scor_ng of Dots.and-Dashes:Colons1 aBlanpain, R.q(Roger),d1932-1 aCutcher, Leanne.1 aKitay, Jim.1 aWailes, Nick,d1970- aYBP Library ServicesbYANKn100475865 aCoutts Information ServicesbCOUTn4606560 aC0bPVU01310cam a2200349 a 4500001003600000005001700036008004100053010001700094035002300111040003700134020003500171050002600206049000900232100002800241245006000269250002700329260007400356300002100430500006100451500011400512504005400626590001300680650004600693650004000739650003600779650003200815650002400847655001400871655003000885655003300915994001200948dot.dash-underscore__3.space suffix20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2001 aPVUM1 aBryant, Dorothy,d1930-14aThe test /cDorothy Bryant ; afterword by Barbara Horn. a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a170 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of Back S\ashes 7aThe Study of Forward S/ashes aC0bPVU01237cam a2200337 a 4500001002200000005001700022008004100039010001700080035002300097040003700120020003500157050002600192049000900218100004700227245002500274250002700299260007400326300002100400500006100421500011400482504005400596590001300650650004600663650004000709650003600749650003200785650002400817655001400841655003200855994001200887dollar$ign/slashcombo20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2021 aPVUM1 aWill B. Broke ; afterword by P.S. Sherman.14aOf Money and Slashes a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a170 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of Cold Hard Ca$h aC0bPVU01212cam a2200337 a 4500001002100000005001700021008004100038010001700079035002300096040003700119020003500156050002600191049000900217100001400226245003100240250002700271260007400298300002000372500006100392500011400453504005400567590001300621650004600634650004000680650003600720650003200756650002400788655001400812655003600826994001200862all'kinds"of'quotes"20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aAl Lusion14aMovie Quotes Thru The Ages a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of "Important" Things aC0bPVU01235cam a2200337 a 4500001002700000005001700027008004100044010001700085035002300102040003700125020003500162050002600197049000900223100002200232245002200254250002700276260007400303300002000377500006100397500011400458504005400572590001300626650004600639650004000685650003600725650003200761650002400793655001400817655005400831994001200885<angle>brackets&ersands20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aKen I. Getawitnez14a<HTML> The Basics a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of Things & Combinations <HTML Edition> aC0bPVU01201cam a2200337 a 4500001001700000005001700017008004100034010001700075035002300092040003700115020003500152050002600187049000900213100001600222245002600238250002700264260007400291300002000365500006100385500011400446504005400560590001300614650004600627650004000673650003600713650003200749650002400781655001400805655003200819994001200851hashes#coming@ya20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aDemian Katz14aOctothorpes: Why not? a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of @Twitter #test aC0bPVU01204cam a2200337 a 4500001002100000005001700021008004100038010001700079035002300096040003700119020003500156050002600191049000900217100002200226245002900248250002700277260007400304300002000378500006100398500011400459504005400573590001300627650004600640650004000686650003600726650003200762650002400794655001400818655002200832994001200854wehave?sand%stospare20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aWill We Everlearn14aQuestions about Percents a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of %'s? aC0bPVU \ No newline at end of file +01284cam a2200265 4500001001700000005001700017006001900034007001500053008004100068035002500109040004000134100003100174245009600205250002200301260005200323300002500375500003200400500005500432510004700487533017000534655001400704655002300718856023500741710004200976|||pipe|||"quote20080305102831.0m | j | cr||n||||||||n810807s1783 enk|||| s 00| ||eng d a(CStRLIN)ESTCT130270 aUk-EScUk-ESdCStRLINdThomson Gale1 aBurney, Fanny,d1752-1840.10aEvelinah[electronic resource],bor, the history of a young lady's entrance into the world. aA new edition. .. aLondon :bprinted for T. and W. Lowndes,c1783. a3v.,plates ;c12â°. aAnonymous. By Fanny Burney. aReproduction of original from the British Library.4 aEnglish Short Title Catalog,cESTCT130270. aElectronic reproduction.bFarmington Hills, Mich. :cThomson Gale,d2003.nAvailable via the World Wide Web.nAccess limited by licensing agreements7s2003 miunns 7aWeird IDs 7aThe Study Of P|pes40uhttp://ezproxy.villanova.edu/login?URL=http://galenet.galegroup.com/servlet/ECCO?c=1&stp=Author&ste=11&af=BN&ae=T130270&tiPG=1&dd=0&dc=flc&docNum=CW113616354&vrsn=1.0&srchtp=a&d4=0.33&n=10&SU=0LRK&locID=vill_mainzFull text online2_aEighteenth Century Collections Online01686cam a2200445Ia 4500001003200000005001700032008004100049035002400090040007000114015001900184016001800203016001900221020001500240020001800255035002100273050002400294084001500318084001500333049000900348090002000357245019200377260017500569300002600744440005100770504004100821590001500862650002100877650002600898650003400924650001900958655001400977655005200991700003401043700002101077700001601098700002501114938004201139938004701181994001201228dot.dash-underscore__3.colon:1820080305121136.0070910s2007 ne b 000 0 eng d a(OCoLC)ocn170922267 aYDXCPcYDXCPdBAKERdOHXdZCLdUKMdBTCTAdCDXdOCLCQdNLGGCdPVU aGBA7832352bnb7 a0139532802Uk7 aB07121102bccb a9041126201 a9789041126207 a(OCoLC)170922267 4aHG1615.5b.G56 2007 a83.502bcl a85.632bcl aPVUM aK2b.U446 v. 6300aGlobalization and employment relations in retail banking /ceditor, Roger Blanpain ; guest editors, Leanne Cutcher, Jim Kitay, and Nick Wailes ; contributors, Leanne Cutcher ... [et al.]. aAlphen aan den Rijn, the Netherlands :bKluwer Law International ;aFrederick, MD :bSold and distributed in North, Central and South America by Aspen Publishers,cc2007. axiv, 154 p. ;c24 cm. 0aBulletin of comparative labour relations ;v63 aIncludes bibliographical references. aMarch08eco 0aBank management. 0aIndustrial relations. 0aBank employeesxLabor unions. 0aGlobalization. 7aWeird IDs 7aThe Study and Scor_ng of Dots.and-Dashes:Colons1 aBlanpain, R.q(Roger),d1932-1 aCutcher, Leanne.1 aKitay, Jim.1 aWailes, Nick,d1970- aYBP Library ServicesbYANKn100475865 aCoutts Information ServicesbCOUTn4606560 aC0bPVU01310cam a2200349 a 4500001003600000005001700036008004100053010001700094035002300111040003700134020003500171050002600206049000900232100002800241245006000269250002700329260007400356300002100430500006100451500011400512504005400626590001300680650004600693650004000739650003600779650003200815650002400847655001400871655003000885655003300915994001200948dot.dash-underscore__3.space suffix20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2001 aPVUM1 aBryant, Dorothy,d1930-14aThe test /cDorothy Bryant ; afterword by Barbara Horn. a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a170 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of Back S\ashes 7aThe Study of Forward S/ashes aC0bPVU01237cam a2200337 a 4500001002200000005001700022008004100039010001700080035002300097040003700120020003500157050002600192049000900218100004700227245002500274250002700299260007400326300002100400500006100421500011400482504005400596590001300650650004600663650004000709650003600749650003200785650002400817655001400841655003200855994001200887dollar$ign/slashcombo20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2021 aPVUM1 aWill B. Broke ; afterword by P.S. Sherman.10aOf Money and Slashes a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a170 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of Cold Hard Ca$h aC0bPVU01212cam a2200337 a 4500001002100000005001700021008004100038010001700079035002300096040003700119020003500156050002600191049000900217100001400226245003100240250002700271260007400298300002000372500006100392500011400453504005400567590001300621650004600634650004000680650003600720650003200756650002400788655001400812655003600826994001200862all'kinds"of'quotes"20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aAl Lusion10aMovie Quotes Thru The Ages a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of "Important" Things aC0bPVU01235cam a2200337 a 4500001002700000005001700027008004100044010001700085035002300102040003700125020003500162050002600197049000900223100002200232245002200254250002700276260007400303300002000377500006100397500011400458504005400572590001300626650004600639650004000685650003600725650003200761650002400793655001400817655005400831994001200885<angle>brackets&ersands20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aKen I. Getawitnez11a<HTML> The Basics a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of Things & Combinations <HTML Edition> aC0bPVU01201cam a2200337 a 4500001001700000005001700017008004100034010001700075035002300092040003700115020003500152050002600187049000900213100001600222245002600238250002700264260007400291300002000365500006100385500011400446504005400560590001300614650004600627650004000673650003600713650003200749650002400781655001400805655003200819994001200851hashes#coming@ya20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aDemian Katz10aOctothorpes: Why not? a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of @Twitter #test aC0bPVU01204cam a2200337 a 4500001002100000005001700021008004100038010001700079035002300096040003700119020003500156050002600191049000900217100002200226245002900248250002700277260007400304300002000378500006100398500011400459504005400573590001300627650004600640650004000686650003600726650003200762650002400794655001400818655002200832994001200854wehave?sand%stospare20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aWill We Everlearn10aQuestions about Percents a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of %'s? aC0bPVU01215cam a2200337 a 4500001002100000005001700021008004100038010001700079035002300096040003700119020003500156050002600191049000900217100001700226245004500243250002700288260007400315300002000389500006100409500011400470504005400584590001300638650004600651650004000697650003600737650003200773650002400805655001400829655002200843994001200865theplus+andtheminus-20060525093449.0060508r20011991nyu b 000 1 eng a 2001033643 a(OCoLC)ocm47013195 aDLCcDLCdYDXdOCLCQdBAKERdPVU a1558612742 (pbk. : alk. paper)00aPS3552.R878bT47 2011 aPVUM1 aMathematibob10aPluses and Minuses of Pluses and Minuses a1st Feminist Press ed. aNew York :bFeminist Press at the City University of New York,c2001. a17 p. ;c22 cm. aOriginally published: Ata Books, Berkeley, Calif., 1991. aThe Alfred F. Mannella and Rose T. (Lauria) Mannella Endowed Library Fund donated by Alfred S. Mannella, '58. aIncludes bibliographical references (p. 169-170). aMay06eng 0aAdult children of aging parentsvFiction. 0aAutomobile drivers' testsvFiction. 0aFathers and daughtersvFiction. 0aMiddle aged womenvFiction. 0aOlder menvFiction. 7aWeird IDs 7aThe Study of +'s? aC0bPVU \ No newline at end of file diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index 6b654f3a96a..b2cadcefee2 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -147,14 +147,20 @@ function registerTabEvents() { } function ajaxLoadTab(tabid) { - var id = $('.hiddenId')[0].value; - // Try to parse out the controller portion of the URL. If this fails, or if - // we're flagged to skip AJAX for this tab, just return true and let the + // if we're flagged to skip AJAX for this tab, just return true and let the // browser handle it. - var urlroot = document.URL.match(new RegExp('/[^/]+/' + encodeURIComponent(id))); - if(!urlroot || document.getElementById(tabid).parentNode.className.indexOf('noajax') > -1) { + if(document.getElementById(tabid).parentNode.className.indexOf('noajax') > -1) { return true; } + + // Parse out the base URL for the current record: + var urlParts = document.URL.split('#'); + var urlWithoutFragment = urlParts[0]; + var pathInUrl = urlWithoutFragment.indexOf(path); + var chunks = urlWithoutFragment.substring(pathInUrl + path.length + 1).split('/'); + var urlroot = '/' + chunks[0] + '/' + chunks[1]; + + // Request the tab via AJAX: $.ajax({ url: path + urlroot + '/AjaxTab', type: 'POST', -- GitLab