1. Начиная с Вебстанции 5.0.7.0 Вы можете указать в спецификации плагина любой js файл, который будет прописан на главной веб-странице.
Свойство ScriptPaths
2. В Вашем скрипте добавьте:
var notifPanel = scada.notifPanelLocator.getNotifPanel();
function enableDebugMode() {
var controls = $("<div>" +
"<button type='button'>Show</button>" +
"<button type='button'>Hide</button>" +
"<button type='button'>Add</button>" +
"<button type='button'>Remove</button></div>");
controls.css({
"top": 0,
"left": 250,
"position": "fixed"
});
var buttons = controls.find("button");
var notifID = 0;
buttons.eq(0).click(function () {
notifPanel.show(true);
});
buttons.eq(1).click(function () {
notifPanel.hide();
});
buttons.eq(2).click(function () {
notifID = notifPanel.addNotification(
new scada.Notification(
new Date().toLocaleString(),
"Test notif, test notif, test notif, test notif, test notif, test notif, test notif, test notif",
notifID % 3));
});
buttons.eq(3).click(function () {
notifPanel.removeNotification(notifID);
});
controls.appendTo("body");
};
$(document).ready(function () {
enableDebugMode();
}
-
Этот ответ был изменен 5 лет, 3 месяца назад от Mikhail.
-
Этот ответ был изменен 5 лет, 3 месяца назад от Mikhail.