Skip to content
This repository
Browse code

Dont need to wrap entwine blocks in onload blocks, theres no benefit

  • Loading branch information...
commit 72efed1993c14982cd02fa7870182ca3ec079ea1 1 parent a9bedcc
Hamish Friedlander authored

Showing 1 changed file with 7 additions and 13 deletions. Show diff stats Hide diff stats

  1. 20  admin/javascript/SecurityAdmin.js
20  admin/javascript/SecurityAdmin.js
@@ -21,20 +21,14 @@
21 21
 	 * Refresh the member listing every time the import iframe is loaded,
22 22
 	 * which is most likely a form submission.
23 23
 	 */
24  
-	$(window).bind('load', function(e) {
25  
-		$('#MemberImportFormIframe,#GroupImportFormIframe').entwine({
26  
-			onmatch: function() {
27  
-				this._super();
28  
-				
29  
-				// TODO entwine can't seem to bind to iframe load events
30  
-				$(this).bind('load', refreshAfterImport);
31  
-			},
32  
-			onunmatch: function() {
33  
-				this._super();
34  
-			}
35  
-		});
  24
+	$('#MemberImportFormIframe, #GroupImportFormIframe').entwine({
  25
+		onadd: function() {
  26
+			this._super();
  27
+			// TODO entwine can't seem to bind to iframe load events
  28
+			$(this).bind('load', refreshAfterImport);
  29
+		}
36 30
 	});
37  
-	
  31
+
38 32
 	$.entwine('ss', function($){
39 33
 		/**
40 34
 		 * Class: #Permissions .checkbox[value=ADMIN]

0 notes on commit 72efed1

Please sign in to comment.
Something went wrong with that request. Please try again.