[open-ils-commits] [GIT] Evergreen ILS branch master updated. 26ff7685cc2744424ea8c5e74dd7e62f0cfcf6e3

Evergreen Git git at git.evergreen-ils.org
Wed Apr 3 15:23:18 EDT 2013


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  26ff7685cc2744424ea8c5e74dd7e62f0cfcf6e3 (commit)
       via  bb847f7bc0872002e38fe914c94211dc18ddc36f (commit)
      from  25da3f9f972e9b7869e3fb7f727c11824f26539a (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 26ff7685cc2744424ea8c5e74dd7e62f0cfcf6e3
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Apr 3 12:44:23 2013 -0400

    Populate variable needed for batch item receive
    
    In the integrated alt editor, we load the sub. grid differently, so
    'sub' was not being populated.  Since we should only ever have one
    subscription showing at a time (in this view), we can simply assign
    the item to 'sub' as it is received.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/serial/subscription.js b/Open-ILS/web/js/ui/default/serial/subscription.js
index 10c6345..6f1291f 100644
--- a/Open-ILS/web/js/ui/default/serial/subscription.js
+++ b/Open-ILS/web/js/ui/default/serial/subscription.js
@@ -320,6 +320,9 @@ openils.Util.addOnLoad(
             ssub_grid.onPostUpdate = function(fmObject) {
                 parent.document.getElementById(window.name).refresh_command();
             }
+            ssub_grid.onItemReceived = function(item) {
+                sub = item;
+            }
             if (cgi.param("tab") in tab_dispatch) {
                 ssub_grid._fresh = false; // force View/Edit tab to reload (otherwise, it is blank) XXX why?
                 tab_container.selectChild(tab_dispatch[cgi.param("tab")]);

commit bb847f7bc0872002e38fe914c94211dc18ddc36f
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Apr 3 12:03:25 2013 -0400

    Small fixes for alt sub editor integration
    
    This commit applies some polish to the alt sub editor integration:
    
     - Prevent spinner from displaying continuously when adding a
       subscription
     - Hide the editor when changing subscriptions to limit confusion
       about what is loaded
     - Dynamically add a node to the tree view when adding a subscription
     - Make sure the 'View/Edit' tab gets populated when backing out of
       the stream or item view
     - Apply some default link styles
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/serial/list_item.tt2 b/Open-ILS/src/templates/serial/list_item.tt2
index 3b5fc30..60569ce 100644
--- a/Open-ILS/src/templates/serial/list_item.tt2
+++ b/Open-ILS/src/templates/serial/list_item.tt2
@@ -1,3 +1,4 @@
+[% USE CGI; -%]
 [% WRAPPER base.tt2 %]
 [% ctx.page_title = l("Items") %]
 [% BLOCK status_values %]
@@ -18,6 +19,13 @@
         font-weight: bold;
     }
 </style>
+[% IF CGI.param('context') == 'scv' -%]
+<!-- links in the frame have no style at all, let's give them one -->
+<style type="text/css">
+    a { color: #1155CC; text-decoration: underline }
+    a:hover { text-decoration: none }
+</style>
+[%- END %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane"
         layoutAlign="top" class="oils-header-panel">
diff --git a/Open-ILS/src/templates/serial/list_stream.tt2 b/Open-ILS/src/templates/serial/list_stream.tt2
index 1918644..8b015aa 100644
--- a/Open-ILS/src/templates/serial/list_stream.tt2
+++ b/Open-ILS/src/templates/serial/list_stream.tt2
@@ -1,3 +1,4 @@
+[% USE CGI; -%]
 [% WRAPPER base.tt2 %]
 [% ctx.page_title = l("Streams") %]
 <style type="text/css">
@@ -6,6 +7,13 @@
     #new-srlu-table td { text-align: center; padding-right: 1em; }
     #list-source { border: 1px #666 dashed; }
 </style>
+[% IF CGI.param('context') == 'scv' -%]
+<!-- links in the frame have no style at all, let's give them one -->
+<style type="text/css">
+    a { color: #1155CC; text-decoration: underline }
+    a:hover { text-decoration: none }
+</style>
+[%- END %]
 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
     <div dojoType="dijit.layout.ContentPane"
         layoutAlign="top" class="oils-header-panel">
diff --git a/Open-ILS/src/templates/serial/subscription.tt2 b/Open-ILS/src/templates/serial/subscription.tt2
index 5081f32..bc92be5 100644
--- a/Open-ILS/src/templates/serial/subscription.tt2
+++ b/Open-ILS/src/templates/serial/subscription.tt2
@@ -6,6 +6,8 @@
     [%- END %]
     [%- IF CGI.param('id') != 'new' %]
     sub_id = [% CGI.param('id') %];
+    [%- ELSE %]
+    sub_id = -1;
     [%- END %]
     var cap_editor;
     var cap_importer;
@@ -19,6 +21,13 @@
 </script>
 <script src="[% ctx.media_prefix %]/js/ui/default/serial/subscription/issuance.js">
 </script>
+[% IF CGI.param('context') == 'scv' -%]
+<!-- links in the frame have no style at all, let's give them one -->
+<style type="text/css">
+    a { color: #1155CC; text-decoration: underline }
+    a:hover { text-decoration: none }
+</style>
+[%- END %]
 
 <div dojoType="dijit.layout.ContentPane" layout="top" class="oils-header-panel">
     <div>[% l('Subscription Details') %]</div>
@@ -121,11 +130,11 @@
                         "disabled": true, "value": sub_id
                     });
 
-                [%- IF CGI.param('context') == 'scv' -%]
+                [%- IF CGI.param('context') == 'scv' %]
                 // attach the holding_lib selector to the record_entry selector
                 dist_grid.overrideWidgetArgs.holding_lib = {'dijitArgs' : {'onChange' : function(value) { populate_sre_selector(dist_grid, value); } }};
 
-                [%- END -%]
+                [%- END %]
                 var _display_grouping_store = new dojo.data.ItemFileReadStore({
                     "data": {
                         "identifier": "display_grouping",
diff --git a/Open-ILS/web/js/ui/default/serial/subscription.js b/Open-ILS/web/js/ui/default/serial/subscription.js
index 575b33d..10c6345 100644
--- a/Open-ILS/web/js/ui/default/serial/subscription.js
+++ b/Open-ILS/web/js/ui/default/serial/subscription.js
@@ -312,13 +312,19 @@ openils.Util.addOnLoad(
 
                 ssub_grid.onPostCreate = function(fmObject) {
                     sub_id = fmObject.id();
+                    parent.document.getElementById(window.name).refresh_command(fmObject);
                 }
 
                 ssub_grid.showCreateDialog();
             }
+            ssub_grid.onPostUpdate = function(fmObject) {
+                parent.document.getElementById(window.name).refresh_command();
+            }
             if (cgi.param("tab") in tab_dispatch) {
+                ssub_grid._fresh = false; // force View/Edit tab to reload (otherwise, it is blank) XXX why?
                 tab_container.selectChild(tab_dispatch[cgi.param("tab")]);
             }
+            parent.document.getElementById(window.name).style.visibility = 'visible'; // unhide the editor pane (iframe)
         }
     }
 );
diff --git a/Open-ILS/xul/staff_client/server/serial/manage_subs.js b/Open-ILS/xul/staff_client/server/serial/manage_subs.js
index 0f724ba..a11fb82 100644
--- a/Open-ILS/xul/staff_client/server/serial/manage_subs.js
+++ b/Open-ILS/xul/staff_client/server/serial/manage_subs.js
@@ -58,10 +58,15 @@ serial.manage_subs.prototype = {
                 iframe.setAttribute("src", src);
             } else if (type == "ssub") {
                 var iframe = dojo.byId('alt_ssub_editor');
+                iframe.setAttribute("src", "about:blank"); // clear in case reloading same page (XXX we might want to do this for add only)
+                iframe.style.visibility = "hidden"; // hide the editor while it loads (it will unhide itself when loaded)
                 var src;
                 if (mode == "add") {
                     src = '/eg/serial/subscription?id=new&owning_lib='+params.owning_lib+'&record_entry='+params.record_entry+'&context=scv';
-                    iframe.refresh_command = function () {obj.refresh_list();};
+                    iframe.refresh_command = function (ssub) {
+                        obj.map_ssub[ 'ssub_' + ssub.id() ] = ssub;
+                        obj.append_ssub( obj.data.hash.aou[ssub.owning_lib()], ssub );
+                    };
                 } else {
                     src = '/eg/serial/subscription?id=' + params.ssub_ids[0] + '&context=scv';
                     iframe.refresh_command = function () {}; //TODO: redraw tree node

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

Summary of changes:
 Open-ILS/src/templates/serial/list_item.tt2        |    8 ++++++++
 Open-ILS/src/templates/serial/list_stream.tt2      |    8 ++++++++
 Open-ILS/src/templates/serial/subscription.tt2     |   13 +++++++++++--
 Open-ILS/web/js/ui/default/serial/subscription.js  |    9 +++++++++
 .../xul/staff_client/server/serial/manage_subs.js  |    7 ++++++-
 5 files changed, 42 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list