[open-ils-commits] [GIT] Evergreen ILS branch master updated. 70fde1d382583af2a0ac9c909660a10b55021701

Evergreen Git git at git.evergreen-ils.org
Mon Jul 25 17:16:10 EDT 2011


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  70fde1d382583af2a0ac9c909660a10b55021701 (commit)
       via  a8c1d0cadb8725b0f91056f275a4ab8b9daf2f06 (commit)
      from  6d4d47b3c971ed024334bea57c509f7326247594 (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 70fde1d382583af2a0ac9c909660a10b55021701
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Jul 25 17:15:44 2011 -0400

    Stamped upgrade script for uncheck_bills_and_unfocus_payment_box
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 175a63c..cb783e2 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0583', :eg_version); -- miker/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0584', :eg_version); -- phasefx/berick
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql b/Open-ILS/src/sql/Pg/upgrade/0584.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
similarity index 93%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
rename to Open-ILS/src/sql/Pg/upgrade/0584.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
index 3856226..64dbce4 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0584.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
@@ -5,7 +5,7 @@
 BEGIN;
 
 -- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0584', :eg_version);
 
 INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) 
     VALUES ( 

commit a8c1d0cadb8725b0f91056f275a4ab8b9daf2f06
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Jul 20 15:20:00 2011 -0400

    GUI: Uncheck bills by default in the patron billing interface
    
    Org unit setting and behavior.  Also defaults the focus to the Uncheck All
    button instead of the Payment Received field in that interface.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 9cf3bbc..cd16dde 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -2751,7 +2751,24 @@ INSERT into config.org_unit_setting_type
     oils_i18n_gettext( 'org.patron_opt_default', 'Circ: Patron Opt-In Default', 'coust', 'label'),
     oils_i18n_gettext( 'org.patron_opt_default', 'This is the default depth at which a patron is opted in; it is calculated as an org unit relative to the current workstation.', 'coust', 'label'),
     'integer')
-
+,( 
+        'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+        oils_i18n_gettext(
+            'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+            'GUI: Uncheck bills by default in the patron billing interface',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+            'Uncheck bills by default in the patron billing interface,'
+            || ' and focus on the Uncheck All button instead of the'
+            || ' Payment Received field.',
+            'coust',
+            'description'
+        ),
+        'bool'
+    )
 ;
 
 UPDATE config.org_unit_setting_type
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
new file mode 100644
index 0000000..3856226
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
@@ -0,0 +1,30 @@
+-- Evergreen DB patch XXXX.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
+--
+-- New org setting ui.circ.billing.uncheck_bills_and_unfocus_payment_box
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) 
+    VALUES ( 
+        'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+        oils_i18n_gettext(
+            'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+            'GUI: Uncheck bills by default in the patron billing interface',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'ui.circ.billing.uncheck_bills_and_unfocus_payment_box',
+            'Uncheck bills by default in the patron billing interface,'
+            || ' and focus on the Uncheck All button instead of the'
+            || ' Payment Received field.',
+            'coust',
+            'description'
+        ),
+        'bool'
+    );
+
+COMMIT;
diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js
index 490a94a..76eb5af 100644
--- a/Open-ILS/xul/staff_client/server/patron/bill2.js
+++ b/Open-ILS/xul/staff_client/server/patron/bill2.js
@@ -47,9 +47,21 @@ function my_init() {
             $('credit_forward').setAttribute('value',util.money.sanitize( g.patron.credit_forward_balance() ));
         }
 
-        default_focus();
-
-        tally_all();
+        if (g.data.hash.aous['ui.circ.billing.uncheck_bills_and_unfocus_payment_box']) {
+            g.funcs.push(
+                function() {
+                    $('uncheck_all').focus();
+                    tally_all();
+                }
+            );
+        } else {
+            g.funcs.push(
+                function() {
+                    default_focus();
+                    tally_all();
+                }
+            );
+        }
 
     } catch(E) {
         var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/bill2.xul', E]);
@@ -406,8 +418,31 @@ function check_all_refunds() {
 
 function gen_list_append_func(r) {
     return function() {
-        if (typeof r == 'object') { g.row_map[ r.id() ] = g.bill_list.append( { 'retrieve_id' : r.id(), 'flesh_immediately' : true, 'row' : { 'my' : { 'checked' : true, 'mbts' : r } } } );
-        } else { g.row_map[r] = g.bill_list.append( { 'retrieve_id' : r, 'flesh_immediately' : true, 'row' : { 'my' : { 'checked' : true } } } ); }
+        var default_check_state = g.data.hash.aous[
+            'ui.circ.billing.uncheck_bills_and_unfocus_payment_box'
+        ] ? false : true;
+        if (typeof r == 'object') {
+            g.row_map[ r.id() ] = g.bill_list.append( {
+                'retrieve_id' : r.id(),
+                'flesh_immediately' : true,
+                'row' : {
+                    'my' : {
+                        'checked' : default_check_state,
+                        'mbts' : r
+                    }
+                }
+            } );
+        } else {
+            g.row_map[r] = g.bill_list.append( {
+                'retrieve_id' : r,
+                'flesh_immediately' : true,
+                'row' : {
+                    'my' : {
+                        'checked' : default_check_state
+                    }
+                }
+            } );
+        }
     }
 }
 
diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.xul b/Open-ILS/xul/staff_client/server/patron/bill2.xul
index e2ba9ee..8dba84d 100644
--- a/Open-ILS/xul/staff_client/server/patron/bill2.xul
+++ b/Open-ILS/xul/staff_client/server/patron/bill2.xul
@@ -142,7 +142,7 @@
                 <hbox>
                     <hbox id="bill_list_actions" />
                     <button label="&staff.patron.bills_overlay.check_all.label;" accesskey="&staff.patron.bills_overlay.check_all.accesskey;" oncommand="check_all();"/>
-                    <button label="&staff.patron.bills_overlay.uncheck_all.label;" accesskey="&staff.patron.bills_overlay.uncheck_all.accesskey;" oncommand="uncheck_all();"/>
+                    <button id="uncheck_all" label="&staff.patron.bills_overlay.uncheck_all.label;" accesskey="&staff.patron.bills_overlay.uncheck_all.accesskey;" oncommand="uncheck_all();"/>
                     <button label="&staff.patron.bills_overlay.check_all_refunds.label;" accesskey="&staff.patron.bills_overlay.check_all_refunds.accesskey;" oncommand="check_all_refunds();"/>
                     <button id="print" label="&staff.patron.bills_overlay.print_bills.label;" accesskey="&staff.patron.bills_overlay.print_bills.accesskey;" oncommand="print_bills();"/>
                     <spacer flex="1"/>

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   19 ++++++++-
 ...lling.uncheck_bills_and_unfocus_payment_box.sql |   30 +++++++++++++
 Open-ILS/xul/staff_client/server/patron/bill2.js   |   45 +++++++++++++++++--
 Open-ILS/xul/staff_client/server/patron/bill2.xul  |    2 +-
 5 files changed, 90 insertions(+), 8 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0584.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list