[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 135048671b01eacffacba741058ab487a5885b22
Evergreen Git
git at git.evergreen-ils.org
Fri Aug 10 09:52:23 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_3 has been updated
via 135048671b01eacffacba741058ab487a5885b22 (commit)
from c81118e76cc10529d857233462a6d690c14a9834 (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 135048671b01eacffacba741058ab487a5885b22
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>
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 3f1c666..2bd19bf 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,11 +278,18 @@ 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
*/
- win = window.open('/xul/server/cat/marcedit.xul','','chrome'); // 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"},
@@ -365,7 +373,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