opac updates
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 May 2005 13:18:25 +0000 (13:18 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 May 2005 13:18:25 +0000 (13:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@718 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/javascript/opac/AbstractRecordResultPage.js
Open-ILS/src/javascript/opac/MRResultPage.js
Open-ILS/src/javascript/util/RemoteRequest.js
Open-ILS/src/javascript/widgets/menu/ContextMenuManager.js

index 10f517b..f5a54d0 100644 (file)
@@ -220,8 +220,11 @@ AbstractRecordResultPage.prototype.displayRecord =
                "record_result_row_" + page_id );
 
        this.addMenuItems( menu, record );
+
        globalMenuManager.setContext(title_row, menu);
        globalMenuManager.setContext(author_row, menu);
+       globalMenuManager.setContext(misc_row, menu);
+
        getDocument().body.appendChild(menu.getNode());
        /* ------------------------------------ */
 
index 606f89e..495df4a 100644 (file)
@@ -328,6 +328,8 @@ MRResultPage.prototype.collectRecords = function() {
 
 MRResultPage.prototype.doCopyCount = function( record, search_id, page_id ) {
 
+       if(record == null) return;
+
        var copy_box    = getById("record_result_copy_count_box_" + page_id );
 
        var orgunit = globalSelectedLocation;
index b9a769b..8c849b2 100644 (file)
@@ -137,6 +137,8 @@ RemoteRequest.prototype.buildXMLRequest = function() {
        all of its data */
 RemoteRequest.prototype.setCompleteCallback = function(callback) {
 
+       if(this.cancelled) return;
+
        var object = this;
        var obj = this.xmlhttp;
        this.callback = callback;
@@ -147,6 +149,7 @@ RemoteRequest.prototype.setCompleteCallback = function(callback) {
                        try {
                                if(object.cancelled) return;
                                callback(object);
+
                        } catch(E) {
 
                                debug("Processing Error in complete callback: [" + E + "]");
index 016008c..fc70e34 100644 (file)
@@ -46,6 +46,13 @@ ContextMenuManager.prototype.setContext = function(node, menu) {
        node.oncontextmenu = function(evt) {
                var win = getAppWindow();
                if(!win.event) win.event = evt;
+
+               if(!IE) {
+                       win.event.preventDefault();
+               } else {
+                       win.event.cancellBubble = true;
+               }
+
                obj.toggle(menu.name);
                return false;
        }