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

Evergreen Git git at git.evergreen-ils.org
Fri Aug 12 15:14:21 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  c3a4adfdc78bbd0ac7e1bb3143331f171d20e5ef (commit)
      from  93211049c2ca2652fb7d1ef14e5329ddb117b8af (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 c3a4adfdc78bbd0ac7e1bb3143331f171d20e5ef
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Aug 11 14:16:24 2011 -0400

    in lieu of Ready Item Editor
    
    We're trying to prevent folks from using the item attribute editor in the
    unified interface when the volume pane is still updating its information
    (i.e. building the copies to feed to the attribute editor), so that a
    given editing widget isn't ripped out from under staff while its being
    used.  This change removes the heavy-handed Ready Item Editor button and
    instead tries to more gracefully manage the editor state based on change
    and keypress events.  Also change the color scheme for a disabled editor
    from red to light pink.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index aec871a..1430b5d 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -2833,8 +2833,6 @@
 <!ENTITY staff.cat.volume_copy_creator.batch_bar.call_number.label.label "Call Number:">
 <!ENTITY staff.cat.volume_copy_creator.batch_bar.call_number.label.accesskey "L">
 <!ENTITY staff.cat.volume_copy_creator.batch_bar.call_number.suffix "Suffix:">
-<!ENTITY staff.cat.volume_copy_creator.ready_item_editor.label "Ready Item Editor">
-<!ENTITY staff.cat.volume_copy_creator.ready_item_editor.accesskey "R">
 <!ENTITY staff.cat.volume_editor.title "Volumes">
 <!ENTITY staff.cat.volume_editor.caption.label "Volume Editor">
 <!ENTITY staff.cat.volume_editor.modify.label "Modify">
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 25ee3ef..3bc1891 100644
--- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js
+++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js
@@ -165,17 +165,17 @@ function my_init() {
 
         if (xulG.unified_interface) {
             xulG.disable_copy_editor = function(c) {
-                addCSSClass(document.documentElement,'red_bg');
+                addCSSClass(document.documentElement,'disabled_copy_editor');
                 g.disabled = true;
             }
             xulG.enable_copy_editor = function(c) {
-                removeCSSClass(document.documentElement,'red_bg');
+                removeCSSClass(document.documentElement,'disabled_copy_editor');
                 g.disabled = false;
                 xulG.refresh_copy_editor();
             }
             xulG.refresh_copy_editor = function() {
                 dump('refresh_copy_editor\n');
-                addCSSClass(document.documentElement,'blue_bg');
+                addCSSClass(document.documentElement,'enabling_copy_editor');
                 try {
                     xulG.clear_update_copy_editor_timeout();
                     g.copies = xulG.copies;
@@ -198,7 +198,7 @@ function my_init() {
                     g.check_for_unmet_required_fields();
                     setTimeout(
                         function() {
-                            removeCSSClass(document.documentElement,'blue_bg');
+                            removeCSSClass(document.documentElement,'enabling_copy_editor');
                         }, 1000
                     );
                 } catch(E) {
diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
index 48b87c5..7b0bee9 100644
--- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
+++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
@@ -68,23 +68,8 @@ function my_init() {
                     g.gather_copies();
                 }
             }
-            $('Sync').addEventListener(
-                'command',
-                function() {
-                    // give gather_copies_soon fired off directly/indirectly by
-                    // onchange a chance to go first
-                    setTimeout(
-                        function() {
-                            xulG.enable_copy_editor();
-                        },
-                        0
-                    );
-                },
-                false
-            );
         } else {
             $('Create').hidden = true;
-            $('Sync').hidden = true;
         }
 
         /***********************************************************************************************************/
@@ -234,7 +219,7 @@ function my_init() {
         g.load_prefs();
 
         if (g.existing_copies.length > 0) {
-            g.gather_copies_soon();
+            g.gather_copies_soon(true);
         }
 
         try {
@@ -290,10 +275,10 @@ g.render_volume_count_entry = function(row,ou_id) {
     util.widgets.apply_vertical_tab_on_enter_handler(
         tb,
         function() { render_copy_count_entry({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); }
-        ,function() { $('Sync').disabled = true; }
+        ,function() { g.delay_gather_copies_soon(false); }
     );
     tb.addEventListener( 'change', render_copy_count_entry, false);
-    tb.addEventListener( 'change', g.gather_copies_soon, false);
+    //tb.addEventListener( 'change', g.gather_copies_soon, false);
     tb.addEventListener( 'focus', function(ev) { g.last_focus = ev.target; }, false );
     setTimeout(
         function() {
@@ -482,7 +467,7 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
                                 },0
                             );
                         }
-                        ,function() { $('Sync').disabled = true; }
+                        ,function() { g.delay_gather_copies_soon(false); }
                     );
                     call_number_column_textbox.addEventListener( 'change', handle_change_to_callnumber_data, false);
                     //call_number_column_textbox.addEventListener( 'change', g.gather_copies_soon, false);
@@ -550,10 +535,10 @@ g.render_callnumber_copy_count_entry = function(row,ou_id,count) {
                                 },0
                             );
                         }
-                        ,function() { $('Sync').disabled = true; }
+                        ,function() { g.delay_gather_copies_soon(false); }
                     );
                     number_of_copies_column_textbox.addEventListener( 'change', handle_change_number_of_copies_column_textbox, false);
-                    number_of_copies_column_textbox.addEventListener( 'change', g.gather_copies_soon, false);
+                    //number_of_copies_column_textbox.addEventListener( 'change', g.gather_copies_soon, false);
                     number_of_copies_column_textbox.addEventListener( 'focus', function(ev) { g.last_focus = ev.target; }, false );
                     if ( !g.last_focus ) { number_of_copies_column_textbox.focus(); g.last_focus = number_of_copies_column_textbox; }
 
@@ -646,7 +631,7 @@ g.render_part_menu = function(barcode_tb) {
                         barcode_tb.setAttribute('bmp_id',menulist.selectedItem.value);
                         button.hidden = true;
                     }
-                    g.gather_copies_soon();
+                    g.gather_copies_soon(true);
                 }
             });
         },
