Fixed php examples and plugins so no warnings are given with the latest versions...
[infodrom/rico3] / examples / php / widgets.php
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
2 <html>\r
3 <head>\r
4 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">\r
5 <title>Rico widgets styled user-selectable themes</title>\r
6 <?php\r
7 require "LoadRicoClient.php";\r
8 ?>\r
9 \r
10 <script>\r
11 \r
12 var dialog;\r
13 \r
14 Rico.onLoad( function() {\r
15   var grid_options = {\r
16     defaultWidth : 90,\r
17     useUnformattedColWidth: false,\r
18     menuEvent     : 'click',\r
19     frozenColumns : 1,\r
20     visibleRows   : 6,\r
21     highlightElem: 'cursorRow',\r
22     columnSpecs  : [{width:200},{type: 'number'},{type: 'number'},{type: 'number'},{type: 'number'},{type: 'number'}]\r
23   };\r
24   var grid=new Rico.LiveGrid ('population', new Rico.Buffer.AjaxLoadOnce('../data/population.xml'), grid_options);\r
25   grid.menu=new Rico.GridMenu();\r
26   new Rico.Accordion( 'accExample', {panelHeight:160});\r
27   new Rico.TabbedPanel( 'tabsExample', {panelHeight:160});\r
28   var cal=new Rico.CalendarControl("ricoCal",{position:'auto'});\r
29   cal.selectNow();\r
30   dialog=new Rico.Window('',{height:'250px',width:'300px',overflow:'auto'}, 'GettysburgContent');\r
31 });\r
32 \r
33 function openWindow(btn) {\r
34   dialog.openPopup();\r
35   Rico.positionCtlOverIcon(dialog.container,btn);\r
36 }\r
37 </script>\r
38 \r
39 <link href="../demo.css" type="text/css" rel="stylesheet" />\r
40 <style type="text/css">\r
41 #accExample {\r
42   width: 27em;\r
43 }\r
44 #tabsExample {\r
45   width: 30em;\r
46 }\r
47 div.ricoLG_cell {\r
48   white-space:nowrap;\r
49 }\r
50 div.population_col1 .ricoLG_cell { text-align:right; }\r
51 div.population_col2 .ricoLG_cell { text-align:right; }\r
52 div.population_col3 .ricoLG_cell { text-align:right; }\r
53 div.population_col4 .ricoLG_cell { text-align:right; }\r
54 div.population_col5 .ricoLG_cell { text-align:right; }\r
55 </style>\r
56 \r
57 </head>\r
58 \r
59 \r
60 <body>\r
61 \r
62 <table id='explanation' border='0' cellpadding='5' cellspacing='0' style='clear:both'><tr valign='top'><td>\r
63 Base Library:\r
64 <script type='text/javascript'>\r
65 document.write(Rico.Lib+' '+Rico.LibVersion);\r
66 </script>\r
67 <hr>\r
68 This example displays some of the widgets that come with Rico.\r
69 The widgets are compatible with all base libraries and themes.\r
70 </td>\r
71 <td>\r
72 <?php\r
73 require "info.php";\r
74 ?>\r
75 </td>\r
76 </tr></table>\r
77 \r
78 \r
79 <p>&nbsp;</p>\r
80 \r
81 <h2 style='margin-bottom:1px;'>Rico LiveGrid</h2>\r
82 <p style='margin-top:1px;'>Click on a cell to see available actions</p>\r
83 \r
84 <p class="ricoBookmark"><span id="population_bookmark">&nbsp;</span></p>\r
85 <table class="ricoLiveGrid" id="population">\r
86 <thead>\r
87  <tr>  <td class='ricoFrozen'></td>  <td colspan=5>Population (thousands)</td> </tr>\r
88  <tr>  <th class='ricoFrozen'>Country or area</th>  <th>1950</th>  <th>2009</th>  <th>2015</th>  <th>2025</th>  <th>2050</th> </tr>\r
89 </thead>\r
90 </table>\r
91 \r
92 <p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the\r
93 Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009).\r
94 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations.</p>\r
95 \r
96 \r
97 <p>&nbsp;</p>\r
98 \r
99 <h2>Rico Accordion</h2>\r
100 \r
101 <div id="accExample">\r
102 \r
103    <div>\r
104      <div>Stanza 1</div>\r
105      <div>\r
106 <p>Two roads diverged in a yellow wood,\r
107 <br>And sorry I could not travel both\r
108 <br>And be one traveler, long I stood\r
109 <br>And looked down one as far as I could\r
110 <br>To where it bent in the undergrowth.\r
111      </div>\r
112    </div>\r
113    <div>\r
114      <div>Stanza 2</div>\r
115      <div>\r
116 <p>Then took the other, as just as fair,\r
117 <br>And having perhaps the better claim,\r
118 <br>Because it was grassy and wanted wear;\r
119 <br>Though as for that the passing there\r
120 <br>Had worn them really about the same.\r
121      </div>\r
122    </div>\r
123    <div>\r
124      <div>Stanza 3</div>\r
125      <div>\r
126 <p>And both that morning equally lay\r
127 <br>In leaves no step had trodden black.\r
128 <br>Oh, I kept the first for another day!\r
129 <br>Yet knowing how way leads on to way,\r
130 <br>I doubted if I should ever come back.\r
131      </div>\r
132    </div>\r
133    <div>\r
134      <div>Stanza 4</div>\r
135      <div>\r
136 <p>I shall be telling this with a sigh\r
137 <br>Somewhere ages and ages hence:\r
138 <br>Two roads diverged in a wood, and I--\r
139 <br>I took the one less traveled by,\r
140 <br>And that has made all the difference.\r
141 <p style='font-size:9pt;'><strong>Robert Frost: The Road Not Taken (1915)</strong>\r
142      </div>\r
143   </div>\r
144 \r
145 </div>\r
146 \r
147 <p>&nbsp;</p>\r
148 \r
149 <h2>Rico Tabbed Panel</h2>\r
150 \r
151 <div id="tabsExample">\r
152    <ul>\r
153      <li>Stanza 1</li>\r
154      <li>Stanza 2</li>\r
155      <li>Stanza 3</li>\r
156      <li>Stanza 4</li>\r
157    </ul>\r
158 \r
159    <div>\r
160      <div>\r
161 <p>Two roads diverged in a yellow wood,\r
162 <br>And sorry I could not travel both\r
163 <br>And be one traveler, long I stood\r
164 <br>And looked down one as far as I could\r
165 <br>To where it bent in the undergrowth.\r
166      </div>\r
167      <div>\r
168 <p>Then took the other, as just as fair,\r
169 <br>And having perhaps the better claim,\r
170 <br>Because it was grassy and wanted wear;\r
171 <br>Though as for that the passing there\r
172 <br>Had worn them really about the same.\r
173      </div>\r
174      <div>\r
175 <p>And both that morning equally lay\r
176 <br>In leaves no step had trodden black.\r
177 <br>Oh, I kept the first for another day!\r
178 <br>Yet knowing how way leads on to way,\r
179 <br>I doubted if I should ever come back.\r
180      </div>\r
181      <div>\r
182 <p>I shall be telling this with a sigh\r
183 <br>Somewhere ages and ages hence:\r
184 <br>Two roads diverged in a wood, and I--\r
185 <br>I took the one less traveled by,\r
186 <br>And that has made all the difference.\r
187 <p style='font-size:9pt;'><strong>Robert Frost: The Road Not Taken (1915)</strong>\r
188      </div>\r
189   </div>\r
190 \r
191 </div>\r
192 \r
193 <p>&nbsp;</p>\r
194 \r
195 <h2>Rico Dialog Window</h2>\r
196 \r
197 <p><button onclick='openWindow(this)'>Open Dialog Window</button>\r
198 <div id='GettysburgContent' title='The Gettysburg Address'>\r
199 <p>Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.\r
200 <p>Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.\r
201 <p>But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth.\r
202 </div>\r
203 \r
204 <p>&nbsp;</p>\r
205 \r
206 <h2>Rico Calendar</h2>\r
207 \r
208 <div id="ricoCal"></div>\r
209 \r
210 </body>\r
211 </html>\r