From a32f210188fea97279f7b34d35868a140322c10e Mon Sep 17 00:00:00 2001 From: thomasmars Date: Thu, 23 Feb 2017 14:22:56 +0100 Subject: [PATCH] Fixed enable hub button state after confirming dialog HFP-502 --- js/settings/h5p-disable-hub.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/settings/h5p-disable-hub.js b/js/settings/h5p-disable-hub.js index 7864695..406e8b2 100644 --- a/js/settings/h5p-disable-hub.js +++ b/js/settings/h5p-disable-hub.js @@ -51,17 +51,17 @@ }).appendTo($(H5PDisableHubData.overlaySelector).get(0)); confirmationDialog.on('confirmed', function () { - disableButton.get(0).checked = false; + enableButton.get(0).checked = true; }); confirmationDialog.on('canceled', function () { - disableButton.get(0).checked = true; + enableButton.get(0).checked = false; }); - var disableButton = $(H5PDisableHubData.selector); - disableButton.change(function () { + var enableButton = $(H5PDisableHubData.selector); + enableButton.change(function () { if ($(this).is(':checked')) { - confirmationDialog.show(disableButton.offset().top); + confirmationDialog.show(enableButton.offset().top); } }); });