Run javascript after the Episerer edit mode page tree is fully loaded

Vote:
 

In a multi language site not all pages are available in all languages. If I change edit language to english, the pages that are only available in norwegian be shown in a gray font with the language code to the right.

I would like to display the name of the language instead of the language code. One site has a lot of (strange looking) language codes, and the editors do not recognize all. The substitution could be done with jquery (although changing the markup would be better, of course).

But, how do I registere the javascript for execution after the page tree is fully loaded? Can it be done?

$('span.epi-extraIcon:contains("no")').text("norsk");
$('span.epi-extraIcon:contains("en-GB")').text("engelsk");
#192045
Edited, May 04, 2018 8:21
Vote:
 

Not sure which js event might be suitable but maybe you can solve that just using CSS and a contains selector on the title attribute.

Something like: [title~="norsk"] { .. } and then some CSS content work.

https://css-tricks.com/css-content/

https://devblog.gosso.se/2017/04/override-css-in-episerver-editor-mode/

#192071
May 04, 2018 23:45
Vote:
 

Thank you very much!

I did as you suggested, and posted the final solution here:
http://gulla.net/customizing-episerver-pagetree/

#192088
Edited, May 06, 2018 22:22
Vote:
 

Great! Thanks for sharing the whole thing!

#192112
May 07, 2018 21:39
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.