Sunday, July 1, 2012

Portal Customization - New Task Alert

When a task is assigned to a user, the task gets routed to the particular user's Inbox.
The user might not look into his/her inbox everytime to check whether a task has been assigned to him/her or not.
To alert the user when a task is assigned to him/her (or) a task is routed to his/her inbox,  New Task Alert mechanism is used.

New Task Alert Mechanism:
  •  An alert will be prompted to the user to showcase that a new task has been routed to his/her inbox.
  •  This mechanism is mainly used to help the user avoid keep on checking his/her inbox.
  •  Alert gets displayed in the current page where the user is looking at.
Note: Alert gets prompted to the user only when the inbox is open.

This Calls NewTaskAlerts.jsp from footer.jsp to prompt the alert.

Code snippet from footer.jsp:


var popup_window = window.open("/portal/Custom/ jsp / NewTaskAlerts.jsp" , "ConfirmInbox" , "titlebar=no, top=100 , width=500 , height=150,left=200");
setInterval('webNewTaskAlert()', 1200000); //Alert popsup every 20 minutes



Code Snippet from NewTaskAlerts.jsp:


Location  : [Teamworks Directory]\process-server\applications\portal.war\Custom\jsp

<DIV id=ConfirmInboxDialog title="New Tasks">You have new tasks. Do you want to go to the Inbox?</DIV>
<BUTTON  class=ui-dialog-buttonpane ID=YES VALUE=Yes onclick="navigateToInbox()"> Yes </BUTTON>
<BUTTON class=ui-dialog-buttonpane ID=NO VALUE=No onclick="self.close();"> No </BUTTON>

function navigateToInbox()
{
window.opener.location='/portal/jsp/getSavedSearch.do?startsWith=0&search=<%=iSearchId%>';
window.opener.focus();
self.close();
}
 

An alert prompts with the message "You have new tasks. Do you want to go to the Inbox?".
Click "Yes" which directs the user to Inbox, click "No" to stay in the current page.


Note: This is tested in Teamworks 6.2, for other versions files should be placed accordingly at correspond places.



No comments:

Post a Comment