コード例 #1
0
ファイル: index.php プロジェクト: hanigamal/jqmphp
 * Include the jqmPhp class.
 */
include '../lib/jqmPhp.php';
/**
 * Create a new jqmPhp object.
 */
$j = new jqmPhp();
/**
 * 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');
コード例 #2
0
ファイル: index.php プロジェクト: laiello/openuluh
 * Copyright (c) 2012-* ShadowEO / Toxus Communications Systems
 * Licensed under the GPLv3
 * You are free to modify, distribute or redistribute this code as you please
 * so long as the above copyright notice remains intact.
 */
include "lib/jqmPhp.php";
include "../libs/XBMCHelper.class.php";
include "../config/application.php";
$currentPage = basename(__FILE__);
$XBMC = new XBMCHelper();
$jqm = new jqmPhp();
$jqm->head()->title($config['AppTitle']);
$jqm->head()->add("<meta name='viewport' content='width=device-width, initial-scale=1'/>");
//	$jqm->head()->add(new jqmLink("themes/PandoraTV.min.css"));
$page = new jqmPage('index');
$page->theme('b')->title($config['AppTitle']);
$page->header()->theme('a');
$nav = $page->header()->add(new jqmNavbar(), true);
$nav->add(new jqmButton('', '', '', 'a', "index.php", 'Home', '', true));
$nav->add(new jqmButton('', '', '', 'a', 'shows.php?ac=sl', 'All Shows', '', false));
$nav->add(new jqmButton('', '', '', 'a', 'channels.php?ac=cl', 'Channels', '', false));
//$page->AddContent('<h1>Pandora TV</h1>');
$g = $page->addContent(new jqmGrid(), true);
$g->grid('b');
$ShowsList = $XBMC->RetrieveShowList();
$randshows = shuffle($ShowsList);
$column1 = 0;
$column2 = 0;
$list = new jqmListviem();
$list->inset(true)->theme('a');
$list->addDivider('Random Shows')->dividerTheme('a')->countTheme('b');
コード例 #3
0
ファイル: custom-js.php プロジェクト: hanigamal/jqmphp
 */
include '../lib/jqmPhp.php';
/**
 * Create a new jqmPhp object.
 */
$jqmPhp = new jqmPhp();
/**
 * Adding custom JavaScript to jqmHead in jqmPhp
 */
$jqmPhp->head()->title('Custom JS Example');
$jqmPhp->head()->add(new jqmScript('custom.js'));
/**
 * Create a new jqmPage object.
 */
$p = new jqmPage('custom-js');
$p->theme('b');
$p->title('Custom JS Example');
$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.
コード例 #4
0
ファイル: episodes.php プロジェクト: laiello/openuluh
 * Copyright (c) 2012-* ShadowEO / Toxus Communications Systems
 * Licensed under the GPLv3
 * You are free to modify, distribute or redistribute this code as you please
 * so long as the above copyright notice remains intact.
 */
include "lib/jqmPhp.php";
include "../libs/XBMCHelper.class.php";
$XBMC = new XBMCHelper();
$jqm = new jqmPhp();
$jqm->head()->add('<meta name="viewport" content="width=device-width, initial-scale=1">');
$page = new jqmPage('episodes', array('data-add-back-btn=true'));
$currentPage = basename(__FILE__);
switch ($_GET['ac']) {
    case 'el':
        $ShowInfo = $XBMC->RetrieveShowInfo($_GET['id']);
        $page->theme('b')->title($ShowInfo['SeriesName']);
        $page->header()->theme('a');
        $page->AddContent("<h1>Episodes</h1>");
        //			$page->header()->addButton('Back',"#shows.php?ac=si&id=".$_GET['id'],'a', 'arrow-l');
        $list = new jqmListviem();
        $list->inset(true)->theme('a');
        //			$list->addDivider('Episodes', $XBMC->CountShows())->dividerTheme('a')->countTheme('b');
        $Shows = $XBMC->RetrieveEpisodesForShow($_GET['id']);
        foreach ($Shows as $k => $v) {
            $list->AddIcon("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;S" . $v['season'] . "E" . $v['episode'] . ": " . $v['EpisodeName'], 'episodes.php?ac=ei&id=' . $v['idEpisode'], '../getimage.php?ac=et&ri=1&w=400&h=400&id=' . $v['idEpisode']);
        }
        $page->AddContent($list);
        $jqm->AddPage($page);
        echo $jqm;
        break;
    case 'ei':
コード例 #5
0
ファイル: example-3.php プロジェクト: hanigamal/jqmphp
$j->head()->title('Example 3');
$j->head()->css('http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css');
$j->head()->jq('http://code.jquery.com/jquery-1.4.4.min.js');
$j->head()->jqm('http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js');
$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));
コード例 #6
0
ファイル: shows.php プロジェクト: laiello/openuluh
include "../config/application.php";
$XBMC = new XBMCHelper();
$jqm = new jqmPhp();
$jqm->head()->add('<meta name="viewport" content="width=device-width, initial-scale=1"/>');
$jqm->head()->add('<style> .ui-content { padding: 0px; }</style>');
if ($_GET['ac'] == "si") {
    $page = new jqmPage('shows', array('data-add-back-btn=true'));
} elseif ($_GET['ac'] == "csl") {
    $page = new jqmPage('shows', array('data-add-back-btn' => 'true'));
} else {
    $page = new jqmPage('shows');
}
$currentPage = basename(__FILE__);
switch ($_GET['ac']) {
    case 'csl':
        $page->theme('b')->title('Shows');
        $page->header()->theme('a');
        $nav = $page->header()->add(new jqmNavbar(), true);
        //			$page->AddContent('<div style="padding: 15px;">');
        $nav->add(new jqmButton('', '', '', 'a', "index.php", 'Home', '', false));
        $nav->add(new jqmButton('', '', '', 'a', '#', 'All Shows', '', false));
        $nav->add(new jqmButton('', '', '', 'a', 'channels.php?ac=cl', 'Channels', '', true));
        $list = new jqmListviem();
        $list->inset(true)->theme('a');
        $list->addDivider('Shows from ' . $_GET['cn'], $XBMC->CountShowsByChannel($_GET['cn']))->dividerTheme('a')->countTheme('b');
        $Shows = $XBMC->SortShowsByChannel($_GET['cn']);
        foreach ($Shows as $k => $v) {
            $list->AddSplit($v['SeriesName'], 'shows.php?ac=si&id=' . $v['idShow'], '#episodes.php?ac=el&id=' . $v['idShow'], $XBMC->CountEpisodes($v['idShow']));
        }
        $page->AddContent($list);
        //			$page->AddContent("</div>");