From 991b8f9ef2c62aa2f4c707c813ab666acfff5735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sun, 24 Feb 2019 22:14:54 +0100 Subject: [PATCH] Added button for searching in channel --- server/public/assets/css/style.css | 10 +++++++++- server/public/assets/js/listeners.js | 11 +++++++++++ server/public/partials/channel/tabs.handlebars | 5 +++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/server/public/assets/css/style.css b/server/public/assets/css/style.css index 5a8405c0..499519a1 100755 --- a/server/public/assets/css/style.css +++ b/server/public/assets/css/style.css @@ -372,6 +372,14 @@ li.disabled span { width: 215px; } +.playlist-search-button { + display: flex; + justify-content: center; + align-items: center; + color: white; + cursor: pointer; +} + .extra-button{ margin: 0 4px !important; padding: 0px !important; @@ -1152,7 +1160,7 @@ margin:-1px; position: absolute; background: #282828; z-index: 2; - width: calc(100% - 22px); + width: calc(100% - 18px); padding: 0 15px; top: 0; color: white; diff --git a/server/public/assets/js/listeners.js b/server/public/assets/js/listeners.js index 614bd68f..9cea3bbc 100755 --- a/server/public/assets/js/listeners.js +++ b/server/public/assets/js/listeners.js @@ -678,6 +678,17 @@ function addDynamicListeners() { document.getElementsByClassName("context-menu-root")[0].setAttribute("data-id", ""); }); + addListener("click", ".playlist-search-button", function(e) { + this.preventDefault(); + Helper.toggleClass("#find_div", "hide"); + document.getElementById("find_input").value = ""; + document.getElementById("find_input").blur(); + Helper.removeClass(".highlight", "highlight"); + found_array = []; + found_array_index = 0; + find_word = ""; + }); + addListener("click", ".delete-context-menu", function(e) { var that = e; if(that.classList.contains("context-menu-disabled")) { diff --git a/server/public/partials/channel/tabs.handlebars b/server/public/partials/channel/tabs.handlebars index d6cb64b1..87cd39b4 100644 --- a/server/public/partials/channel/tabs.handlebars +++ b/server/public/partials/channel/tabs.handlebars @@ -4,6 +4,11 @@
  • Playlist
  • Suggested
  • Chat
  • + +
  • + search +
  • +
    {{/unless}}