Beispiel #1
0
$p->header()->theme('a')->add(new jqmButton('', array(new jqmAttribute('data-iconpos', 'notext')), '', 'a', 'index.php#', '', '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 jqmNavbar object and add items.
 */
$nav = $p->header()->add(new jqmNavbar(), true);
$nav->add(new jqmButton('', '', '', 'a', 'example-1.php#', 'EX1', '', false));
$nav->add(new jqmButton('', '', '', 'a', 'example-2.php#', 'Ex2', '', false));
$nav->add(new jqmButton('', '', '', 'a', 'example-3.php#', 'EX3', '', false));
$nav->add(new jqmButton('', '', '', 'a', 'example-4.php#', 'EX4', '', false));
$nav->add(new jqmButton('', '', '', 'a', '#', 'EX5', '', true));
/**
 * Confif page footer (jqmFooter).
 */
$p->footer()->addButton('EX1', 'example-1.php#', '', 'arrow-l');
$p->footer()->addButton('EX2', 'example-2.php#', '', 'arrow-l');
$p->footer()->addButton('EX3', 'example-3.php#', '', 'arrow-l');
$p->footer()->addButton('EX4', 'example-4.php#', '', 'arrow-l');
$p->footer()->addButton('EX5', '#', '', 'check', true);
$p->footer()->group(true)->uiBar(true)->theme('a');
/**
 * Create and config a new jqmListview object and add Basic Items.
 */
$p->addContent('<h1>Adding Listviews</h1>');
$p->addContent('<h3>Basic</h3>');
$list1 = new jqmListview();
$list1->addDivider('Basic Examples', '2')->inset(true);
$list1->addBasic('Example 1', 'example-1.php#');
$list1->addBasic('Example 2', 'example-2.php#');
$list1->addDivider('Advanced Examples', '3')->inset(true);
Beispiel #2
0
include '../lib/jqmPhp.php';
/**
 * Create a new jqmPhp object.
 */
$j = new jqmPhp();
/**
 * Create a new jqmPage object.
 */
$p = new jqmPage('example-2');
$p->theme('b');
$p->title('Example 2');
$p->header()->addButton('Example 1', 'example-1.php#', 'a', 'arrow-l');
$p->header()->addButton('Example 3', 'example-3.php#', 'b', 'arrow-r');
$p->header()->theme('a');
$p->addContent('<h1>Adding Pages</h1>');
$p->addContent('<p>In this example we create a page (jqmPage),');
$p->addContent(' add content and buttons to the header.');
$p->addContent(' After we add the page to jqmPhp object.</p>');
$p->addContent('<a href="index.php#" data-role="button" data-theme="a">Home</a>');
$p->addContent('<a href="example-3.php#" data-role="button">Example 3</a>');
$p->footer()->title('Example 2 Footer');
$p->footer()->position('fixed');
$p->footer()->theme('a');
/**
 * Add the page to jqmPhp object.
 */
$j->addPage($p);
/**
 * Generate the HTML code.
 */
echo $j;