[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. bed345c3da99ab1c838baf42c5b0bfc5a746b17c
Evergreen Git
git at git.evergreen-ils.org
Tue Jan 8 10:42:49 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_3 has been updated
via bed345c3da99ab1c838baf42c5b0bfc5a746b17c (commit)
from ba61b7aa214c77f67d7651006a542baa86d40142 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bed345c3da99ab1c838baf42c5b0bfc5a746b17c
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Fri Oct 5 18:42:11 2012 -0400
Acq: When invoice-building with embedded search, allow control of results list
Previously, a results list could accumulate under inconsistent
conditions. You'd get an accumulating results list if you were pressing
enter after successful searches, but your results lists would clear if
you actually clicked the Search button. Worse, searches yielding empty
result sets would *appear* to clear your result list, but subsequent
sucessful searches would restore what was there before.
This is the "missing commit" that makes the behavior consistent and
togglable.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/templates/acq/invoice/view.tt2 b/Open-ILS/src/templates/acq/invoice/view.tt2
index a4a60fb..51c6669 100644
--- a/Open-ILS/src/templates/acq/invoice/view.tt2
+++ b/Open-ILS/src/templates/acq/invoice/view.tt2
@@ -197,8 +197,14 @@
<option value="or">any</option>
</select>
<label for="acq-unified-conjunction">
- of the following terms:
- </label>
+ of the following terms
+ </label> (
+ <input type="checkbox" id="acq-unified-build-progressively" />
+ <label for="acq-unified-build-progressively">
+ building the results list progressively
+ </label> )
+
+
</div>
<div id="acq-unified-terms">
<table id="acq-unified-terms-table">
@@ -243,15 +249,15 @@
</div>
<table width='100%'><tr>
<td align='left'>
- <button onclick="performSearch(0)">[% l('Search') %]</button>
+ <button onclick="smartSearchSubmitter()">[% l('Search') %]</button>
<button onclick='addSelectedToInvoice()'>
[% l('Add Selected Items to Invoice') %]
</button>
<span id='acq-inv-search-prev'>
- <a href='javascript:performSearch(-1)'>[% l('Previous') %]</a>
+ <a href='javascript:performSearch(-1, true)'>[% l('Previous') %]</a>
</span>
<span>
- <a href='javascript:performSearch(1)'>[% l('Next') %]</a>
+ <a href='javascript:performSearch(1, true)'>[% l('Next') %]</a>
</span>
</td>
<td align='right'>
diff --git a/Open-ILS/src/templates/acq/search/unified.tt2 b/Open-ILS/src/templates/acq/search/unified.tt2
index 0a7259d..a37fad2 100644
--- a/Open-ILS/src/templates/acq/search/unified.tt2
+++ b/Open-ILS/src/templates/acq/search/unified.tt2
@@ -83,8 +83,7 @@
<button onclick="termManager.addRow()">Add Search Term</button>
</div>
<div>
- <button
- onclick="resultManager.go(termManager.buildSearchObject())">
+ <button onclick="resultManager.submitter();">
Search
</button>
</div>
diff --git a/Open-ILS/web/js/ui/default/acq/invoice/view.js b/Open-ILS/web/js/ui/default/acq/invoice/view.js
index 2036f6f..1add689 100644
--- a/Open-ILS/web/js/ui/default/acq/invoice/view.js
+++ b/Open-ILS/web/js/ui/default/acq/invoice/view.js
@@ -250,8 +250,10 @@ function doAttachPo(idx) {
);
}
-function performSearch(pageDir) {
- clearSearchResTable();
+function performSearch(pageDir, clearFirst) {
+ if (clearFirst)
+ clearSearchResTable();
+
var searchObject = termManager.buildSearchObject();
dojo.cookie('invs', base64Encode(searchObject));
dojo.cookie('invc', dojo.byId("acq-unified-conjunction").getValue());
@@ -331,8 +333,12 @@ function renderUnifiedSearch() {
"no_results": {
"revealer": function() { }
}
+
};
+ resultManager.no_results_popup = true;
+ resultManager.submitter = smartSearchSubmitter;
+
var searchObject = dojo.cookie('invs');
console.log('loaded ' + searchObject);
if (searchObject) {
@@ -1053,6 +1059,10 @@ function createExtraCopies(oncomplete) {
}
+function smartSearchSubmitter() {
+ performSearch(0, !dojo.byId('acq-unified-build-progressively').checked);
+}
+
openils.Util.addOnLoad(init);
diff --git a/Open-ILS/web/js/ui/default/acq/search/unified.js b/Open-ILS/web/js/ui/default/acq/search/unified.js
index 0dfac0a..a6be3f0 100644
--- a/Open-ILS/web/js/ui/default/acq/search/unified.js
+++ b/Open-ILS/web/js/ui/default/acq/search/unified.js
@@ -175,7 +175,7 @@ function TermSelectorFactory(terms) {
dojo.connect(wStore[widgetKey], 'onkeyup',
function(e) {
if(e.keyCode == dojo.keys.ENTER) {
- resultManager.go(termManager.buildSearchObject());
+ resultManager.submitter();
}
}
);
@@ -204,7 +204,7 @@ function TermSelectorFactory(terms) {
dojo.connect(w.domNode, 'onkeyup',
function(e) {
if(e.keyCode == dojo.keys.ENTER) {
- resultManager.go(termManager.buildSearchObject());
+ resultManager.submitter();
}
}
);
@@ -807,8 +807,12 @@ function ResultManager(liPager, poGrid, plGrid, invGrid) {
this.liPager.focusLi();
}
- if (!this.count_results)
- this.show("no_results");
+ if (!this.count_results) {
+ if (this.no_results_popup)
+ alert(localeStrings.NO_RESULTS);
+ else
+ this.show("no_results");
+ }
else this.finish(this.result_type);
};
@@ -979,6 +983,10 @@ openils.Util.addOnLoad(
dijit.byId("acq-unified-inv-grid")
);
+ resultManager.submitter = function() {
+ resultManager.go(termManager.buildSearchObject());
+ };
+
uriManager = new URIManager();
if (uriManager.search_object) {
if (!uriManager.half_search)
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/templates/acq/invoice/view.tt2 | 16 +++++++++++-----
Open-ILS/src/templates/acq/search/unified.tt2 | 3 +--
Open-ILS/web/js/ui/default/acq/invoice/view.js | 14 ++++++++++++--
Open-ILS/web/js/ui/default/acq/search/unified.js | 16 ++++++++++++----
4 files changed, 36 insertions(+), 13 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list