From 4e4e51ab1947a95ffef090c9080a07fdbac0e023 Mon Sep 17 00:00:00 2001 From: Chris B Date: Tue, 29 Mar 2016 09:40:11 -0400 Subject: [PATCH] fix all spells --- Pathfinder-Neceros/pathfinder-neceros.css | 12 ++++++--- Pathfinder-Neceros/pathfinder-neceros.html | 31 +++++++++++----------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/Pathfinder-Neceros/pathfinder-neceros.css b/Pathfinder-Neceros/pathfinder-neceros.css index fef8265938..98ae70060e 100644 --- a/Pathfinder-Neceros/pathfinder-neceros.css +++ b/Pathfinder-Neceros/pathfinder-neceros.css @@ -466,15 +466,21 @@ input.sheet-spells_level-tab7:checked ~ .sheet-spells .sheet-section-level-7:che input.sheet-spells_level-tab8:checked ~ .sheet-spells .sheet-section-level-8:checked ~ .sheet-sect, input.sheet-spells_level-tab9:checked ~ .sheet-spells .sheet-section-level-9:checked ~ .sheet-sect, input.sheet-spells_level-tab99:checked ~ .sheet-spells .sheet-sect, -input.sheet-spellclass-tab0:checked ~ div.sheet-section.sheet-section-spellclass-0, -input.sheet-spellclass-tab1:checked ~ div.sheet-section.sheet-section-spellclass-1, -input.sheet-spellclass-tab2:checked ~ div.sheet-section.sheet-section-spellclass-2 { +input.sheet-spellclass-tab0:checked ~ div.sheet-section-spellclass-0, +input.sheet-spellclass-tab1:checked ~ div.sheet-section-spellclass-1, +input.sheet-spellclass-tab2:checked ~ div.sheet-section-spellclass-2 { max-height: 999999px; visibility: visible; opacity: 1; transition: opacity 0.5s linear 0s; overflow: hidden; } +input.sheet-spellclass-tab0:checked ~ div.sheet-section-spellclass-0, +input.sheet-spellclass-tab1:checked ~ div.sheet-section-spellclass-1, +input.sheet-spellclass-tab2:checked ~ div.sheet-section-spellclass-2 { +visibility: visible !important; +max-height: 999999px !important; +} input.sheet-spells_level-tab99:checked ~ .sheet-spells .sheet-spell-border { display:block !important; } diff --git a/Pathfinder-Neceros/pathfinder-neceros.html b/Pathfinder-Neceros/pathfinder-neceros.html index 400780c211..0389f194b9 100644 --- a/Pathfinder-Neceros/pathfinder-neceros.html +++ b/Pathfinder-Neceros/pathfinder-neceros.html @@ -7849,17 +7849,12 @@
- put map of old to new ids here +
- - - - - - + @@ -14959,13 +14954,9 @@ var PFSheet = PFSheet || (function () { }, spellUserFields=[], - - - - migrateSpell = function(section,id) { + migrateSpell = function(section,id,newId) { var idStr=getRepeatingIDStr(id) - ,newId= generateRowID() ,newIdStr=getRepeatingIDStr(newId) ,prefix="repeating_"+section+"_"+idStr ,prefixLen=prefix.length @@ -15012,13 +15003,14 @@ var PFSheet = PFSheet || (function () { TAS.debug(v); TAS.debug(setter); setAttrs(setter,{silent:true},function(){ - updateSpells(newSection); + updateSpell(newSection,newId); }); }); }, migrateSpells = function () { + var idmap={},mapstr; _.each(spellUserFieldDefaults,function(defMap,field){ spellUserFields.push(field); }); @@ -15027,14 +15019,21 @@ var PFSheet = PFSheet || (function () { ,repeatingsection="repeating_"+section ; //TAS.debug(section); getSectionIDs(repeatingsection,function(ids){ + var newId; //if (ids && ids.length > 0) {TAS.notice(section,ids);} _.each(ids,function(id){ - migrateSpell(section,id); + newId= generateRowID(); + idmap[id]=newId; + migrateSpell(section, id, newId); }); + setAttrs({"spellmap":mapstr}); }); }); - - }, + TAS.notice(idmap); + mapstr=JSON.stringify(idmap); + TAS.notice(mapstr); + + }, /*********************************** ROW ********************************************/