From 68df21d7378bbeb109abccc8707d081da0b1f41e Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 2 Sep 2010 03:37:50 +0000 Subject: [PATCH] Backport r17343 from trunk: Add explicit identification of the master authority record when merging We now generate a table with the first cell containing either "Master" (indicating the record into which the other records will be merged) and or "Target" (indicating that the record will be merged into the master. This also adds a horizontal rule to delineate between the form buttons at the top, and adds borders to provide more clarity between the mergebox contents. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@17439 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/cat/authority/list.js | 13 +++++-- .../web/templates/default/cat/authority/list.tt2 | 41 +++++++++++++--------- 2 files changed, 35 insertions(+), 19 deletions(-) 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 37dc478a82..b719ecc080 100644 --- a/Open-ILS/web/js/ui/default/cat/authority/list.js +++ b/Open-ILS/web/js/ui/default/cat/authority/list.js @@ -71,7 +71,16 @@ function displayAuthorities(data) { dojo.query('#auth' + recId + ' span.text').forEach(function(node) { authText += dojox.xml.parser.textContent(node); }); - dojo.place('
' + authText + '
', 'mergebox-div', 'last'); + + // If there is a toMerge item already, this is a target record + var mergeRole = ''; + var isTarget = dojo.query('.toMerge').length; + if (isTarget) { + mergeRole += 'Target'; + } else { + mergeRole += 'Master'; + } + dojo.place('' + mergeRole + '' + authText + '', 'mergebox-tbody', 'last'); dojo.removeClass('mergebox-div', 'hidden'); }, "label":"Mark for Merge"}).placeAt(auth_menu, "last"); @@ -139,7 +148,7 @@ function loadMarcEditor(pcrud, rec) { win = window.open('/xul/server/cat/marcedit.xul'); // XXX version? win.xulG = { - "record": {"marc": rec.marc()}, + "record": {"marc": rec.marc(), "rtype": "are"}, "save": { "label": "Save", "func": function(xmlString) { diff --git a/Open-ILS/web/templates/default/cat/authority/list.tt2 b/Open-ILS/web/templates/default/cat/authority/list.tt2 index 3f6c7842eb..67a1fa7541 100644 --- a/Open-ILS/web/templates/default/cat/authority/list.tt2 +++ b/Open-ILS/web/templates/default/cat/authority/list.tt2 @@ -3,23 +3,6 @@ - -
@@ -63,6 +46,30 @@
+
+ + + +
[% END %] -- 2.11.0