[open-ils-commits] r17439 - in branches/rel_2_0/Open-ILS/web: js/ui/default/cat/authority templates/default/cat/authority (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Sep 1 23:37:53 EDT 2010


Author: dbs
Date: 2010-09-01 23:37:50 -0400 (Wed, 01 Sep 2010)
New Revision: 17439

Modified:
   branches/rel_2_0/Open-ILS/web/js/ui/default/cat/authority/list.js
   branches/rel_2_0/Open-ILS/web/templates/default/cat/authority/list.tt2
Log:
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. 


Modified: branches/rel_2_0/Open-ILS/web/js/ui/default/cat/authority/list.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/ui/default/cat/authority/list.js	2010-09-02 03:31:39 UTC (rev 17438)
+++ branches/rel_2_0/Open-ILS/web/js/ui/default/cat/authority/list.js	2010-09-02 03:37:50 UTC (rev 17439)
@@ -71,7 +71,16 @@
             dojo.query('#auth' + recId + ' span.text').forEach(function(node) {
                 authText += dojox.xml.parser.textContent(node); 
             });
-            dojo.place('<div class="toMerge" id="toMerge_' + recId + '">' +  authText + '</div>', 'mergebox-div', 'last');
+
+            // If there is a toMerge item already, this is a target record
+            var mergeRole = '<td style="border: 1px solid black; padding-left: 0.5em; padding-right: 1em;">';
+            var isTarget = dojo.query('.toMerge').length;
+            if (isTarget) {
+                mergeRole += 'Target</td>';
+            } else {
+                mergeRole += 'Master</td>';
+            }
+            dojo.place('<tr class="toMerge" id="toMerge_' + recId + '">' + mergeRole + '<td style="border: 1px solid black; padding-left: 1em;">' + authText + '</td></tr>', 'mergebox-tbody', 'last');
             dojo.removeClass('mergebox-div', 'hidden');
         }, "label":"Mark for Merge"}).placeAt(auth_menu, "last");
 
@@ -139,7 +148,7 @@
     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) {

Modified: branches/rel_2_0/Open-ILS/web/templates/default/cat/authority/list.tt2
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/default/cat/authority/list.tt2	2010-09-02 03:31:39 UTC (rev 17438)
+++ branches/rel_2_0/Open-ILS/web/templates/default/cat/authority/list.tt2	2010-09-02 03:37:50 UTC (rev 17439)
@@ -3,23 +3,6 @@
 
 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/cat/authority/list.js'> </script>
 
-<div id='mergebox-div' class='hidden' style='float:right; border: 4px solid; width: 25%;'>
-    <div style="border-bottom: 4px solid; text-align: center;">
-        <div dojoType="dijit.form.Form" encType="multipart/form-data" action="" method="">
-            <div dojoType="dijit.form.Button" type="button" value="Merge">Merge
-                <script type="dojo/method" event="onClick" args="evt">
-                    mergeRecords();
-                </script>
-            </div>
-            <div dojoType="dijit.form.Button" type="button" value="Clear">Clear
-                <script type="dojo/method" event="onClick" args="evt">
-                    clearMergeRecords();
-                </script>
-            </div>
-        </div>
-    </div>
-</div>
-
 <div dojoType="dijit.form.Form" id="myForm" jsId="myForm" encType="multipart/form-data" action="" method="">
     <span style="white-space: nowrap;">
         <label for="authTerm">Search term: </label>
@@ -63,6 +46,30 @@
     </span>
 </div>
 
+<hr />
+
+<div id='mergebox-div' class='hidden' style='float:right; border: 4px solid; width: 25%;'>
+    <div style="border-bottom: 4px solid; text-align: center;">
+        <div dojoType="dijit.form.Form" encType="multipart/form-data" action="" method="">
+            <div dojoType="dijit.form.Button" type="button" value="Merge">Merge
+                <script type="dojo/method" event="onClick" args="evt">
+                    mergeRecords();
+                </script>
+            </div>
+            <div dojoType="dijit.form.Button" type="button" value="Clear">Clear
+                <script type="dojo/method" event="onClick" args="evt">
+                    clearMergeRecords();
+                </script>
+            </div>
+        </div>
+    </div>
+    <table>
+        <tbody id='mergebox-tbody'>
+        </tbody>
+    </table>
+</div>
+
+
 <div id='authlist-div'></div>
 
 [% END %]



More information about the open-ils-commits mailing list