From 0ea614784997a1a9c41e9a352e0c57cae0befda1 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Sun, 5 Apr 2020 11:21:27 +0100 Subject: [PATCH] [bug] fix new bookmark modal help text disable state not changing --- package-lock.json | 2 +- package.json | 2 +- src/js/link.js | 28 ++++++++++++---------------- src/js/version.js | 2 +- src/manifest.json | 2 +- 5 files changed, 16 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index a127ff67..0a7e6a9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.5.2", + "version": "5.5.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 07b2339b..f8d4f3ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.5.2", + "version": "5.5.3", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "main": "index.js", "scripts": { diff --git a/src/js/link.js b/src/js/link.js index 3cf3b16c..3dc78d4b 100644 --- a/src/js/link.js +++ b/src/js/link.js @@ -1194,9 +1194,21 @@ var link = (function() { }, false); displayLetterRadio.addEventListener("change", function(event) { stagedLink.link.display = this.value; + displayLetterInput.removeAttribute("disabled"); + displayIconInput.setAttribute("disabled", ""); + helper.addClass(displayIconFormGroupText, "disabled"); + helper.addClass(displayIconHelperItem, "disabled"); + displayIconFormGroupClear.setAttribute("disabled", ""); + displayIconFormGroupText.tabIndex = -1; }, false); displayIconRadio.addEventListener("change", function(event) { stagedLink.link.display = this.value; + displayLetterInput.setAttribute("disabled", ""); + displayIconInput.removeAttribute("disabled"); + helper.removeClass(displayIconFormGroupText, "disabled"); + helper.removeClass(displayIconHelperItem, "disabled"); + displayIconFormGroupClear.removeAttribute("disabled"); + displayIconFormGroupText.tabIndex = 1; }, false); displayLetterInput.addEventListener("input", function(event) { stagedLink.link.letter = this.value; @@ -1242,22 +1254,6 @@ var link = (function() { }; displayIconInput.value = ""; }, false); - displayLetterRadio.addEventListener("change", function(event) { - displayLetterInput.removeAttribute("disabled"); - displayIconInput.setAttribute("disabled", ""); - helper.addClass(displayIconFormGroupText, "disabled"); - helper.addClass(displayIconHelper, "disabled"); - displayIconFormGroupClear.setAttribute("disabled", ""); - displayIconFormGroupText.tabIndex = -1; - }, false); - displayIconRadio.addEventListener("change", function(event) { - displayLetterInput.setAttribute("disabled", ""); - displayIconInput.removeAttribute("disabled"); - helper.removeClass(displayIconFormGroupText, "disabled"); - helper.removeClass(displayIconHelper, "disabled"); - displayIconFormGroupClear.removeAttribute("disabled"); - displayIconFormGroupText.tabIndex = 1; - }, false); autoSuggest.bind.input({ input: displayIconInput, type: "fontawesomeIcon", diff --git a/src/js/version.js b/src/js/version.js index 94ddab45..174313f6 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "5.5.2"; + var current = "5.5.3"; var name = "Zonked Tarsier"; diff --git a/src/manifest.json b/src/manifest.json index 5574f62c..0f1743a2 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "nightTab", "short_name": "nightTab", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", - "version": "5.5.2", + "version": "5.5.3", "manifest_version": 2, "chrome_url_overrides": { "newtab": "index.html"