Update of /var/cvs/contributions/didactor2/src/core/templates/content/js
In directory james.mmbase.org:/tmp/cvs-serv9209

Modified Files:
        open.jsp 
Log Message:
added also 'UnLoad' event


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/templates/content/js


Index: open.jsp
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/core/templates/content/js/open.jsp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- open.jsp    23 Oct 2008 10:02:43 -0000      1.12
+++ open.jsp    10 Nov 2008 12:53:37 -0000      1.13
@@ -139,10 +139,11 @@
 }
 
 function requestContent(href) {
+    var contentEl = document.getElementById('contentFrame');
+    $(document).trigger("didactorContentBeforeUnload",  { unloaded: contentEl 
});
    var content = usedFrames[href];
    if (content == null) {
        loadIconOn();
-       var contentEl = document.getElementById('contentFrame');
        $.ajax({async: true, url: href, type: "GET", dataType: "xml", data: 
null,
                    complete: function(res, status){
                    loadIconOff();
@@ -179,16 +180,17 @@
                        }
                        usedFrames[href] = array;
                         $(document).trigger("didactorContentLoaded",  { 
loaded: contentEl });
+                        $(document).trigger("didactorContent",  { loaded: 
contentEl });
                    }
                }
            });
    } else {
-       var contentEl = document.getElementById('contentFrame');
        $(contentEl).empty();
        for (var i=0; i < content.length; i++) {
            contentEl.appendChild(content[i]);
        }
        document.href_frame = href;
+       $(document).trigger("didactorContent",  { loaded: contentEl });
    }
    scrollToTop();
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to