forked from GitHub-Mirrors/foundry-sw5e
Finished and tested adding import button
This commit is contained in:
parent
435c9e295f
commit
c068ebff9a
2 changed files with 2 additions and 7 deletions
|
@ -1281,20 +1281,17 @@ export default class CharacterImporter {
|
|||
Actor.create(targetCharacter);
|
||||
}
|
||||
|
||||
static addImportButton(){
|
||||
console.log("Starting to add Import Character button...");
|
||||
static addImportButton(html){
|
||||
const header = $("#actors").find("header.directory-header");
|
||||
const search = $("#actors").children().find("div.header-search");
|
||||
const newImportButtonDiv = $("#actors").children().find("div.header-actions").clone();
|
||||
const newSearch = search.clone();
|
||||
|
||||
search.remove();
|
||||
newImportButtonDiv.attr('id', 'character-sheet-import');
|
||||
header.append(newImportButtonDiv);
|
||||
newImportButtonDiv.children("button").remove();
|
||||
newImportButtonDiv.append("<button class='create-entity'><i class='fas fa-upload'></i> Import Character</button>");
|
||||
newSearch.appendTo(header);
|
||||
console.log("Finished adding new button!");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue