From 99c419c315cd3230e198791f49118e465fa5f603 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 22 Feb 2018 11:03:31 -0800 Subject: [PATCH] disable click on restore during restore or for corrupted --- domain-server/resources/web/content/js/content.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/domain-server/resources/web/content/js/content.js b/domain-server/resources/web/content/js/content.js index fc6d2ca205..5d3124ead0 100644 --- a/domain-server/resources/web/content/js/content.js +++ b/domain-server/resources/web/content/js/content.js @@ -271,10 +271,15 @@ $(document).ready(function(){ } // handle click in table to restore a given content backup - $('body').on('click', '.' + BACKUP_RESTORE_LINK_CLASS, function(e){ + $('body').on('click', '.' + BACKUP_RESTORE_LINK_CLASS, function(e) { // stop the default behaviour e.preventDefault(); + // if this is a disabled link, don't proceed with the restore + if ($(this).parent().hasClass('disabled')) { + return false; + } + // grab the name of this backup so we can show it in alerts var backupName = $(this).closest('tr').attr('data-backup-name');