app/assets/javascripts/semantic-ui/modules/behavior/form.js in semantic-ui-rails-0.8.3 vs app/assets/javascripts/semantic-ui/modules/behavior/form.js in semantic-ui-rails-0.8.4
- old
+ new
@@ -244,11 +244,11 @@
}
$prompt
.html(errors[0])
;
if(!promptExists) {
- if(settings.transition && $.fn.transition !== undefined) {
+ if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
module.verbose('Displaying error with css transition', settings.transition);
$prompt.transition(settings.transition + ' in', settings.duration);
}
else {
module.verbose('Displaying error with fallback javascript animation');
@@ -277,11 +277,11 @@
$fieldGroup
.removeClass(className.error)
;
if(settings.inline && $prompt.is(':visible')) {
module.verbose('Removing prompt for field', field);
- if(settings.transition && $.fn.transition !== undefined) {
+ if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
$prompt.transition(settings.transition + ' out', settings.duration, function() {
$prompt.remove();
});
}
else {
@@ -498,21 +498,21 @@
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
- if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
- instance = instance[value];
- }
- else if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
+ if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
instance = instance[camelCaseValue];
}
- else if( instance[value] !== undefined ) {
- found = instance[value];
- return false;
- }
else if( instance[camelCaseValue] !== undefined ) {
found = instance[camelCaseValue];
+ return false;
+ }
+ else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
+ instance = instance[value];
+ }
+ else if( instance[value] !== undefined ) {
+ found = instance[value];
return false;
}
else {
module.error(error.method);
return false;