{:uriI"·file:///Users/stock/workspace/sail/app/assets/javascripts/settings.js.erb?type=application/javascript&pipeline=self&id=286159f7d02972508824f48d4b9879503ef7839796e8ea456f4e09499f3d6ed3:ET:load_pathI"7/Users/stock/workspace/sail/app/assets/javascripts;T: filenameI"G/Users/stock/workspace/sail/app/assets/javascripts/settings.js.erb;T: nameI" settings;T:logical_pathI"settings.self.js;T:content_typeI"application/javascript;T: sourceI"h "use strict"; /* Search related functions */ let submitTimer, submitInterval, intervals = 1; let queryElement = document.getElementById("query"); let autoSearchEnabled = "true"; let progress = document.getElementById("search-submit-progress"); let sortMenu = document.getElementById("sort-menu"); let orderButton = document.getElementById("btn-order"); let profilesMenu = document.getElementById("profiles-modal"); let profilesButton = document.getElementById("btn-profiles"); function submitSearch() { document.getElementById("search-form").submit(); } function advanceProgress() { progress.value = intervals; intervals += 1; } function clearTimer() { clearTimeout(submitTimer); clearTimeout(submitInterval); intervals = 1; } function afterTypingQuery() { progress.style.display = "inline-block"; clearTimer(); submitTimer = setTimeout(submitSearch, 2000); submitInterval = setInterval(advanceProgress, 20); } function toggleSortMenu() { if (sortMenu.style.display === "none") { sortMenu.style.display = "block"; } else { sortMenu.style.display = "none"; } } function toggleProfilesMenu() { if (profilesMenu.style.display === "none") { // document.body.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; document.body.style.filter = "alpha(opacity=60)"; profilesMenu.style.display = "block"; } else { profilesMenu.style.display = "none"; } } function handleGenericClick(event) { let target = event.target; if (target === sortMenu || sortMenu.contains(target) || target === orderButton || orderButton.contains(target) || target === profilesMenu || profilesMenu.contains(target) || target === profilesButton || profilesButton.contains(target)) { return; } sortMenu.style.display = "none"; profilesMenu.style.display = "none"; } if (autoSearchEnabled === "true") { queryElement.addEventListener("keyup", afterTypingQuery); queryElement.addEventListener("keydown", clearTimer); } orderButton.addEventListener("click", toggleSortMenu); profilesButton.addEventListener("click", toggleProfilesMenu); document.body.addEventListener("click", handleGenericClick); /* Refresh related functions */ let refreshButtons = document.getElementsByClassName("refresh-button"); function refreshClick() { let button = this; if (!button.className.includes("active")) { button.classList.add("active"); setTimeout(function() { button.classList.remove("active"); }, 500); } } for(var i = 0; i < refreshButtons.length; i++) refreshButtons[i].addEventListener("click", refreshClick); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"gprocessors:type=application/javascript&file_type=application/javascript&engines=.erb&pipeline=self;TTI"Ufile-digest:///Users/stock/workspace/sail/app/assets/javascripts/settings.js.erb;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%J†]BEú×ñI¾ï ˆ>-<Ë%Ý:ݽžDÆfß·üû: lengthih :dependencies_digest"%2¨cßT®"J8Ô'Þ ›í*òöº–Ž›¤~¸ô‚ I:idI"E286159f7d02972508824f48d4b9879503ef7839796e8ea456f4e09499f3d6ed3;F: mtimel+×Zc\