Jump to content

"view" in admin template


thomas
 Share

Recommended Posts

Hello,

This is a tiny thing that's easily changed but I thought I'll post it here anyways:

I'm having a hard time explaining to the editors that clicking "view" in the backend while editing a page will pretty much delete all the changes made if you don't save the page first. It would be great if "view" opened the page in a new window or would save the changes first (while leaving unpublished).

Thanks,

thomas

Link to comment
Share on other sites

  • 4 months later...

I don't feel good about capturing this thread, but I wanted to ask for exactly the same:

Even with the great Form Save Reminder in place, it would be great to open all "View" links in the backend in new tabs/windows. Any ideas on how to archieve this the clean way?

Link to comment
Share on other sites

I personally wouldn't want my view link opening in new tabs/windows, but I can see why some would. I will plan to make it a configuration option on the ProcessPageEdit module.

As for how to explain the current behavior to a client, I'm not sure it needs explanation because it works the same as any other form on the web. If you are completing a form and you navigate elsewhere, your form is not still there waiting for you. So if you want to say anything, that's probably the best way to say it: it works the same as any other form you've ever used on the web... as in "don't click to a link until you've finished your form". :)

  • Like 3
Link to comment
Share on other sites

Thanks a lot for answering, Ryan!

I personally wouldn't want my view link opening in new tabs/windows, but I can see why some would.

This is exactly how I feel about it, but experience shows the average user doesn't get it. You're completely right about the fact that every form on the whole wide web works like this, it's still better to be prepared  ;)

I will plan to make it a configuration option on the ProcessPageEdit module.

That sounds just great!

Link to comment
Share on other sites

  • 1 year later...

hi had the same issue with a customer atm.

he WANTS this function so badly and does not want to use the middle mouse button or ctrl or the rightclick.
so i got a workaround for it.

i made a custom backend for them (which you probably need in some way)

so i added following code at the bottom of the default.php of the admin theme (which i copied and then edited by my needs)

$(document).ajaxComplete(function(){
	addtargetblank();
});

function addtargetblank(){
	$('li.PageListActionView a').each(function(){
		if($(this).attr('target') == undefined){
			$(this).attr('target','_blank');
		}
	});

	if($('#_ProcessPageEditView').attr('target') == undefined){
            $('#_ProcessPageEditView').attr('target','_blank');
        }
}

since PW does use jquery you can "hook" onto the ajaxComplete part (which is the part where you load all the page lists and kinda everything in PW).

then you call my super awesome addtargetblank function which writes to all pagelistactionviews and the (in edit mode) viewtab an target blank if its not defined.

hope that helped

p.S.: please keep in mind this is a very trashy workaround which is not recommended, but it works.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...