[open-ils-commits] r7686 - in
branches/rel_1_2/Open-ILS/xul/staff_client:
chrome/content/main server/cat server/circ
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 15 17:58:26 EDT 2007
Author: phasefx
Date: 2007-08-15 17:54:28 -0400 (Wed, 15 Aug 2007)
New Revision: 7686
Modified:
branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/main/main.js
branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_browser.js
branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js
branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js
branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
Log:
backport filepicker bug fix, and for Item Status interface, handle VOLUME_LABEL_EXISTS event on callnumber edit
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/main/main.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/main/main.js 2007-08-15 21:52:26 UTC (rev 7685)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/main/main.js 2007-08-15 21:54:28 UTC (rev 7686)
@@ -34,7 +34,8 @@
mode == 'open' ? nsIFilePicker.modeOpen : nsIFilePicker.modeSave
);
fp.appendFilters( nsIFilePicker.filterAll );
- if ( fp.show( ) == nsIFilePicker.returnOK && fp.file ) {
+ var fp_result = fp.show();
+ if ( ( fp_result == nsIFilePicker.returnOK || fp_result == nsIFilePicker.returnReplace ) && fp.file ) {
return fp.file;
} else {
return null;
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_browser.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2007-08-15 21:52:26 UTC (rev 7685)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2007-08-15 21:54:28 UTC (rev 7686)
@@ -572,8 +572,16 @@
api.FM_ACN_TREE_UPDATE.method,
[ ses(), volumes, true ]
);
- if (typeof r.ilsevent != 'undefined') throw(r);
- alert('Volumes modified.');
+ if (typeof r.ilsevent != 'undefined') {
+ switch(r.ilsevent) {
+ case 1705 /* VOLUME_LABEL_EXISTS */ :
+ alert("Edit failed: You tried to change a volume's callnumber to one that is already in use for the given library. You should transfer the items to the desired callnumber instead.");
+ break;
+ default: throw(r);
+ }
+ } else {
+ alert('Volumes modified.');
+ }
} catch(E) {
obj.error.standard_unexpected_error_alert('volume update error: ',E);
}
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2007-08-15 21:52:26 UTC (rev 7685)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/cat/copy_editor.js 2007-08-15 21:54:28 UTC (rev 7686)
@@ -188,7 +188,8 @@
mode == 'open' ? nsIFilePicker.modeOpen : nsIFilePicker.modeSave
);
fp.appendFilters( nsIFilePicker.filterAll );
- if ( fp.show( ) == nsIFilePicker.returnOK && fp.file ) {
+ var fp_result = fp.show();
+ if ( ( fp_result == nsIFilePicker.returnOK || fp_result == nsIFilePicker.returnReplace ) && fp.file ) {
return fp.file;
} else {
return null;
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js 2007-08-15 21:52:26 UTC (rev 7685)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/copy_status.js 2007-08-15 21:54:28 UTC (rev 7686)
@@ -298,7 +298,8 @@
mode == 'open' ? nsIFilePicker.modeOpen : nsIFilePicker.modeSave
);
fp.appendFilters( nsIFilePicker.filterAll );
- if ( fp.show( ) == nsIFilePicker.returnOK && fp.file ) {
+ var fp_result = fp.show();
+ if ( ( fp_result == nsIFilePicker.returnOK || fp_result == nsIFilePicker.returnReplace ) && fp.file ) {
return fp.file;
} else {
return null;
@@ -720,8 +721,16 @@
api.FM_ACN_TREE_UPDATE.method,
[ ses(), volumes, false ]
);
- if (typeof r.ilsevent != 'undefined') throw(r);
- alert('Volumes modified.');
+ if (typeof r.ilsevent != 'undefined') {
+ switch(r.ilsevent) {
+ case 1705 /* VOLUME_LABEL_EXISTS */ :
+ alert("Edit failed: You tried to change a volume's callnumber to one that is already in use for the given library. You should transfer the items to the desired callnumber instead.");
+ break;
+ default: throw(r);
+ }
+ } else {
+ alert('Volumes modified.');
+ }
} catch(E) {
obj.error.standard_unexpected_error_alert('volume update error: ',E);
}
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js 2007-08-15 21:52:26 UTC (rev 7685)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js 2007-08-15 21:54:28 UTC (rev 7686)
@@ -366,7 +366,8 @@
mode == 'open' ? nsIFilePicker.modeOpen : nsIFilePicker.modeSave
);
fp.appendFilters( nsIFilePicker.filterAll );
- if ( fp.show( ) == nsIFilePicker.returnOK && fp.file ) {
+ var fp_result = fp.show();
+ if ( ( fp_result == nsIFilePicker.returnOK || fp_result == nsIFilePicker.returnReplace ) && fp.file ) {
return fp.file;
} else {
return null;
More information about the open-ils-commits
mailing list