You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/05/28 22:52:10 UTC

svn commit: r1487111 - /incubator/climate/trunk/rcmet/src/main/ui/app/js/directives.js

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]);