Add files via upload

pre-0.4.4
Felix 2019-12-29 18:03:01 +01:00 committed by GitHub
parent 840804c332
commit ec7c72e747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 11 deletions

View File

@ -275,7 +275,6 @@ class SpellBrowser extends Application {
let setting = ev.target.dataset.setting; let setting = ev.target.dataset.setting;
let value = ev.target.checked; let value = ev.target.checked;
if (setting === 'spell-compendium-setting') { if (setting === 'spell-compendium-setting') {
console.log('changing spells');
let key = ev.target.dataset.key; let key = ev.target.dataset.key;
this.settings.loadedSpellCompendium[key].load = value; this.settings.loadedSpellCompendium[key].load = value;
this.loadSpells().then((spells) => { this.loadSpells().then((spells) => {
@ -284,7 +283,6 @@ class SpellBrowser extends Application {
}); });
ui.notifications.info("Settings Saved. Spell Compendiums are being reloaded."); ui.notifications.info("Settings Saved. Spell Compendiums are being reloaded.");
} else if (setting === 'npc-compendium-setting') { } else if (setting === 'npc-compendium-setting') {
console.log('changing npcs');
let key = ev.target.dataset.key; let key = ev.target.dataset.key;
this.settings.loadedNpcCompendium[key].load = value; this.settings.loadedNpcCompendium[key].load = value;
this.loadNpcs().then((npcs) => { this.loadNpcs().then((npcs) => {
@ -429,10 +427,6 @@ class SpellBrowser extends Application {
let operator = $(ev.target).parents('.filter').find('select').val(); let operator = $(ev.target).parents('.filter').find('select').val();
let value = $(ev.target).parents('.filter').find('input').val(); let value = $(ev.target).parents('.filter').find('input').val();
console.log(operator, value);
console.log(value === '');
console.log(operator === 'null');
let filterTarget = `${itemType}Filters`; let filterTarget = `${itemType}Filters`;
if (value === '' || operator === 'null') { if (value === '' || operator === 'null') {
@ -466,7 +460,6 @@ class SpellBrowser extends Application {
list.sort((a, b) => { list.sort((a, b) => {
let aName = $(a).find('.spell-name a')[0].innerHTML; let aName = $(a).find('.spell-name a')[0].innerHTML;
let bName = $(b).find('.spell-name a')[0].innerHTML; let bName = $(b).find('.spell-name a')[0].innerHTML;
//console.log(`${aName} vs ${bName}`);
if (aName < bName) return -1; if (aName < bName) return -1;
if (aName > bName) return 1; if (aName > bName) return 1;
return 0; return 0;
@ -475,7 +468,6 @@ class SpellBrowser extends Application {
list.sort((a, b) => { list.sort((a, b) => {
let aVal = $(a).find('input[name=level]').val(); let aVal = $(a).find('input[name=level]').val();
let bVal = $(b).find('input[name=level]').val(); let bVal = $(b).find('input[name=level]').val();
console.log(aVal, bVal);
if (aVal < bVal) return -1; if (aVal < bVal) return -1;
if (aVal > bVal) return 1; if (aVal > bVal) return 1;
if (aVal == bVal) { if (aVal == bVal) {
@ -547,8 +539,6 @@ class SpellBrowser extends Application {
for (let filterKey in filters) { for (let filterKey in filters) {
let filter = filters[filterKey]; let filter = filters[filterKey];
let prop = getProperty(subject, filter.path); let prop = getProperty(subject, filter.path);
console.log(filter);
console.log(prop);
if (filter.type === 'numberCompare') { if (filter.type === 'numberCompare') {
switch (filter.operator) { switch (filter.operator) {
@ -577,7 +567,6 @@ class SpellBrowser extends Application {
if (filter.value && prop.indexOf(filter.value) === -1) { if (filter.value && prop.indexOf(filter.value) === -1) {
return false; return false;
} else { } else {
console.log(prop, filter.values);
for (let val of filter.values) { for (let val of filter.values) {
if (prop.indexOf(val) !== -1) { if (prop.indexOf(val) !== -1) {
continue; continue;