From: Dan Scott Date: Tue, 28 Aug 2012 21:03:28 +0000 (-0400) Subject: Use CSS selectors that new XUL can live with X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=80e39218c459e6df354385fe3668da424e901c0f;p=evergreen%2Fpines.git Use CSS selectors that new XUL can live with Just another case of current XUL not liking Dojo 1.3's "dojo.query('foo bar')" and converting it to "dojo.query('foo').query('bar')" instead. This problem manifested as bizarrely large fixed field grids and an absence of working authority context menus. Signed-off-by: Dan Scott Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js index 71e6f22d4e..6abd005ff9 100644 --- a/Open-ILS/xul/staff_client/server/cat/marcedit.js +++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js @@ -472,7 +472,7 @@ function setFocusToNextTag (row, direction) { var keep_looking = true; while (keep_looking && (direction == 'up' ? row = row.previousSibling : row = row.nextSibling)) { // Is it a datafield? - dojo.query('hbox hbox textbox', row).forEach(function(node, index, arr) { + dojo.query('hbox', row).query('hbox').query('textbox').forEach(function(node, index, arr) { node.focus(); keep_looking = false; }); @@ -777,7 +777,7 @@ function changeFFEditor (type) { // Hide FFEditor rows that we don't need for our current type // If all of the labels for a given row do not include our // desired type in their set attribute, we can hide that row - dojo.query('rows row', grid).forEach(function(node, index, arr) { + dojo.query('rows', grid).query('row').forEach(function(node, index, arr) { if (dojo.query('label[set~=' + type + ']', node).length == 0) { node.hidden = true; } @@ -1767,7 +1767,7 @@ function browseAuthority (sf_popup, menu_id, target, sf, limit, page) { var main_text = ''; var see_from = []; var see_also = []; - var auth_id = dojox.xml.parser.textContent(dojo.query('datafield[tag="901"] subfield[code="c"]', record)[0]); + var auth_id = dojox.xml.parser.textContent(dojo.query('datafield[tag="901"]', record).query('subfield[code="c"]')[0]); var auth_org = dojox.xml.parser.textContent(dojo.query('controlfield[tag="003"]', record)[0]); // Grab the fields with tags beginning with 1 (main entries) and iterate through the subfields