mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 00:06:05 -07:00
Redo change #1848
This commit is contained in:
parent
7a765bade8
commit
3a404f0cc0
1 changed files with 4 additions and 4 deletions
|
@ -53,7 +53,7 @@ export class TvSearchComponent implements OnInit {
|
||||||
}
|
}
|
||||||
public openClosestTab(el: any) {
|
public openClosestTab(el: any) {
|
||||||
el.preventDefault();
|
el.preventDefault();
|
||||||
const rowclass = "undefined";
|
const rowclass = "undefined ng-star-inserted";
|
||||||
el = el.toElement || el.relatedTarget || el.target;
|
el = el.toElement || el.relatedTarget || el.target;
|
||||||
while (el.className !== rowclass) {
|
while (el.className !== rowclass) {
|
||||||
// Increment the loop to the parent node until we find the row we need
|
// Increment the loop to the parent node until we find the row we need
|
||||||
|
@ -63,12 +63,12 @@ export class TvSearchComponent implements OnInit {
|
||||||
// the class you specified
|
// the class you specified
|
||||||
|
|
||||||
// Then we loop through the children to find the caret which we want to click
|
// Then we loop through the children to find the caret which we want to click
|
||||||
const caretright = "ui-treetable-toggler fa fa-fw ui-clickable fa-caret-right";
|
const caretright = "fa-caret-right";
|
||||||
const caretdown = "ui-treetable-toggler fa fa-fw ui-clickable fa-caret-down";
|
const caretdown = "fa-caret-down";
|
||||||
for (const value of el.children) {
|
for (const value of el.children) {
|
||||||
// the caret from the ui has 2 class selectors depending on if expanded or not
|
// the caret from the ui has 2 class selectors depending on if expanded or not
|
||||||
// we search for both since we want to still toggle the clicking
|
// we search for both since we want to still toggle the clicking
|
||||||
if (value.className === caretright || value.className === caretdown) {
|
if (value.className.includes(caretright) || value.className.includes(caretdown)) {
|
||||||
// Then we tell JS to click the element even though we hid it from the UI
|
// Then we tell JS to click the element even though we hid it from the UI
|
||||||
value.click();
|
value.click();
|
||||||
//Break from loop since we no longer need to continue looking
|
//Break from loop since we no longer need to continue looking
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue