-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add message edit functionality (#13)
* add html for edit form * update id naming convention to put form type first * create and wire in edit-handler.js * move redundant methods to webhook-handler.js * convert ConditionalInput to class to separate instances previously instances were pointing to same object and interfering with each other * disable jscpd for HTML files opened #15 to come back to this in the future
- Loading branch information
1 parent
2d15264
commit 10dbe91
Showing
8 changed files
with
302 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"absolute": true, | ||
"ignore": [ | ||
"**/__snapshots__/**", | ||
"**/*.html" | ||
], | ||
"reporters": [ | ||
"consoleFull" | ||
], | ||
"threshold": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,34 @@ | ||
import * as JsCheck from "./modules/js-check.js"; | ||
import { SendHandler } from "./modules/send-handler.js"; | ||
import * as ConditionalInput from "./modules/conditional-input.js"; | ||
import { GetHandler } from "./modules/get-handler.js"; | ||
import { EditHandler } from "./modules/edit-handler.js"; | ||
import { ConditionalInput } from "./modules/conditional-input.js"; | ||
|
||
JsCheck.setJsAvailable(); | ||
|
||
// set up send form | ||
const sendForm = document.getElementById("form-send"); | ||
const sendOutput = document.getElementById("output-send"); | ||
const sendForm = document.getElementById("send-form"); | ||
const sendOutput = document.getElementById("send-output"); | ||
|
||
const sendHandler = new SendHandler(sendForm, sendOutput); | ||
const sendConditional = new ConditionalInput(sendForm); | ||
|
||
sendHandler.register(); | ||
ConditionalInput.initialize(sendForm); | ||
sendConditional.register(); | ||
|
||
// set up get form | ||
const getForm = document.getElementById("form-get"); | ||
const getOutput = document.getElementById("output-get"); | ||
const getForm = document.getElementById("get-form"); | ||
const getOutput = document.getElementById("get-output"); | ||
const getHandler = new GetHandler(getForm, getOutput); | ||
|
||
getHandler.register(); | ||
|
||
// set up edit form | ||
const editForm = document.getElementById("edit-form"); | ||
const editOutput = document.getElementById("edit-output"); | ||
|
||
const editHandler = new EditHandler(editForm, editOutput); | ||
const editConditional = new ConditionalInput(editForm); | ||
|
||
editHandler.register(); | ||
editConditional.register(); |
Oops, something went wrong.