Skip to content

Commit c3b7666

Browse files
authored
Merge branch 'master' into bugfix/validate-refs
2 parents 140fcb3 + e763884 commit c3b7666

File tree

15 files changed

+184
-41
lines changed

15 files changed

+184
-41
lines changed

Admin/PropertyGroups.ascx.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,11 @@ private void SaveAll()
151151
var grpname = GenXmlFunctions.GetField(rtnItem, "groupname");
152152
var grpref = GenXmlFunctions.GetField(rtnItem, "groupref");
153153
var grptype = GenXmlFunctions.GetField(rtnItem, "grouptype");
154+
var addsearchbox = GenXmlFunctions.GetField(rtnItem, "addsearchbox");
154155
grpData.Name = grpname;
155156
grpData.Ref = grpref;
156157
grpData.Type = grptype;
158+
grpData.AddSearchBox = addsearchbox;
157159
grpData.Save();
158160
}
159161
}

App_LocalResources/General.ascx.nl-NL.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,4 +1227,7 @@
12271227
<data name="RefValidationMessage.Text" xml:space="preserve">
12281228
<value>Ref mag alleen in kleine letters alfanumeriek zijn zonder lege spaties.</value>
12291229
</data>
1230+
<data name="PropertyGroupAddSearchBox.Text" xml:space="preserve">
1231+
<value>Zoekvak toevoegen</value>
1232+
</data>
12301233
</root>

App_LocalResources/General.ascx.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,4 +1236,10 @@
12361236
<data name="RefValidationMessage.Text" xml:space="preserve">
12371237
<value>Ref should be lower case alpha numeric only with no empty spaces.</value>
12381238
</data>
1239+
<data name="PropertyGroupAddSearchBox.Text" xml:space="preserve">
1240+
<value>Add Search Box</value>
1241+
</data>
1242+
<data name="PropertyGroupSearchLabel.Text" xml:space="preserve">
1243+
<value>Search</value>
1244+
</data>
12391245
</root>

Components/GroupData.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,30 @@ public String Type
8080
}
8181
}
8282

83+
public string AddSearchBox
84+
{
85+
get
86+
{
87+
if (Exists) return Info.GetXmlPropertyBool("genxml/checkbox/addsearchbox").ToString();
88+
return false.ToString();
89+
}
90+
set
91+
{
92+
if (Exists)
93+
{
94+
bool b;
95+
if (bool.TryParse(value, out b))
96+
{
97+
DataRecord.SetXmlProperty("genxml/checkbox/addsearchbox", b.ToString());
98+
}
99+
else
100+
{
101+
DataRecord.SetXmlProperty("genxml/checkbox/addsearchbox", false.ToString());
102+
}
103+
}
104+
}
105+
}
106+
83107

84108
public void Save()
85109
{

DNNpackager.dnnpack

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<websitedestrelpath>\DesktopModules\NBright\NBrightBuy</websitedestrelpath>
44
<websitedestbinrelpath>\bin</websitedestbinrelpath>
55
<!-- Include only files that match the regular expression -->
6-
<regexpr>(\.cshtml|\.html|\.resx|OpenStore\.dnn|\.png|\.gif|\.jpg|\.jpeg|\.css|\.js|\.xml|\.txt|\.md|\.aspx|\.ascx|\.ashx)$</regexpr>
6+
<regexpr>(\.cshtml|\.html|\.resx|OpenStore\.dnn|\.png|\.gif|\.jpg|\.jpeg|\.css|\.js|\.xml|\.txt|\.md|\.aspx|\.ascx|\.ashx|\.config)$</regexpr>
77
<directory include='false'>
88
<!-- All paths should be from the source root (project root) -->
99
<value>\.git</value>
@@ -12,10 +12,33 @@
1212
<value>\obj</value>
1313
<value>\Components</value>
1414
<value>\render</value>
15+
<value>\packages</value>
16+
<value>\Installation</value>
1517
<value>\_external</value>
16-
<value>\Providers</value>
18+
<value>\Skins</value>
19+
<value>\Providers\EventProvider</value>
20+
<value>\Providers\DiscountCodesProvider\bin</value>
21+
<value>\Providers\DiscountCodesProvider\obj</value>
22+
<value>\Providers\ManualPaymentProvider\bin</value>
23+
<value>\Providers\ManualPaymentProvider\obj</value>
24+
<value>\Providers\PromoProvider\bin</value>
25+
<value>\Providers\PromoProvider\obj</value>
26+
<value>\Providers\ShippingProvider\bin</value>
27+
<value>\Providers\ShippingProvider\obj</value>
28+
<value>\Providers\TaxProvider\bin</value>
29+
<value>\Providers\TaxProvider\obj</value>
1730
</directory>
1831
<file include='false'>
32+
<value>\Providers\DiscountCodesProvider\app.config</value>
33+
<value>\Providers\DiscountCodesProvider\packages.config</value>
34+
<value>\Providers\ManualPaymentProvider\app.config</value>
35+
<value>\Providers\ManualPaymentProvider\packages.config</value>
36+
<value>\Providers\PromoProvider\app.config</value>
37+
<value>\Providers\PromoProvider\packages.config</value>
38+
<value>\Providers\ShippingProvider\app.config</value>
39+
<value>\Providers\ShippingProvider\packages.config</value>
40+
<value>\Providers\TaxProvider\app.config</value>
41+
<value>\Providers\TaxProvider\packages.config</value>
1942
</file>
2043
<file include='true'>
2144
<value>\Installation\04.00.00.SqlDataProvider</value>

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("4.1.5.3")]
36-
[assembly: AssemblyFileVersion("4.1.5.3")]
35+
[assembly: AssemblyVersion("4.1.5.4")]
36+
[assembly: AssemblyFileVersion("4.1.5.4")]

