Open Source Content Management System

protoGrowl

  1. Screenshot
    1. protoGrowl user interface messages
  2. Different message statuses
  3. Usage in Midgard
  4. Usage in Javascript

protoGrowl is a Javascript tool based on the Prototype library. It enables site developer to display bubble-styled user interface messages inspired by the Growl notification system for OS X.

Screenshot

view_protoGrowl-beta

protoGrowl user interface messages

Different message statuses

There are four different message statuses supported by protoGrowl:

  • info: Informational message to the user
  • ok: Some action performed by user was successfull
  • warning: Warning about an action performed by user
  • error: Some action performed by user failed

Usage in Midgard

protoGrowl has been integrated into the MidCOM UI messages service. This means that to display notices you only need to do something like the following:

$_MIDCOM->uimessages->add('Title', 'Message', 'ok');

The messages are stored in user session so if you relocate the user after adding a message, they will be shown in the next page.

Usage in Javascript

MidCOM automatically includes the protoGrowl library. However, if you want to use it outside MidCOM you must include the following in your HTML <head> area:

<script type="text/javascript" src="Prototype/prototype.js"></script>
<script type="text/javascript" src="Scriptaculous/scriptaculous.js"></script>
<script type="text/javascript" src="protoGrowl/src/protoGrowl.js"></script>
<link rel="stylesheet" type="text/css" href="protoGrowl/src/protoGrowl.css" />

To display messages with Javascript, call the following anywhere in your page:

<script language="javascript">
  new protoGrowl({type: 'info', title: 'Some title', message: 'Some content'});
</script>

The message content area may contain HTML.

Designed by Nemein, hosted by Anykey