//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); });
<?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) {