Use effective box title height when unfolding the folder search box
This commit is contained in:
parent
f212dea78c
commit
8845dc032d
4 changed files with 12 additions and 8 deletions
|
@ -262,14 +262,15 @@ $(document).ready(function(e){
|
|||
|
||||
// animation to unfold list search box
|
||||
$('#calendars .boxtitle a.search').click(function(e){
|
||||
var box = $('#calendars .listsearchbox'),
|
||||
var title = $('#calendars .boxtitle'),
|
||||
box = $('#calendars .listsearchbox'),
|
||||
dir = box.is(':visible') ? -1 : 1;
|
||||
|
||||
box.slideToggle({
|
||||
duration: 160,
|
||||
progress: function(animation, progress) {
|
||||
if (dir < 0) progress = 1 - progress;
|
||||
$('#calendars .scroller').css('top', (34 + 34 * progress) + 'px');
|
||||
$('#calendars .scroller').css('top', (title.outerHeight() + 34 * progress) + 'px');
|
||||
},
|
||||
complete: function() {
|
||||
box.toggleClass('expanded');
|
||||
|
|
|
@ -107,14 +107,15 @@ if (window.rcmail) {
|
|||
rcmail.gettext('findaddressbooks', 'kolab_addressbook') + '</a>')
|
||||
.appendTo('#directorylistbox h2.boxtitle')
|
||||
.click(function(e){
|
||||
var box = $('#directorylistbox .listsearchbox'),
|
||||
var title = $('#directorylistbox .boxtitle'),
|
||||
box = $('#directorylistbox .listsearchbox'),
|
||||
dir = box.is(':visible') ? -1 : 1;
|
||||
|
||||
box.slideToggle({
|
||||
duration: 160,
|
||||
progress: function(animation, progress) {
|
||||
if (dir < 0) progress = 1 - progress;
|
||||
$('#directorylistbox .scroller').css('top', (34 + 34 * progress) + 'px');
|
||||
$('#directorylistbox .scroller').css('top', (title.outerHeight() + 34 * progress) + 'px');
|
||||
},
|
||||
complete: function() {
|
||||
box.toggleClass('expanded');
|
||||
|
|
|
@ -166,14 +166,15 @@ $(document).ready(function(e){
|
|||
|
||||
// animation to unfold list search box
|
||||
$('#notebooksbox .boxtitle a.search').click(function(e){
|
||||
var box = $('#notebooksbox .listsearchbox'),
|
||||
var title = $('#notebooksbox .boxtitle'),
|
||||
box = $('#notebooksbox .listsearchbox'),
|
||||
dir = box.is(':visible') ? -1 : 1;
|
||||
|
||||
box.slideToggle({
|
||||
duration: 160,
|
||||
progress: function(animation, progress) {
|
||||
if (dir < 0) progress = 1 - progress;
|
||||
$('#notebooksbox .scroller').css('top', (34 + 34 * progress) + 'px');
|
||||
$('#notebooksbox .scroller').css('top', (title.outerHeight() + 34 * progress) + 'px');
|
||||
},
|
||||
complete: function() {
|
||||
box.toggleClass('expanded');
|
||||
|
|
|
@ -201,14 +201,15 @@ $(document).ready(function(e){
|
|||
|
||||
// animation to unfold list search box
|
||||
$('#tasklistsbox .boxtitle a.search').click(function(e){
|
||||
var box = $('#tasklistsbox .listsearchbox'),
|
||||
var title = $('#tasklistsbox .boxtitle'),
|
||||
box = $('#tasklistsbox .listsearchbox'),
|
||||
dir = box.is(':visible') ? -1 : 1;
|
||||
|
||||
box.slideToggle({
|
||||
duration: 160,
|
||||
progress: function(animation, progress) {
|
||||
if (dir < 0) progress = 1 - progress;
|
||||
$('#tasklistsbox .scroller').css('top', (34 + 34 * progress) + 'px');
|
||||
$('#tasklistsbox .scroller').css('top', (title.outerHeight() + 34 * progress) + 'px');
|
||||
},
|
||||
complete: function() {
|
||||
box.toggleClass('expanded');
|
||||
|
|
Loading…
Add table
Reference in a new issue