From c31399262b27fdef16572831a2fed753221a5740 Mon Sep 17 00:00:00 2001 From: Etheryte Date: Fri, 20 Oct 2023 17:56:30 +0200 Subject: [PATCH] Remove unused code --- .../common/fragments/schedule-options.jspf | 1 - web/html/javascript/schedule-options.js | 34 ------------------- 2 files changed, 35 deletions(-) delete mode 100644 web/html/javascript/schedule-options.js diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/schedule-options.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/schedule-options.jspf index a0d4a5e8af07..7c47d06c3718 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/schedule-options.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/schedule-options.jspf @@ -3,7 +3,6 @@ <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> <%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %> -
diff --git a/web/html/javascript/schedule-options.js b/web/html/javascript/schedule-options.js deleted file mode 100644 index c22ddf2137cf..000000000000 --- a/web/html/javascript/schedule-options.js +++ /dev/null @@ -1,34 +0,0 @@ -jQuery(function() { - // load existing action chain data - var combobox = jQuery("#action-chain"); - var actionChains = combobox.data("existing-action-chains"); - - // init widget - combobox.select2({ - width: "20em", - data: actionChains, - createSearchChoice: ifNotFound, - maximumInputLength: 256, - initSelection: function (element, callback) { callback(actionChains[0]); } - }); - - // init initial selection - combobox.select2("val", actionChains[0].id); - - // select radio button when combobox has focus - combobox.on("select2-focus", function(event) { - jQuery("#schedule-by-action-chain").prop("checked", true); - }); - - // returns a new search choice if term is new - function ifNotFound(term, data) { - var matchingChoices = jQuery(data).filter(function() { - return this.text.localeCompare(term) == 0; - }); - - if (matchingChoices.length == 0) { - var sanitizedTerm = term.replace(/[',]/g, ""); - return {id: sanitizedTerm, text: sanitizedTerm}; - } - } -});