Skip to content

Commit f031b22

Browse files
committed
Version 3.7.8 release
1 parent 316b335 commit f031b22

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Build/CommonAssemblyInfo.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
// Minor Version
1313
// Build Number
1414
// Revision
15-
//
16-
// You can specify all the values or you can default the Revision and Build Numbers
17-
// by using the '*' as shown below:
1815
[assembly: AssemblyVersion("3.7.8")]
1916
[assembly: AssemblyFileVersion("3.7.8")]
20-
[assembly: AssemblyInformationalVersion("3.7.8-beta")]
17+
// Uncomment the informational version to create a pre-release package
18+
//[assembly: AssemblyInformationalVersion("3.7.8-beta")]

Griddly.NetCore.Razor/wwwroot/js/griddly.js

+15-13
Original file line numberDiff line numberDiff line change
@@ -566,14 +566,14 @@
566566
this.setFilterValues(values, true, null, true);
567567
};
568568

569-
var hidePopover = function (selector, isBootstrap4or5) {
569+
var hidePopover = function (selector, bootstrapVersion) {
570570
selector.each(function () {
571571
var filter = $(this);
572572
if (filter.attr("aria-describedby")) { //This attribute will be present only when the popover is currently shown
573573
filter.popover("hide");
574574

575575
//Workaround for bug introduced in Bootstrap 3.3.5, where hide() doesn't clear out the click state, so toggle() after hide() does not show.
576-
if (!isBootstrap4or5 && filter.data("bs.popover").inState) {
576+
if (bootstrapVersion < 4 && filter.data("bs.popover").inState) {
577577
filter.data("bs.popover").inState.click = false;
578578
}
579579
}
@@ -585,8 +585,10 @@
585585
this.$element = $(element);
586586
this.$filterModal = $(".griddly-filter-modal", this.$element);
587587
this.options = options;
588-
this.bootstrapVersion = $.fn.tooltip.Constructor.VERSION.substr(0, 1);
589-
this.isBootstrap4or5 = this.bootstrapVersion == "4" || this.bootstrapVersion == "5";
588+
this.bootstrapVersion = parseInt($.fn.tooltip.Constructor.VERSION.substr(0, 1));
589+
if (isNaN(this.bootstrapVersion))
590+
this.bootstrapVersion = 3;
591+
590592
this.create();
591593
this.isConstructed = false;
592594
this.eventQueue = [];
@@ -681,7 +683,7 @@
681683
tip = filter.data('bs.popover').tip; /*BS4*/
682684

683685
if ($(tip).hasClass('in') || $(tip).hasClass('show')/*BS4*/) {
684-
hidePopover(filter, self.isBootstrap4or5);
686+
hidePopover(filter, self.bootstrapVersion);
685687

686688
if (!self.options.autoRefreshOnFilter && self.pendingInlineFilterRefresh) {
687689
self.refresh(true);
@@ -1155,7 +1157,7 @@
11551157
if (filter.hasClass("griddly-filter-box"))
11561158
{
11571159
if (!dontHide && this.options.autoRefreshOnFilter)
1158-
hidePopover(filter.find(".filter-trigger"), self.isBootstrap4or5);
1160+
hidePopover(filter.find(".filter-trigger"), self.bootstrapVersion);
11591161

11601162
var val = trimToNull(getCleanedValue(content.find("input").first().val(), dataType));
11611163

@@ -1201,7 +1203,7 @@
12011203
else if (filter.hasClass("griddly-filter-list"))
12021204
{
12031205
if (!filter.data("griddly-filter-ismultiple") && !dontHide && this.options.autoRefreshOnFilter)
1204-
hidePopover(filter.find(".filter-trigger"), self.isBootstrap4or5);
1206+
hidePopover(filter.find(".filter-trigger"), self.bootstrapVersion);
12051207

12061208
var allItems = content.find("li:not(.griddly-list-group-header), .dropdown-item");
12071209
var selectedItems = allItems.filter(":has(:checked)");
@@ -1218,7 +1220,7 @@
12181220
display = selectedItems.length + " " + filter.data("filter-name-plural");
12191221
else if (selectedItems.length > 0 && selectedItems.length <= displayItemCount)
12201222
{
1221-
var itemTexts = self.isBootstrap4or5 ? selectedItems : selectedItems.find("a");
1223+
var itemTexts = self.bootstrapVersion == 4 || self.bootstrapVersion == 5 ? selectedItems : selectedItems.find("a");
12221224
var display = $.trim($(itemTexts[0]).text());
12231225

12241226
for (var i = 1; i < selectedItems.length && i < displayItemCount; i++)
@@ -1272,7 +1274,7 @@
12721274
}
12731275

12741276
var filter = $input.data("griddly-filter");
1275-
hidePopover(filter.find(".filter-trigger"), this.isBootstrap4or5);
1277+
hidePopover(filter.find(".filter-trigger"), this.bootstrapVersion);
12761278
}
12771279
}, this));
12781280

@@ -1293,15 +1295,15 @@
12931295
placement: "bottom",
12941296
container: $(".griddly-filters-inline", this.$element),
12951297
template:
1296-
self.isBootstrap4or5 ? '<div class="popover griddly-filter-popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
1298+
self.bootstrapVersion == 4 || self.bootstrapVersion == 5 ? '<div class="popover griddly-filter-popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
12971299
: '<div class="popover griddly-filter-popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>',
12981300
content: function ()
12991301
{
13001302
return content;
13011303
}
13021304
}).on("show.bs.popover", function ()
13031305
{
1304-
hidePopover(self.$element.find(".griddly-filters-inline .filter-trigger").not(this), self.isBootstrap4or5);
1306+
hidePopover(self.$element.find(".griddly-filters-inline .filter-trigger").not(this), self.bootstrapVersion);
13051307

13061308
content.find("input:first").select();
13071309

@@ -1332,7 +1334,7 @@
13321334
if (this.pendingInlineFilterRefresh) {
13331335
this.refresh(true);
13341336
}
1335-
hidePopover(filterTrigger, this.isBootstrap4or5);
1337+
hidePopover(filterTrigger, this.bootstrapVersion);
13361338
}, this));
13371339
}
13381340

@@ -1367,7 +1369,7 @@
13671369
}
13681370
else
13691371
{
1370-
var item = self.isBootstrap4or5 ? $(this) : $(this).parents("li");
1372+
var item = self.bootstrapVersion == 4 || self.bootstrapVersion == 5 ? $(this) : $(this).parents("li");
13711373

13721374
var checkbox = $(this).find("input");
13731375

0 commit comments

Comments
 (0)