From 3037e41bf087a1e930217a432eef3b2eed13ecfd Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 26 Jun 2006 06:20:52 +0000 Subject: [PATCH] Reset copies button and misc git-svn-id: svn://svn.open-ils.org/ILS/trunk@4783 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/copy_editor.js | 16 ++++++++++++++++ Open-ILS/xul/staff_client/server/cat/copy_editor.xul | 10 +++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 09e9b05f34..c58ab8adcc 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -66,6 +66,7 @@ function my_init() { if (g.copies.length > 0 && g.copies[0].id() < 0) { document.getElementById('copy_notes').setAttribute('hidden','true'); g.apply("status",5 /* In Process */); + $('save').setAttribute('label','Create Copies'); } else { g.panes_and_field_names.left_pane = [ @@ -160,6 +161,11 @@ function my_init() { } /******************************************************************************************************/ + /* Backup copies :) */ + + g.original_copies = js2JSON( g.copies ); + + /******************************************************************************************************/ /* Do it */ g.summarize( g.copies ); @@ -174,6 +180,16 @@ function my_init() { } /******************************************************************************************************/ +/* Restore backup copies */ + +g.reset = function() { + g.changed = {}; + g.copies = JSON2js( g.original_copies ); + g.summarize( g.copies ); + g.render(); +} + +/******************************************************************************************************/ /* Apply a value to a specific field on all the copies being edited */ g.apply = function(field,value) { diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul index 15d4a07d6e..251ecd12f9 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul @@ -39,7 +39,9 @@ - + +