Skip to content

Commit

Permalink
Remove unneeded files
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Nov 6, 2024
1 parent ba7400f commit f4f567a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 62 deletions.

This file was deleted.

1 change: 0 additions & 1 deletion eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ module.exports = [
CodeMirror: "readonly",
ComboBox: "readonly",
COMBOBOX_VERSION: "writeable",
createSearchBox: "readonly",
crumb: "readonly",
dialog: "readonly",
ensureVisible: "readonly",
Expand Down
55 changes: 0 additions & 55 deletions war/src/main/webapp/scripts/hudson-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -2259,61 +2259,6 @@ function ensureVisible(e) {
}
}

// set up logic behind the search box
// eslint-disable-next-line no-unused-vars
function createSearchBox(searchURL) {
var ds = new YAHOO.util.XHRDataSource(searchURL + "suggest");
ds.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
ds.responseSchema = {
resultsList: "suggestions",
fields: ["name"],
};
var ac = new YAHOO.widget.AutoComplete(
"search-box",
"search-box-completion",
ds,
);
ac.typeAhead = false;
ac.autoHighlight = false;
ac.formatResult = ac.formatEscapedResult;
ac.maxResultsDisplayed = 25;

var box = document.getElementById("search-box");
var sizer = document.getElementById("search-box-sizer");
var comp = document.getElementById("search-box-completion");

Behaviour.addLoadEvent(function () {
// copy font style of box to sizer
var ds = sizer.style;
ds.fontFamily = getStyle(box, "fontFamily");
ds.fontSize = getStyle(box, "fontSize");
ds.fontStyle = getStyle(box, "fontStyle");
ds.fontWeight = getStyle(box, "fontWeight");
});

// update positions and sizes of the components relevant to search
function updatePos() {
sizer.innerHTML = escapeHTML(box.value);
var cssWidth,
offsetWidth = sizer.offsetWidth;
if (offsetWidth > 0) {
cssWidth = offsetWidth + "px";
} else {
// sizer hidden on small screen, make sure resizing looks OK
cssWidth = getStyle(sizer, "minWidth");
}
box.style.width = comp.firstElementChild.style.minWidth =
"calc(60px + " + cssWidth + ")";

var pos = YAHOO.util.Dom.getXY(box);
pos[1] += YAHOO.util.Dom.get(box).offsetHeight + 2;
YAHOO.util.Dom.setXY(comp, pos);
}

updatePos();
box.addEventListener("input", updatePos);
}

/**
* Finds the DOM node of the given DOM node that acts as a parent in the form submission.
*
Expand Down

0 comments on commit f4f567a

Please sign in to comment.