make sure record is selected for import if overlay has been selected. pre-select...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Sep 2008 14:45:34 +0000 (14:45 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Sep 2008 14:45:34 +0000 (14:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10544 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/vandelay/vandelay.js

index 62edb96..5c6334d 100644 (file)
@@ -362,8 +362,13 @@ function vlGetViewMARC(rowIdx) {
 
 function vlGetOverlayTargetSelector(rowIdx) {
     data = this.grid.model.getRow(rowIdx);
-    if(data) 
-        return this.value.replace('ID', data.id);
+    if(data) {
+        var value = this.value.replace('ID', data.id);
+        var overlay = currentOverlayRecordsMap[currentImportRecId];
+        if(overlay && overlay == data.id) 
+            value = value.replace('/>', 'checked="checked"/>');
+        return value;
+    }
 }
 
 /**
@@ -377,11 +382,13 @@ function vlHandleOverlayTargetSelected() {
             if(dojo.byId('vl-overlay-target-'+matchRecId).checked) {
                 console.log("found overlay target " + matchRecId);
                 currentOverlayRecordsMap[currentImportRecId] = matchRecId;
+                dojo.byId('vl-record-list-selected-' + currentImportRecId).checked = true;
                 return;
             }
         }
     } else {
         delete currentOverlayRecordsMap[currentImportRecId];
+        dojo.byId('vl-record-list-selected-' + currentImportRecId).checked = false;
     }
 }