[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 4 // Moodle is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Moodle is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * Produces a sample page using JQuery. 19 * 20 * @package core 21 * @copyright 20014 Petr Skoda 22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 */ 24 25 require(dirname(__FILE__) . '/../../../config.php'); 26 27 require_login(); 28 $context = context_system::instance(); 29 require_capability('moodle/site:config', $context); 30 31 $PAGE->set_url('/lib/tests/other/jquerypage.php'); 32 $PAGE->set_context($context); 33 $PAGE->set_title('jQuery library test'); 34 $PAGE->set_heading('jQuery library test'); 35 36 $PAGE->requires->jquery(); 37 $PAGE->requires->jquery_plugin('ui'); 38 $PAGE->requires->jquery_plugin('ui-css'); 39 $PAGE->requires->jquery_plugin('migrate'); 40 41 echo $OUTPUT->header(); 42 43 // Note: the examples were copied from http://jqueryui.com/accordion/, and 44 // http://jqueryui.com/progressbar/#label. 45 46 ?> 47 48 <script> 49 $(function() { 50 $( "#accordion" ).accordion(); 51 $( "#progressbar" ).progressbar({ 52 value: false 53 }); 54 }); 55 </script> 56 <style> 57 .ui-progressbar { 58 position: relative; 59 } 60 .progress-label { 61 position: absolute; 62 left: 50%; 63 top: 4px; 64 font-weight: bold; 65 text-shadow: 1px 1px 0 #fff; 66 } 67 </style> 68 69 <div id="progressbar"><div class="progress-label">Loading...</div></div> 70 71 <div id="accordion"> 72 <h3>Section 1</h3> 73 <div> 74 <p> 75 Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer 76 ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit 77 amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut 78 odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. 79 </p> 80 </div> 81 <h3>Section 2</h3> 82 <div> 83 <p> 84 Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet 85 purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor 86 velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In 87 suscipit faucibus urna. 88 </p> 89 </div> 90 <h3>Section 3</h3> 91 <div> 92 <p> 93 Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. 94 Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero 95 ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis 96 lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. 97 </p> 98 <ul> 99 <li>List item one</li> 100 <li>List item two</li> 101 <li>List item three</li> 102 </ul> 103 </div> 104 <h3>Section 4</h3> 105 <div> 106 <p> 107 Cras dictum. Pellentesque habitant morbi tristique senectus et netus 108 et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in 109 faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia 110 mauris vel est. 111 </p> 112 <p> 113 Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. 114 Class aptent taciti sociosqu ad litora torquent per conubia nostra, per 115 inceptos himenaeos. 116 </p> 117 </div> 118 </div> 119 120 <?php 121 echo $OUTPUT->footer();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |