Skip to content
This repository
Browse code

MINOR: fix the bug that ModelAdmin search filter doesn't work when ar…

…riving from another section of the CMS.
  • Loading branch information...
commit 4c1cb591162e4ce30530323fd140488b56e8de24 1 parent 4bf4d4d
Normann Lou authored March 13, 2012 chillu committed March 27, 2012

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

  1. 8  admin/javascript/ModelAdmin.js
8  admin/javascript/ModelAdmin.js
@@ -4,6 +4,13 @@
4 4
 
5 5
 (function($) {
6 6
 	$.entwine('ss', function($){
  7
+		$('#cms-content-tools #Form_SearchForm').entwine({
  8
+			onsubmit: function(e) {
  9
+				//We need to trigger handleStateChange() explicitly, otherwise handleStageChange()
  10
+				//doesn't called if landing from another section of cms
  11
+				this.trigger('beforeSubmit');
  12
+			}
  13
+		});
7 14
 	
8 15
 		/**
9 16
 		 * Class: .importSpec
@@ -21,6 +28,5 @@
21 28
 				this._super();
22 29
 			}
23 30
 		});
24  
-
25 31
 	});
26 32
 })(jQuery);

0 notes on commit 4c1cb59

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