Example #1
0
 * Config 'html' and 'head' tag.
 */
$j->head()->title('Examples');
/**
 * Create and config a jqmPage object.
 */
$p = new jqmPage('examples');
$p->theme('b')->title('Examples');
$p->header()->theme('a');
$p->header()->addButton('Home', './', '', 'home');
//Get the Button Added and Set Attributes
$p->header()->items()->get(1)->attribute('data-iconpos', 'notext')->attribute('rel', 'external');
/**
 * Create and config a new jqmListview object and add Items.
 */
$list1 = new jqmListview();
$list1->splitIcon('search')->splitTheme('c');
$list1->addDivider('Beginner', '2')->inset(true);
$list1->addBasic('Basic Example', 'example-1.php#');
$list1->items()->get(1)->add('<a href="example-1.php.txt" rel="external" target="_blank"></a>');
$list1->addBasic('Adding Pages', 'example-2.php#');
$list1->items()->get(2)->add('<a href="example-2.php.txt" rel="external" target="_blank"></a>');
$list1->addDivider('Intermediate', '3');
$list1->addBasic('Adding Objects', 'example-3.php#');
$list1->items()->get(4)->add('<a href="example-3.php.txt" rel="external" target="_blank"></a>');
$list1->addBasic('Adding Form Elements', 'example-4.php#');
$list1->items()->get(5)->add('<a href="example-4.php.txt" rel="external" target="_blank"></a>');
$list1->addBasic('Adding Listview', 'example-5.php#');
$list1->items()->get(6)->add('<a href="example-5.php.txt" rel="external" target="_blank"></a>');
$list1->addDivider('Advanced', '3');
$list1->add('<li><a href="custom-css.php" rel="external">Custom CSS</a><a href="custom-css.php.txt" rel="external" target="_blank"></a></li>');
Example #2
0
        /**
         * Creating a new Listview. This will be added as a nested item.
         */
        $lv_cars = new jqmListview();
        foreach ($brand->car as $car) {
            $lv_cars->addBasic($car, '#');
        }
        /**
         * Adding Nested Item (Other Listview);
         */
        $lv->addNested($brand->name, $lv_cars);
    }
}
/**
 * Adding Source Code Links.
 */
$list = new jqmListview();
$li = $list->addBasic('cars.xml', 'cars.xml', '', true);
$li->rel('external')->target('_blank');
$li = $list->addBasic('simple-xml.php', 'simple-xml.php.txt', '', true);
$li->rel('external')->target('_blank');
$lv->addDivider('S');
$lv->addNested('Source Code', $list);
/**
 * Add the page to jqmPhp object.
 */
$jqmPhp->addPage($p);
/**
 * Generate the HTML code.
 */
echo $jqmPhp;
Example #3
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 #4
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#');