I know you want to keep this module lightweight, but one small feature that would make it perfect would be a configuration to enable messages to automatically hide after x milliseconds.

Comments

rupl’s picture

Interesting idea and not too disruptive. If you start a patch I'm happy to review it.

johnhanley’s picture

StatusFileSize
new2.49 KB
new278 bytes

Here's a patch to add a fadeout behavior for status messages. Note: warning and error messages should persist as they respectively provide information to or require action by the user.

FILES CHANGED

dismiss.module - define constant and pass fadeout value to dismiss.js
dismiss.admin.inc - configuration field to set duration of or to disable timer
js/dismiss.js - accept fadeout setting passed from dismiss.module; conditional value check to initiate fadeout timer

FILES ADDED

dismiss.install - clean-up system variables upon uninstall

The latter is considered best practice and thrown in as a bonus. Rename file to dismiss.install (as issue queue does not accept the .install extension.)

Comments & feedback welcome.

  • rupl committed 0ff3821 on 7.x-1.x authored by bacteriaman
    Issue #2449213 by bacteriaman: Add ability for messages to automatically...
  • rupl committed 2f45e28 on 7.x-1.x
    Follow-up to #2449213 by rupl: comments, whitespace, and admin UI tweaks...
  • rupl committed 4027ae3 on 7.x-1.x
    Follow-up to #2449213 by rupl: set default fade timeout to 0 for back-...
  • rupl committed d34246c on 7.x-1.x authored by bacteriaman
    Issue #2449213 by bacteriaman: implement hook_uninstall()
    
rupl’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Active » Fixed

Hey sorry the delay in reviewing, thanks for the patch! The only change I made was to make the default timeout be 0, so that the module's default behavior does not change for existing users. Also thanks for the install file. Cheers!

johnhanley’s picture

Cool--happy to contribute.

Default timer value of 0 makes sense.

You might want to update the project page description to include this new functionality.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

johnhanley’s picture

I still suggest you update the project page and mention the auto hide feature.

rupl’s picture

ok it's been added