fix row hiding and paste events for badging

This commit is contained in:
Stephen Birarda 2018-02-16 14:09:14 -08:00
parent 1c053730eb
commit 679513599c
2 changed files with 4 additions and 4 deletions

View file

@ -145,7 +145,7 @@ $(document).ready(function(){
// populate the backups tables with the backups
function createBackupTableRow(backup) {
return "<tr data-backup-id='" + backup.id + "' data-backup-name='" + backup.name + "'>"
+ "<td data-value='" + backup.name.toLowerCase() + "'>" + backup.name + "</td><td data-dateformat='lll'>"
+ "<td data-value='" + backup.name.toLowerCase() + "'>" + backup.name + "</td><td data-value='" + backup.createdAtMillis + "'>"
+ moment(backup.createdAtMillis).format('lll')
+ "</td><td class='backup-status'></td><td class='" + ACTION_MENU_CLASS + "'>"
+ "<div class='dropdown'><div class='dropdown-toggle' data-toggle='dropdown' aria-expanded='false'><span class='glyphicon glyphicon-option-vertical'></span></div>"
@ -211,7 +211,7 @@ $(document).ready(function(){
// at this point, any rows that no longer have the ACTIVE_BACKUP_ROW_CLASS
// are deleted backups, so we remove them from the table
$('tbody tr:not(.' + ACTIVE_BACKUP_ROW_CLASS + ')').remove();
$('#' + CONTENT_ARCHIVES_NORMAL_ID + ' tbody tr:not(.' + ACTIVE_BACKUP_ROW_CLASS + ')').remove();
// check if the restore action on all rows should be enabled or disabled
$('.' + BACKUP_RESTORE_LINK_CLASS).parent().toggleClass('disabled', data.status.isRecovering);

View file

@ -263,7 +263,7 @@ $(document).ready(function(){
}
});
$('#' + Settings.FORM_ID).on('change keyup paste', '.' + Settings.TRIGGER_CHANGE_CLASS , function(e){
$('#' + Settings.FORM_ID).on('input propertychange', '.' + Settings.TRIGGER_CHANGE_CLASS , function(e){
// this input was changed, add the changed data attribute to it
$(this).attr('data-changed', true);
@ -838,7 +838,7 @@ function addTableRow(row) {
var keyInput = row.children(".key").children("input");
// whenever the keyInput changes, re-badge for differences
keyInput.on('change keyup paste', function(e){
keyInput.on('input propertychange', function(e){
// update siblings in the row to have the correct name
var currentKey = $(this).val();