Right now, when you choose to edit a node, it opens a new window, you edit the node, and then you return to the "View Node" page.

I would LOVE IT if there was a ?destination= the previous node tacked onto the end.

Is that something easily added? I went poking around inside jquery.contextmenu.js and outline_designer.module and nothing obvious jumped out at me. I don't think I would even know how to pass the variable. I'm not a code guy! I just want to not open up a bunch of windows when I select "edit" from the contextual menu.

Ideas?

Comments

btopro’s picture

previous node tacked on? You mean the destination back to the outline designer? I'm not sure what you mean, clicking view/edit should open in a new window.

Typically the way we work with this module is that you build the outline in Outline Designer, then go through the normal site pages structure to edit the pages themselves. The only way to optimize the workflow for a 1-stop-shop would be to use the CTools modal module to pop up view / edit in a modal. I'll accept patches for this functionality but have no capacity to add it myself at the moment.

pbeakley’s picture

Right. Right now it opens a new window and then keeps you there. I want to update the app so that there's no new window, and the redirect on submit is back to the originating page (i.e. admin/content/book/nodeID).

My feature request is to make that setting something you can pick, a radio button or whatever: open a new window or return to the outline designer. That's it!

Unfortunately I'm totally not a programmer. I'm gonna go poking under the hood again to see if I can find the line, add a current node variable (should already be in there, I'd think!), and rewrite the edit link that the contextual menu produces.

btopro’s picture

it's a valid request, may take some time to engineer and free up time to accomplish. I'd personally rather it pop up in a ctools modal window so you can stay on task in the outline designer. There is a possibility that I will be paying for some contrib commits to this project to get it to where I'd like it which would include:

  • IE10 support / testing of other browsers
  • more consistent drag drop
  • modal / the setting you mention here
  • accessibility scrub / validation
  • code clean up to better position for D8
  • better jwerty / system documentation via joyride tour

All very long term though at the moment, many people here are JUST starting to look at moving to D7 (ya,.. i know) and are looking at this module again so we'll see.

pbeakley’s picture

I know! I'm just now rolling out D7 sites consistently.

I would absolutely throw (a little) money at helping to pay for someone's time. I think everything on your roadmap is solid. (+ options to customize various button behaviors of course. :-) )

BTW I did figure out how to customize outline_designer_book.js to do what I wanted. Line 177, edited:

window.open(Drupal.settings.basePath + '?q=node/' + Drupal.settings.outline_designer.activeNid + '/edit&destination=' + 'admin/content/book/' + Drupal.settings.outline_designer.rootNid,'_self');

I feel like a monkey randomly pushing buttons on a typewriter, but I eventually get there. :-)

btopro’s picture

Issue summary: View changes
Status: Active » Patch (to be ported)

wow, why did I overlook this request / suggested improvement. This is a much better workflow then it functioned previously. Nice one!

btopro’s picture

Status: Patch (to be ported) » Fixed
pbeakley’s picture

Holy cow, my first authored patch! :-)

Glad it worked out. Hope it's useful to someone else.

btopro’s picture

credit where credit is due; sorry I took so long to add it in!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.