added a callback for recordDrawn so XUL can plug in actions
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 24 Aug 2005 16:01:27 +0000 (16:01 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 24 Aug 2005 16:01:27 +0000 (16:01 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1716 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/config.js
Open-ILS/web/opac/skin/default/js/config.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/js/rresult.js

index 1970c34..833bf55 100644 (file)
@@ -196,9 +196,11 @@ createEvt("common", "unload");                                     /* f() : what happens on window unload (clean
 createEvt("common", "run");                                            /* f() : make the page do stuff */
 createEvt("mresult", "idsReceived");                   /* f(ids) */
 createEvt("rresult", "idsReceived");                   /* f(ids) */    
+createEvt("rresult", "recordDrawn");                   /* f(recordid, linkDOMNode) : after record is drawn, allow others (xul) to plugin actions */
 
 createEvt("result", "hitCountReceived");               /* f() : display hit info, pagination, etc. */
 createEvt("result", "recordReceived");                 /* f(mvr, pagePosition, isMr) : display the record*/
+createEvt("result", "recordDrawn");                            /* f(recordid, linkDOMNode) : after record is drawn, allow others (xul) to plugin actions */
 createEvt("result", "copyCountsReceived");     /* f(mvr, pagePosition, copyCountInfo) : display copy counts*/
 createEvt("result", "allRecordsReceived");     /* f(mvrsArray) : add other page stuff, sidebars, etc.*/
 
index 5b40131..1e347ee 100644 (file)
@@ -102,10 +102,12 @@ config.ids.rdetail = {};
 
 
 /* XUL */
+/*
 config.ids.xul.marc_editor_link = "marc_editor_link";
 config.ids.xul.copy_browser_link = "copy_browser_link";
 config.ids.xul.marc_editor                     = "marc_editor_div";
 config.ids.xul.copy_browser            = "copy_browser_div";
+*/
 
 
 /* ---------------------------------------------------------------------------- */
index c14baf6..bb7724e 100644 (file)
@@ -95,6 +95,8 @@ function resultDisplayRecord(rec, pos, is_mr) {
                100 - (orgNodeTrail(findOrgUnit(getLocation())).length * 8) + "%";
 
        unHideMe(r);
+       
+       runEvt("result", "recordDrawn", rec.doc_id(), title_link);
 
        if(resultPageIsDone()) 
                runEvt('result', 'allRecordsReceived', recordsCache);
index 49f572d..995e453 100644 (file)
@@ -7,6 +7,7 @@ function rresultUnload() { removeChildren(table); table = null;}
 attachEvt("common", "unload", rresultUnload);
 attachEvt("common", "run", rresultDoSearch);
 attachEvt("rresult", "idsReceived", rresultCollectRecords); 
+attachEvt("result", "recordDrawn", rresultLaunchDrawn); 
 
 function rresultDoSearch() {
        table = G.ui.result.main_table;
@@ -47,3 +48,7 @@ function rresultHandleMods(r) {
        resultCollectCopyCounts(rec, r.userdata, FETCH_R_COPY_COUNTS);
 }
 
+
+function rresultLaunchDrawn(id, node) {
+       runEvt("rresult", "recordDrawn", id, node);
+}