Skip to content

Commit

Permalink
Merge branch 'hotfix/dnn92_datepicker'
Browse files Browse the repository at this point in the history
  • Loading branch information
sachatrauwaen committed May 24, 2018
2 parents 5159aee + e45f99e commit 092cd2b
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 46 deletions.
29 changes: 25 additions & 4 deletions OpenContent/Components/Lucene/Config/SelectQueryDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private void AddRulles(BooleanQuery q, List<FilterRule> filterRules, Occur cond)
}
else
{
string searchstring = QueryParser.Escape(rule.Value.AsString);
string searchstring = QueryParser.Escape(rule.Value.AsString);
q.Add(new TermQuery(new Term(fieldName, searchstring)), cond);
}
}
Expand Down Expand Up @@ -129,12 +129,27 @@ private void AddRulles(BooleanQuery q, List<FilterRule> filterRules, Occur cond)
var endDate = rule.UpperValue.AsDateTime;
q.Add(NumericRangeQuery.NewLongRange(fieldName, startDate.Ticks, endDate.Ticks, true, true), cond);
}
else if (rule.FieldType == FieldTypeEnum.FLOAT)
{
var startValue = rule.LowerValue.AsFloat;
var endValue = rule.UpperValue.AsFloat;
q.Add(NumericRangeQuery.NewFloatRange(fieldName, startValue, endValue, true, true), cond);
}
}
else if (rule.FieldOperator == OperatorEnum.GREATER_THEN_OR_EQUALS)
{
DateTime startDate = rule.Value.AsDateTime;
DateTime endDate = DateTime.MaxValue;
q.Add(NumericRangeQuery.NewLongRange(fieldName, startDate.Ticks, endDate.Ticks, true, true), cond);
if (rule.FieldType == FieldTypeEnum.DATETIME)
{
DateTime startDate = rule.Value.AsDateTime;
DateTime endDate = DateTime.MaxValue;
q.Add(NumericRangeQuery.NewLongRange(fieldName, startDate.Ticks, endDate.Ticks, true, true), cond);
}
else if (rule.FieldType == FieldTypeEnum.FLOAT)
{
var startValue = rule.Value.AsFloat;
var endValue = float.MaxValue;
q.Add(NumericRangeQuery.NewFloatRange(fieldName, startValue, endValue, true, true), cond);
}
}
else if (rule.FieldOperator == OperatorEnum.LESS_THEN_OR_EQUALS)
{
Expand All @@ -144,6 +159,12 @@ private void AddRulles(BooleanQuery q, List<FilterRule> filterRules, Occur cond)
DateTime endDate = rule.Value.AsDateTime;
q.Add(NumericRangeQuery.NewLongRange(fieldName, startDate.Ticks, endDate.Ticks, true, true), cond);
}
else if (rule.FieldType == FieldTypeEnum.FLOAT)
{
var startValue = float.MinValue;
var endValue = rule.Value.AsFloat;
q.Add(NumericRangeQuery.NewFloatRange(fieldName, startValue, endValue, true, true), cond);
}
}
else if (rule.FieldOperator == OperatorEnum.GREATER_THEN)
{
Expand Down
2 changes: 1 addition & 1 deletion OpenContent/OpenContent.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="OpenContent" type="Module" version="03.05.03">
<package name="OpenContent" type="Module" version="03.05.04">
<friendlyName>OpenContent</friendlyName>
<description>OpenContent module by Satrabel.be</description>
<iconFile>~/DesktopModules/OpenContent/Images/icon_extensions.png</iconFile>
Expand Down
18 changes: 17 additions & 1 deletion OpenContent/alpaca/js/fields/dnn/AccordionField.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
getFieldType: function () {
return "accordion";
},

constructor: function (container, data, options, schema, view, connector) {
var self = this;
this.base(container, data, options, schema, view, connector);
this.culture = connector.culture;
this.defaultCulture = connector.defaultCulture;
this.rootUrl = connector.rootUrl;
},
setup: function()
{
var self = this;
Expand Down Expand Up @@ -59,10 +65,20 @@
var field = control.childrenByPropertyId[self.options.titleField];
if (field) {
var val = field.getValue();

// multi language
if (Alpaca.isObject(val)) {
val = val[self.culture];
}

val = val ? val : label;
control.getContainerEl().closest('.panel').find('.panel-title a').first().text(val);
field.on("keyup", function () {
var val = this.getValue();
// multi language
if (Alpaca.isObject(val)) {
val = val[self.culture];
}
val = val ? val : label;
$(this.getControlEl()).closest('.panel').find('.panel-title a').first().text(val);
});
Expand Down
18 changes: 17 additions & 1 deletion OpenContent/alpaca/js/fields/dnn/dnnfields.js
Original file line number Diff line number Diff line change
Expand Up @@ -13506,7 +13506,13 @@
getFieldType: function () {
return "accordion";
},

constructor: function (container, data, options, schema, view, connector) {
var self = this;
this.base(container, data, options, schema, view, connector);
this.culture = connector.culture;
this.defaultCulture = connector.defaultCulture;
this.rootUrl = connector.rootUrl;
},
setup: function()
{
var self = this;
Expand Down Expand Up @@ -13551,10 +13557,20 @@
var field = control.childrenByPropertyId[self.options.titleField];
if (field) {
var val = field.getValue();

// multi language
if (Alpaca.isObject(val)) {
val = val[self.culture];
}

val = val ? val : label;
control.getContainerEl().closest('.panel').find('.panel-title a').first().text(val);
field.on("keyup", function () {
var val = this.getValue();
// multi language
if (Alpaca.isObject(val)) {
val = val[self.culture];
}
val = val ? val : label;
$(this.getControlEl()).closest('.panel').find('.panel-title a').first().text(val);
});
Expand Down
2 changes: 1 addition & 1 deletion OpenContent/alpaca/js/fields/dnn/dnnfields.min.js

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions OpenContent/js/lib/eonasdan-bootstrap-datetimepicker/LICENSE

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.glyphicon-time:before {
content: "\e023";
}

.glyphicon-chevron-left:before {
content: "\e079";
}

.glyphicon-chevron-right:before {
content: "\e080";
}

.glyphicon-chevron-up:before {
content: "\e113";
}

.glyphicon-chevron-down:before {
content: "\e114";
}

.glyphicon-calendar:before {
content: "\e109";
}

.btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}

.collapse {
display: none;
}

.collapse.in {
display: block;
}

.dropdown-menu {
position: absolute;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
font-size: 14px;
text-align: left;
list-style: none;
background-color: #fff;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, .15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}

.list-unstyled {
padding-left: 0;
list-style: none;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*!
* Datetimepicker for Bootstrap 3
* version : 4.14.30
* version : 4.17.47
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
list-style: none;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
display: block;
margin: 2px 0;
padding: 4px;
width: 19em;
Expand Down Expand Up @@ -35,7 +36,7 @@
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #cccccc;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
top: -7px;
left: 7px;
Expand All @@ -50,7 +51,7 @@
.bootstrap-datetimepicker-widget.dropdown-menu.top:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #cccccc;
border-top: 7px solid #ccc;
border-top-color: rgba(0, 0, 0, 0.2);
bottom: -7px;
left: 6px;
Expand Down Expand Up @@ -299,7 +300,8 @@
.bootstrap-datetimepicker-widget table td.today:before {
content: '';
display: inline-block;
border: 0 0 7px 7px solid transparent;
border: solid transparent;
border-width: 0 0 7px 7px;
border-bottom-color: #337ab7;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
Expand All @@ -309,7 +311,7 @@
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
background-color: #337ab7;
color: #ffffff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td.active.today:before {
Expand All @@ -335,7 +337,7 @@
}
.bootstrap-datetimepicker-widget table td span.active {
background-color: #337ab7;
color: #ffffff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td span.old {
Expand Down
Loading

0 comments on commit 092cd2b

Please sign in to comment.