on 04-14-2016 3:27 PM
Hi,
How can I change the standard behavior of the Home button, in the upper left corner?
I want to add some logic that prevents going to the home screen (launch pad) if there are unsaved changes.
I worked out this solution:
$( "#homeBtn" ).click(function( event ) {
if (window.UNSAVEDCHANGES){
event.preventDefault();
}else{
return true;
}
});
but... as you can tell, this is not a very clean solution.
So I was wondering if SAP provides a solution to do this...
Kind regards,
Robbe Wuyts
Robbe,
I have not tried it. But how about handling in router change event? I think upon clicking Home, route changes to "#'.
Other thought is about view's onExit method. But not sure if exit can be aborted there say by returning 'false'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.