Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Custom Actions #7

Open
1 of 15 tasks
EitanBlumin opened this issue Jul 26, 2018 · 5 comments
Open
1 of 15 tasks

Implement Custom Actions #7

EitanBlumin opened this issue Jul 26, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request Feature: Custom actions Issue related to dataview custom actions implementation priority High priority tasks and issues

Comments

@EitanBlumin
Copy link
Owner

EitanBlumin commented Jul 26, 2018

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

Generic Framework:

  • Actions and Action Parameters JavaScript object collections (i.e. "dt_Actions"), each action object would have action parameters collection same structures as "dt_Columns" collection.
  • Action Parameters Modal
  • Action Parameters Modal Rendering Function
  • Action Parameters Modal Re-Fill Function
  • Action Execution Wrapper Functions (for DataTable button: one for inline and one for toolbar)

Action Types:

  • HTTP Link
  • DB Procedure
  • DB Ad-Hoc Command
  • JavaScript Function
  • HTTP REST API Request

Action Properties:

  • Is Per Row
  • Require Confirmation
  • Open (HTTP Link) in New Window
  • Send (Selected) DataTable Row(s) as Parameter (XML/JSON?)
  • REST Method (GET / POST / PUT / PATCH / DELETE)
@EitanBlumin EitanBlumin added the enhancement New feature or request label Jul 26, 2018
@EitanBlumin EitanBlumin self-assigned this Jul 26, 2018
@EitanBlumin EitanBlumin added this to the Action Links milestone Jul 26, 2018
@EitanBlumin EitanBlumin reopened this Aug 26, 2018
@EitanBlumin EitanBlumin added the priority High priority tasks and issues label Mar 18, 2019
@EitanBlumin
Copy link
Owner Author

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

@EitanBlumin EitanBlumin modified the milestones: DataView Action Links, Alpha release phase 1 Mar 26, 2019
@EitanBlumin
Copy link
Owner Author

EitanBlumin commented Mar 28, 2019

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 EitanBlumin pinned this issue Mar 29, 2019
@EitanBlumin
Copy link
Owner Author

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
Copy link
Owner Author

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

@EitanBlumin
Copy link
Owner Author

EitanBlumin commented May 12, 2019

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?

@EitanBlumin EitanBlumin added the Feature: Custom actions Issue related to dataview custom actions implementation label May 14, 2019
@EitanBlumin EitanBlumin changed the title Implement Action Links Implement Custom Actions May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature: Custom actions Issue related to dataview custom actions implementation priority High priority tasks and issues
Projects
None yet
Development

No branches or pull requests

1 participant