climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1487111 - /incubator/climate/trunk/rcmet/src/main/ui/app/js/directives.js
Date Tue, 28 May 2013 20:52:10 GMT
Author: joyce
Date: Tue May 28 20:52:08 2013
New Revision: 1487111

URL: http://svn.apache.org/r1487111
Log:
Resolved CLIMATE-58. Fixes boostrapModalOpen attribute handling.

- Adds conversion from string to boolean in the assignment of of the
  background and keyboard attributes. This causes the correct boolean
  value to be passed to the corresponding open function.

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

Modified: incubator/climate/trunk/rcmet/src/main/ui/app/js/directives.js
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/ui/app/js/directives.js?rev=1487111&r1=1487110&r2=1487111&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/ui/app/js/directives.js (original)
+++ incubator/climate/trunk/rcmet/src/main/ui/app/js/directives.js Tue May 28 20:52:08 2013
@@ -79,9 +79,9 @@ directive('bootstrapModalOpen', function
 		restrict: 'A',
 		link: function(scope, elem, attrs) {
 			// Default to showing the background if the user didn't specify a value for this.
-			var hasBackground = (attrs.background === undefined ? true : attrs.background);
+			var hasBackground = (attrs.background === undefined ? true : (attrs.background == "true"));
 			// Enable keyboard closing of modal with escape key.
-			var hasKeyboardEscape = (attrs.keyboard === undefined ? true : attrs.keyboard);
+			var hasKeyboardEscape = (attrs.keyboard === undefined ? true : (attrs.keyboard == "true"));
 
 			$(elem).bind('click', function() {
 				$('#' + attrs.bootstrapModalOpen).trigger('modalOpen', [hasBackground, hasKeyboardEscape]);



Mime
View raw message