mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
css: improve popup opening animation
This commit is contained in:
parent
a5d461f25f
commit
2dc4cfdfe1
10 changed files with 74 additions and 46 deletions
|
@ -81,11 +81,13 @@
|
|||
_tpl_title: '<h3 class="gritter-title">[[title]]</h3>',
|
||||
_tpl_item: [
|
||||
'<div id="gritter-item-[[number]]" class="popup gritter-item [[item_class]]">',
|
||||
'<div class="gritter-content">',
|
||||
'[[title]]',
|
||||
'<p>[[text]]</p>',
|
||||
'<div class="popup-content">',
|
||||
'<div class="gritter-content">',
|
||||
'[[title]]',
|
||||
'<p>[[text]]</p>',
|
||||
'</div>',
|
||||
'<div class="gritter-close"><i class="buttonicon buttonicon-cancel"></i></div>',
|
||||
'</div>',
|
||||
'<div class="gritter-close"><i class="buttonicon buttonicon-cancel"></i></div>',
|
||||
'</div>'].join(''),
|
||||
|
||||
|
||||
|
@ -162,7 +164,7 @@
|
|||
|
||||
var item = $('#gritter-item-' + this._item_count);
|
||||
|
||||
item.fadeIn(this.fade_in_speed, function(){
|
||||
item.addClass('popup-show').fadeIn(this.fade_in_speed, function(){
|
||||
Gritter['_after_open_' + number]($(this));
|
||||
});
|
||||
|
||||
|
@ -244,7 +246,7 @@
|
|||
e.animate({ height: 0 }, 300, function(){
|
||||
Gritter._countRemoveWrapper(unique_id, e, manual_close);
|
||||
})
|
||||
})
|
||||
}).removeClass('popup-show')
|
||||
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -231,8 +231,7 @@ var padeditbar = (function()
|
|||
if(module.css('display') != "none")
|
||||
{
|
||||
$("li[data-key=" + thisModuleName + "] > a").removeClass("selected");
|
||||
module.slideUp("fast", cb);
|
||||
returned = true;
|
||||
module.removeClass("popup-show");
|
||||
}
|
||||
}
|
||||
if(!returned && cb) return cb();
|
||||
|
@ -246,15 +245,16 @@ var padeditbar = (function()
|
|||
var thisModuleName = self.dropdowns[i];
|
||||
var module = $("#" + thisModuleName);
|
||||
|
||||
if(module.css('display') != "none")
|
||||
if(module.hasClass('popup-show'))
|
||||
{
|
||||
$("li[data-key=" + thisModuleName + "] > a").removeClass("selected");
|
||||
module.slideUp("fast");
|
||||
module.removeClass("popup-show");
|
||||
}
|
||||
else if(thisModuleName==moduleName)
|
||||
{
|
||||
$("li[data-key=" + thisModuleName + "] > a").addClass("selected");
|
||||
module.slideDown("fast", cb);
|
||||
module.addClass("popup-show")
|
||||
cb();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -785,7 +785,7 @@ function closeColorPicker(accept)
|
|||
}
|
||||
|
||||
colorPickerOpen = false;
|
||||
$("#mycolorpicker").fadeOut("fast");
|
||||
$("#mycolorpicker").removeClass('popup-show');
|
||||
}
|
||||
|
||||
function showColorPicker()
|
||||
|
@ -823,7 +823,7 @@ function showColorPicker()
|
|||
colorPickerSetup = true;
|
||||
}
|
||||
|
||||
$("#mycolorpicker").fadeIn();
|
||||
$("#mycolorpicker").addClass('popup-show')
|
||||
colorPickerOpen = true;
|
||||
|
||||
$("#colorpickerswatches li").removeClass('picked');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue