climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1509432 - /incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PredictiveFileBrowserInput.js
Date Thu, 01 Aug 2013 21:11:40 GMT
Author: joyce
Date: Thu Aug  1 21:11:39 2013
New Revision: 1509432

URL: http://svn.apache.org/r1509432
Log:
CLIMATE-240 - PredictiveFileBrowserInput doesn't properly update model

- Add call to trigger the input box's "input" event when the user
  selects an autocomplete option from the drop down menu. This forces
  Angular to update the model so two-way data bindings work properly
  again.

Modified:
    incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PredictiveFileBrowserInput.js

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PredictiveFileBrowserInput.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PredictiveFileBrowserInput.js?rev=1509432&r1=1509431&r2=1509432&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PredictiveFileBrowserInput.js
(original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/directives/PredictiveFileBrowserInput.js
Thu Aug  1 21:11:39 2013
@@ -34,7 +34,9 @@ App.Directives.directive('predictiveFile
 			// Set the input text box's value to that of the user selected path
 			var val = $(e.target).text();
 			$($elem).val(val);
-
+			// Need to trigger the input box's "input" event so Angular updates the model!
+			$elem.trigger('input'); 
+			
 			// If the user selected a directory, find more results..
 			if (val[val.length - 1] == '/') {
 				$scope.fetchFiles($($elem).val());



Mime
View raw message