Example #1
0
<?php

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

<?php 
$centeredNotification = new \Kendo\UI\Notification('centeredNotification');
$centeredNotification->stacking('down');
$centeredNotification->show('onShow');
$centeredNotification->button(true);
echo $centeredNotification->render();
$configurableNotification = new \Kendo\UI\Notification('configurableNotification');
echo $configurableNotification->render();
?>

<div class="demo-section">
  <h3>Centered notification:</h3>
  <p>
    <button id="showNotification" class="k-button">Show centered notification</button>
  </p>
  <h3>Custom positioning:</h3>
  <p>
    <label for="left">Left position:</label> <input type="number" id="left" class="num" />
    <label for="left">Top position:</label> <input type="number" id="top" class="num" />
    <br />
    <label for="left">Right position:</label> <input type="number" id="right" class="num" value="20" />
    <label for="left">Bottom position:</label> <input type="number" id="bottom" class="num" value="20" />
    <br />
    <label for="stacking">Notification stacking:</label>
    <select id="stacking" style="width:6em">
Example #2
0
$position->pinned(true);
$position->top(30);
$position->right(30);
$infoTemplate = new \Kendo\UI\NotificationTemplate();
$infoTemplate->type('info');
$infoTemplate->templateId('emailTemplate');
$errorTemplate = new \Kendo\UI\NotificationTemplate();
$errorTemplate->type('error');
$errorTemplate->templateId('errorTemplate');
$uploadSuccess = new \Kendo\UI\NotificationTemplate();
$uploadSuccess->type('upload-success');
$uploadSuccess->templateId('successTemplate');
$notification = new \Kendo\UI\Notification('notification');
$notification->position($position);
$notification->autoHideAfter(0);
$notification->stacking("down");
$notification->addTemplate($infoTemplate);
$notification->addTemplate($errorTemplate);
$notification->addTemplate($uploadSuccess);
echo $notification->render();
?>

<span id="notification" style="display:none;"></span>

<div class="demo-section">

  <h3>Show notification:</h3>
  <p>
    <button id="showEmailNotification" class="k-button">Email Notification</button>
    <br />
    <button id="showErrorNotification" class="k-button">Error Notification</button>