Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

Conversation

@dmoerman
Copy link
Contributor

Changed the styling of the alert generated by framework.flash.coffee so it fits better with the symfony alerts.

now the alerts will have a fixed position under the navigation bar.

It's also possible to define for how long the alert should be visible
-> Flash.add(message, 'success', 5000);

When not defining the time, then the alert wont disappear until its closed or there is a page refresh

Dylan Moerman added 2 commits November 17, 2016 13:16
When time is not defined then the flash message will be displayed till its closed or the page is refreshed
' ' + message +
' </div>' +
$('.main-header').append(
'<div class="alert alert-fixed alert-' + type + ' alert-dismissible notification" role="status" data-alert-id="' + alertId + '">' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alert-fixed is a pretty bad class name in my opinion. I'd presume it sets the alert to the fixed position

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, what is is a better name in your opinion ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be honest i'd just use the .main-header .alert selector, the alert is not 'special', it's just in a special place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 26bf89e

@StijnVrolijk StijnVrolijk merged commit bcdb454 into master Jan 27, 2017
@tijsverkoyen tijsverkoyen deleted the refactor-flash-class-handling-the-js-genereted-messages branch May 23, 2018 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants