[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. e4a2048d4e5840d2e589532ad014374b5598c365

Evergreen Git git at git.evergreen-ils.org
Fri Aug 10 09:55:01 EDT 2012


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_2 has been updated
       via  e4a2048d4e5840d2e589532ad014374b5598c365 (commit)
      from  796a3e95acb558d319c35f46dde3f888ca60fdfe (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 e4a2048d4e5840d2e589532ad014374b5598c365
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Aug 9 18:25:00 2012 -0400

    Authorities: Fix broken UI due to new XUL/Dojo/regressions
    
    New versions of XUL, since Firefox 10, hate dojo.query("foo bar"), so we
    have to refactor it to use dojo.query("foo").query("bar") instead. At
    least until we upgrade to a new version of Dojo.
    
    In addition, 522d8d82 introduced a regression meaning that the text of
    the authorities was no longer wrapped in a SPAN element with a class of
    "text". That in turn meant that the Dojo queries weren't picking up the
    labels for the merge box, leaving no visual indication to the user as to
    what authorities exactly were being merged. So, repair that.
    
    Also, similar to a fix for the MFHD editor, set the initial height of
    the spawned MARC Editor for an authority record to something reasonable.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    
    Conflicts:
    	Open-ILS/web/js/ui/default/cat/authority/list.js
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/js/ui/default/cat/authority/list.js b/Open-ILS/web/js/ui/default/cat/authority/list.js
index 1d1e4c4..ac93635 100644
--- a/Open-ILS/web/js/ui/default/cat/authority/list.js
+++ b/Open-ILS/web/js/ui/default/cat/authority/list.js
@@ -75,8 +75,8 @@ function displayAuthorities(data) {
 
         
         // Grab the ID of the authority record
-        dojo.query("datafield[tag='901'] subfield[code='c']", node).forEach(function(dfNode) {
-            auth.id = dojox.xml.parser.textContent(dfNode); 
+        dojo.query("datafield[tag='901']", node).query("subfield[code='c']").forEach(function(dfNode) {
+            auth.id = dojox.xml.parser.textContent(dfNode);
         });
 
         /* I wrap this in try/catch only because:
@@ -98,7 +98,8 @@ function displayAuthorities(data) {
         // Create the authority record listing entry. XXX i18n
         dojo.place(
             '<div class="authEntry" id="auth' + auth.id + '">' +
-            '<div class="text" id="authLabel' + auth.id + '">' + auth.text + '</div>' +
+            '<div class="text" id="authLabel' + auth.id + '">' +
+            '<span class="text">' + auth.text + '</span></div>' +
             '<div class="authority-control-set">Control Set: <span class="acs-name">' +
             fetch_control_set(auth.thesaurus).name() +
             '</span> <span class="acs-id">(#' +
@@ -120,7 +121,7 @@ function displayAuthorities(data) {
         // "Merge" menu item
         new dijit.MenuItem({"id": "merge_" + auth.id, "onClick":function(){
             auth.text = '';
-            dojo.query('#auth' + auth.id + ' span.text').forEach(function(node) {
+            dojo.query('#auth' + auth.id).query('span.text').forEach(function(node) {
                 auth.text += dojox.xml.parser.textContent(node); 
             });
 
@@ -153,7 +154,7 @@ function displayAuthorities(data) {
 
                 var delDlg = dijit.byId("delDialog_" + auth.id);
 
-                dojo.query('#auth' + auth.id + ' span.text').forEach(function(node) {
+                dojo.query('#auth' + auth.id).query('span.text').forEach(function(node) {
                     auth.text += dojo.trim(dojox.xml.parser.textContent(node)); 
                 });
 
@@ -277,12 +278,19 @@ function showBibCount(authIds) {
 }
 
 function loadMarcEditor(pcrud, rec) {
+
+    /* Prevent the spawned MARC editor from making its title bar inaccessible */
+    var initHeight = self.outerHeight - 40;
+    /* Setting an explicit height results in a super skinny window, so fix that up */
+    var initWidth = self.outerWidth / 2;
+
     /*
        To run in Firefox directly, must set signed.applets.codebase_principal_support
        to true in about:config
      */
     netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-    win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+    win = window.open('/xul/server/cat/marcedit.xul','',    // XXX version?
+        'chrome,resizable=yes,height=' + initHeight + ',width=' + initWidth);
 
     win.xulG = {
         "record": {"marc": rec.marc(), "rtype": "are"},
@@ -366,7 +374,7 @@ function displayRecords(parms) {
     var widgets = dijit.findWidgets(dojo.byId('authlist-div'));
     dojo.forEach(widgets, function(w) { w.destroyRecursive(true); });
 
-    dojo.query("#authlist-div div").orphan();
+    dojo.query("#authlist-div").query("div").orphan();
 
     var url = '/opac/extras/browse/marcxml/authority.'
         + dijit.byId('authAxis').attr('value')

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

Summary of changes:
 Open-ILS/web/js/ui/default/cat/authority/list.js |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list