[open-ils-commits] [GIT] Evergreen ILS branch master updated. 11908662b2a67dd4dac03d715e2fb97a48adfe64

Evergreen Git git at git.evergreen-ils.org
Fri Jun 3 15:52:33 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  11908662b2a67dd4dac03d715e2fb97a48adfe64 (commit)
       via  bf9017e16fb6d0e7568fc3b6a713363008a60f37 (commit)
       via  d96e2a45e12bef1a913a2f295bdcc7f4e5de51d4 (commit)
      from  891d934fca3909043d31602a7d5de1d5ec699d9f (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 11908662b2a67dd4dac03d715e2fb97a48adfe64
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Fri Jun 3 15:58:52 2011 -0400

    tweak function name
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

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 44bfaaa..0ce4db1 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
@@ -168,7 +168,7 @@ function my_init() {
                 try {
                     g.copies = xulG.copies;
                     g.original_copies = js2JSON( g.copies );
-                    g.show_copy_notes_button();
+                    g.hide_copy_notes_button();
                     for (var i = 0; i < g.applied_templates.length; i++) {
                         g._apply_template( g.applied_templates[i], false);
                     }
@@ -186,7 +186,7 @@ function my_init() {
                 g.changed[ 'volume_copy_creator.'+id ] = { 'type' : 'volume_copy_creator', 'field' : id, 'value' : v };
             }
         } else {
-            g.show_copy_notes_button();
+            g.hide_copy_notes_button();
         }
 
     } catch(E) {
@@ -198,7 +198,7 @@ function my_init() {
 
 /******************************************************************************************************/
 /* Show copy notes button */
-g.show_copy_notes_button = function() {
+g.hide_copy_notes_button = function() {
     if (g.copies.length > 0 && g.copies[0].id() < 0) {
         document.getElementById('copy_notes').setAttribute('hidden','true');
         $('save').setAttribute('label', $('catStrings').getString('staff.cat.copy_editor.create_copies'));

commit bf9017e16fb6d0e7568fc3b6a713363008a60f37
Author: Dan Scott <dan at coffeecode.net>
Date:   Fri Jun 3 14:48:30 2011 -0400

    Refactor the "show copy notes button" functionality
    
    Collapse the duplicated code for showing / hiding the "show copy notes
    button" into a single method. Might make maintenance a bit easier some
    day.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

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 3967b55..44bfaaa 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
@@ -1,4 +1,4 @@
-// vim:noet:sw=4:ts=4
+// vim:et:sw=4:ts=4
 var g = {};
 g.map_acn = {};
 
@@ -168,14 +168,7 @@ function my_init() {
                 try {
                     g.copies = xulG.copies;
                     g.original_copies = js2JSON( g.copies );
-                    if (g.copies.length > 0 && g.copies[0].id() < 0) {
-                        document.getElementById('copy_notes').setAttribute('hidden','true');
-                        $('save').setAttribute('label', $('catStrings').getString('staff.cat.copy_editor.create_copies'));
-                        $('save').setAttribute('accesskey', $('catStrings').getString('staff.cat.copy_editor.create_copies.accesskey'));
-                    }
-                    if (g.copies.length != 1) {
-                        document.getElementById('copy_notes').setAttribute('hidden','true');
-                    }
+                    g.show_copy_notes_button();
                     for (var i = 0; i < g.applied_templates.length; i++) {
                         g._apply_template( g.applied_templates[i], false);
                     }
@@ -193,14 +186,7 @@ function my_init() {
                 g.changed[ 'volume_copy_creator.'+id ] = { 'type' : 'volume_copy_creator', 'field' : id, 'value' : v };
             }
         } else {
-            if (g.copies.length > 0 && g.copies[0].id() < 0) {
-                document.getElementById('copy_notes').setAttribute('hidden','true');
-                $('save').setAttribute('label', $('catStrings').getString('staff.cat.copy_editor.create_copies'));
-                $('save').setAttribute('accesskey', $('catStrings').getString('staff.cat.copy_editor.create_copies.accesskey'));
-            }
-            if (g.copies.length != 1) {
-                document.getElementById('copy_notes').setAttribute('hidden','true');
-            }
+            g.show_copy_notes_button();
         }
 
     } catch(E) {
@@ -211,6 +197,19 @@ function my_init() {
 }
 
 /******************************************************************************************************/
+/* Show copy notes button */
+g.show_copy_notes_button = function() {
+    if (g.copies.length > 0 && g.copies[0].id() < 0) {
+        document.getElementById('copy_notes').setAttribute('hidden','true');
+        $('save').setAttribute('label', $('catStrings').getString('staff.cat.copy_editor.create_copies'));
+        $('save').setAttribute('accesskey', $('catStrings').getString('staff.cat.copy_editor.create_copies.accesskey'));
+    }
+    if (g.copies.length != 1) {
+        document.getElementById('copy_notes').setAttribute('hidden','true');
+    }
+}
+
+/******************************************************************************************************/
 /* Retrieve Templates */
 
 g.retrieve_templates = function() {

commit d96e2a45e12bef1a913a2f295bdcc7f4e5de51d4
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Wed Jun 1 15:57:50 2011 -0400

    fix the Copy Notes button in the unified vol/copy editor
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

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 32139eb..3967b55 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
@@ -123,11 +123,6 @@ function my_init() {
             $('top_nav').setAttribute('hidden','true');
         }
 
-        if (g.copies.length > 0 && g.copies[0].id() < 0) {
-            document.getElementById('copy_notes').setAttribute('hidden','true');
-            $('save').setAttribute('label', $('catStrings').getString('staff.cat.copy_editor.create_copies'));
-            $('save').setAttribute('accesskey', $('catStrings').getString('staff.cat.copy_editor.create_copies.accesskey'));
-        }
         g.panes_and_field_names.left_pane = 
             [
                 [
@@ -140,9 +135,6 @@ function my_init() {
                 ]
             ].concat(g.panes_and_field_names.left_pane);
 
-        if (g.copies.length != 1) {
-            document.getElementById('copy_notes').setAttribute('hidden','true');
-        }
 
         /******************************************************************************************************/
         /* Show the Record Details? */
@@ -176,6 +168,14 @@ function my_init() {
                 try {
                     g.copies = xulG.copies;
                     g.original_copies = js2JSON( g.copies );
+                    if (g.copies.length > 0 && g.copies[0].id() < 0) {
+                        document.getElementById('copy_notes').setAttribute('hidden','true');
+                        $('save').setAttribute('label', $('catStrings').getString('staff.cat.copy_editor.create_copies'));
+                        $('save').setAttribute('accesskey', $('catStrings').getString('staff.cat.copy_editor.create_copies.accesskey'));
+                    }
+                    if (g.copies.length != 1) {
+                        document.getElementById('copy_notes').setAttribute('hidden','true');
+                    }
                     for (var i = 0; i < g.applied_templates.length; i++) {
                         g._apply_template( g.applied_templates[i], false);
                     }
@@ -192,6 +192,15 @@ function my_init() {
             xulG.notify_of_templatable_field_change = function(id,v) {
                 g.changed[ 'volume_copy_creator.'+id ] = { 'type' : 'volume_copy_creator', 'field' : id, 'value' : v };
             }
+        } else {
+            if (g.copies.length > 0 && g.copies[0].id() < 0) {
+                document.getElementById('copy_notes').setAttribute('hidden','true');
+                $('save').setAttribute('label', $('catStrings').getString('staff.cat.copy_editor.create_copies'));
+                $('save').setAttribute('accesskey', $('catStrings').getString('staff.cat.copy_editor.create_copies.accesskey'));
+            }
+            if (g.copies.length != 1) {
+                document.getElementById('copy_notes').setAttribute('hidden','true');
+            }
         }
 
     } catch(E) {

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

Summary of changes:
 .../xul/staff_client/server/cat/copy_editor.js     |   26 +++++++++++++-------
 1 files changed, 17 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list