In the previous parts I told you how you could enable the reorder functionality and create a custom reorder action in the ribbon. In this blog post I will cover how you could open the reorder page in a SharePoint dialog window.
Everywhere in SharePoint you got dialog windows. So it would be much cleaner to modify the custom action to also use a dialog box.
The final result looks like this:
So what does this function need?
The option properties you will be using in this example are: url and dialogReturnValueCallback.
For the url property you could use the Navigate to URL value from the previous post.
With the dialogReturnValueCallback property you can create a callback function that executes after a completed form submission.
We are going to use this property to create a callback function that automatically refreshes the page when the form submission was ok. You could use the following function.
The whole block looks like this:
Change Custom Action
The only thing that remains is to update your custom action that you created in Part 2.
- Open the custom action;
- Click OK. Now you should have a custom action that opens a dialog box to the reorder page.