-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for Roll20 JSON and give a meaningful error Import into Folders Duplicate Checking Configuration Options
- Loading branch information
Showing
12 changed files
with
202 additions
and
61 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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,10 +1,56 @@ | ||
<form> | ||
<label for="masterPlanInput">{{localize "TOOLS4E.import-json-screen.label"}}</label> | ||
<textarea type="text" id="masterPlanInput" name="masterPlanInput" data-dtype="String" onclick="this.select();" rows="10" cols="80" placeholder="{{localize "TOOLS4E.import-json-screen.placeholder"}}"></textarea> | ||
<button type="submit"><i class="fas fa-plus"></i>{{localize "TOOLS4E.import-json-screen.import-button"}}</button> | ||
<textarea type="text" id="masterPlanInput" name="masterPlanInput" data-dtype="String" onclick="this.select();" rows="10" cols="80" | ||
placeholder="{{localize "TOOLS4E.import-json-screen.placeholder"}}"></textarea> | ||
<div> | ||
<input type="checkbox" id="create-in-encounter-folders" name="create-in-encounter-folders" onchange="handleImportInFoldersChange(this);"> | ||
<label for="create-in-encounter-folders">{{localize "TOOLS4E.import-json-screen.create-in-encounter-folders"}}</label> | ||
</div> | ||
<div> | ||
<input type="radio" id="no-duplicate-checking" name="handle-duplicates" checked value="no-duplicate-checking"> | ||
<label for="do-not-import-duplicates">{{localize "TOOLS4E.import-json-screen.no-duplicate-checking"}}</label> | ||
</div> | ||
<div> | ||
<input type="radio" id="do-not-import-duplicates" name="handle-duplicates" value="do-not-import-duplicates"> | ||
<label for="do-not-import-duplicates">{{localize "TOOLS4E.import-json-screen.do-not-import-duplicates"}}</label> | ||
</div> | ||
<div> | ||
<input type="radio" id="do-not-import-duplicates-in-folder" name="handle-duplicates" value="do-not-import-duplicates-in-folder"> | ||
<label for="do-not-import-duplicates-in-folder">{{localize "TOOLS4E.import-json-screen.do-not-import-duplicates-in-folder"}}</label> | ||
</div> | ||
<input type="hidden" id="create-in-encounter-folders-default" value="{{create-in-encounter-folders}}"/> | ||
<input type="hidden" id="do-not-import-duplicates-default" value="{{do-not-import-duplicates}}"/> | ||
<input type="hidden" id="do-not-import-duplicates-in-folder-default" value="{{do-not-import-duplicates-in-folder}}"/> | ||
<button type="submit"><i class="fas fa-plus"></i>{{localize "TOOLS4E.import-json-screen.import-button"}}</button> | ||
</form> | ||
|
||
<script> | ||
document.getElementById('masterPlanInput').focus(); | ||
document.getElementById('masterPlanInput').select(); | ||
if (truthy(document.getElementById('create-in-encounter-folders-default').value)) { | ||
document.getElementById('create-in-encounter-folders').setAttribute("checked", "true") | ||
} | ||
else { | ||
document.getElementById('do-not-import-duplicates-in-folder').setAttribute("disabled", "true") | ||
} | ||
if (truthy(document.getElementById('do-not-import-duplicates-default').value)) { | ||
document.getElementById('do-not-import-duplicates').setAttribute("checked", "true") | ||
} | ||
if (truthy((document.getElementById('do-not-import-duplicates-in-folder-default').value)) && (truthy(document.getElementById('create-in-encounter-folders-default').value))) { | ||
document.getElementById('do-not-import-duplicates-in-folder').setAttribute("checked", "true") | ||
} | ||
function handleImportInFoldersChange(cb) { | ||
if (cb.checked) { | ||
document.getElementById('do-not-import-duplicates-in-folder').removeAttribute("disabled") | ||
} | ||
else { | ||
document.getElementById('do-not-import-duplicates-in-folder').setAttribute("disabled", "true") | ||
} | ||
} | ||
function truthy(val) { | ||
return val && val == "true" | ||
} | ||
</script> |