bug 448, let record editor/creator be clickable in record summaries.. then can re...
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Feb 2007 19:37:03 +0000 (19:37 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Feb 2007 19:37:03 +0000 (19:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6949 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/bib_brief.xul

index 529d27e..2032ce1 100644 (file)
                                                                                document.getElementById('tcn_source').appendChild(
                                                                                        document.createTextNode(meta.tcn_source())
                                                                                );
+                                                                               g.network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ses(),meta.creator().id()],
+                                                                                       function(rreq) {
+                                                                                               var creator_au = rreq.getResultObject();
+                                                                                               document.getElementById('creator_bc').appendChild(
+                                                                                                       document.createTextNode(creator_au.card().barcode())
+                                                                                               );
+                                                                                       }
+                                                                               );
+                                                                               g.network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ses(),meta.editor().id()],
+                                                                                       function(rreq) {
+                                                                                               var editor_au = rreq.getResultObject();
+                                                                                               document.getElementById('editor_bc').appendChild(
+                                                                                                       document.createTextNode(editor_au.card().barcode())
+                                                                                               );
+                                                                                       }
+                                                                               );
                                                                                document.getElementById('creator').appendChild(
-                                                                                       document.createTextNode(meta.creator().usrname())
+                                                                                       document.createTextNode('('+data.hash.aou[meta.creator().home_ou()].shortname()+') ')
                                                                                );
+                                                                               document.getElementById('creator_bc').setAttribute('au_id',meta.creator().id());
                                                                                document.getElementById('editor').appendChild(
-                                                                                       document.createTextNode(meta.editor().usrname())
+                                                                                       document.createTextNode('('+data.hash.aou[meta.editor().home_ou()].shortname()+') ')
                                                                                );
+                                                                               document.getElementById('editor_bc').setAttribute('au_id',meta.editor().id());
                                                                                document.getElementById('edit_date').appendChild(
                                                                                        document.createTextNode(
                                                                                                util.date.formatted_date(meta.edit_date(),"%D")
                        }
                }
 
+               function spawn_patron(span) {
+            try {
+                var loc = urls.XUL_PATRON_DISPLAY; // + '?barcode=' + window.escape(barcode);
+
+                if (typeof window.xulG == 'object' && typeof window.xulG.set_tab == 'function') {
+                    window.xulG.set_tab( loc, {}, { 'id' : span.getAttribute('au_id') } );
+                } else {
+                                       copy_to_clipboard( span.textContent );
+                               }
+            } catch(E) {
+                g.error.standard_unexpected_error_alert('spawning patron display',E);
+            }
+               }
+
        ]]>
        </script>
 
                                        </html:td>
                                        <html:td>
                                                <html:span style="font-weight: bold;">Created By: </html:span><html:span id="creator" />
+                                               <html:span id="creator_bc" style="text-decoration: underline; color: blue;" onclick="try{spawn_patron(this);}catch(E){alert(E);}"/>
                                        </html:td>
                                        <html:td>
                                                <html:span style="font-weight: bold;">Last Edited By: </html:span><html:span id="editor" />
+                                               <html:span id="editor_bc" style="text-decoration: underline; color: blue;" onclick="try{spawn_patron(this);}catch(E){alert(E);}"/>
                                        </html:td>
                                        <html:td>
                                                <html:span style="font-weight: bold;">Last Edited On: </html:span><html:span id="edit_date" />