Add WaitPanel to onclick/Action.Javascript
I'm using the tmfBookmarkOrganizer in my SSRM implementation to swap out and style the Folder Rename mechanism. I have the following EventHander in my TMF:
<EventHandler DhtmlEvent="onclick">
<Action Type="Javascript" ID="actSaveRename" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRenameFolder();ShowElement(null, 'ppRenameFolder', 'Hide');" Validate="True" />
</EventHandler>
The first js action uses the built-in rdRenameFolder code and the second hides the styled Popup Panel I'm using for the Rename. However, this process takes a second or so before refreshing the Bookmark Organizer so it looks to the user like nothing has happened. How can I add a Wait Panel to this process?
I have the same issue with an EventHandler/styled Popup for the Rename Bookmark mechanism in the goShared > sharedTitleWithRename >>> PopupOption using a Popup Panel with an EventHandler:
<EventHandler DhtmlEvent="onclick">
<Action Type="Javascript" ID="actSaveRename" Javascript="rdEditBookmark('actionEditBookmark','@Request.rdReport~','@Session.goBookmarkCollection~','@Session.goBookmarkID~','@Session.goBookmarkCaption~','Name: ','','');
document.getElementById("lblBookmarkCaption").childNodes[0].nodeValue = document.getElementById("txtEditBookmarkDescription").value;" Validate="True" />
</EventHandler>
Same issue - How do I inject a Wait Panel into the process?
-
I received an answer back from Logi Support on this (a few days ago, sorry for the delay). Basically, to add a Wait Panel to my Action.Javascript, I need to build an Action.Refresh with a Wait Panel that does what I need done (not available for Action.ShowElement) and then copy that into my Action.Javascript call.
Here are the details of Logi's response:
Thank you for submitting this case to Logi Support.
You can't add a wait panel element to an Action.Javascript element. To add the wait panel, you would have to come up with your own version of the JavaScript function based on the current version and add a call to a wait panel. This may not be terrible as the script ultimately calls the Logi javascript function that performs the Action.RefreshElement Logi Ajax refresh; this function does support a wait panel.
The syntax to include the Wait Panel is best identified by building an Action.Refresh Element that mimics the content you would like to include and then copy its content from the resulting HTML page.
The following scab rdAjaxRequestWithFormVars should provide an idea of how the Wait Panel object is included/determined:
rdAjaxRequestWithFormVars('rdAjaxCommand=RefreshElement&rdRefreshElementID=divDataTable&rdReport=Sample','true','',true,null,null,[' Please Wait...','rdThemeWaitPanel','rdThemeWaitCaption']);0
Please sign in to leave a comment.
Comments
1 comment