[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. b844a3c1fbda7fc66193e5c3f400ba0b3e35d7de
Evergreen Git
git at git.evergreen-ils.org
Wed Aug 27 01:06:04 EDT 2014
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, master has been updated
via b844a3c1fbda7fc66193e5c3f400ba0b3e35d7de (commit)
via 5ebaf746568c4d51863b73533fb4c3af530d27de (commit)
from 611673967f308a806842b8a30e09cdee10e742da (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 b844a3c1fbda7fc66193e5c3f400ba0b3e35d7de
Author: Jason Etheridge <jason at esilibrary.com>
Date: Mon Oct 1 16:49:04 2012 -0400
LP#1010027: tweak patron columns in patron search interface
specifically, remove the Mailing Address and Billing Address columns that come
off the actor table, since they are redundant with the Mailing Addr: Address ID
and Billing Addr: Address ID columns that come off the address table.
Also, alphabetize the columns coming directly off of the user table. The columns
coming off the library card and address tables remain unsorted; I believe their
order is as listed in the fm_IDL.xml file for their corresponding fieldmapper
definitions.
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Signed-off-by: Jennifer Pringle <jpringle at sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/xul/staff_client/server/patron/search_result.js b/Open-ILS/xul/staff_client/server/patron/search_result.js
index 49c4522..4e95573 100644
--- a/Open-ILS/xul/staff_client/server/patron/search_result.js
+++ b/Open-ILS/xul/staff_client/server/patron/search_result.js
@@ -37,7 +37,7 @@ patron.search_result.prototype = {
JSAN.use('patron.util');
var columns = obj.list.fm_columns('au',{
- '*' : { 'remove_virtual' : true, 'expanded_label' : false, 'hidden' : true },
+ '*' : { 'remove_virtual' : true, 'expanded_label' : false, 'hidden' : true, 'sort_headers' : true },
'au_barcode' : { 'hidden' : false },
'au_barred' : { 'hidden' : false },
'au_family_name' : { 'hidden' : false },
@@ -47,6 +47,8 @@ patron.search_result.prototype = {
'au_profile' : { 'fleshed_display_field' : 'name' },
'au_ident_type' : { 'fleshed_display_field' : 'name' },
'au_ident_type2' : { 'fleshed_display_field' : 'name' },
+ 'au_mailing_address' : { 'remove_me' : true },
+ 'au_billing_address' : { 'remove_me' : true },
'au_net_access_level' : { 'fleshed_display_field' : 'name' }
}).concat(
obj.list.fm_columns('ac',{
commit 5ebaf746568c4d51863b73533fb4c3af530d27de
Author: Jason Etheridge <jason at esilibrary.com>
Date: Mon Oct 1 16:46:56 2012 -0400
LP#1010027: more internal options for xul lists
specifically, give fm_columns a sort_headers flag for alphabetizing the columns
returned by label; and delete_me flag for omitting a column definition entirely
Not all xul lists are using fm_columns yet
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Signed-off-by: Jennifer Pringle <jpringle at sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js
index 0eba98b..f9a962f 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/list.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js
@@ -2059,6 +2059,7 @@ util.list.prototype = {
var obj = this;
var columns = [];
if (!prefix) { prefix = ''; }
+ var sort_headers = false;
try {
// requires the dojo library fieldmapper.autoIDL
if (typeof fieldmapper == 'undefined') { throw 'fieldmapper undefined'; }
@@ -2164,6 +2165,9 @@ util.list.prototype = {
def.remove_me = true;
}
}
+ if (column_extras['*']['sort_headers']) {
+ sort_headers = true;
+ }
}
if (column_extras[col_id]) {
for (var attr in column_extras[col_id]) {
@@ -2172,6 +2176,9 @@ util.list.prototype = {
if (column_extras[col_id]['keep_me']) {
def.remove_me = false;
}
+ if (column_extras[col_id]['remove_me']) {
+ def.remove_me = true;
+ }
if (column_extras[col_id]['label_prefix']) {
def.label = column_extras[col_id]['label_prefix'] + def.label;
}
@@ -2194,6 +2201,16 @@ util.list.prototype = {
}
}
+ if (sort_headers) {
+ columns.sort(
+ function(a,b) {
+ if (a.label > b.label) { return 1; }
+ if (a.label < b.label) { return -1; }
+ return 0;
+ }
+ );
+ }
+
} catch(E) {
obj.error.standard_unexpected_error_alert('fm_columns()',E);
}
-----------------------------------------------------------------------
Summary of changes:
.../xul/staff_client/chrome/content/util/list.js | 17 +++++++++++++++++
.../staff_client/server/patron/search_result.js | 4 +++-
2 files changed, 20 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list