[open-ils-commits] r17343 - in trunk/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 Aug 25 23:07:41 EDT 2010


Author: dbs
Date: 2010-08-25 23:07:39 -0400 (Wed, 25 Aug 2010)
New Revision: 17343

Modified:
   trunk/Open-ILS/web/js/ui/default/cat/authority/list.js
   trunk/Open-ILS/web/templates/default/cat/authority/list.tt2
Log:
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: trunk/Open-ILS/web/js/ui/default/cat/authority/list.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/cat/authority/list.js	2010-08-26 01:38:54 UTC (rev 17342)
+++ trunk/Open-ILS/web/js/ui/default/cat/authority/list.js	2010-08-26 03:07:39 UTC (rev 17343)
@@ -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");
 

Modified: trunk/Open-ILS/web/templates/default/cat/authority/list.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/cat/authority/list.tt2	2010-08-26 01:38:54 UTC (rev 17342)
+++ trunk/Open-ILS/web/templates/default/cat/authority/list.tt2	2010-08-26 03:07:39 UTC (rev 17343)
@@ -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