In Pinegrow we use partials for editing dialog boxes.
Take a look at Open as partial… dialog box:
Instead of hard coding the layout of the dialog in the code, we have a special HTML file where this and similar dialogs are defined. This makes it super easy to edit them with Pinegrow:
With the help of Save partial action we than export each dialog to its HTML partial file (the file contains just the HTML code of the dialog). For example, we export the Open as partial dialog into open-partial.html file:
Then in the code that creates the dialog we just use a simple function that loads the partial through Ajax call and use the returned HTML to construct the dialog box:
And that’s it!
Of course, you would need to define your own function for loading the partial into your app. It can be a simple Ajax get call.
The post Using partials for Pinegrow UI dialogs appeared first on Pinegrow Web Editor - Documentation and Tutorials.