You are here: Foswiki>Tasks Web>Item868 (28 Jan 2011, CrawfordCurrie)Edit Attach

Item868: Refresh action in parent window after action edit close

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: ActionTrackerPlugin
Branches:
Reported By: JanCarstenJ
Waiting For:
Last Change By: CrawfordCurrie
When a topic editor decides that ActionTracker tasks are opened in a pop-up window after click on "Edit", there may be a desire to have the window closed again after pressing "Save", and at the same time having the parent window to refresh.

I haven't done any work on plugins, so I cannot provide the source code for the solution, but have seen that the issue has surfaced once in a while.

I have this idea: When "Save" is pressed I expect that the form-data are sent to the server (POST)..... Isn't it possible to render the "refreshed" topic (In the pop-up) after the "reload" so the pop-up is closed and the parent is refreshed ?

I am thinking of using the information in the "history" of a browser. I.e. check if there is a previous item in the browser-history.

An example: A user clicks "Edit" and a pop-up window opens with the action. At this time the "Browser.History" object contains no data. The "back" option in the browser is grayed out.

When a user then clicks "Save", the original topic opens/renders and the "Browser.History" object contains at least one data. The "back" option in the browser is NOT grayed out and the user has an option to select the previously loaded page. My idea is that in case a topic is opened in a pop-up AND the Browser.History object contains data the "parent" window is asked to refresh "document.parent.refresh" (My javascript skills are very rusty) AND the pop-up window is instructed to close.

Perhaps there also is a need to add a parameter to the URL of the refreshed page, and then check on that parameter(Together with the check on the History object) so we don't get problems if a user decides to open a topic in a new window (In that case the History object will also contain "no data").

Inspiration can also be found from http://lists.evolt.org/archive/Week-of-Mon-20010115/023182.html

I hope this can trigger other ideas and finally a solution.

Best regards JC
I'm afraid you haven't suggested anything I hadn't already tried. However I'm going to leave this live, because there is a solution using Javascript, just not this one.

-- CrawfordCurrie - 22 Apr 2009

Reworded the headline to reflect the report (was "Separate ActionTracker Edit window close on Save")

-- CrawfordCurrie - 28 Jan 2011

ItemTemplate edit

Summary Refresh action in parent window after action edit close
ReportedBy JanCarstenJ
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component ActionTrackerPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins ActionTrackerPlugin:5869561574f9
ReleasedIn n/a
Topic revision: r6 - 28 Jan 2011, CrawfordCurrie - This page was cached on 17 Sep 2021 - 14:13.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy