PageSourceSearch

https://fljud13.org/Portals/_default/Skins/glend/resource/vendor/e…/easyResponsiveTabs.js?cdv=1094

js fljud13.org collected 2026-10-02 12:29:48 UTC 14,480 bytes, 391 lines download raw bytes

1// Easy Responsive Tabs Plugin
2// Author: Samson.Onna <Email : [email protected]>
3
4(function (e) {
5  e.fn.extend({
6    easyResponsiveTabs: function (t) {
7      var n = {
8        type: "default",
9        width: "auto",
10        fit: !0,
11        closed: !1,
12        activate: function () { }
13      },
14        t = e.extend(n, t),
15        r = t,
16        i = r.type,
17        s = r.fit,
18        o = r.width,
19        u = "vertical",
20        a = "accordion",
21        f = window.location.hash,
22        l = !!window.history && !!history.replaceState;
23      e(this).bind("tabactivate", function (e, n) {
24        typeof t.activate == "function" && t.activate.call(n, e)
25      }), this.each(function () {
26        function c() {
27          i == u && n.addClass("resp-vtabs"), s == 1 && n.css({
28            width: "100%",
29            margin: "0px"
30          }), i == a && (n.addClass("resp-easy-accordion"), n.find(".resp-tabs-list").css("display", "none"))
31        }
32        var n = e(this),
33          r = n.find("ul.resp-tabs-list"),
34          l = n.attr("id");
35        n.find("ul.resp-tabs-list li").addClass("resp-tab-item"), n.css({
36          display: "block",
37          width: o
38        }), n.find(".resp-tabs-container > div").addClass("resp-tab-content"), c();
39        var h;
40        n.find(".resp-tab-content").before("<h2 class='resp-accordion' role='tab' tabindex='0'><span class='resp-arrow'></span></h2>");
41        var p = 0;
42        n.find(".resp-accordion").each(function () {
43          h = e(this);
44          var t = n.find(".resp-tab-item:eq(" + p + ")"),
45            r = n.find(".resp-accordion:eq(" + p + ")");
46          r.append(t.html()), r.data(t.data()), h.attr("aria-controls", "tab_cont-" + p).attr("id", "tab_item-" + p), p++
47        });
48        var d = 0,
49          v;
50        n.find(".resp-tab-item").each(function () {
51          $tabItem = e(this), $tabItem.attr("aria-controls", "tab_cont-" + d).attr("id", "tab_item-" + d), $tabItem.attr("role", "tab");
52          var t = 0;
53          n.find(".resp-tab-content").each(function () {
54            v = e(this), v.attr("aria-labelledby", "tab_item-" + t).attr("id", "tab_cont-" + t), t++
55          }), d++
56        });
57        var m = e(this).find(".resp-tab-active").length != 0 ? e(this).find(".resp-tab-active").index() : "0";
58        if (f != "") {
59          var g = f.match(new RegExp(l + "([0-9]+)"));
60          g !== null && g.length === 2 && (m = parseInt(g[1], 10) - 1, m > d && (m = 0))
61        }
62        e(n.find(".resp-tab-item")[m]).addClass("resp-tab-active").attr("aria-expanded", "true").attr("tabindex", "0").siblings().removeClass("active").attr("aria-expanded", "false").attr("tabindex", "-1"), t.closed === !0 || t.closed === "accordion" && !r.is(":visible") || t.closed === "tabs" && !!r.is(":visible") ? e(n.find(".resp-tab-content")[m]).addClass("resp-tab-content-active resp-accordion-closed") : (e(n.find(".resp-accordion")[m]).addClass("resp-tab-active"), e(n.find(".resp-tab-content")[m]).addClass("resp-tab-content-active").attr("style", "display:block")), n.find("[role=tab]").each(function () {
63          var t = e(this);
64          t.click(function () {
65            var tc = e(this);
66            if (e(this).hasClass("resp-tab-active")) {
67              if (e(this)[0].tagName == "H2") {
68                e(this).removeClass("resp-tab-active");
69                e(this).siblings(".resp-tab-content-active").hide(200).removeClass("resp-tab-content-active");
70              };
71              return false;
72            };
73            var t = e(this),
74              r = t.attr("aria-controls");
75
76            if (t.hasClass("resp-accordion") && t.hasClass("resp-tab-active"))
77              return n.find(".resp-tab-content-active").hide(200, function () {
78                e(this).addClass("resp-accordion-closed")
79              }), t.removeClass("resp-tab-active"), !1;
80            !t.hasClass("resp-tab-active") && t.hasClass("resp-accordion") ? (n.find(".resp-tab-active").removeClass("resp-tab-active"), n.find(".resp-tab-content-active").hide(200).removeClass("resp-tab-content-active resp-accordion-closed"), n.find("[aria-controls=" + r + "]").addClass("resp-tab-active"), n.find("#" + r).show(200, function () {
81              if (tc.offset().top < e(window).scrollTop()) {
82
83                if (jQuery(".mobile-header-replace").css("display") !== "none" && jQuery(".mobile-header").css("position") == "fixed") {
84                  floatingOffset = jQuery(".mobile-header-replace").height();
85                } else {
86                  floatingOffset = 0
87                }
88                jQuery('body,html').stop().animate({
89                  scrollTop: tc.offset().top - floatingOffset
90
91                }, 200)
92              }
93            }).addClass("resp-tab-content-active")) : (n.find(".resp-tab-active").removeClass("resp-tab-active"), n.find(".resp-tab-content-active").removeAttr("style").removeClass("resp-tab-content-active").removeClass("resp-accordion-closed"), n.find("[aria-controls=" + r + "]").addClass("resp-tab-active").attr("aria-expanded", "true").attr("tabindex", "0").siblings().removeClass("active").attr("aria-expanded", "false").attr("tabindex", "-1"), n.find("#" + r).addClass("resp-tab-content-active").fadeIn(400)), t.trigger("tabactivate", t)
94          })
95        }), e(window).resize(function () {
96          n.find(".resp-accordion-closed").removeAttr("style")
97        })
98      })
99    }
100  })
101})(jQuery);
102
103
104
105/*dng */
106var tabLauncher = function (mod) {
107  (function ($) {
108    $(document).ready(function () {
109      mod.easyResponsiveTabs({
110        type: "vertical",
111        width: "auto",
112        fit: !0
113      })
114    });
115  })(jQuery);
116  (function ($) {
117    let first = true;
118
119    $.fn.OpenTab = function () {
120      var url = window.location.search,
121        e = $(this);
122      
123      let n = 0;
124
125      var hash = window.location.hash;
126
127      if (!url) {
128        var pathname = window.location.pathname.split("/");
129        var eId = e.attr("id");
130        pathname.forEach(function (i, index) {
131          if (i && eId && i.toUpperCase() == eId.toUpperCase()) {
132            url = "?" + e.attr("id") + "=" + pathname[index + 1]
133          }
134        });
135      }
136
137      if (url.indexOf("?") != -1) {
138        var str = url.substr(1);
139        strs = str.split("&");
140
141        for (i = 0; i < strs.length; i++) {
142          if (e.attr("id") == strs[i].split("=")[0]) {
143            var info = strs[i].split("=")[1];
144            if (!n) n = info -1;
145          }
146        }
147      }
148
149      if (hash && e.find(hash).length) {
150        n = e.find(hash).parent().parent().find(".resp_container").index(e.find(hash).parent());
151      };
152
153      if (n) {
154        e.find(".resp-tabs-list .resp-tab-item").eq(n).addClass("resp-tab-active").siblings(".resp-tab-item").removeClass("resp-tab-active");
155        e.find(".resp-tabs-container .resp-accordion").eq(n).addClass("resp-tab-active").siblings(".resp-accordion").removeClass("resp-tab-active");
156        e.find(".resp-tabs-container .resp-tab-content").eq(n).addClass("resp-tab-content-active").show().siblings(".resp-tab-content").removeClass("resp-tab-content-active").hide();
157      }
158
159      if (first && n) {
160        first = false;
161        history.scrollRestoration = "manual";
162
163        let offset = (typeof floatingOffset != "undefined" ?floatingOffset + 10 : 100)
164
165        $(window).scrollTop(($(window).width() >= 768 ? e.offset().top : e.find(".resp-tabs-container .resp-accordion").eq(n).offset().top) - offset);
166        $(window).on("load", function () {
167          setTimeout(function () {
168            history.scrollRestoration = "auto";
169          }, 300)
170        })
171      }
172
173
174
175    }
176  })(jQuery);
177  (function ($) {
178    $(document).ready(function () {
179      mod.each(function () {
180        $(this).OpenTab();
181      });
182
183      $(".verticalTab_Left,.verticalTab_Right,.dg-tabs-left,.dg-tabs-right").each(function () {
184        var e = $(this);
185        e.find(".resp_margin").css("min-height", e.find(".resp-tabs-list").height())
186      });
187
188      mod.each(function () {
189        var e = $(this),
190          itm = e.find(".resp-tab-item"),
191          interval,
192          clickSwitch = true;
193
194        function autoSwitch() {
195          if ($(window)[0].innerWidth > 768) {
196            if (!clickSwitch) {
197              clickSwitch = true;
198              int = e.find(".resp-tabs-list .resp-tab-active").index();
199              itm.eq(int).click();
200            }
201          } else {
202            clearTimeout(interval);
203            clickSwitch = false;
204          }
205        }
206        autoSwitch();
207        if (e.data("autoplay")) {
208          var time = parseInt(e.data("autoplay")) >= 1 ? e.data("autoplay") : 3000;
209          var autoplays = function (n) {
210            int = e.find(".resp-tabs-list .resp-tab-active").index() + n < itm.length ? e.find(".resp-tabs-list .resp-tab-active").index() + n : 0;
211            itm.eq(int).click();
212          };
213          if (clickSwitch) {
214            interval = setTimeout(function () {
215              autoplays(1)
216            }, time);
217          }
218          itm.on("click", function () {
219            clearTimeout(interval);
220            if (clickSwitch) {
221              interval = setTimeout(function () {
222                autoplays(1)
223              }, time);
224            }
225          })
226
227          $(window).on("resize", function () {
228            autoSwitch();
229          });
230
231        }
232        if (e.data("navigation")) {
233          e.append("<div class='resp-tab-arrow'><a  href='javascript:;' class='last-page'><</a><a  href='javascript:;' class='next-page'>></a></div>");
234          e.find(".next-page").on("click", function () {
235            autoplays(1)
236          });
237          e.find(".last-page").on("click", function () {
238            autoplays(-1)
239          })
240        }
241        /**/
242        e.find(".resp-tabs-list > li,.resp-accordion").on("keydown", function (event) {
243          var ev = event || window.event || arguments.callee.caller.arguments[0];
244          var keycode = ev.keyCode;
245          if (keycode == 13) {
246            $(this).click();
247          }
248        })
249
250        e.find(".resp-tabs-list").on("keydown", function (event) {
251          var ev = event || window.event || arguments.callee.caller.arguments[0];
252          var keyCode = ev.keyCode;
253
254
255
256          if (keyCode == 37) {
257            if ($(this).find(":focus").prev().length) {
258              $(this).find(":focus").prev().trigger("focus").trigger("click");
259            } else {
260              $(this).find("li").last().trigger("focus").trigger("click");
261            }
262          } else if (keyCode == 39) {
263            if ($(this).find(":focus").next().length) {
264              $(this).find(":focus").next().trigger("focus").trigger("click");
265            } else {
266              $(this).find("li").first().trigger("focus").trigger("click");
267            }
268          }
269
270        })
271
272
273
274
275      });
276
277      $(".horizontalTab_Top,.horizontalTab_Bottom,.verticalTab_Left,.verticalTab_Right,.dg-tabs-top,.dg-tabs-bottom,.dg-tabs-left,.dg-tabs-right").each(function () {
278        var e = $(this),
279          itm = e.find(".resp-tab-item"),
280          interval,
281          clickSwitch = true;
282
283        function autoSwitch() {
284          if ($(window)[0].innerWidth > 768) {
285            if (!clickSwitch) {
286              clickSwitch = true;
287              int = e.find(".resp-tabs-list .resp-tab-active").index();
288              itm.eq(int).click();
289            }
290          } else {
291            clearTimeout(interval);
292            clickSwitch = false;
293          }
294        }
295        autoSwitch();
296        if (e.data("autoplay")) {
297          var time = parseInt(e.data("autoplay")) >= 1 ? e.data("autoplay") : 3000;
298          var autoplays = function (n) {
299            int = e.find(".resp-tabs-list .resp-tab-active").index() + n < itm.length ? e.find(".resp-tabs-list .resp-tab-active").index() + n : 0;
300            itm.eq(int).click();
301          };
302          if (clickSwitch) {
303            interval = setTimeout(function () {
304              autoplays(1)
305            }, time);
306          }
307          itm.on("click", function () {
308            clearTimeout(interval);
309            if (clickSwitch) {
310              interval = setTimeout(function () {
311                autoplays(1)
312              }, time);
313            }
314          })
315          $(window).resize(function () {
316            autoSwitch();
317          });
318        }
319        if (e.data("navigation")) {
320          e.append("<div class='resp-tab-arrow'><a  href='javascript:;' class='last-page'><</a><a  href='javascript:;' class='next-page'>></a></div>");
321          e.find(".next-page").on("click", function () {
322            autoplays(1)
323          });
324          e.find(".last-page").on("click", function () {
325            autoplays(-1)
326          })
327        }
328      });
329    })
330  })(jQuery);
331
332  (function ($) {
333    function sortNumber(a, b) {
334      return b - a
335    };
336
337    function minHeight() {
338      if ($(window)[0].innerWidth > 768) {
339
340        setTimeout(function () {
341          $(".equalHeight.horizontalTab_Top , .equalHeight.verticalTab_Left").each(function () {
342
343            var arrHeight = new Array();
344
345            $(this).find(".resp_container").each(function () {
346              if (!$(this).hasClass("resp-tab-content-active")) {
347                $(this).css("display", "block");
348              };
349
350              $(this).find(".resp_margin").css("min-height", "auto");
351              arrHeight.push($(this).find(".resp_margin").innerHeight());
352
353              arrHeight.sort(sortNumber);
354
355              if (!$(this).hasClass("resp-tab-content-active")) {
356                $(this).css("display", "none");
357              };
358            });
359
360            var listHeight = $(this).find(".resp-tabs-list").outerHeight();
361
362            var minHeight = listHeight > arrHeight[0] ? listHeight : arrHeight[0];
363            $(this).find(".resp_margin").each(function () {
364              $(this).css("min-height", minHeight);
365            });
366
367          });
368
369        }, 0);
370
371      } else {
372        setTimeout(function () {
373          $(".equalHeight.horizontalTab_Top , .equalHeight.verticalTab_Left").each(function () {
374            $(this).find(".resp_margin").css("min-height", "auto");
375          });
376
377        }, 0);
378      }
379    };
380    minHeight();
381    $(window).resize(function () {
382      minHeight();
383    });
384
385  })(jQuery);
386}
387
388
389jQuery(document).ready(function () {
390  tabLauncher($(".verticalTab_Left,.verticalTab_Right,.horizontalTab_Bottom,.horizontalTab_Top,.dg-tabs-top,.dg-tabs-bottom,.dg-tabs-left,.dg-tabs-right"));
391});

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.