[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. 1a37aefeb0fc58ddc8ec4e4835bd4871c4c5bd7e

Evergreen Git git at git.evergreen-ils.org
Tue Jan 21 17:24:03 EST 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, rel_2_4 has been updated
       via  1a37aefeb0fc58ddc8ec4e4835bd4871c4c5bd7e (commit)
      from  bdd7b7745e857372a6d0178bd76a5f19412501fe (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 1a37aefeb0fc58ddc8ec4e4835bd4871c4c5bd7e
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Wed Nov 27 09:55:35 2013 -0500

    LP#842991 Reports needs to error when deleting fails
    
    When attempting to delete a report template, the reports interface
    incorrectly shows "Action Succeeded" even when it partly fails. If the
    user performing the delete does not own all the dependent reports and
    outputs, then the perl function returns 1 to indicate that some were
    deleted, but not all. However, the javascript that calls that function
    does not check for a return value of 1. This commit adds that check, and
    also improves the formatting of the related error messages.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/web/opac/locale/en-US/reports.dtd b/Open-ILS/web/opac/locale/en-US/reports.dtd
index 09a721b..f572515 100644
--- a/Open-ILS/web/opac/locale/en-US/reports.dtd
+++ b/Open-ILS/web/opac/locale/en-US/reports.dtd
@@ -143,8 +143,12 @@
 <!ENTITY reports.oils_rpt_folder_window.select_folder "Select Folder">
 <!ENTITY reports.oils_rpt_folder_window.cancel "Cancel">
 <!ENTITY reports.oils_rpt_folder_window.confirm_delete "Are you sure you wish to delete the selected item(s)?">
-<!ENTITY reports.oils_rpt_folder_window.dependant_reports_no_delete "One or more of the selected templates could not be deleted because there are reports that depend on them.">
-<!ENTITY reports.oils_rpt_folder_window.dependant_outputs_no_delete "One or more of The selected reports could not be deleted because there are outputs that depend on them.">
+<!ENTITY reports.oils_rpt_folder_window.dependant_reports_no_delete "
+        One or more of the selected templates could not be deleted because
+        there are reports or outputs that depend on them.">
+<!ENTITY reports.oils_rpt_folder_window.dependant_outputs_no_delete "
+        One or more of the selected reports could not be deleted because
+        there are outputs that depend on them.">
 <!ENTITY reports.oils_rpt_folder_window.cannot_delete_another_users_data "You may not delete another user's items">
 <!ENTITY reports.oils_rpt_folder_window.cannot_move_another_users_data "You may not move another user's items">
 <!ENTITY reports.oils_rpt_folder_window.delete_all_attached_reports "
diff --git a/Open-ILS/web/reports/oils_rpt_folder_window.js b/Open-ILS/web/reports/oils_rpt_folder_window.js
index b9d31b3..dc6a7d09 100644
--- a/Open-ILS/web/reports/oils_rpt_folder_window.js
+++ b/Open-ILS/web/reports/oils_rpt_folder_window.js
@@ -444,6 +444,7 @@ oilsRptFolderWindow.prototype.deleteTemplates = function(list, idx, callback, er
 					req.callback(function(r) {
 						var res = r.getResultObject();
 						if( res == 0 ) return oilsRptAlertFailure();
+						if( res == 1 ) errid = 'oils_rpt_folder_contents_template_no_delete';
 						obj.deleteTemplates(list, ++idx, callback, errid)
 					});
 					req.send();

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

Summary of changes:
 Open-ILS/web/opac/locale/en-US/reports.dtd     |    8 ++++++--
 Open-ILS/web/reports/oils_rpt_folder_window.js |    1 +
 2 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list