@@ -662,7 +647,7 @@ g.render_part_menu = function(barcode_tb) {
         },
         false
     );
-    menulist.addEventListener('change',g.gather_copies_soon,false);
+    menulist.addEventListener('change',function() { g.gather_copies_soon(true); },false);
     menulist.addEventListener(
         'command',
         function(ev) {
@@ -671,7 +656,7 @@ g.render_part_menu = function(barcode_tb) {
         },
         false
     );
-    menulist.addEventListener('command',g.gather_copies_soon,false);
+    menulist.addEventListener('command',function() { g.gather_copies_soon(true); },false);
 
     return hbox;
 }
@@ -755,12 +740,12 @@ g.render_barcode_entry = function(node,callnumber_composite_key,count,ou_id) {
                 util.widgets.apply_vertical_tab_on_enter_handler(
                     tb,
                     function() { ready_to_create({'target':tb}); setTimeout(function(){util.widgets.vertical_tab(tb);},0); },
-                    g.delay_gather_copies_soon
+                    function() { g.delay_gather_copies_soon(true); }
                 );
                 util.widgets.apply_vertical_tab_on_enter_handler(
                     part_menu.firstChild,
                     function() { setTimeout(function(){util.widgets.vertical_tab(part_menu.firstChild);},0); },
-                    g.delay_gather_copies_soon
+                    function() { g.delay_gather_copies_soon(true); }
                 );
                 tb.addEventListener('change', function(ev) {
                     var barcode = String( ev.target.value ).replace(/\s/g,'');
@@ -778,7 +763,7 @@ g.render_barcode_entry = function(node,callnumber_composite_key,count,ou_id) {
             }
         }
 
-        g.gather_copies_soon();
+        g.gather_copies_soon(true);
         setTimeout( function() { if (g.first_focus) { g.first_focus.focus(); } }, 0 );
 
     } catch(E) {
@@ -816,7 +801,7 @@ g.generate_barcodes = function() {
 
         setTimeout(
             function() {
-                g.gather_copies_soon();
+                g.gather_copies_soon(true);
             },0
         );
 
@@ -825,21 +810,20 @@ g.generate_barcodes = function() {
     }
 }
 
-g.delay_gather_copies_soon = function() {
+g.delay_gather_copies_soon = function(enable_copy_editor) {
     if (xulG.unified_interface) {
         dump('g.delay_gather_copies_soon()\n');
-        g.gather_copies_soon();
+        g.gather_copies_soon(enable_copy_editor);
     }
 }
 
-g.gather_copies_soon = function(ev) {
+g.gather_copies_soon = function(enable_copy_editor) {
     try {
         if (!xulG.unified_interface) { return; }
         dump('g.gather_copies_soon()\n');
         if (typeof xulG.disable_copy_editor == 'function') {
             xulG.disable_copy_editor();
         }
-        $('Sync').disabled = true;
         if (g.update_copy_editor_timeoutID) {
             clearTimeout(g.update_copy_editor_timeoutID);
         }
@@ -849,8 +833,9 @@ g.gather_copies_soon = function(ev) {
             function() {
                 try {
                     g.gather_copies();
-                    //xulG.enable_copy_editor();
-                    $('Sync').disabled = false;
+                    if (enable_copy_editor) {
+                        xulG.enable_copy_editor();
+                    }
                     xulG.refresh_copy_editor();
                 } catch(E) {
                     dump('Error in volume_copy_editor.js with g.gather_copies_soon setTimeout func(): ' + E + '\n');
@@ -1555,7 +1540,7 @@ g.render_batch_button = function() {
             }
             setTimeout(
                 function() {
-                    g.gather_copies_soon();
+                    g.gather_copies_soon(true);
                 },0
             );
             if (g.last_focus) setTimeout( function() { g.last_focus.focus(); }, 0 );
diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul
index 00a846f..5cfc111 100644
--- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul
+++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.xul
@@ -121,11 +121,6 @@
                 <button id="CreateWithDefaults" disabled="true" oncommand="g.stash_and_close('noedit');"/>
                 <button id="EditThenCreate" disabled="true" oncommand="g.stash_and_close('edit');"/>
             </hbox>
-            <button id="Sync"
-                label="&staff.cat.volume_copy_creator.ready_item_editor.label;"
-                accesskey="&staff.cat.volume_copy_creator.ready_item_editor.accesskey;"
-                disabled="true"
-                image="/xul/server/skin/media/images/down_arrow.gif"/>
             <button id="Create" disabled="true" oncommand="g.stash_and_close('unified_interface');"/>
         </hbox>
     </vbox>
diff --git a/Open-ILS/xul/staff_client/server/skin/cat.css b/Open-ILS/xul/staff_client/server/skin/cat.css
index 3fc7a30..27d055a 100644
--- a/Open-ILS/xul/staff_client/server/skin/cat.css
+++ b/Open-ILS/xul/staff_client/server/skin/cat.css
@@ -17,3 +17,6 @@ row#batch_bar { background-color: gray; }
 .cn_suffix { display: none; }
 .part_column { display: none; }
 */
+
+.disabled_copy_editor { background-color: LightPink; }
+.enabling_copy_editor { background-color: LightPink; }
diff --git a/Open-ILS/xul/staff_client/server/skin/global.css b/Open-ILS/xul/staff_client/server/skin/global.css
index d089ced..8ad17cd 100644
--- a/Open-ILS/xul/staff_client/server/skin/global.css
+++ b/Open-ILS/xul/staff_client/server/skin/global.css
@@ -149,5 +149,3 @@ listitem { border-bottom: solid thin black; }
 
 .oils_event { color: red; }
 
-.blue_bg { background-color: blue; }
-.red_bg { background-color: red; }

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

Summary of changes:
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    2 -
 .../xul/staff_client/server/cat/copy_editor.js     |    8 ++--
 .../staff_client/server/cat/volume_copy_creator.js |   55 +++++++------------
 .../server/cat/volume_copy_creator.xul             |    5 --
 Open-ILS/xul/staff_client/server/skin/cat.css      |    3 +
 Open-ILS/xul/staff_client/server/skin/global.css   |    2 -
 6 files changed, 27 insertions(+), 48 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list