From 8cb4005192f1e872e199869bee3ea3fed6de1b32 Mon Sep 17 00:00:00 2001 From: Adam R Grey Date: Fri, 10 May 2024 10:54:45 -0400 Subject: [PATCH] update links to guy who forked it --- wwwroot/css/bstreeview.min.css | 2 +- wwwroot/js/bstreeview.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wwwroot/css/bstreeview.min.css b/wwwroot/css/bstreeview.min.css index e5623f9..d01f80a 100644 --- a/wwwroot/css/bstreeview.min.css +++ b/wwwroot/css/bstreeview.min.css @@ -5,6 +5,6 @@ Authors: Sami CHNITER Copyright 2020 License: Apache License 2.0 - Project: https://github.com/chniter/bstreeview + Project: https://github.com/nhmvienna/bs5treeview */ .bstreeview{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem;padding:0;overflow:hidden}.bstreeview .list-group{margin-bottom:0}.bstreeview .list-group-item{border-radius:0;border-width:1px 0 0 0;padding-top:.5rem;padding-bottom:.5rem;cursor:pointer}.bstreeview .list-group-item:hover{background-color:#dee2e6}.bstreeview>.list-group-item:first-child{border-top-width:0}.bstreeview .state-icon{margin-right:8px}.bstreeview .item-icon{margin-right:5px} \ No newline at end of file diff --git a/wwwroot/js/bstreeview.min.js b/wwwroot/js/bstreeview.min.js index ff0ca7c..e80f92c 100644 --- a/wwwroot/js/bstreeview.min.js +++ b/wwwroot/js/bstreeview.min.js @@ -5,6 +5,6 @@ Authors: Sami CHNITER Copyright 2020 License: Apache License 2.0 - Project: https://github.com/chniter/bstreeview + Project:https://github.com/nhmvienna/bs5treeview */ !function (t, e, i, s) { "use strict"; var n = { expandIcon: "fa fa-angle-down fa-fw", collapseIcon: "fa fa-angle-right fa-fw", expandClass: 'show', indent: 1.25, parentsMarginLeft: "1.25rem", openNodeLinkOnNewTab: !0 }, a = '
', d = '
', o = '', r = ''; function l(e, i) { this.element = e, this.itemIdPrefix = e.id + "-item-", this.settings = t.extend({}, n, i), this.init() } t.extend(l.prototype, { init: function () { this.tree = [], this.nodes = [], this.settings.data && (this.settings.data.isPrototypeOf(String) && (this.settings.data = t.parseJSON(this.settings.data)), this.tree = t.extend(!0, [], this.settings.data), delete this.settings.data), t(this.element).addClass("bstreeview"), this.initData({ nodes: this.tree }); var i = this; this.build(t(this.element), this.tree, 0), t(this.element).on("click", ".list-group-item", function (s) { t(".state-icon", this).toggleClass(i.settings.expandIcon).toggleClass(i.settings.collapseIcon), s.target.hasAttribute("href") && (i.settings.openNodeLinkOnNewTab ? e.open(s.target.getAttribute("href"), "_blank") : e.location = s.target.getAttribute("href")) }) }, initData: function (e) { if (e.nodes) { var i = e, s = this; t.each(e.nodes, function (t, e) { e.nodeId = s.nodes.length, e.parentId = i.nodeId, s.nodes.push(e), e.nodes && s.initData(e) }) } }, build: function (e, i, s) { var n = this, l = n.settings.parentsMarginLeft; s > 0 && (l = (n.settings.indent + s * n.settings.indent).toString() + "rem;"), s += 1, t.each(i, function (i, g) { var h = t(a).attr("data-bs-target", "#" + n.itemIdPrefix + g.nodeId).attr("style", "padding-left:" + l).attr("aria-level", s); if (g.nodes) { var c = t(o).addClass((g.expanded)?n.settings.expandIcon:n.settings.collapseIcon); h.append(c) } if (g.icon) { var f = t(r).addClass(g.icon); h.append(f) } if (h.append(g.text), g.href && h.attr("href", g.href), g.class && h.addClass(g.class), g.id && h.attr("id", g.id), e.append(h), g.nodes) { var p = t(d).attr("id", n.itemIdPrefix + g.nodeId); e.append(p), n.build(p, g.nodes, s); if (g.expanded) p.addClass(n.settings.expandClass) } }) } }), t.fn.bstreeview = function (e) { return this.each(function () { t.data(this, "plugin_bstreeview") || t.data(this, "plugin_bstreeview", new l(this, e)) }) } }(jQuery, window, document); \ No newline at end of file