public
Description: Quicky Growl-like implementation for Prototype
Homepage:
Clone URL: git://github.com/tdreyno/prototypegrowl.git
Click here to lend your support to: prototypegrowl and make a donation at www.pledgie.com !
cpjolicoeur (author)
Sat Apr 05 19:55:07 -0700 2008
tdreyno (committer)
Fri Dec 19 21:35:47 -0800 2008
prototypegrowl / test.html
100644 91 lines (83 sloc) 2.819 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>prototypeGrowl 0.8</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" charset="utf-8" src="prototype-1.6.0.2.js"></script>
<script type="text/javascript" charset="utf-8" src="effects.js"></script>
<script type="text/javascript" charset="utf-8" src="growl.js"></script>
<link rel="stylesheet" href="growl.css" type="text/css" media="screen" />
<style type="text/css" media="screen">
  * {
   margin: 0;
   padding: 0; }
 
  body {
   margin:50px;
   font: 13px/14px "Lucida Grande", Arial, Helvetica, Verdana, sans-serif; }
 
  a {
   color:#666; }
 
  a:hover {
   text-decoration:none; }
 
  ul, li {
   margin:10px; }
 
  pre {
   width:450px;
   background-color:#0C1021;
   padding:20px;
   margin:25px 0px; }
 
  code {
   color:#7D93B8;
   font: 12px/13px Monaco, Courier, monospace; }
</style>
</head>
<body>
<h3><img src="logo.png" alt="prototypeGrowl 0.8" title="prototypeGrowl 0.8"></h3>
<ul>
<li><a href="#" id="smoke1" title="Show msg Smoke">Show Growl Smoke.</a> (click to close)</li>
<li><a href="#" id="smoke2" title="Show msg Smoke">Show Growl Smoke.</a> (autohide)</li>
<li><a href="#" id="bezel" title="Show msg Bezel">Show Growl Bezel.</a> <b>(NOT WORKING YET)</b></li>
<li><a href="growl.js" title="Download">Download js.</a></li>
</ul>
<pre><code>
    var growl = new Growl.Smoke;
    growl.show({
      title: &apos;prototypeGrowl&apos;,
      text: &apos;http://github.com/tdreyno/prototypegrowl&apos;,
      image: &apos;growl.jpg&apos;,
      autohide: 2,
      animated: 0.75,
      opacity: 0.8
    });
</code></pre>
<p>
By <a href="http://github.com/tdreyno" title="Thomas Reynolds">Thomas Reynolds</a> and <a href="http://github.com/cpjolicoeur" title="Blog">Craig P Jolicoeur</a>.
</p>
 
<script type="text/javascript" charset="utf-8">
var growl = new Growl.Smoke;
    $('smoke1').observe('click', function(event) {
      growl.show({
        image: 'http://www.gravatar.com/avatar.php?gravatar_id=a4c4bd782c415f9ec93fe11e5694bf06&rating=PG&size=48',
        title: 'Click me to close!',
        autohide: 0,
animated: 0
      });
event.stop();
});
    $('smoke2').observe('click', function(event) {
      growl.show({
        image: 'http://www.gravatar.com/avatar.php?gravatar_id=cf8a610127d1108dfe67f673320b5fe5&rating=PG&size=48',
        title: 'I close automatically',
        autohide: 2
      });
event.stop();
});
 
    // $('bezel').observe('click', function(event) {
    // var growl = new Growl.Bezel;
    // growl.show({
    // title: 'Window.Growl<br />By Daniel Mota'
    // });
    // event.stop();
    // });
</script>
</body>
</html>