- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2016 02:23 PM
In UI15 the email icon in tickets was on the bar at the top of the window. Now I have to click on more More options button and then select Email. Is there any way to move the Email icon back on to the bar?
UI15
UI16
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 07:08 AM
Check this out.
UI16: Bring the email client icon back to the header
https://share.servicenow.com/app.do#/detailV2/c55ab020137712404e8cd4a76144b0f0/overview
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2016 08:54 AM
Hi Anthony,
Did you manage to find a solution for that? I was able to get this far:
Using this UI Script:
document.addEventListener("DOMContentLoaded", function(event) {
var essLink ="<span class='btn btn-icon icon-mail' onclick=;emailClientOpen(this,'incident')'/>";
document.querySelector("#section-bf1d96e3c0a801640190725e63f8ac80 > nav > span").innerHTML = essLink;
});
Its still not perfect, but I think I got the first step of getting this out of that list, into the form and now need the professionals (you) to help?
any thoughts about what can be done to make it work & aligned to the Attachment field?
Thank you,
Shay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 03:41 AM
I would take a step back and consider if it's work to have a UI Script for this. DOM manipulation isn't something that is recommended and will to 99% lead to be broken in new releases since they tend to change the way they ID or use Class etc.
Just a note.
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 01:25 AM
document.observe("dom:loaded", function() {
var emailButton = $('email_client_open');
if(emailButton != undefined){
var newEmailButton = emailButton.clone();
newEmailButton.innerHTML = '';
newEmailButton.src = 'images/icons/email.gifx';
newEmailButton.addClassName('btn');
newEmailButton.addClassName('btn-icon');
$('header_add_attachment').insert({before: newEmailButton});
}
});
Give this UI Script a shot (enable Globally)
This inserts the button as a button element BEFORE the Attachment button and attaches the correct event. It also sources the item itself from the submenu one so if the record shouldnt have the email client available, it will not add itself.
Tested in UI16 Helsinki P4
Let me know if it works for you
EDIT: Small Simplification to Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2016 09:09 AM
Hello,
I tested this and it works fine, but it leaves the old mail button in . . . so do you think that you could remove it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 07:11 AM
Hi,
Try this:
function onLoad() {
if (!!!g_scratchpad.isConcourse || g_form.isNewRecord())
return;
var navbarNode = document.getElementsByClassName('navbar-right')[0];
var emailNode = document.getElementById('email_client_open');
if (emailNode) {
// just a bit of optional styling:
emailNode.innerHTML = '';
emailNode.className += ' btn btn-icon';
navbarNode.insertBefore(emailNode, navbarNode.childNodes[0]);
}
}