Project

General

Profile

Patch #11021 ยป ensure-that-calendar-is-visible.patch

Oleg Kandaurov, 2012-05-24 20:39

View differences:

public/javascripts/calendar/calendar-setup.js (working copy)
193 193
			cal.showAtElement(params.button || params.displayArea || params.inputField);
194 194
		else
195 195
			cal.showAt(params.position[0], params.position[1]);
196

  
197
        var elementOffsets = $(cal.element).cumulativeOffset();
198
        new Effect.Parallel(
199
        [
200
            new Effect.Tween(null, document.viewport.getScrollOffsets().top, elementOffsets[1], {sync: true},
201
                function(p){ scrollTo(document.viewport.getScrollOffsets().left, p.round());}),
202
            new Effect.Tween(null, document.viewport.getScrollOffsets().left, elementOffsets[0], {sync: true},
203
                function(p){ scrollTo(p.round(), document.viewport.getScrollOffsets().top);})
204
        ],
205
        {duration: 1}
206
        );
207

  
196 208
		return false;
197 209
	};
198 210

  
    (1-1/1)