EitanBlumin / CRUDE-ASP

Low Code Application Generator in Classic ASP, with MSSQL Database, Bootstrap, Fontawesome, and jQuery. Based on the AdminLTE web template.
https://git.eitanblumin.com/CRUDE-ASP/
Mozilla Public License 2.0
24 stars 13 forks source link

Implement Custom Actions #7

Open EitanBlumin opened 6 years ago

EitanBlumin commented 6 years ago

After Action Links management is implemented in the admin section, we'll need to implement their usage in dataview.asp

Generic Framework:

Action Types:

Action Properties:

EitanBlumin commented 5 years ago

Split to separate issues: #90 , #91 , #92 , #93 , #94 , #95

EitanBlumin commented 5 years ago

This type of script may give a good direction for dynamically creating and destroying modals:

https://deepasp.wordpress.com/2015/10/18/dynamically-creating-and-showing-bootstrap-modal/

Basically, the modal could be created using regular strings or jQuery, and then it's appended as a child to the body element. After that, event listeners are attached and possibly other extensions (tooltip and summer note?).

When the modal is closed, it's removed from the body element entirely using removeChild method.

If this works well in practice, we could use this methodology for all other modals as well.

I should start with a simple standalone POC of creating a modal with a form, form elements and buttons, turn the form into an Ajax form, and attach event listeners. See how it works.

EitanBlumin commented 5 years ago

The POC is completed successfully, with all data manipulation modals converted to dynamic modals.

Next step is to prepare wrapper functions in JavaScript for custom action buttons.

EitanBlumin commented 5 years ago

Simple http and JavaScript actions are working well without parameters. Now need to implement modal for parameters functionality.

EitanBlumin commented 5 years ago

Added issue tasks for new action type: API Call: #126 , #127

This new action type will work similarly to HTTP link action type, except that instead of opening the URL in the browser window, it will perform a REST request and display the output in a modal.

We may need to be able to support multiple REST methods (GET, POST, PUT, PATCH, DELETE). Not sure how would distinguish between the different methods... Adding another field for actions called "method" might seem too much hassle for just a single action type. Perhaps create separate action type for each method?