PageSourceSearch

https://www.wintrade-international.com.au/public/olb/038-rowfuncti…bfd32d6ca3f8db036d4570eed704d64fdce3a485.js

js wintrade-international.com.au collected 2026-10-08 10:35:37 UTC 2,830 bytes, 72 lines download raw bytes

1namespace("com.fiserv.ps.element").rowfunction = {
2    init: function () {
3        var _this = this;
4
5        function loadLink(link, e) {
6            var executedKOBinding = false;
7            //if the link has a KO databind attribute with a click event follow that click event otherwise go 
8            if (link.attr("data-bind") !== undefined) {
9                if (link.attr("data-bind").toLowerCase().indexOf("click") >= 0) {
10                    link.trigger("click");
11                    executedKOBinding = true;
12                }
13            }
14
15            if (executedKOBinding === false) {
16                if (link.attr("target") === undefined) {
17                    window.location.href = link.attr("href");
18                } else {
19                    window.open(link.attr("href"), link.attr("target"));
20                }
21            }
22        }
23
24        // Expands click to entire rows in interactive tables
25        $(".table-base.table-interactive tbody").on("click", "tr", function (e) {
26
27            //Regex to determine if a string is a URL link
28            var urlPattern = new RegExp("(http|ftp|https)://[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?|#[a-z0-9\-_%]+");
29
30            //find the target, cross browser compliant
31            var targ;
32            if (!e) var e = window.event;
33            if (e.target) targ = e.target;
34            else if (e.srcElement) targ = e.srcElement;
35
36            //if the target is a link/button/input we don't want to load it twice, so bail out of this method.
37            if (urlPattern.test(targ)) { return; };
38            if ($(targ).is('a, :input, label')) { return; }
39
40            //try to find a with the class row-primary-link first if there is none then try to first a tag.
41            var primaryLink = $(this).find(".row-primary-link").eq(0);
42            var defaultLink = $(this).find("a").eq(0);
43            if (primaryLink.size() === 1) {
44                if (primaryLink[0].type === "checkbox") {
45                    primaryLink[0].click();
46                } else {
47                    loadLink(primaryLink, e);
48                }
49            } else if (defaultLink.size() === 1) {
50                loadLink(defaultLink, e);
51            }
52        });
53
54    },
55
56    zebraStripe: function (target) {
57        var targetTables = target || '.table-base';
58        if (typeof targetTables.currentTarget != "undefined") {
59            targetTables = targetTables.currentTarget;
60        }
61
62        // Zebra Striping Classes
63        var $tableRows = $('tbody tr', $(targetTables));
64
65        setTimeout(function () {
66            $tableRows.removeClass('even odd');
67            $tableRows.filter(':nth-child(even)').addClass('even');
68            $tableRows.filter(':nth-child(odd)').addClass('odd');
69            return $tableRows;
70        }, 10);
71    }
72};

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.