Ejemplo n.º 1
0
require_once '../include/header.php';
require_once '../lib/Kendo/Autoload.php';
?>

<div class="demo-section">
    <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>");
Ejemplo n.º 2
0
        $(document).ready(function() {
            $("#tabstrip-images").data("kendoTabStrip").select(0);
        });
    </script>
</div>

<div class="demo-section">
    <h3>TabStrip with sprites</h3>
<?php 
$tabstrip = new \Kendo\UI\TabStrip('tabstrip-sprites');
$tabstrip->dataTextField("text")->dataSpriteCssClass("spriteCssClass")->dataContentField("content");
$brazil = new \Kendo\UI\TabStripItem();
$brazil->text("Brazil")->spriteCssClass("brazilFlag")->content("Brazil, officially the Federative Republic of Brazil, is the largest country in South America. It is the world's fifth largest country, both by geographical area and by population with over 192 million people. It is the only Portuguese-speaking country in the Americas and the largest lusophone country in the world.");
$india = new \Kendo\UI\TabStripItem();
$india->text("India")->spriteCssClass("indiaFlag")->content("India, officially the Republic of India, is a country in South Asia. It is the seventh-largest country by geographical area, the second-most populous country with over 1.2 billion people, and the most populous democracy in the world. Bounded by the Indian Ocean on the south, the Arabian Sea on the south-west, and the Bay of Bengal on the south-east, it shares land borders with Pakistan to the west; China, Nepal, and Bhutan to the north-east; and Burma and Bangladesh to the east. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India's Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia.");
$netherlands = new \Kendo\UI\TabStripItem();
$netherlands->text("Netherlands")->spriteCssClass("netherlandsFlag")->content("The Netherlands is a constituent country of the Kingdom of the Netherlands, located mainly in North-West Europe and with several islands in the Caribbean. Mainland Netherlands borders the North Sea to the north and west, Belgium to the south, and Germany to the east, and shares maritime borders with Belgium, Germany and the United Kingdom. It is a parliamentary democracy organised as a unitary state. The country capital is Amsterdam and the seat of government is The Hague. The Netherlands in its entirety is often referred to as Holland, although North and South Holland are actually only two of its twelve provinces.");
$tabstrip->dataSource(array($brazil, $india, $netherlands));
// set animation
$animation = new \Kendo\UI\TabStripAnimation();
$openAnimation = new \Kendo\UI\TabStripAnimationOpen();
$openAnimation->effects("fadeIn");
$animation->open($openAnimation);
$tabstrip->animation($animation);
echo $tabstrip->render();
?>
    <script>
        $(document).ready(function() {
            $("#tabstrip-sprites").data("kendoTabStrip").select(0);
        });
    </script>
Ejemplo n.º 3
0
        <li>
            <input type="text" value="Item" id="afterText" class="k-textbox"/> <button class="afterItem k-button">Insert After</button>
        </li>
    </ul>
</div>

<div style="width: 500px;">
<?php 
$tabstrip = new \Kendo\UI\TabStrip('tabstrip');
$baseball = new \Kendo\UI\TabStripItem();
$baseball->text("Baseball")->selected(true)->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")->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")->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")->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->addItem($baseball, $golf, $swimming, $snowboarding);
echo $tabstrip->render();
?>
</div>

