From 8697ba318816193feefd82c33347f4eb6f65155f Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 27 Sep 2023 22:22:56 +0100 Subject: [PATCH] Added option for show-icon Updated demo page --- src/bbtreeview.css => bbtreeview.css | 4 ++++ bbtreeview.js | 14 ++++++++++---- demo-test.html | 29 +++++++++++++++++++++------- 3 files changed, 36 insertions(+), 11 deletions(-) rename src/bbtreeview.css => bbtreeview.css (95%) diff --git a/src/bbtreeview.css b/bbtreeview.css similarity index 95% rename from src/bbtreeview.css rename to bbtreeview.css index c6733c7..1c61c3b 100644 --- a/src/bbtreeview.css +++ b/bbtreeview.css @@ -69,4 +69,8 @@ ul.bbtreeview div.li > span { text-overflow: ellipsis; vertical-align: top; white-space: nowrap; +} + +ul.bbtreeview div.li > span.noicon { + padding-left: 0px !important; } \ No newline at end of file diff --git a/bbtreeview.js b/bbtreeview.js index 6983bc9..fa5bb92 100644 --- a/bbtreeview.js +++ b/bbtreeview.js @@ -1,6 +1,6 @@ /** * BBTreeview - * @version v0.1.0.244 (2023/09/11 2327) + * @version v0.1.1.006 (2023/09/27 2218) */ function BBTreeview(options) { @@ -65,7 +65,8 @@ BBTreeview.prototype.Default = function() { ID: null, ShowCheckbox: false, ShowSelection: true, - EnablePullUp: false + EnablePullUp: false, + ShowIcon: true }, TreeNodeOptions: { ID: null, @@ -295,8 +296,13 @@ BBTreeview.prototype.generateNodeHtml = function(options) { html += '
'; } - html += '
'; - html += '' + options.Name + ''; + if (a.Options.ShowIcon) { + html += '
'; + html += '' + options.Name + ''; + } else { + html += '' + options.Name + ''; + } + html += ''; html += ''; html += ''; diff --git a/demo-test.html b/demo-test.html index 56a382b..783237d 100644 --- a/demo-test.html +++ b/demo-test.html @@ -10,11 +10,11 @@ - - - - - + + + + + @@ -34,6 +34,7 @@

+

@@ -94,11 +95,13 @@