MCPcopy
hub / github.com/Mottie/Keyboard / toolbarModuleFilter

Function toolbarModuleFilter

testing/qunit-2.9.2.js:4907–5057  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4905 }
4906
4907 function toolbarModuleFilter() {
4908 var commit,
4909 reset,
4910 moduleFilter = document.createElement("form"),
4911 label = document.createElement("label"),
4912 moduleSearch = document.createElement("input"),
4913 dropDown = document.createElement("div"),
4914 actions = document.createElement("span"),
4915 applyButton = document.createElement("button"),
4916 resetButton = document.createElement("button"),
4917 allModulesLabel = document.createElement("label"),
4918 allCheckbox = document.createElement("input"),
4919 dropDownList = document.createElement("ul"),
4920 dirty = false;
4921
4922 moduleSearch.id = "qunit-modulefilter-search";
4923 moduleSearch.autocomplete = "off";
4924 addEvent(moduleSearch, "input", searchInput);
4925 addEvent(moduleSearch, "input", searchFocus);
4926 addEvent(moduleSearch, "focus", searchFocus);
4927 addEvent(moduleSearch, "click", searchFocus);
4928
4929 label.id = "qunit-modulefilter-search-container";
4930 label.innerHTML = "Module: ";
4931 label.appendChild(moduleSearch);
4932
4933 applyButton.textContent = "Apply";
4934 applyButton.style.display = "none";
4935
4936 resetButton.textContent = "Reset";
4937 resetButton.type = "reset";
4938 resetButton.style.display = "none";
4939
4940 allCheckbox.type = "checkbox";
4941 allCheckbox.checked = config.moduleId.length === 0;
4942
4943 allModulesLabel.className = "clickable";
4944 if (config.moduleId.length) {
4945 allModulesLabel.className = "checked";
4946 }
4947 allModulesLabel.appendChild(allCheckbox);
4948 allModulesLabel.appendChild(document.createTextNode("All modules"));
4949
4950 actions.id = "qunit-modulefilter-actions";
4951 actions.appendChild(applyButton);
4952 actions.appendChild(resetButton);
4953 actions.appendChild(allModulesLabel);
4954 commit = actions.firstChild;
4955 reset = commit.nextSibling;
4956 addEvent(commit, "click", applyUrlParams);
4957
4958 dropDownList.id = "qunit-modulefilter-dropdown-list";
4959 dropDownList.innerHTML = moduleListHtml();
4960
4961 dropDown.id = "qunit-modulefilter-dropdown";
4962 dropDown.style.display = "none";
4963 dropDown.appendChild(actions);
4964 dropDown.appendChild(dropDownList);

Callers 1

appendToolbarFunction · 0.85

Calls 3

addEventFunction · 0.85
moduleListHtmlFunction · 0.85
selectionChangeFunction · 0.85

Tested by

no test coverage detected