Пример #1
0
<?php

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

<?php 
$timeTemplate = new \Kendo\UI\NotificationTemplate();
$timeTemplate->type('time');
$timeTemplate->template("<div style='padding: .6em 1em'>Time is: <span class='timeWrap'>#: time #</span></div>");
$notification = new \Kendo\UI\Notification('notification');
$notification->width("12em");
$notification->addTemplate($timeTemplate);
$notification->show("onShow");
$notification->hide("onHide");
echo $notification->render();
?>

<div class="demo-section">
    <p>
        <button id="showNotification" class="k-button">Show notification</button>

        <button id="hideAllNotifications" class="k-button">Hide All Notifications</button>
    </p>
</div>
 
<div class="demo-section">                
    <h3 class="title">Console log</h3>
    <div class="console"></div>
</div>
           
Пример #2
0
require_once '../include/header.php';
require_once '../lib/Kendo/Autoload.php';
?>

<?php 
$position = new \Kendo\UI\NotificationPosition();
$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">