forked from GNUsocial/gnu-social
Make the effects for adding/removing invites less jerky
This commit is contained in:
parent
f44e0330df
commit
125141a0c6
@ -24,8 +24,9 @@ SN_WHITELIST.resetRow = function(row) {
|
|||||||
SN_WHITELIST.addRow = function() {
|
SN_WHITELIST.addRow = function() {
|
||||||
var row = $(this).closest("li");
|
var row = $(this).closest("li");
|
||||||
var newRow = row.clone();
|
var newRow = row.clone();
|
||||||
|
$(row).find('a.add_row').hide();
|
||||||
SN_WHITELIST.resetRow(newRow);
|
SN_WHITELIST.resetRow(newRow);
|
||||||
$(newRow).insertAfter(row).show("blind", "slow", function() {
|
$(newRow).insertAfter(row).show("blind", "fast", function() {
|
||||||
SN_WHITELIST.updateButtons();
|
SN_WHITELIST.updateButtons();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -37,7 +38,7 @@ SN_WHITELIST.removeRow = function() {
|
|||||||
buttons : {
|
buttons : {
|
||||||
"Confirm" : function() {
|
"Confirm" : function() {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
$(that).closest("li").hide("blind", "slow", function() {
|
$(that).closest("li").hide("blind", "fast", function() {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
SN_WHITELIST.updateButtons();
|
SN_WHITELIST.updateButtons();
|
||||||
});
|
});
|
||||||
@ -51,7 +52,7 @@ SN_WHITELIST.removeRow = function() {
|
|||||||
if ($(this).closest('li').find(':input[name^=username]').val()) {
|
if ($(this).closest('li').find(':input[name^=username]').val()) {
|
||||||
$("#confirm-dialog").dialog("open");
|
$("#confirm-dialog").dialog("open");
|
||||||
} else {
|
} else {
|
||||||
$(that).closest("li").hide("blind", "slow", function() {
|
$(that).closest("li").hide("blind", "fast", function() {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
SN_WHITELIST.updateButtons();
|
SN_WHITELIST.updateButtons();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user