]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-18486, fixed popup window callabck function bug"
authordongsheng <dongsheng>
Tue, 28 Apr 2009 02:17:34 +0000 (02:17 +0000)
committerdongsheng <dongsheng>
Tue, 28 Apr 2009 02:17:34 +0000 (02:17 +0000)
repository/repository.js

index 9f16899cf2d6440c12d940094956e6440ee9a47e..7a426aa5539f0ce494aee7bc6e0e1c3f8ba04927 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 var repository_listing = {};
-var active_instances = {};
+var cached_client_id = {};
 var file_extensions = {};
 // repository_client has static functions
 var repository_client = (function(){
@@ -803,13 +803,12 @@ repository_client.stripHTML = function(str){
     return ret;
 }
 repository_client.popup = function(client_id, url) {
-    repository_client.win = window.open(url,'repo_auth', 'location=0,status=0,scrollbars=0,width=500,height=300');
-    repository_client.win.client_id = client_id;
-    return false;
+    window.open(url,'repo_auth', 'location=0,status=0,scrollbars=0,width=500,height=300');
+    cached_client_id = client_id;
+    return true;
 }
 function repository_callback(id) {
-    repository_client.req(repository_client.win.client_id, id, '');
-    repository_client.win = null;
+    repository_client.req(cached_client_id, id, '');
 }
 repository_client.logout = function(client_id, repo_id) {
     var params = [];