<?php 
use Kendo\Template;
//error_reporting ( E_ALL );
//ini_set ( 'display_errors', '1' );
require_once "../../../wp-load.php";
$current_user = wp_get_current_user();
require_once '../lib/Kendo/Autoload.php';
$faire_id = isset($_GET['faire_id']) ? $_GET['faire_id'] : 'NY15';
?>


<form>
<div class="k-floatwrap k-header k-scheduler-toolbar">
<?php 
$locations_array = get_entry_locations($faire_id);
$select = new \Kendo\UI\MultiSelect('locationfilters');
$select->dataSource($locations_array)->change('onChange')->value(array('166', '188', '167', '174', '194'))->dataTextField('text')->dataValueField('value')->placeholder('Filter location ...');
echo $select->render();
?>
</div>
<?php 
$scheduler = create_makerfaire_scheduler($faire_id);
echo $scheduler->render();
?>

<script>
    $(document).ready(function() {
        // create ComboBox from select HTML element
        var input = $("#input").data("kendoComboBox");
        var select = $("#select").data("kendoComboBox");
        onChange(null);
Example #2
0
<?php

require_once '../lib/DataSourceResult.php';
require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
?>
<div class="demo-section k-rtl">
    <h2>Select Continents</h2>
<?php 
$multiselect = new \Kendo\UI\MultiSelect('select');
$multiselect->dataTextField('text')->dataValueField('value')->dataSource(array(array('text' => 'Africa', 'value' => '1'), array('text' => 'Europe', 'value' => '2'), array('text' => 'Asia', 'value' => '3'), array('text' => 'North America', 'value' => '4'), array('text' => 'South America', 'value' => '5'), array('text' => 'Antarctica', 'value' => '6'), array('text' => 'Australia', 'value' => '7')));
echo $multiselect->render();
?>
    <style scoped>
        .demo-section {
            width: 250px;
            margin: 35px auto 50px;
            padding: 30px;
        }
        .demo-section h2 {
            text-transform: uppercase;
            font-size: 1.2em;
            margin-bottom: 10px;
        }
    </style>
</div>
<?php 
require_once '../include/footer.php';
Example #3
0
<?php

require_once '../lib/DataSourceResult.php';
require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
$multiselect = new \Kendo\UI\MultiSelect('select');
$multiselect->dataTextField('text')->dataValueField('value')->dataSource(array(array('text' => 'Africa', 'value' => '1'), array('text' => 'Europe', 'value' => '2'), array('text' => 'Asia', 'value' => '3'), array('text' => 'North America', 'value' => '4'), array('text' => 'South America', 'value' => '5'), array('text' => 'Antarctica', 'value' => '6'), array('text' => 'Australia', 'value' => '7')))->select('onSelect')->dataBound('onDataBound')->change('onChange')->close('onClose')->open('onOpen');
?>

<div class="demo-section">
    <h3 class="title">Select Continents</h3>
<?php 
echo $multiselect->render();
?>
</div>

<script>
    function onOpen() {
        if ("kendoConsole" in window) {
            kendoConsole.log("event: open");
        }
    }

    function onDataBound(){
        if ("kendoConsole" in window) {
            kendoConsole.log("event: dataBound");
        }
    }

    function onClose() {
        if ("kendoConsole" in window) {
Example #4
0
            <button id="find" class="k-button">Find item</button>
        </li>
    </ul>
    </div>
    <div class="config-section">
    <span class="configHead">Select</span>
    <ul class="options">
        <li>
            <input id="value" value="1,2" class="k-textbox" style="width: 40px; margin: 0;" /> <button id="setValue" class="k-button">Select by value</button>
        </li>
    </ul>
    </div>
</div>
<div class="demo-section">
<?php 
$multiselect = new \Kendo\UI\MultiSelect('movies');
$multiselect->dataTextField('text')->dataValueField('value')->dataSource(array(array('text' => '12 Angry Men', 'value' => 1), array('text' => 'Il buono, il brutto, il cattivo.', 'value' => 2), array('text' => 'Inception', 'value' => 3), array('text' => "One Flew Over the Cuckoo's Nest", 'value' => 4), array('text' => 'Pulp Fiction', 'value' => 5), array('text' => "Schindler's List", 'value' => 6), array('text' => 'The Dark Knight', 'value' => 7), array('text' => 'The Godfather', 'value' => 8), array('text' => 'The Godfather: Part II', 'value' => 9), array('text' => 'The Shawshank Redemption', 'value' => 10), array('text' => 'The Shawshank Redemption 2', 'value' => 11)));
echo $multiselect->render();
?>
</div>
    <script>
    $(function() {
        $("#filter").kendoDropDownList({
            change: filterTypeOnChanged
        });

        var multiselect = $("#movies").data("kendoMultiSelect"),
            setValue = function (e) {
                if (e.type != "keypress" || kendo.keys.ENTER == e.keyCode) {
                    multiselect.dataSource.filter({}); //clear applied filter before setting value
Example #5
0
    $result = new DataSourceResult('sqlite:..//sample.db');
    echo json_encode($result->read('Products', array('ProductID', 'ProductName'), $request));
    exit;
}
require_once '../include/header.php';
$transport = new \Kendo\Data\DataSourceTransport();
$read = new \Kendo\Data\DataSourceTransportRead();
$read->url('serverfiltering.php')->contentType('application/json')->type('POST');
$transport->read($read)->parameterMap('function(data) {
              return kendo.stringify(data);
           }');
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)->schema($schema)->serverFiltering(true);
$multiselect = new \Kendo\UI\MultiSelect('products');
$multiselect->dataSource($dataSource)->dataTextField('ProductName')->dataValueField('ProductID')->value(array(array("ProductName" => "Chang", "ProductID" => "2"), array("ProductName" => "Uncle Bob's Organic Dried Pears", "ProductID" => "7")))->autoBind(false)->filter('contains')->ignoreCase(false);
?>
<div class="demo-section">
    <h2>Products</h2>
<?php 
echo $multiselect->render();
?>
<style scoped>
    .demo-section {
        width: 300px;
        margin: 35px auto 50px;
        padding: 30px;
    }
    .demo-section h2 {
        text-transform: uppercase;
Example #6
0
<?php

require_once '../lib/DataSourceResult.php';
require_once '../lib/Kendo/Autoload.php';
require_once '../include/header.php';
?>
<div class="demo-section">
    <h2>T-shirt Sizes</h2>
<?php 
$multiselect = new \Kendo\UI\MultiSelect('select');
$multiselect->placeholder('Select size ...')->attr('style', 'width: 250px')->attr('accesskey', 'w')->value('Large')->dataSource(array('X-Small', 'Small', 'Medium', 'Large', 'X-Large', '2X-Large'));
echo $multiselect->render();
?>
</div>

<ul class="keyboard-legend">
    <li>
        <span class="button-preview">
            <span class="key-button leftAlign wider"><a target="_blank" href="http://en.wikipedia.org/wiki/Access_key">Access key</a></span>
            +
            <span class="key-button">w</span>
        </span>
        <span class="button-descr">
            focuses the widget
        </span>
    </li>
</ul>

<h4>
    Closed popup:
</h4>
Example #7
0
    exit;
}
require_once '../include/header.php';
?>
<div class="demo-section">
    <h2>Select Customers</h2>
<?php 
$read = new \Kendo\Data\DataSourceTransportRead();
$read->url('template.php')->type('POST');
$transport = new \Kendo\Data\DataSourceTransport();
$transport->read($read);
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)->schema($schema);
$multiselect = new \Kendo\UI\MultiSelect('customers');
$multiselect->minLength(1)->dataTextField('ContactName')->dataValueField('CustomerID')->dataSource($dataSource)->attr('style', 'width:400px')->headerTemplate(<<<TEMPLATE
<div class="dropdown-header"><span class="k-widget k-header">Photo</span><span class="k-widget k-header">Contact info</span></div>
TEMPLATE
)->itemTemplate(<<<TEMPLATE
<span class="k-state-default"><img src="../content/web/Customers/#= CustomerID #.jpg" alt="#= CustomerID #" /></span><span class="k-state-default"><h3>#: data.ContactName #</h3><p>#: data.CompanyName #</p></span>
TEMPLATE
)->tagTemplate(<<<TEMPLATE
<img class="tag-image" src="../content/web/Customers/#= CustomerID #.jpg" alt="#= CustomerID #" />#: ContactName #
TEMPLATE
);
echo $multiselect->render();
?>
</div>
<div class="demo-section">
    <h2>Information</h2>
Example #8
0
require_once '../include/header.php';
require_once '../lib/Kendo/Autoload.php';
?>

<div class="demo-section">
    <h2>Invite Attendees</h2>
    <label for="required">Required</label>
<?php 
$select = new \Kendo\UI\MultiSelect('required');
$select->dataSource(array('Steven White', 'Nancy King', 'Anne King', 'Nancy Davolio', 'Robert Davolio', 'Michael Leverling', 'Andrew Callahan', 'Michael Suyama', 'Anne King', 'Laura Peacock', 'Robert Fuller', 'Janet White', 'Nancy Leverling', 'Robert Buchanan', 'Andrew Fuller', 'Anne Davolio', 'Andrew Suyama', 'Nige Buchanan', 'Laura Fuller'))->placeholder('Choose attendees...');
echo $select->render();
?>
<label for="optional">Optional</label>
<?php 
$select = new \Kendo\UI\MultiSelect('optional');
$select->dataSource(array('Steven White', 'Nancy King', 'Anne King', 'Nancy Davolio', 'Robert Davolio', 'Michael Leverling', 'Andrew Callahan', 'Michael Suyama', 'Anne King', 'Laura Peacock', 'Robert Fuller', 'Janet White', 'Nancy Leverling', 'Robert Buchanan', 'Andrew Fuller', 'Anne Davolio', 'Andrew Suyama', 'Nige Buchanan', 'Laura Fuller'))->placeholder('Choose attendees...');
echo $select->render();
?>
<button class="k-button" id="get">Send Invitation</button>
</div>
<script>
    $(document).ready(function() {
        var required = $("#required").data("kendoMultiSelect");
        var optional = $("#optional").data("kendoMultiSelect");

        $("#get").click(function() {
            alert("Attendees:\n\nRequired: " + required.value() + "\nOptional: " + optional.value());
        });
    });
</script>