Skip to main content

Plone integration with Gritter

Project description

A Plone add-on that makes the standard Plone status messages appear like a Growl notification using the jQuery Gritter plugin.

It transforms the Plone status messages from this

The default Plone messages

to this

The gritterized Plone messages

How it works

It just works! If JavaScript is disabled you will have the standard Plone behaviour. Test it visiting:

Installation

To install redturtle.gritterize you simply add redturtle.gritterize to the list of eggs in your buildout, run buildout and restart Plone. Then, install redturtle.gritterize using the Add-ons control panel.

Configuration

At the moment it is really basic, this will change. You can configure the stickiness and the persistence time (in milliseconds) by adding a custom a config object to the igritter global object:

igritter.config = {
    time: {
      'portalMessage info': 10000,
      'portalMessage warning': 20000,
    }
};

According to the matching portal message class the right persistnece time will be set (in this case 10 seconds for the info ones, 20 for the warning ones). If the lookup fails the gritter message will be sticky.

Adding more gritter messages

Following the same approach you can add additional gritter messages (e.g. you can pop up form validation messages).

This is an example:

message = jq('.fieldErrorBox');
mygritter = {title: message.parent().find('.widget > span > a').html(),
             text: message.html(),
             class_name: 'portalMessage error',
             target: message,
             remove: false
};
igritter.add_gritter(mygritter);

This will take the element with class .fieldErrorBox and try to get info from the page to fill in the gritter message.

If remove is true the orginal error will be removed. Changelog =========

0.9.3 (2013-09-23)

  • Added a new add_gritter function to allow adding gritter messages unrelated to plone portal messages [ale-rt]

0.9.2 (2013-09-10)

  • The stickiness and persistence time of the popup can be configured now (see README.rst) [ale-rt]

0.9.1 (2013-07-30)

  • Fixinig broken release [ale-rt]

0.9.0 (2013-07-30)

  • Initial release. [ale-rt]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redturtle.gritterize-0.9.3.zip (26.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page