Jump to content

Remove items with CSS


igeoorge
Go to solution Solved by Happy2Play,

Recommended Posts

  • Solution
Happy2Play

Not that I have found do to the way they exist by index id in header.  Since the index id is different in each section you would be removing Trailers for Movies would remove Upcoming in TV

body > div.skinHeader.focuscontainer-x.skinHeader-withBackground.headroom > div > div.headerMiddle.sectionTabs > div > div > button:nth-child(3) = TV Upcoming tab

body > div.skinHeader.focuscontainer-x.skinHeader-withBackground.headroom > div > div.headerMiddle.sectionTabs > div > div > button:nth-child(3) = Movies Trailers tab

So my google foo css skills does not see a way for it to be done.

 

Same discussion here.

https://emby.media/community/index.php?/topic/75931-remove-menu-buttons

  • Like 1
Link to comment
Share on other sites

Happy2Play

I would make backups of the files but you would have to edit the \system\dashboard-ui\movies\movies.js and \system\dashboard-ui\tv\tv.js to remove the tabs you do not want.

 

example for removing Trailers tab from Movies.

define(["tabbedView","require","globalize","userSettings","emby-itemscontainer","emby-tabs","emby-button","emby-scroller"],function(TabbedView,require,globalize,userSettings){"use strict";function MovieView(view,params){TabbedView.call(this,view,params)}return Object.assign(MovieView.prototype,TabbedView.prototype),MovieView.prototype.getTabs=function(){return[{name:globalize.translate("Movies")},{name:globalize.translate("Suggestions")},{name:globalize.translate("Trailers")},{name:globalize.translate("Collections")},{name:globalize.translate("Favorites")},{name:globalize.translate("Genres")},{name:globalize.translate("Folders")}]},MovieView.prototype.getDefaultTabIndex=function(folderId){switch(userSettings.get("landing-"+folderId)){case"suggestions":return 1;case"favorites":return 4;case"collections":return 3;case"genres":return 5;case"folders":return 6;default:return 0}},MovieView.prototype.getTabController=function(index){if(null==index)throw new Error("index cannot be null");var depends=[];switch(index){case 0:depends.push("./moviestab");break;case 1:depends.push("./suggestions");break;case 2:depends.push("./trailers");break;case 3:depends.push("./collections");break;case 4:depends.push("./moviestab");break;case 5:depends.push("./genres");break;case 6:depends.push("foldersTab")}var instance=this;return function(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}(depends).then(function(controllerFactory){var controller=instance.tabControllers[index];controller||(controller=new controllerFactory(instance.view.querySelector(".tabContent[data-index="+index+"]"),instance.params),4===index&&(controller.mode="favorites"),instance.tabControllers[index]=controller);return controller})},MovieView});

But requires change with every server update.

Edited by Happy2Play
  • Like 2
Link to comment
Share on other sites

igeoorge

I would make backups of the files but you would have to edit the \system\dashboard-ui\movies\movies.js and \system\dashboard-ui\tv\tv.js to remove the tabs you do not want.

 

example for removing Trailers tab from Movies.

 

But requires change with every server update.

 

 

 
I had not seen this comment.
 
Thanks, I'm already trying!
Link to comment
Share on other sites

Happy2Play

Still messing around but removing the tab messes up the tabs behind them.  So you shouldn't have a issue with TV as you want to remove the last three, but Movies will create a issue with Favorites and Genres.

Link to comment
Share on other sites

igeoorge
 
You're right.
 
In movies, I had a little headache.
 
But I got it, it was like this:

 

define(["tabbedView","require","globalize","userSettings","emby-itemscontainer","emby-tabs","emby-button","emby-scroller"],function(TabbedView,require,globalize,userSettings){"use strict";function MovieView(view,params){TabbedView.call(this,view,params)}return Object.assign(MovieView.prototype,TabbedView.prototype),MovieView.prototype.getTabs=function(){return[{name:globalize.translate("Movies")},{name:globalize.translate("Suggestions")},{name:globalize.translate("Favorites")},{name:globalize.translate("Genres")}]},MovieView.prototype.getDefaultTabIndex=function(folderId){switch(userSettings.get("landing-"+folderId)){case"suggestions":return 1;case"favorites":return 2;case"genres":return 3;case"collections":return 5;case"folders":return 6;default:return 0}},MovieView.prototype.getTabController=function(index){if(null==index)throw new Error("index cannot be null");var depends=[];switch(index){case 0:depends.push("./moviestab");break;case 1:depends.push("./suggestions");break;case 2:depends.push("./moviestab");break;case 3:depends.push("./genres");break;case 4:depends.push("./moviestab");break;case 5:depends.push("./genres");break;case 6:depends.push("foldersTab")}var instance=this;return function(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}(depends).then(function(controllerFactory){var controller=instance.tabControllers[index];controller||(controller=new controllerFactory(instance.view.querySelector(".tabContent[data-index="+index+"]"),instance.params),2===index&&(controller.mode="favorites"),instance.tabControllers[index]=controller);return controller})},MovieView});

Edited by igeoorge
Link to comment
Share on other sites

  • 3 weeks later...
Happy2Play

 

5dab1c30d755b_Semttulo.png

 

This inside the red square i can't remove

 

 

Something like this.

#moviesPage [data-index="3"] div.flex.align-items-center.focuscontainer-x.itemsViewSettingsContainer.padded-bottom {display: none; } 

But the issue is Favorites=Trailer html section and Genre=Collection html section, do to the html page for the original index numbers.  Reordering in the js would require the same html div reordering in the page html.

Edited by Happy2Play
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...