Example #1
0
$j->head()->add(new jqmLink('css/custom.css'));
// Adding a custom CSS.
$j->head()->add(new jqmScript('js/custom.js'));
// Adding a custom JavaScript.
//$j->body()->attribute('onload', 'initCustom();');     // Adding a custom attribute to 'body' tag.
/**
 * Create and config a jqmPage object.
 * Most methods return the object itself allowing call
 * another method on the object in sequence.
 */
$p = new jqmPage('example-3');
$p->theme('b')->title('Example 3')->header()->addButton('Example 2', 'example-2.php#', 'a', 'arrow-l')->addButton('Example 4', 'example-4.php#', 'b', 'arrow-r')->theme('a');
/**
 * addContent() is alias to content()->add().
 */
$p->content()->add('<h1>Adding Objects</h1>');
$p->addContent('<h3>Controlgroup and Buttons</h3>');
/**
 * Create and config a new jqmControlgroup object and add items.
 * Most methods of addition have the last parameter $returnAdded.
 * If it is set to 'true' the added object is returned, otherwise
 * the object that called the method is returned.
 */
$cg = $p->content()->add(new jqmControlgroup(), true);
$cg->dataType('vertical');
$cg->add(new jqmButton('', '', '', 'a', 'index.php#', 'Home', 'home', false));
$cg->add(new jqmButton('', '', '', 'b', 'example-1.php#', 'Example 1', 'arrow-l', false));
$cg->add(new jqmButton('', '', '', 'b', 'example-2.php#', 'Example 2', 'arrow-l', false));
$cg->add(new jqmButton('', '', '', 'b', '#', 'Example 3', 'check', true));
$cg->add(new jqmButton('', '', '', 'b', 'example-4.php#', 'Example 4', 'arrow-r', false));
$cg->add(new jqmButton('', '', '', 'b', 'example-5.php#', 'Example 5', 'arrow-r', false));
Example #2
0
$nav->add(new jqmButton('', '', '', 'a', 'example-3.php#', 'EX3', '', false));
$nav->add(new jqmButton('', '', '', 'a', '#', 'EX4', '', true));
$nav->add(new jqmButton('', '', '', 'a', 'example-5.php#', 'EX5', '', false));
/**
 * 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', '#', '', 'check', true);
$p->footer()->addButton('EX5', 'example-5.php#', '', 'arrow-r');
$p->footer()->group(true)->uiBar(true)->theme('a');
/**
 * Create and config a new jqmForm object and add items.
 */
$p->content()->add('<h1>Adding Form Elements</h1>');
$form = $p->addContent(new jqmForm(), true);
$form->action('example-4.php?rand=' . rand(0, 9999))->method('POST');
/**
 * Add some jqmInput objects.
 */
$form->add('<h3>Text Inputs</h3>');
$form->add(new jqmInput('uid', 'uid', 'text', '', 'Username:'******'', true));
$form->add(new jqmInput('pwd', 'pwd', 'password', '', 'Password:'******'', true));
$form->add(new jqmInput('find', 'find', 'search', '', 'Search:', '', true));
/**
 * Add a jqmTextarea object.
 */
$form->add('<h3>Textarea</h3>');
$form->add(new jqmTextarea('msg', 'msg', '', '80', '4', 'Comments:', '', true));
/**