diff --git a/src/styles/requests.scss b/src/styles/requests.scss index e4b03b3f6987543a2bc3d6048a13cc6a80c0a1fe..5658c7a530b46aa566abdcd1776dc5ceec8bb5d6 100644 --- a/src/styles/requests.scss +++ b/src/styles/requests.scss @@ -66,9 +66,9 @@ text-align: left; position: relative; padding-left: 15px; + cursor: pointer; &:after { display: inline; - display: none; float: right; content: '\f35d'; font-size: 20px; diff --git a/src/views-terrytories.js b/src/views-terrytories.js index eb6192791b7f3080d66331c5ff9f180bf85e79a1..344eb02bcb15c3edefebae71d29a07d6865f85f0 100644 --- a/src/views-terrytories.js +++ b/src/views-terrytories.js @@ -1244,43 +1244,18 @@ import("./utils.js").then((utils) => { e.target.classList.toggle("open") ; e.target.nextElementSibling.classList.toggle("hidden") ; }); - /*utils.live('click', '.table-requests th:first-child', function(e){ + utils.live('click', '.table-requests th:first-child', function(e){ e.target.classList.toggle("asc") ; - let table = utils.findAncestor (e.target, 'table-requests') - console.log(table.getAttribute('sorted-by')) ; + let table = utils.findAncestor (e.target, 'table-requests'); let formFilterId = table.getAttribute('sorted-by') ; let selectFilter = document.querySelector('#'+formFilterId+' select[name="order"]') ; - console.log(selectFilter) ; if (selectFilter.value == 'asc') { selectFilter.value = 'desc' ; } else { selectFilter.value = 'asc' ; - let selectOption = document.querySelector('#'+formFilterId+' select[name="order"] option[value="asc"]') ; - console.log(selectOption) ; - selectOption.dispatchEvent(new Event('click')); } - - if(document.createEvent){ - let event = document.createEvent("HTMLEvents"); - event.initEvent("click", true, true); - event.eventName = "click"; - selectFilter.dispatchEvent(event); - } else { - let event = document.createEventObject(); - event.eventName = "click"; - event.eventType = "click"; - selectFilter.fireEvent("on" + event.eventType, event); - } - - selectFilter.closest("form").dispatchEvent(new Event('selectionchange')); - console.log(selectFilter.closest("form")) ; - var EVENTS = ["selectionchange", "mousedown", "mouseup", "click", "change"]; - EVENTS.forEach(function(eventName) { - selectFilter.dispatchEvent(new Event(eventName, { 'bubbles': true })); - }) ; - - - });*/ + selectFilter.closest("solid-form-search")._component.change(); + }); return render; }