From: miker Date: Thu, 18 Dec 2008 21:21:43 +0000 (+0000) Subject: thow and error on, well, error for easier debugging in firebug X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a9795a64771649eaa9aa814fe90232e64aec18f2;p=Evergreen.git thow and error on, well, error for easier debugging in firebug git-svn-id: svn://svn.open-ils.org/ILS/trunk@11620 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/conify/global/actor/org_unit.js b/Open-ILS/web/conify/global/actor/org_unit.js index ac6dc71545..9a55d3e910 100644 --- a/Open-ILS/web/conify/global/actor/org_unit.js +++ b/Open-ILS/web/conify/global/actor/org_unit.js @@ -86,6 +86,7 @@ function save_org () { } else { highlighter.editor_pane.red.play(); status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_DATA, [ou_list_store.getValue( current_ou, 'name' )] ) ); + throw 'commit error'; } pCRUD.disconnect(); }, @@ -98,18 +99,17 @@ function save_org () { onerror : function (r) { highlighter.editor_pane.red.play(); status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_DATA, [ou_list_store.getValue( current_ou, 'name' )] ) ); + throw 'update error'; }, oncomplete : function (r) { var res = r.recv(); if ( res && res.content() ) { - ou_list_store.setValue( current_ou, 'ischanged', 0 ); - highlighter.editor_pane.green.play(); - status_update( dojo.string.substitute( aou_strings.SUCCESS_SAVE, [ou_list_store.getValue( current_ou, 'name' )] ) ); commit.send(); } else { highlighter.editor_pane.red.play(); status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_DATA, [ou_list_store.getValue( current_ou, 'name' )] ) ); pCRUD.disconnect(); + throw 'update error'; } }, }); @@ -121,6 +121,7 @@ function save_org () { onerror : function (r) { highlighter.editor_pane.red.play(); status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_DATA, [ou_list_store.getValue( current_ou, 'name' )] ) ); + throw 'begin error'; }, oncomplete : function (r) { var res = r.recv(); @@ -130,6 +131,7 @@ function save_org () { highlighter.editor_pane.red.play(); status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_DATA, [ou_list_store.getValue( current_ou, 'name' )] ) ); pCRUD.disconnect(); + throw 'begin error'; } }, });