<script>
    $(document).ready(function() {
        var tabStrip = $("#tabstrip").data("kendoTabStrip");

        var getItem = function (target) {
                var itemIndex = target[0].value;

                return tabStrip.tabGroup.children("li").eq(itemIndex);
            },
Ejemplo n.º 4
0
            <p>Sunny weather in London.</p>
        </div>
        <span class="sunny">&nbsp;</span>
<?php 
$london->endContent();
$moscow = new \Kendo\UI\TabStripItem();
$moscow->text("Moscow")->startContent();
?>
        <div class="weather">
            <h2>16<span>&ordm;C</span></h2>
            <p>Cloudy weather in Moscow.</p>
        </div>
        <span class="cloudy">&nbsp;</span>
<?php 
$moscow->endContent();
$sydney = new \Kendo\UI\TabStripItem();
$sydney->text("sydney")->startContent();
?>
        <div class="weather">
            <h2>17<span>&ordm;C</span></h2>
            <p>Rainy weather in Sydney.</p>
        </div>
        <span class="rainy">&nbsp;</span>
<?php 
$sydney->endContent();
$tabstrip->addItem($paris, $newYork, $london, $moscow, $sydney);
// set animation
$animation = new \Kendo\UI\TabStripAnimation();
$openAnimation = new \Kendo\UI\TabStripAnimationOpen();
$openAnimation->effects("fadeIn");
$animation->open($openAnimation);
Ejemplo n.º 5
0
?>
    <p>Maecenas vitae eros vel enim molestie cursus. Proin ut lacinia ipsum. Nam at elit arcu, at porttitor ipsum. Praesent id viverra lorem. Nam lacinia elementum fermentum. Nulla facilisi. Nulla bibendum erat sed sem interdum suscipit. Vestibulum eget molestie leo. Aliquam erat volutpat. Ut sed nulla libero. Suspendisse id euismod quam. Aliquam interdum turpis vitae purus consectetur in pulvinar libero accumsan. In id augue dui, ac volutpat ante. Suspendisse purus est, ullamcorper id bibendum sed, placerat id leo.</p>
<?php 
$item->endContent();
$tabstrip->addItem($item);
$item = new \Kendo\UI\TabStripItem();
$item->text("Fifth Tab")->startContent();
?>
    <p>Fusce nec mauris enim, non pharetra neque. Etiam elementum nunc ut velit fermentum sed porta eros dignissim. Duis at nisl eros. Integer arcu nisl, accumsan non molestie at, elementum nec odio. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque arcu odio, aliquam vel viverra ac, varius at sapien. Nullam elementum nulla non libero interdum vestibulum at in lacus. Curabitur ac magna ac lacus dapibus convallis non at turpis.</p>
<?php 
$item->endContent();
$tabstrip->addItem($item);
$ajaxTab = new \Kendo\UI\TabStripItem();
$ajaxTab->text("Ajax Tab")->contentUrl("../content/web/tabstrip/ajax/ajaxContent1.html");
$tabstrip->addItem($ajaxTab);
$errorTab = new \Kendo\UI\TabStripItem();
$errorTab->text("Error Tab")->contentUrl("error.html");
$tabstrip->addItem($errorTab);
// set animation
$animation = new \Kendo\UI\TabStripAnimation();
$openAnimation = new \Kendo\UI\TabStripAnimationOpen();
$openAnimation->effects("fadeIn");
$animation->open($openAnimation);
$tabstrip->animation($animation);
echo $tabstrip->render();
?>

<script>
    function onSelect(e) {
        kendoConsole.log("Selected: " + $(e.item).find("> .k-link").text());
    }
Ejemplo n.º 6
0
$filter->field('EmployeeID')->operator('eq')->value('#=EmployeeID#');
$dataSource->transport($transport)->pageSize(5)->schema($schema)->addFilterItem($filter)->serverSorting(true)->serverFiltering(true)->serverPaging(true);
$detailGrid = new \Kendo\UI\Grid('detailGrid#=EmployeeID#');
$orderID = new \Kendo\UI\GridColumn();
$orderID->field('OrderID')->width(70)->title('Order ID');
$shipCountry = new \Kendo\UI\GridColumn();
$shipCountry->field('ShipCountry')->width(110)->title('Ship Country');
$shipAddress = new \Kendo\UI\GridColumn();
$shipAddress->field('ShipAddress')->title('Ship Address');
$shipName = new \Kendo\UI\GridColumn();
$shipName->field('ShipName')->title('Ship Name')->width(200);
$detailGrid->dataSource($dataSource)->addColumn($orderID, $shipCountry, $shipAddress, $shipName)->pageable(true)->sortable(true)->scrollable(false);
$orders = new \Kendo\UI\TabStripItem();
$orders->text('Orders')->selected(true)->content($detailGrid->renderInTemplate());
//add grid to the tabstrip item content
$contact = new \Kendo\UI\TabStripItem();
$contact->text('Contact Information');
$contact->startContent();
?>
        <div class="employee-details">
            <ul>
                <li><label>Country:</label>#= Country #</li>
                <li><label>City:</label>#= City #</li>
                <li><label>Address:</label>#= Address #</li>
                <li><label>Home Phone:</label>#= HomePhone #</li>
            </ul>
        </div>
<?php 
$contact->endContent();
$tabstrip = new \Kendo\UI\TabStrip('tabstrip_#=EmployeeID#');
$tabstrip->addItem($orders, $contact)->animation(false);
Ejemplo n.º 7
0
<?php

require_once '../include/header.php';
require_once '../lib/Kendo/Autoload.php';
?>

<div class="wrapper">
<?php 
$tabstrip = new \Kendo\UI\TabStrip('tabstrip');
$dimensions = new \Kendo\UI\TabStripItem();
$dimensions->text("Dimensions & Weights")->selected(true)->contentUrl('../content/web/tabstrip/ajax/ajaxContent1.html');
$tabstrip->addItem($dimensions);
$engine = new \Kendo\UI\TabStripItem();
$engine->text("Engine")->contentUrl('../content/web/tabstrip/ajax/ajaxContent2.html');
$tabstrip->addItem($engine);
$chassis = new \Kendo\UI\TabStripItem();
$chassis->text("Chassis")->contentUrl('../content/web/tabstrip/ajax/ajaxContent3.html');
$tabstrip->addItem($chassis);
// set animation
$animation = new \Kendo\UI\TabStripAnimation();
$openAnimation = new \Kendo\UI\TabStripAnimationOpen();
$openAnimation->effects("fadeIn");
$animation->open($openAnimation);
$tabstrip->animation($animation);
echo $tabstrip->render();
?>
</div>

<style scoped>
    .wrapper {
        width: 270px;
Ejemplo n.º 8
0
$tabstrip->addItem($item);
$item = new \Kendo\UI\TabStripItem();
$item->text("Third Tab")->startContent();
?>
    <p>Aliquam at nisl quis est adipiscing bibendum. Nam malesuada eros facilisis arcu vulputate at aliquam nunc tempor. In commodo scelerisque enim, eget sodales lorem condimentum rutrum. Phasellus sem metus, ultricies at commodo in, tristique non est. Morbi vel mauris eget mauris commodo elementum. Nam eget libero lacus, ut sollicitudin ante. Nam odio quam, suscipit a fringilla eget, dignissim nec arcu. Donec tristique arcu ut sapien elementum pellentesque.</p>
<?php 
$item->endContent();
$tabstrip->addItem($item);
$item = new \Kendo\UI\TabStripItem();
$item->text("Fourth Tab")->startContent();
?>
    <p>Maecenas vitae eros vel enim molestie cursus. Proin ut lacinia ipsum. Nam at elit arcu, at porttitor ipsum. Praesent id viverra lorem. Nam lacinia elementum fermentum. Nulla facilisi. Nulla bibendum erat sed sem interdum suscipit. Vestibulum eget molestie leo. Aliquam erat volutpat. Ut sed nulla libero. Suspendisse id euismod quam. Aliquam interdum turpis vitae purus consectetur in pulvinar libero accumsan. In id augue dui, ac volutpat ante. Suspendisse purus est, ullamcorper id bibendum sed, placerat id leo.</p>
<?php 
$item->endContent();
$tabstrip->addItem($item);
$item = new \Kendo\UI\TabStripItem();
$item->text("Fifth Tab")->startContent();
?>
    <p>Fusce nec mauris enim, non pharetra neque. Etiam elementum nunc ut velit fermentum sed porta eros dignissim. Duis at nisl eros. Integer arcu nisl, accumsan non molestie at, elementum nec odio. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque arcu odio, aliquam vel viverra ac, varius at sapien. Nullam elementum nulla non libero interdum vestibulum at in lacus. Curabitur ac magna ac lacus dapibus convallis non at turpis.</p>
<?php 
$item->endContent();
$tabstrip->addItem($item);
// set animation
$animation = new \Kendo\UI\TabStripAnimation();
$openAnimation = new \Kendo\UI\TabStripAnimationOpen();
$openAnimation->effects("fadeIn");
$animation->open($openAnimation);
$tabstrip->animation($animation);
echo $tabstrip->render();
?>