Themes/Bootstrap4/Default/ProductListAjaxFilter.cshtml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,17 @@
9595
}
9696
if (propertyDisplayList.Contains(item.Key) || moduleKey == "")
9797
{
98-
cbString += "<div class=\"form-check\"><input class=\"form-check-input\" type=\"checkbox\" " + selected + " value=\"" + groupRef + "-" + item.Key + "\" id=\"defaultCheck1\"><label class=\"form-check-label\" for=\"defaultCheck1\">" + item.Value + "</label></div>";
98+
cbString += "<div class=\"form-check nbsfilteroption\" data-groupref=\"" + groupRef + "\" data-itemvalue=\"" + item.Value + "\"><input class=\"form-check-input\" type=\"checkbox\" " + selected + " value=\"" + groupRef + "-" + item.Key + "\" id=\"defaultCheck1\"><label class=\"form-check-label\" for=\"defaultCheck1\">" + item.Value + "</label></div>";
9999
}
100100
}
101101
if (cbString != "")
102102
{
103+
var addSearchBox = groupnbi.GetXmlPropertyBool("/genxml/checkbox/addsearchbox");
103104
strOut += "<h3 class='h3-headline mt-0 mb-2'>" + grouplang.GetXmlProperty("genxml/textbox/groupname") + "</h3>";
105+
if (addSearchBox)
106+
{
107+
strOut += "<div class=\"form-group\"><input type=\"text\" class=\"form-control\" onkeyup=\"filterFilterOptions(this, '" + groupRef + "')\" ></div>";
108+
}
104109
strOut += cbString;
105110
}
106111
}

Themes/Bootstrap4/js/product.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,18 @@ function loadFilters() {
358358
nbxproductget('product_ajaxview_getfilters', '#productajaxview', '#ajaxfilter');
359359
}
360360

361+
function filterFilterOptions(searchbox, groupref) {
362+
var s = $(searchbox).val();
363+
$(`.nbsfilteroption[data-groupref='${groupref}']`).each(function(index) {
364+
if ($(this).children("input[type='checkbox']").is(":checked") || $(this).attr('data-itemvalue').indexOf(s) >= 0) {
365+
$(this).show();
366+
} else {
367+
$(this).hide();
368+
}
369+
});
370+
}
371+
372+
361373
function IsInFavorites(productid) {
362374
var productitemlist = $.cookie("NBSShoppingList");
363375
if (typeof productitemlist !== 'undefined') {

Themes/ClassicAjax/Default/ProductListAjaxFilter.cshtml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,17 @@
9595
}
9696
if (propertyDisplayList.Contains(item.Key) || moduleKey == "")
9797
{
98-
cbString += "<li><input type='checkbox' " + selected + " value='" + groupRef + "-" + item.Key + "' />" + item.Value + "</li>";
98+
cbString += "<li class=\"nbsfilteroption\" data-groupref=\"" + groupRef + "\" data-itemvalue=\"" + item.Value + "\"><input type='checkbox' " + selected + " value='" + groupRef + "-" + item.Key + "' />" + item.Value + "</li>";
9999
}
100100
}
101101
if (cbString != "")
102102
{
103+
var addSearchBox = groupnbi.GetXmlPropertyBool("/genxml/checkbox/addsearchbox");
103104
strOut += "<div class='h3-headline'>" + grouplang.GetXmlProperty("genxml/textbox/groupname") + "</div>";
105+
if (addSearchBox)
106+
{
107+
strOut += "<input type=\"text\" class=\"NormalTextBox\" onkeyup=\"filterFilterOptions(this, '" + groupRef + "')\" >";
108+
}
104109
strOut += "<ul>";
105110
strOut += cbString;
106111
strOut += "</ul>";

Themes/Default/js/product.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,17 @@ function loadFilters() {
353353
nbxproductget('product_ajaxview_getfilters', '#productajaxview', '#ajaxfilter');
354354
}
355355

356+
function filterFilterOptions(searchbox, groupref) {
357+
var s = $(searchbox).val();
358+
$(`.nbsfilteroption[data-groupref='${groupref}']`).each(function(index) {
359+
if ($(this).children("input[type='checkbox']").is(":checked") || $(this).attr('data-itemvalue').indexOf(s) >= 0) {
360+
$(this).show();
361+
} else {
362+
$(this).hide();
363+
}
364+
});
365+
}
366+
356367
function IsInFavorites(productid) {
357368
var productitemlist = $.cookie("NBSShoppingList");
358369
if (typeof productitemlist !== 'undefined') {

0 commit comments

Comments
 (0)