Fixes issue #2274 - Datepicker in bulk action not usable in bulk action if ticket list is longer the one page.

This commit is contained in:
Mantas Masalskis 2019-11-20 15:53:24 +01:00 committed by Martin Edenhofer
parent 265d60a65f
commit 149a086aab
3 changed files with 15 additions and 6 deletions

View file

@ -37,6 +37,8 @@ class App.UiElement.basedate
rtl: App.i18n.dir() is 'rtl'
container: item
language: 'custom'
orientation: attribute.orientation
disableScroll: attribute.disableScroll
)
@setNewTimeInitial(item, attribute)

View file

@ -1357,6 +1357,10 @@ class BulkForm extends App.Controller
localAttribute.null = true
@configure_attributes_ticket.push localAttribute
time_attribute = _.findWhere(@configure_attributes_ticket, {'name': 'pending_time'})
time_attribute.orientation = 'top'
time_attribute.disableScroll = true
@holder = @options.holder
@visible = false

View file

@ -28,6 +28,7 @@
- added rerender method to show correct today if task is longer open the 24 hours
- scroll into view
- fix vertical auto position
- disableScroll flag to
*/
(function(factory){
@ -767,13 +768,15 @@
});
}
// adjust scroll of scrollParent
var scrollParent = this.picker.scrollParent();
var bottomEdge = offset.top + height + this.picker.outerHeight();
var scrollBottomEdge = scrollParent.scrollTop() + scrollParent.height();
if(!this.o.disableScroll) {
// adjust scroll of scrollParent
var scrollParent = this.picker.scrollParent();
var bottomEdge = offset.top + height + this.picker.outerHeight();
var scrollBottomEdge = scrollParent.scrollTop() + scrollParent.height();
if(bottomEdge > scrollBottomEdge){
scrollParent.scrollTop(scrollParent.scrollTop() + (bottomEdge - scrollBottomEdge) + 10);
if(bottomEdge > scrollBottomEdge){
scrollParent.scrollTop(scrollParent.scrollTop() + (bottomEdge - scrollBottomEdge) + 10);
}
}
return this;