1// Namespace definition 2var juniper = juniper || {}; 3juniper.specialProjects = juniper.specialProjects || {}; 4juniper.specialProjects.suppliertools = juniper.specialProjects.suppliertools || {}; 5 6 7 8// Declare a static class, with parameteres 9juniper.specialProjects.suppliertools.notifications = (function () { 10 'use strict'; 11 12 let formValidatorClass = function () { 13 let _delay = 3000; 14 let _count = 1; 15 16 this.showSuccessNotification = function (message) { 17 this.showNotification(message, 'success', _delay); 18 }; 19 20 this.showErrorNotification = function (message) { 21 this.showNotification(message, 'error', _delay); 22 }; 23 24 this.showInfoNotification = function (message) { 25 this.showNotification(message, 'info', _delay); 26 }; 27 28 this.showWarningNotification = function (message) { 29 this.showNotification(message, 'warning', _delay); 30 }; 31 32 this.showNotification = function (message, type, delay) { 33 DevExpress.ui.notify({ 34 contentTemplate: (element) => { 35 let $closeDiv = $('<div />').attr({ class: 'closeToast' }); 36 let $closeIcon = $('<label />').attr({ class: 'fa fa-times', 'data-selector': 'selectorToast' + _count }); 37 let $div = $('<div />').attr({ class: 'textToast' }); 38 let $label1 = $('<span />').append(message); 39 $div.append($label1); 40 $closeDiv.append($closeIcon); 41 element.append($div); 42 element.append($closeDiv); 43 }, 44 width: 700, 45 type: type, 46 displayTime: delay, 47 wrapperAttr: { id: 'selectorToast' + _count }, 48 animation: { 49 show: { type: 'fade', duration: 400, from: 0, to: 1 }, 50 hide: { type: 'fade', duration: 40, to: 0 } 51 }, 52 }, 53 { 54 position: 'top right', 55 direction: 'down-push', 56 } 57 ); 58 _count += 1; 59 }; 60 61 62 }; 63 64 return new formValidatorClass(); 65})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.