Open modal dialog
Permalink
I've been trying to edit items in a table through a modal dialog. What I'd like to achieve is that every row in a table has an "edit", and that clicking this button will open a new modal dialog where you can edit the row. Then you should have the option to cancel or save the operation.
I know how to do this using either plain JavaScript or jQuery UI, but I can't figure out what the correct way to achieve this is in concrete5. I haven't been able to find any documentation for this apart from a tutorial by Andrew Embler (http://andrewembler.com/posts/javascript-jquery-and-concrete5/), which doesn't work in the newest version of concrete5.
Does anyone know how to do this?
I know how to do this using either plain JavaScript or jQuery UI, but I can't figure out what the correct way to achieve this is in concrete5. I haven't been able to find any documentation for this apart from a tutorial by Andrew Embler (http://andrewembler.com/posts/javascript-jquery-and-concrete5/), which doesn't work in the newest version of concrete5.
Does anyone know how to do this?
To position the buttons correctly I use the following CSS code:
I basically just use the jQuery UI dialog class. But because concrete5 only applies the bootstrap styles to elements within an element with class "ccm-ui" I manually add that class to the dialog.
I hope this helps someone else who has the same problem.