PageSourceSearch

https://app.livestockanalytics.com/Content/js/Notifications.js

js livestockanalytics.com collected 2026-10-02 00:31:27 UTC 3,841 bytes, 120 lines download raw bytes

1let textosNotificaciones = {};
2
3// Función para recibir una lista con los textos de los recursos
4function recibirTextosRecursosNotificaciones(listaTextos) {
5    textosNotificaciones = listaTextos;
6}
7
8function run_waitMe(content) {
9    var txtCargando = textosNotificaciones["MessageLoading"] == undefined ? "" : textosNotificaciones["MessageLoading"];
10
11    $(content).waitMe({
12        effect: 'img',
13
14        //place text under the effect (string).
15        text: txtCargando,
16
17        //background for container (string).
18        bg: 'rgba(136,142,151,0.7)',
19
20        //color for background animation and text (string).
21        color: '#000',
22
23        //change width for elem animation (string).
24        sizeW: '',
25
26        //change height for elem animation (string).
27        sizeH: '',
28
29        // url to image
30        source: server + '/Content/img/laloading.gif',
31    });
32}
33
34
35//NEW NOTIFICATION STYLE
36// create the notification
37function showNotification(type, message, timer) {
38
39    var icnTxt = '';
40
41    if (typeof message == "number") {
42        timer = message;
43        message = null;
44    }
45
46    if (message == null || message == undefined) {
47        switch (type) {
48            case 1:
49                message = textosNotificaciones["MessageOperationSuccessfully"];
50                break;
51            case 2:
52                message = textosNotificaciones["MessageErrorSomethingWrongTryAgain"];
53                break;
54            case 3:
55                message = textosNotificaciones["LabelWarning"];
56                break;
57            case 4:
58                message = textosNotificaciones["LabelInformation"];
59                break;
60        }
61    }
62
63    switch (type) {
64        case 1:
65            type = "success";
66            icnTxt = "<i class='fa fa-check-circle fa-lg' aria-hidden='true'></i> <p class='titleAlert'>"+textosNotificaciones["LabelSuccess"]+"</p>";
67            break;
68        case 2:
69            type = "error";
70            icnTxt = " <i class='fa fa-exclamation-circle fa-lg' aria-hidden='true'></i> <p class='titleAlert'>"+textosNotificaciones["LabelError"]+"</p>";
71            break;
72        case 3:
73            type = "warning";
74            icnTxt = "<i class='fa fa-exclamation-triangle fa-lg' aria-hidden='true'></i> <p class='titleAlert'>"+textosNotificaciones["LabelWarning"]+"</p>";
75            break;
76        case 4:
77            type = "info";
78            icnTxt = "<i class='fa fa-info-circle fa-lg' aria-hidden='true'></i> <p class='titleAlert'>"+textosNotificaciones["LabelInformation"]+"</p>";
79            break;
80    }
81
82    if (timer == null) {
83        timer = 3000;
84    }
85
86    var notification = new NotificationFx({
87
88        // element to which the notification will be appended
89        // defaults to the document.body
90        wrapper: document.getElementById("notificationTest"),
91
92        // the message
93        message: icnTxt + '<p class="contentAlert">' + message + '</p>',
94
95        // layout type: growl|attached|bar|other
96        layout: 'growl',
97
98        // effects for the specified layout:
99        // for growl layout: scale|slide|genie|jelly
100        // for attached layout: flip|bouncyflip
101        // for other layout: boxspinner|cornerexpand|loadingcircle|thumbslider
102        // ...
103        effect: 'jelly',
104
105        // notice, warning, error, success
106        // will add class ns-type-warning, ns-type-error or ns-type-success
107        type: type,
108
109        // if the user doesn´t close the notification then we remove it 
110        // after the following time
111        ttl: timer,
112
113        // callbacks
114        onClose: function () { return false; },
115        onOpen: function () { return false; }
116    });
117
118    // show the notification
119    notification.show();
120}

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.