From c01a12f3d8e6104e5ac1cdf60fa7f32c5f647686 Mon Sep 17 00:00:00 2001 From: Terry W Brady Date: Wed, 28 Mar 2018 15:00:03 -0700 Subject: [PATCH] port PR 1951 to 5x --- .../src/main/webapp/scripts/search-controls.js | 6 ++++++ .../src/main/webapp/static/js/discovery/search-controls.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js b/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js index 2425a314e5..c69028fc50 100644 --- a/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js +++ b/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js @@ -262,6 +262,12 @@ mainForm.find('input[name="' + param + '"]').val(value); } + + //DS-3835 ensure that the current scope is passed as form field "scope" + mainForm.find('input[name="current-scope"]') + .val($('select[name="scope"]').val()) + .attr("name","scope"); + //Clear the page param mainForm.find('input[name="page"]').val('1'); diff --git a/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js b/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js index 31458564e0..ddfe9c6ec6 100644 --- a/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js +++ b/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js @@ -57,6 +57,12 @@ mainForm.find('input[name="' + param + '"]').val(value); } + + //DS-3835 ensure that the current scope is passed as form field "scope" + mainForm.find('input[name="current-scope"]') + .val($('select[name="scope"]').val()) + .attr("name","scope"); + //Clear the page param mainForm.find('input[name="page"]').val('1');