PageSourceSearch

https://neurosuites.com/static/neurosuite/js/utils/notify_messages.js

js neurosuites.com collected 2026-09-25 22:06:28 UTC 2,518 bytes, 96 lines download raw bytes

1
2function print_notify_message(permanent, type, icon, title, message, delay, additional_mesage, position) {
3    if (position === undefined) {
4        position = "top-right";
5    }
6    var placement = get_placement_notify(position);
7
8    if (additional_mesage === undefined) {
9        additional_mesage = "";
10    }
11    if (permanent) {
12        delay = 0;
13    }
14    var notify_object = $.notify({
15        // options
16        icon: icon,
17        title: title,
18        message: message
19    }, {
20        // settings
21        type: type,
22        placement: {
23            from: placement["from"],
24            align: placement["align"],
25        },
26        offset: placement["offset"],
27        allow_dismiss: true,
28        delay: delay,
29        template: "<div data-notify=\"container\" class=\"col-xs-11 col-sm-3 alert alert-{0}\" role=\"alert\">" +
30            '<button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button>' +
31            "<span data-notify=\"icon\" class='notify-icon'></span>" +
32            "<span data-notify=\"title\"><strong>{1}</strong></span><br>" +
33            "<span data-notify=\"message\">{2}</span>" +
34            additional_mesage +
35            "</div>" +
36            ""
37    });
38
39    return notify_object
40}
41
42function get_placement_notify(position) {
43    var placement = {
44        "from": "top",
45        "align": "right",
46        "offset": {
47            x: 10,
48            y: 100,
49        },
50    };
51
52    switch(position) {
53        case "top-right":
54            placement = {
55                "from": "top",
56                "align": "right",
57                "offset": {
58                    x: 10,
59                    y: 100,
60                },
61            };
62            break;
63        case "top-left":
64            placement = {
65                "from": "top",
66                "align": "left",
67                "offset": {
68                    x: 10,
69                    y: 100,
70                },
71            };
72            break;
73        case "bottom-right":
74            placement = {
75                "from": "bottom",
76                "align": "right",
77                "offset": {
78                    x: 10,
79                    y: 60,
80                },
81            };
82            break;
83        case "bottom-left":
84            placement = {
85                "from": "bottom",
86                "align": "left",
87                "offset": {
88                    x: 10,
89                    y: 60,
90                },
91            };
92            break;
93    }
94
95    return placement;
96}

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.