Hiding Home Title
I just tried to hide the Home Title using two ways. The first is to add a new class within the custom.js and to set the color of the new class to white in the custom.css. It does not work, nothing happens. Must I do something with html code? Both proposed solutions I found in the internet are mentioned here:
1.
$(document).ready(function (formObj) { /*Hide “Home” page title */ functionhideHomeTitle() { $(“.page_bar .page_title:contains(“ + localization.Home +“)“).hide(); } /*Execute the hide home title after 1 second */setTimeout(hideHomeTitle, 1000); // … // Any more of your custom code for non-workitem pages (like the Home page) // … });
2.
$(“.page_bar .page_title:contains(“ + localization.Home +“)“).addClass(“HomeTitle“);
Regards
Margret
Best Answers
-
Morten_Meisler Premier Partner Advanced IT Monkey ✭✭✭I have a working example in my blogpost here:
http://blog.coretech.dk/mme/customization-tips-to-the-cireson-portal/
Edit: OK just realized the code was from that post Ok, but just tried it out and it works fine, but I had to do a ctrl-F5 for a hard refresh before I could see the result. Dunno if something has changed in the newer versions, I don't recall I had to do that5 -
Morten_Meisler Premier Partner Advanced IT Monkey ✭✭✭If you mean that users can see the title goes a way after a short while, then yes it's because of the timeout delay that unfortunately is nessecary at the moment for the Home page, same goes if you make a new class etc.
You can always experiment with reducing the delay, to say 300ms. Would be nice if we had an ready event like the work items forms - I should make a feature request of this (can't seem to find one already)5 -
Morten_Meisler Premier Partner Advanced IT Monkey ✭✭✭Ok, try using this method instead:
//******************************************************** // Hide Home Title //******************************************************** $(document).ready(function () { var hideMenuCount = 0; var hideMenu = setInterval(function hideHomeTitle() { if ($(".page_bar .page_title:contains(" + localization.Home + ")").length > 0 || hideMenuCount > 100) { $(".page_bar .page_title:contains(" + localization.Home + ")").hide(); clearInterval(hideMenu); } //fail safe hideMenuCount++; }, 50) });
I am using an interval instead of timeout to check if the home title exists every 50 ms and then stops when it does.5
Answers
http://blog.coretech.dk/mme/customization-tips-to-the-cireson-portal/
Edit: OK just realized the code was from that post Ok, but just tried it out and it works fine, but I had to do a ctrl-F5 for a hard refresh before I could see the result. Dunno if something has changed in the newer versions, I don't recall I had to do that
Hello,
I tried the code from your post link. It works, thanks. Don´t know why it did not work last week.....
I also made ctrl-F5 last week. Maybe there is something wrong with our test Server. Sometimes I have to reboot the Server to see changes in SCSM Windows Console...
I am searching for a solution where I do not see the effect on Homepage. (seing home title disappearing)
So I tried the new class method but it still does not work.
You can always experiment with reducing the delay, to say 300ms. Would be nice if we had an ready event like the work items forms - I should make a feature request of this (can't seem to find one already)
Exactly. I tried to reduce the dely but it did not work. I did not know that creating a new class will have the same effect. A Feature request is a good idea an I did not find one also yet. Thank you very much for your help.
I am using an interval instead of timeout to check if the home title exists every 50 ms and then stops when it does.