Closed siegy22 closed 8 years ago
native = message.native.dup
Array(@options[:ignore_selectors]).each do |ignore_selector|
native.css(ignore_selector).remove
end
present_messages[type] << {text: native.text.strip}
subject { CornerStones::FlashMessages.new(message_types: [:'alert-info', :'alert-danger', :'alert-warning'],
ignore_selectors: '.close')}
If a bootstrap 3 alert has a close button it will have a
<a>
or a<button>
inside which hasdata-dismiss="alert"
or the classclose
If corner stones gets the flash message of an alert with a close button it will return the X (close button text) within the text of the flash message.
With this commit corner stones will ignore elements inside an alert which have the data-dismiss="alert" or class="close" attributes.