1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
---|
2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
---|
3 | |
---|
4 | <html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en"> |
---|
5 | <head> |
---|
6 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> |
---|
7 | <script type="text/javascript" src="../javascripts/prototype.js"> </script> |
---|
8 | <script type="text/javascript" src="../javascripts/effects.js"> </script> |
---|
9 | <script type="text/javascript" src="../javascripts/window.js"> </script> |
---|
10 | <script type="text/javascript" src="../javascripts/window_effects.js"> </script> |
---|
11 | <script type="text/javascript" src="../javascripts/debug.js"> </script> |
---|
12 | <link href="../themes/default.css" rel="stylesheet" type="text/css"/> |
---|
13 | <link href="../themes/alert.css" rel="stylesheet" type="text/css"/> |
---|
14 | <link href="../themes/alphacube.css" rel="stylesheet" type="text/css"/> |
---|
15 | |
---|
16 | <title>nice_open</title> |
---|
17 | |
---|
18 | <style type="text/css"> |
---|
19 | .popup_effect1 { |
---|
20 | background:#11455A; |
---|
21 | opacity: 0.2; |
---|
22 | } |
---|
23 | .popup_effect2 { |
---|
24 | background:#FF0041; |
---|
25 | border: 3px dashed #000; |
---|
26 | } |
---|
27 | |
---|
28 | </style> |
---|
29 | </head> |
---|
30 | |
---|
31 | <body> |
---|
32 | |
---|
33 | <input type=button onclick="openDialog2(this)" value="open"/> a window with <tt>className: "popup_effect1"</tt> <br/> <br/> |
---|
34 | <a href="#" onclick="openDialog1(this)">Open a window</a> with: <tt>className: "popup_effect2", duration: 2, fromOpacity: 0.2, toOpacity: 0.4</tt> <br/><br/> |
---|
35 | <input type=button onclick="openDialog3(this)" value="Modal window"/> It works also with moodal window<br/> |
---|
36 | |
---|
37 | <script type="text/javascript"> |
---|
38 | function openDialog1(html) { |
---|
39 | var effect = new PopupEffect(html, {className: "popup_effect2", duration: 2, fromOpacity: 0.2, toOpacity: 0.4}); |
---|
40 | var win = new Window({className:"alphacube", width: 200, height:null, showEffect:effect.show.bind(effect), hideEffect:effect.hide.bind(effect)}) |
---|
41 | win.getContent().update("<h1>Hello</h1>Word"); |
---|
42 | |
---|
43 | win.showCenter(); |
---|
44 | } |
---|
45 | |
---|
46 | function openDialog2(html) { |
---|
47 | var effect = new PopupEffect(html, {className: "popup_effect1"}); |
---|
48 | var win = new Window({className:"alphacube", width: 200, height:null, showEffect:effect.show.bind(effect), hideEffect:effect.hide.bind(effect)}) |
---|
49 | win.getContent().update("<h1>Hello</h1>Word"); |
---|
50 | |
---|
51 | win.show(); |
---|
52 | } |
---|
53 | |
---|
54 | function openDialog3(html) { |
---|
55 | var effect = new PopupEffect(html, {className: "popup_effect1"}); |
---|
56 | Dialog.confirm("Do you like this effect?",{className:"alphacube", width: 400, height:null, showEffect:effect.show.bind(effect), hideEffect:effect.hide.bind(effect)}) |
---|
57 | } |
---|
58 | |
---|
59 | </script> |
---|
60 | </body> |
---|
61 | </html> |
---|