Example #1
0
$p->header()->theme('a');
$bt = $p->header()->addButton('', 'index.php#', 'a', 'home', false, false, true);
$bt->rel('external')->attribute('data-iconpos', 'notext');
/**
 * Adding Content.
 */
$p->addContent('<h1>Adding Custom JavaScript</h1>');
$p->addContent('<p align="justify">To add a custom JS you need add the tag <b>' . htmlspecialchars('<script...></script>') . '</b>');
$p->addContent(' to the jqmHead object [<b>' . htmlspecialchars('$jqmPhp->head()') . '</b>] in the jqmPhp instance. ');
$p->addContent('To facilitate the addition of JS you can use the class <b>jqmScript</b> as example:</p>');
$p->addContent('<pre class="ui-body-c" style="padding:20px;">$jqmPhp = new jqmPhp();' . "\n" . '$jqmPhp->head()->add(' . "\n\t" . 'new jqmScript(\'custom.js\')' . "\n" . ');</pre>');
$p->addContent(new jqmTag('p', 'p_js', 'class="ui-body-c" style="padding:20px;"', '&nbsp;'));
/**
 * Adding Source Code Links.
 */
$list = new jqmListview();
$list->inset(true)->dividerTheme('a');
$list->addDivider('Source Code');
$li = $list->addBasic('custom.js', 'custom.js', '', true);
$li->rel('external')->target('_blank');
$li = $list->addBasic('custom-js.php', 'custom-js.php.txt', '', true);
$li->rel('external')->target('_blank');
$p->addContent($list);
/**
 * Add the page to jqmPhp object.
 */
$jqmPhp->addPage($p);
/**
 * Generate the HTML code.
 */
echo $jqmPhp;
Example #2
0
 * Create and config a new jqmListview object and add Split Items.
 */
$p->addContent('<h3>Split</h3>');
$list4 = new jqmListview();
$list4->inset(true)->splitIcon('gear')->splitTheme('c');
$list4->addDivider('Unread Messages', '11')->dividerTheme('c')->countTheme('b');
$list4->addSplit('Account 1', '#', '#', '09');
$list4->addSplit('Account 2', '#', '#', '02');
$list4->addSplit('Account 3', '#', '#', '00');
$p->addContent($list4);
/**
 * Create and config a new jqmListview object and add Nested Items.
 */
$p->addContent('<h3>Nested</h3>');
$list5 = new jqmListview();
$list5->inset(true)->theme('a');
$list5->addDivider('Cars');
$fiat = new jqmListview();
$fiat->addBasic('Bravo', 'example-5.php#');
$fiat->addBasic('Linea', 'example-5.php#');
$fiat->addBasic('Punto', 'example-5.php#');
$list5->addNested('Fiat', $fiat);
$gm = new jqmListview();
$gm->addBasic('Celta', 'example-5.php#');
$gm->addBasic('Agile', 'example-5.php#');
$gm->addBasic('Vectra', 'example-5.php#');
$list5->addNested('GM', $gm);
$honda = new jqmListview();
$honda->addBasic('Fit', 'example-5.php#');
$honda->addBasic('City', 'example-5.php#');
$honda->addBasic('Civic', 'example-5.php#');