EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
interface.php
Go to the documentation of this file.
1 <?php
2 
3 $baseUrl = Yii::app()->theme->baseUrl;
4 $cs = Yii::app()->getClientScript();
5 $cs->registerCssFile($baseUrl.'/css/jquery.css');
6 
7 $this->pageTitle=Yii::app()->name . ' - Interface Elements';
8 $this->breadcrumbs=array(
9  'Interface Elements',
10 );
11 
12 $sample_content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed turpis diam, facilisis nec egestas quis, pharetra eget diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed turpis diam, facilisis nec egestas quis, pharetra eget diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed turpis diam, facilisis nec egestas quis, pharetra eget diam.';
13 ?>
14 <h1>Interface Elements</h1>
15 
16 <h2>Flash Messages</h2>
17 <div class="flash-notice"><b>NOTICE:</b> This is an example of a notice message.</div>
18 <div class="flash-success"><b>SUCCESS:</b> This is an example of a success message to show you that things have gone according to plan.</div>
19 <div class="flash-error"><b>ERROR:</b> This is an example of an error message to show you that things have gone wrong.</div>
20 
21 <div class="container showgrid">
22  <div class="span-12">
23 
24 <h2>CJuiTabs</h2>
25 <?php
26 $this->widget('zii.widgets.jui.CJuiTabs', array(
27  'tabs'=>array(
28  'StaticTab 1'=>$sample_content,
29  'StaticTab 2'=>array('content'=>$sample_content, 'id'=>'tab2'),
30  // panel 3 contains the content rendered by a partial view
31  'AjaxTab'=>$sample_content,
32  ),
33  // additional javascript options for the tabs plugin
34  'options'=>array(
35  'collapsible'=>true,
36  ),
37  'htmlOptions'=>array('class'=>'shadowtabs'),
38 ));
39 
40 ?>
41 
42 <br />
43 <h2>CJuiAccordion</h2>
44 <?php
45 $this->widget('zii.widgets.jui.CJuiAccordion', array(
46  'panels'=>array(
47  'Panel 1'=>$sample_content,
48  'Panel 2'=>$sample_content,
49  'Panel 3'=>$sample_content,
50  // panel 3 contains the content rendered by a partial view
51  //'panel 3'=>$this->renderPartial('_partial',null,true),
52  ),
53  // additional javascript options for the accordion plugin
54  'options'=>array(
55  'animated'=>'bounceslide',
56  ),
57  'htmlOptions'=>array('class'=>'shadowaccordion'),
58 ));
59 ?>
60  </div>
61  <div class="span-11 last">
62 <h2>CJuiProgressBar</h2>
63 <?php
64 $this->widget('zii.widgets.jui.CJuiProgressBar', array(
65  'value'=>75,
66  'htmlOptions'=>array(
67  'style'=>'height:20px;',
68  'class'=>'shadowprogressbar'
69  ),
70 ));
71 ?>
72 <br />
73 <?php
74 $this->widget('zii.widgets.jui.CJuiProgressBar', array(
75  'value'=>45,
76  'htmlOptions'=>array(
77  'style'=>'height:20px;',
78  'class'=>'shadowprogressbar'
79  ),
80 ));
81 ?>
82 <br />
83 <h2>CJuiSlider</h2>
84 <label for="amt">Volume:</label>
85 <input type="text" id="amt" style="border:0; font-weight:bold;" value="35" />
86 <?php
87 $this->widget('zii.widgets.jui.CJuiSlider', array(
88  'value'=>35,
89  'id'=>'amtSlider',
90  // additional javascript options for the slider plugin
91  'options'=>array(
92  'min'=>0,
93  'max'=>50,
94  'slide'=>'js:function(event, ui) { $("#amt").val(ui.value);}',
95  ),
96  'htmlOptions'=>array(
97  'class'=>'shadowslider'
98  ),
99 ));
100 ?>
101 
102 <br />
103 <label for="amt1">Volume:</label>
104 <input type="text" id="amt1" style="border:0; font-weight:bold;" value="15"/>
105 <?php
106 $this->widget('zii.widgets.jui.CJuiSlider', array(
107  'value'=>15,
108  // additional javascript options for the slider plugin
109  'options'=>array(
110  'min'=>0,
111  'max'=>50,
112  'slide'=>'js:function(event, ui) { $("#amt1").val(ui.value);}',
113  ),
114  'htmlOptions'=>array(
115  'class'=>'shadowslider-dark'
116  ),
117 
118 ));
119 ?>
120 
121 <br />
122 <h2>CJuiSliderInput</h2>
123 <?php
124 $this->widget('zii.widgets.jui.CJuiSliderInput', array(
125  'name'=>'rate',
126  'value'=>37,
127  // additional javascript options for the slider plugin
128  'options'=>array(
129  'min'=>10,
130  'max'=>50,
131  ),
132  'htmlOptions'=>array(
133  'class'=>'shadowslider'
134  ),
135 ));
136 
137 ?>
138 <br />
139 <?php
140 $this->widget('zii.widgets.jui.CJuiSliderInput', array(
141  'name'=>'rate2',
142  'value'=>45,
143  // additional javascript options for the slider plugin
144  'options'=>array(
145  'min'=>10,
146  'max'=>50,
147  ),
148  'htmlOptions'=>array(
149  'class'=>'shadowslider'
150  ),
151 ));
152 
153 ?>
154 <br />
155 <h2>CJuiButton</h2>
156 <?php
157 $this->widget('zii.widgets.jui.CJuiButton',
158  array(
159  'name'=>'button',
160  'caption'=>'Click on me!',
161  'value'=>'asd',
162  'htmlOptions'=>array(
163  'style'=>'height:40px;',
164  'class'=>'shadowbutton'
165  ),
166  'onclick'=>'js:function(){alert("The button has been clicked!"); this.blur(); return false;}',
167  )
168 );
169 ?>
170 
171 <?php
172 $this->widget('zii.widgets.jui.CJuiButton',
173  array(
174  'name'=>'button',
175  'caption'=>'Click on me!',
176  'value'=>'asd',
177  'htmlOptions'=>array(
178  'style'=>'height:40px;',
179  'class'=>'button green'
180  ),
181  'onclick'=>'js:function(){alert("The button has been clicked!"); this.blur(); return false;}',
182  )
183 );
184 ?>
185 
186 <?php
187 $this->widget('zii.widgets.jui.CJuiButton',
188  array(
189  'name'=>'button',
190  'caption'=>'Click on me!',
191  'value'=>'asd',
192  'htmlOptions'=>array(
193  'style'=>'height:40px;',
194  'class'=>'button red'
195  ),
196  'onclick'=>'js:function(){alert("The button has been clicked!"); this.blur(); return false;}',
197  )
198 );
199 ?>
200 <br />
201 <br />
202 <?php
203 $this->widget('zii.widgets.jui.CJuiButton',
204  array(
205  'name'=>'button',
206  'caption'=>'Click on me!',
207  'value'=>'asd',
208  'htmlOptions'=>array(
209  'style'=>'height:40px;',
210  'class'=>' button blue'
211  ),
212  'onclick'=>'js:function(){alert("The button has been clicked!"); this.blur(); return false;}',
213  )
214 );
215 ?>
216 <?php
217 $this->widget('zii.widgets.jui.CJuiButton',
218  array(
219  'name'=>'button',
220  'caption'=>'Click on me!',
221  'value'=>'asd',
222  'htmlOptions'=>array(
223  'style'=>'height:40px;',
224  'class'=>' button yellow'
225  ),
226  'onclick'=>'js:function(){alert("The button has been clicked!"); this.blur(); return false;}',
227  )
228 );
229 ?>
230 <?php
231 $this->widget('zii.widgets.jui.CJuiButton',
232  array(
233  'name'=>'button2',
234  'caption'=>'Click on me!',
235  'value'=>'asd2',
236  'htmlOptions'=>array(
237  'style'=>'height:40px;'
238  ),
239  'onclick'=>'js:function(){alert("The button has been clicked!"); this.blur(); return false;}',
240  )
241 );
242 ?>
243 <br />
244 <br />
245 <?php
246 $this->widget('zii.widgets.jui.CJuiButton',
247  array(
248  'name'=>'button',
249  'caption'=>'Click on me!',
250  'value'=>'asd',
251  'htmlOptions'=>array(
252  'style'=>'height:40px;',
253  'class'=>' button grey'
254  ),
255  'onclick'=>'js:function(){alert("The button has been clicked!"); this.blur(); return false;}',
256  )
257 );
258 ?>
259 <br /><br />
260 <h2>CJuiDatePicker</h2>
261 <?php
262 $this->widget('zii.widgets.jui.CJuiDatePicker', array(
263  'name'=>'publishDate',
264  // additional javascript options for the date picker plugin
265  'options'=>array(
266  'showAnim'=>'fold',
267  ),
268  'htmlOptions'=>array(
269  'class'=>'shadowdatepicker'
270  ),
271 ));
272 ?>
273 
274 <br />
275 <br />
276 
277 <h2>CJuiDialog</h2>
278 <?php
279 $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
280  'id'=>'mydialog',
281  // additional javascript options for the dialog plugin
282  'options'=>array(
283  'title'=>'Dialog box 1',
284  'autoOpen'=>false,
285  ),
286  'htmlOptions'=>array(
287  'class'=>'shadowdialog'
288  ),
289 ));
290 
291  echo 'dialog content here';
292 
293 $this->endWidget('zii.widgets.jui.CJuiDialog');
294 
295 // the link that may open the dialog
296 echo CHtml::link('open dialog', '#', array(
297  'onclick'=>'$("#mydialog").dialog("open"); return false;',
298 ));
299 ?>
300 
301  </div>
302 
303 
304 </div>
305 <br />
306 <div class="flash-notice">
307 <p>This is a "static" page. You may change the content of this page
308 by updating the file <tt><?php echo __FILE__; ?></tt>.</p>
309 </div>