Handles the addition of new films and series via a form interface.
Manages dynamic form fields, collects and formats input data,
and generates JSON output for new media entries.
Methods
(inner) getInnerJsonString(obj) → {string}
Extracts and returns the inner content of a JSON object as a formatted string,
removing the outermost braces and adjusting indentation.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | The JSON object to process. |
Returns:
The formatted inner JSON string.
- Type
- string
(inner) syntaxHighlight(json) → {string}
Applies syntax highlighting to a JSON string for display in HTML.
Parameters:
Name | Type | Description |
---|---|---|
json |
Object | string | The JSON object or string to highlight. |
Returns:
The HTML string with syntax highlighting.
- Type
- string
(inner) updateFields() → {void}
Updates the visibility of form fields based on the selected media type.
Shows or hides film and series fields accordingly.
Returns:
- Type
- void