Name change from "Save" button
When i change it in the Localizations, the rename is gone after an update. Thanks. :-)
Best Answers
-
Shane_White Cireson Support Super IT Monkey ✭✭✭✭✭Hi @Nico_Redepenning
Can you press Ctrl+F5 to do a hard refresh of the page and if it is still not loading can you open your Dev tools and see if there are any errors?
Thanks,
Shane.
5 -
Shane_White Cireson Support Super IT Monkey ✭✭✭✭✭
Hmm that's because the class is a different number on request offerings.. Unfortunately on the page they don't have nay specific attributes like an Id or databind to point to
You could change it to this:
$(document).ready(function () {
var mainPageNode = document.getElementById('main_wrapper');
var observer = new MutationObserver(function(mutations) {
var saveElement = document.getElementsByClassName('btn btn-link btn-lg')[0].getElementsByTagName('div')[0]
var saveElement2 = document.getElementsByClassName('btn btn-link btn-lg')[2].getElementsByTagName('div')[0]
if (saveElement.innerHTML == "Save") { //Check Save box exists
saveElement.innerHTML = 'New Text'
}
if (saveElement2.innerHTML == "Save") { //Check Save box exists
saveElement2.innerHTML = 'New Text'
}
observer.disconnect();
});
// configure the observer and start the instance.
var observerConfig = {attributes: true, childList: true, subtree: true, characterData: true };
observer.observe(mainPageNode, observerConfig);
});
Thanks,
Shane.
5
Answers
Try this Javascript out and let me know if this is what you are after!
Also, if you wanted to change the color of the tick box you could add this to your .css file:
.fa-check:before {
Thanks,
Shane.
i put it in the custom.js but the name is the same.
Can you press Ctrl+F5 to do a hard refresh of the page and if it is still not loading can you open your Dev tools and see if there are any errors?
Thanks,
Shane.
Made a quick edit to the above code as I only put 1 = instead of 2!
This means it shouldn't just randomly change things
Thanks,
Shane.
Can this also be used for Service Request?
Yes this is for all workitems!
Thanks,
Shane.
I mean when i open a Service Request. View Screenshot.
Hi @Nico_Redepenning
Hmm that's because the class is a different number on request offerings.. Unfortunately on the page they don't have nay specific attributes like an Id or databind to point to
You could change it to this:
$(document).ready(function () {
var mainPageNode = document.getElementById('main_wrapper');
var observer = new MutationObserver(function(mutations) {
var saveElement = document.getElementsByClassName('btn btn-link btn-lg')[0].getElementsByTagName('div')[0]
var saveElement2 = document.getElementsByClassName('btn btn-link btn-lg')[2].getElementsByTagName('div')[0]
if (saveElement.innerHTML == "Save") { //Check Save box exists
saveElement.innerHTML = 'New Text'
}
if (saveElement2.innerHTML == "Save") { //Check Save box exists
saveElement2.innerHTML = 'New Text'
}
observer.disconnect();
});
// configure the observer and start the instance.
var observerConfig = {attributes: true, childList: true, subtree: true, characterData: true };
observer.observe(mainPageNode, observerConfig);
});
Thanks,
Shane.
Hi @Nico_Redepenning
I just made an improvement to this customisation if you would like to try it out, less code and more efficient!
$(document).on('ajaxStop', function () {
var buttons = $('.btn.btn-link.btn-lg')
var buttonDivs = buttons.find("div")
buttonDivs.each(changeName);
function changeName() {
if (this.innerHTML == "Save") { //Check Save box exists
this.innerHTML = 'Save Ticket'
}
if (this.innerHTML == "Apply") {
this.innerHTML = "Apply Changes"
}
};
});
Let me know what you think!
Thanks,
Shane