[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. bfb3104d8f5adce39031c4ce9ca9b0c644fc46e8

Evergreen Git git at git.evergreen-ils.org
Fri Jun 3 15:53:27 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, rel_2_1 has been updated
       via  bfb3104d8f5adce39031c4ce9ca9b0c644fc46e8 (commit)
       via  b0a38aaca23e17086808f2f6bce43de095829676 (commit)
       via  a0fa6c0460274c78da3e1d2bf3db7bd566b30fe5 (commit)
      from  82b04b35e28445e0f005ccc3203eea95e58507fc (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 bfb3104d8f5adce39031c4ce9ca9b0c644fc46e8
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 b0a38aaca23e17086808f2f6bce43de095829676
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 a0fa6c0460274c78da3e1d2bf3db7bd566b30fe5
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