Example #1
0
    <h3>TabStrip with images</h3>
<?php 
$tabstrip = new \Kendo\UI\TabStrip('tabstrip');
$tabstrip->dataTextField("text")->dataImageUrlField("imageUrl")->dataContentField("content");
$baseball = new \Kendo\UI\TabStripItem();
$baseball->text("Baseball")->imageUrl("../content/shared/icons/sports/baseball.png")->content("Baseball is a bat-and-ball sport played between two teams of nine players each. The aim is to score runs by hitting a thrown ball with a bat and touching a series of four bases arranged at the corners of a ninety-foot diamond. Players on the batting team take turns hitting against the pitcher of the fielding team, which tries to stop them from scoring runs by getting hitters out in any of several ways. A player on the batting team can stop at any of the bases and later advance via a teammate's hit or other means. The teams switch between batting and fielding whenever the fielding team records three outs. One turn at bat for each team constitutes an inning and nine innings make up a professional game. The team with the most runs at the end of the game wins.");
$golf = new \Kendo\UI\TabStripItem();
$golf->text("Golf")->imageUrl("../content/shared/icons/sports/golf.png")->content("Golf is a precision club and ball sport, in which competing players (or golfers) use many types of clubs to hit balls into a series of holes on a golf course using the fewest number of strokes. It is one of the few ball games that does not require a standardized playing area. Instead, the game is played on golf courses, each of which features a unique design, although courses typically consist of either nine or 18 holes. Golf is defined, in the rules of golf, as playing a ball with a club from the teeing ground into the hole by a stroke or successive strokes in accordance with the Rules.");
$swimming = new \Kendo\UI\TabStripItem();
$swimming->text("Swimming")->imageUrl("../content/shared/icons/sports/swimming.png")->content("Swimming has been recorded since prehistoric times; the earliest recording of swimming dates back to Stone Age paintings from around 7,000 years ago. Written references date from 2000 BC. Some of the earliest references to swimming include the Gilgamesh, the Iliad, the Odyssey, the Bible, Beowulf, and other sagas. In 1578, Nikolaus Wynmann, a German professor of languages, wrote the first swimming book, The Swimmer or A Dialogue on the Art of Swimming (Der Schwimmer oder ein Zwiegespräch über die Schwimmkunst). Competitive swimming in Europe started around 1800, mostly using breaststroke.");
$snowboarding = new \Kendo\UI\TabStripItem();
$snowboarding->text("Snowboarding")->imageUrl("../content/shared/icons/sports/snowboarding.png")->content("Snowboarding is a sport that involves descending a slope that is covered with snow on a snowboard attached to a rider's feet using a special boot set onto a mounted binding. The development of snowboarding was inspired by skateboarding, sledding, surfing and skiing. It was developed in the U.S.A. in the 1960s to 1970s and became a Winter Olympic Sport in 1998.");
$tabstrip->dataSource(array($baseball, $golf, $swimming, $snowboarding));
$tabstrip->animation(false);
echo $tabstrip->render();
$sortable = new \Kendo\UI\Sortable('#tabstrip ul.k-tabstrip-items');
$sortable->filter('li.k-item')->axis('x')->container('ul.k-tabstrip-items')->hint(new \Kendo\JavaScriptFunction('hint'))->start('onStart')->change('onChange');
echo $sortable->render();
?>
    <script>
        $(document).ready(function() {
            $("#tabstrip").data("kendoTabStrip").select(0);
        });

        function hint(element) {
            return $("<div id='hint' class='k-widget k-header k-tabstrip'><ul class='k-tabstrip-items k-reset'><li class='k-item k-state-active k-tab-on-top'>" + element.html() + "</li></ul></div>");
        }

        function onStart(e) {
            $("#tabstrip").data("kendoTabStrip").activateTab(e.item);
        }
