To implement this I added the following code to into cool_message.js:
setTimeout(function() {
$('.messages', context).fadeOut('slow');
}, 10000);
We could also add an option to set different timeouts to each message type, for example "0" for system errors.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1334446-7.patch | 2.94 KB | rahulrasgon |
Comments
Comment #1
Vc Developer commentedThanks for the code and its an good idea! Where is the maintainer? There should be a configuration menu for this.
Comment #2
krolpl commentedI agree ability to set a timeouts would make this a perfect messages module ;) Great work.
Comment #2.0
krolpl commented"cood" instead of "could" ?? WTF?? I need some sleep...
Comment #3
cbe243 commentedAnd for D8?
Comment #4
azovsky commentedOf course!
Comment #5
cbe243 commentedWhich cool_message.js ? Because there is 2.
cool_message.js and js/cool_message.js
And exactly where? Because I tried to put it as such:
and that doesn't work.
Comment #6
rahulrasgon commentedComment #7
rahulrasgon commentedPlease review the patch.
Comment #9
azovsky commentedComment #10
azovsky commentedThank you, @rahulrasgon!