Skip to content

Commit c5ec36e

Browse files
author
Atanas Atanasov
committed
changed the version to 1.9.4. improved the visualization of the dropdown.
1 parent f7e9202 commit c5ec36e

File tree

32 files changed

+105
-77
lines changed

32 files changed

+105
-77
lines changed

Gijgo.GitHub.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@
111111
<Content Include="examples\datepicker\DatePicker.Base.locale.Bulgarian.html" />
112112
<Content Include="examples\datepicker\DatePicker.Base.locale.French.html" />
113113
<Content Include="examples\datepicker\DatePicker.Base.locale.German.html" />
114+
<Content Include="examples\datepicker\DatePicker.Base.locale.Italian.html" />
114115
<Content Include="examples\datepicker\DatePicker.Base.locale.Russian.html" />
116+
<Content Include="examples\datepicker\DatePicker.Base.locale.Spanish.html" />
115117
<Content Include="examples\datepicker\DatePicker.Base.maxDate.Today.html" />
116118
<Content Include="examples\datepicker\DatePicker.Base.maxDate.Tomorrow.html" />
117119
<Content Include="examples\datepicker\DatePicker.Base.minDate.Bootstrap.4.html" />
@@ -209,6 +211,10 @@
209211
<Content Include="examples\dropdown\DropDown.Base.maxHeight.Auto.html" />
210212
<Content Include="examples\dropdown\DropDown.Base.maxHeight.Bootstrap.4.html" />
211213
<Content Include="examples\dropdown\DropDown.Base.maxHeight.Fixed.html" />
214+
<Content Include="examples\dropdown\DropDown.Base.placeholder.Bootstrap.4.html" />
215+
<Content Include="examples\dropdown\DropDown.Base.placeholder.Bootstrap.html" />
216+
<Content Include="examples\dropdown\DropDown.Base.placeholder.HTML.Config.html" />
217+
<Content Include="examples\dropdown\DropDown.Base.placeholder.JS.Config.html" />
212218
<Content Include="examples\dropdown\DropDown.Base.selectedField.sample.html" />
213219
<Content Include="examples\dropdown\DropDown.Base.textField.sample.html" />
214220
<Content Include="examples\dropdown\DropDown.Base.uiLibrary.Bootstrap.3.html" />

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gijgo",
3-
"version": "1.9.3",
3+
"version": "1.9.4",
44
"description": "Gijgo is a set of free open source javascript controls distributed under MIT License with built-in support for Bootstrap and Material Design",
55
"main": [
66
"./dist/combined/js/gijgo.js",

dist/combined/js/gijgo.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Gijgo JavaScript Library v1.9.3
2+
* Gijgo JavaScript Library v1.9.4
33
* http://gijgo.com/
44
*
55
* Copyright 2014, 2018 gijgo.com
@@ -13078,21 +13078,35 @@ gj.dropdown.methods = {
1307813078
},
1307913079

1308013080
setListPosition: function (presenter, list, data) {
13081-
var top, listHeight, presenterHeight, newHeight,
13082-
mainElRect = presenter.getBoundingClientRect();
13083-
13084-
gj.core.setChildPosition(presenter, list);
13081+
var top, listHeight, presenterHeight, newHeight, listElRect,
13082+
mainElRect = presenter.getBoundingClientRect(),
13083+
scrollY = window.scrollY || window.pageYOffset || 0,
13084+
scrollX = window.scrollX || window.pageXOffset || 0;
1308513085

1308613086
// Reset list size
1308713087
list.style.overflow = '';
1308813088
list.style.overflowX = '';
1308913089
list.style.height = '';
1309013090

13091+
gj.core.setChildPosition(presenter, list);
13092+
1309113093
listHeight = gj.core.height(list, true);
13094+
listElRect = list.getBoundingClientRect();
1309213095
presenterHeight = gj.core.height(presenter, true);
13093-
if (!isNaN(listHeight) && data.maxHeight === 'auto' && (mainElRect.top + listHeight + presenterHeight) > window.innerHeight) {
13094-
newHeight = window.innerHeight - mainElRect.top - presenterHeight - 3;
13095-
} else if (!isNaN(listHeight) && !isNaN(data.maxHeight) && data.maxHeight < listHeight) {
13096+
if (data.maxHeight === 'auto') {
13097+
if (mainElRect.top < listElRect.top) { // The list is located below the main element
13098+
if (mainElRect.top + listHeight + presenterHeight > window.innerHeight) {
13099+
newHeight = window.innerHeight - mainElRect.top - presenterHeight - 3;
13100+
}
13101+
} else { // The list is located above the main element
13102+
if (mainElRect.top - listHeight - 3 > 0) {
13103+
list.style.top = Math.round(mainElRect.top + scrollY - listHeight - 3) + 'px';
13104+
} else {
13105+
list.style.top = scrollY + 'px';
13106+
newHeight = mainElRect.top - 3;
13107+
}
13108+
}
13109+
} else if (!isNaN(data.maxHeight) && data.maxHeight < listHeight) {
1309613110
newHeight = data.maxHeight;
1309713111
}
1309813112

dist/combined/js/gijgo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modular/js/checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Gijgo Checkbox v1.9.3
2+
* Gijgo Checkbox v1.9.4
33
* http://gijgo.com/checkbox
44
*
55
* Copyright 2014, 2018 gijgo.com

dist/modular/js/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Gijgo JavaScript Library v1.9.3
2+
* Gijgo JavaScript Library v1.9.4
33
* http://gijgo.com/
44
*
55
* Copyright 2014, 2018 gijgo.com

dist/modular/js/datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Gijgo DatePicker v1.9.3
2+
* Gijgo DatePicker v1.9.4
33
* http://gijgo.com/datepicker
44
*
55
* Copyright 2014, 2018 gijgo.com

dist/modular/js/datetimepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Gijgo DateTimePicker v1.9.3
2+
* Gijgo DateTimePicker v1.9.4
33
* http://gijgo.com/datetimepicker
44
*
55
* Copyright 2014, 2018 gijgo.com

dist/modular/js/dialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Gijgo Dialog v1.9.3
2+
* Gijgo Dialog v1.9.4
33
* http://gijgo.com/dialog
44
*
55
* Copyright 2014, 2018 gijgo.com

dist/modular/js/draggable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Gijgo Draggable v1.9.3
2+
* Gijgo Draggable v1.9.4
33
* http://gijgo.com/draggable
44
*
55
* Copyright 2014, 2018 gijgo.com

0 commit comments

Comments
 (0)