Example #2
0
$model = new \Kendo\Data\DataSourceSchemaModel();
$productNameField = new \Kendo\Data\DataSourceSchemaModelField('ProductName');
$productNameField->type('string');
$unitPriceField = new \Kendo\Data\DataSourceSchemaModelField('UnitPrice');
$unitPriceField->type('number');
$unitsInStockField = new \Kendo\Data\DataSourceSchemaModelField('UnitsInStock');
$unitsInStockField->type('number');
$model->addField($productNameField)->addField($unitPriceField)->addField($unitsInStockField);
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->model($model)->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)->schema($schema)->pageSize(15);
$listview = new \Kendo\UI\ListView('listView');
$listview->dataSource($dataSource)->templateId('template')->pageable(true);
echo $listview->render();
$sortable = new \Kendo\UI\Sortable('#listView');
$sortable->filter('>div.product')->cursor('move')->hint(new \Kendo\JavaScriptFunction('hint'))->placeholder(new \Kendo\JavaScriptFunction('placeholder'))->change('onChange');
echo $sortable->render();
?>
</div>

<script>
    function placeholder(element) {
        return element.clone().css("opacity", 0.1);
    }

    function hint(element) {
        return element.clone().removeClass("k-state-selected");
    }

    function onChange(e) {
Example #3
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$sortableSidebar = new \Kendo\UI\Sortable('#sidebar');
// select the container for the Sortable
$sortableSidebar->filter('>div')->connectWith('#main-content')->cursor('move')->hint(new \Kendo\JavaScriptFunction('hint'))->placeholder(new \Kendo\JavaScriptFunction('placeholder'));
echo $sortableSidebar->render();
$sortableMain = new \Kendo\UI\Sortable('#main-content');
// select the container for the Sortable
$sortableMain->connectWith('#sidebar')->cursor('move')->hint(new \Kendo\JavaScriptFunction('hint'))->placeholder(new \Kendo\JavaScriptFunction('placeholder'));
echo $sortableMain->render();
?>

    <div class="dash-head"></div>
    <div class="panel-wrap">
        <div id="sidebar">
            <div id="profile" class="widget">
                <h3>Profile <span class="collapse k-icon k-i-arrowhead-n"></span></h3>
                <div>
                    <div class="profile-photo"></div>
                    <h4>Lynda Schleifer</h4>
                    <p>Sales Associate</p>
                </div>
            </div>
            <div id="teammates" class="widget">
                <h3>Teammates <span class="collapse k-icon k-i-arrowhead-n"></h3>
                <div>
                    <div class="team-mate">
                        <img src="../content/web/panelbar/andrew.jpg" alt="Andrew Fuller">
                        <h4>Andrew Fuller</h4>
Example #4
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$sortable = new \Kendo\UI\Sortable('#sortable-horizontal');
// select the container for the Sortable
$sortable->axis('x')->container('#sortable-horizontal')->cursor('move')->placeholder('<div class="placeholder">Drop Here!</div>')->hint(new \Kendo\JavaScriptFunction('hint'));
echo $sortable->render();
?>

    <div class="demo-section" style="margin-top: 50px;">
        <h3 class="title">Rearrange the photos</h3>
    </div>
    <div class="demo-section" style="margin-bottom: 50px;">
        <div id="sortable-horizontal">
            <img src="../content/web/sortable/1.jpg" /><img
            src="../content/web/sortable/2.jpg" /><img
            src="../content/web/sortable/3.jpg" /><img
            src="../content/web/sortable/4.jpg" /><img
            src="../content/web/sortable/5.jpg" />
        </div>
    </div>

    <script>
        function hint(element) {
            return element.clone().addClass("tooltip");
        }
    </script>

    <style>
        #example {
Example #5
0
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->model($model)->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->data($data)->pageSize(16)->schema($schema);
$grid = new \Kendo\UI\Grid('grid');
$productName = new \Kendo\UI\GridColumn();
$productName->field('ProductName')->title('Product Name');
$unitPrice = new \Kendo\UI\GridColumn();
$unitPrice->field('UnitPrice')->width('130px')->format('{0:c}')->title('Unit Price');
$unitsInStock = new \Kendo\UI\GridColumn();
$unitsInStock->field('UnitsInStock')->width('130px')->title('Units In Stock');
$discontinued = new \Kendo\UI\GridColumn();
$discontinued->field('Discontinued')->width('130px');
$grid->addColumn($productName)->addColumn($unitPrice)->addColumn($unitsInStock)->addColumn($discontinued)->scrollable(false)->dataSource($dataSource);
echo $grid->render();
$sortable = new \Kendo\UI\Sortable('#grid table');
// select the container for the Sortable
$sortable->hint(new \Kendo\JavaScriptFunction('hint'))->placeholder(new \Kendo\JavaScriptFunction('placeholder'))->filter('>tbody >tr')->cursor('move')->container('#grid tbody')->change('onChange');
echo $sortable->render();
?>

    <script>
        var hint = $.noop;

        function placeholder(element) {
            return element.clone().addClass("k-state-hover").css("opacity", 0.65);
        }

        function onChange(e) {
            var grid = $("#grid").data("kendoGrid"),
                skip = grid.dataSource.skip(),
Example #6
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$sortableLeft = new \Kendo\UI\Sortable('#sortable-left');
// select the container for the Sortable
$sortableLeft->connectWith('#sortable-right')->hint(new \Kendo\JavaScriptFunction('hint'))->placeholder(new \Kendo\JavaScriptFunction('placeholder'))->cursor('url(\'../content/web/sortable/grabbing.cur\'), default')->start('onStart')->move('onMove')->end('onEnd')->change('onChange')->cancel('onCancel');
echo $sortableLeft->render();
$sortableRight = new \Kendo\UI\Sortable('#sortable-right');
// select the container for the Sortable
$sortableRight->connectWith('#sortable-left')->hint(new \Kendo\JavaScriptFunction('hint'))->placeholder(new \Kendo\JavaScriptFunction('placeholder'))->cursor('url(\'../content/web/sortable/grabbing.cur\'), default')->start('onStart')->move('onMove')->end('onEnd')->change('onChange')->cancel('onCancel');
echo $sortableRight->render();
?>

    <div class="demo-section list-wrapper">
        <h3 class="title">Reorder Items
        </h3>
        <ul id="sortable-left" style="min-height: 41px;">
            <li class="list-left">Item 1</li>
            <li class="list-left">Item 2</li>
            <li class="list-left">Item 3</li>
        </ul>

        <ul id="sortable-right" style="min-height: 41px;">
            <li class="list-right">Item 1</li>
            <li class="list-right">Item 2</li>
            <li class="list-right">Item 3</li>
        </ul>
    </div>
    
    <div class="demo-section">
Example #7
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$sortable = new \Kendo\UI\Sortable('#sortable-basic');
// select the container for the Sortable
$cursorOffset = new \Kendo\UI\SortableCursorOffset();
$cursorOffset->left(-230)->top(-10);
$sortable->hint(new \Kendo\JavaScriptFunction('hint'))->placeholder(new \Kendo\JavaScriptFunction('placeholder'))->cursor('url(\'../content/web/sortable/grabbing.cur\'), default')->cursorOffset($cursorOffset);
echo $sortable->render();
?>

    <div id="playlist">
        <div id="playlist-title"><span>My Playlist</span></div>
        <ul id="sortable-basic">
            <li class="sortable">Papercut <span>3:04</span></li>
            <li class="sortable">One Step Closer <span>2:35</span></li>
            <li class="sortable">With You <span>3:23</span></li>
            <li class="sortable">Points of Authority <span>3:20</span></li>
            <li class="sortable">Crawling <span>3:29</span></li>
            <li class="sortable">Runaway <span>3:03</span></li>
            <li class="sortable">By Myself <span>3:09</span></li>
            <li class="sortable">In the End <span>3:36</span></li>
            <li class="sortable">A Place for My Head <span>3:04</span></li>
            <li class="sortable">Forgotten <span>3:14</span></li>
            <li class="sortable">Cure for the Itch <span>2:37</span></li>
            <li class="sortable">Pushing Me Away <span>3:11</span></li>
        </ul>
    </div>

    <script>
Example #8
0
require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$sortableListA = new \Kendo\UI\Sortable('#sortable-listA');
// select the container for the Sortable
$sortableListA->connectWith('#sortable-listB')->cursor('url(\'../content/web/sortable/grabbing.cur\'), default')->placeholder(new \Kendo\JavaScriptFunction('placeholder'));
echo $sortableListA->render();
$sortableListB = new \Kendo\UI\Sortable('#sortable-listB');
// select the container for the Sortable
$sortableListB->cursor('url(\'../content/web/sortable/grabbing.cur\'), default')->placeholder(new \Kendo\JavaScriptFunction('placeholder'));
echo $sortableListB->render();
$sortableListC = new \Kendo\UI\Sortable('#sortable-listC');
// select the container for the Sortable
$sortableListC->connectWith('#sortable-listD')->cursor('url(\'../content/web/sortable/grabbing.cur\'), default')->placeholder(new \Kendo\JavaScriptFunction('placeholder'));
echo $sortableListC->render();
$sortableListD = new \Kendo\UI\Sortable('#sortable-listD');
// select the container for the Sortable
$sortableListD->connectWith('#sortable-listC')->cursor('url(\'../content/web/sortable/grabbing.cur\'), default')->placeholder(new \Kendo\JavaScriptFunction('placeholder'));
echo $sortableListD->render();
?>

    <div class="demo-section one-way">
        <div class="list-wrapper">
            <ul id="sortable-listA">
                <li class="list-item">Apples</li>
                <li class="list-item">Grapefruits</li>
                <li class="list-item">Bananas</li>
            </ul>

            <ul id="sortable-listB">
                <li class="list-item">Cranberries</li>
Example #9
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$sortableDisable = new \Kendo\UI\Sortable('#sortable-disable');
// select the container for the Sortable
$sortableDisable->disabled('.disabled');
echo $sortableDisable->render();
$sortableFilter = new \Kendo\UI\Sortable('#sortable-filter');
// select the container for the Sortable
$sortableFilter->filter('.sortable');
echo $sortableFilter->render();
?>

    <div class="demo-section sortable-wrapper">
        <h3>Disable</h3>
        <p>Disabled items cannot be dragged but are valid drop targets.</p>
        <div id="sortable-disable">
            <div class="sortable disabled">Disabled item 1</div>
            <div class="sortable disabled">Disabled item 2</div>
            <div class="sortable">Item 3</div>
            <div class="sortable">Item 4</div>
            <div class="sortable">Item 5</div>
            <div class="sortable">Item 6</div>
        </div>
    </div>

    <div class="demo-section sortable-wrapper">
        <h3>Filter</h3>
        <p>Filtered items cannot be dragged and are not valid drop targets.</p>
        <div id="sortable-filter">
Example #10
0
<?php

require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$sortable = new \Kendo\UI\Sortable('#sortable-handlers');
// select the container for the Sortable
$sortable->handler('.handler')->hint(new \Kendo\JavaScriptFunction('hint'));
echo $sortable->render();
?>

    <div id="pages">
        <div id="pages-title"><span>Site Menu</span></div>
        <div id="sortable-handlers">
            <div class="item">
                <span class="handler">&nbsp;</span>
                <span>About us</span>
            </div>
            <div class="item">
                <span class="handler">&nbsp;</span>
                <span>Contact us</span>
            </div>
            <div class="item">
                <span class="handler">&nbsp;</span>
                <span>Community</span>
            </div>
            <div class="item">
                <span class="handler">&nbsp;</span>
                <span>Products</span>
            </div>
            <div class="item">
                <span class="handler">&nbsp;</span>