Update M20.html

This commit is contained in:
mantonyz
2016-03-24 09:48:05 -05:00
parent ba376d1aee
commit d6a3eea615
+28 -8
View File
@@ -3,7 +3,7 @@
<input type="radio" name="attr_sheet_type" class="sheet-tab sheet-tab3" value="Backgrounds" /><span></span>
<input type="radio" name="attr_sheet_type" class="sheet-tab sheet-tab4" value="Rotes" /><span></span>
<input type="radio" name="attr_sheet_type" class="sheet-tab sheet-tab5" value="Experience" /><span></span>
<button type='roll' name='roll_Roll' class="sheet-Dice" value='?{Description|Action} [[?{Number of Dice|1}d10s>?{Difficulty|6}f1]]'> Dice</button>
<button type='roll' name='roll_Roll' class="sheet-Dice" value='?{Description|Action} [[?{Number of Dice|1}d10s>?{Difficulty|6}]]'> Dice</button>
<div class="clear"></div>
<!-- Primary Sheet -->
@@ -424,12 +424,12 @@
<input type="radio" name="attr_Abi3" value="5" /><span></span>
</div>
<div class="sheet-row">
<input type="radio" name="attr_bi4" value="0" class="zero" checked/><span></span>
<input type="radio" name="attr_bi4" value="1" /><span></span>
<input type="radio" name="attr_bi4" value="2" /><span></span>
<input type="radio" name="attr_bi4" value="3" /><span></span>
<input type="radio" name="attr_bi4" value="4" /><span></span>
<input type="radio" name="attr_bi4" value="5" /><span></span>
<input type="radio" name="attr_Abi4" value="0" class="zero" checked/><span></span>
<input type="radio" name="attr_Abi4" value="1" /><span></span>
<input type="radio" name="attr_Abi4" value="2" /><span></span>
<input type="radio" name="attr_Abi4" value="3" /><span></span>
<input type="radio" name="attr_Abi4" value="4" /><span></span>
<input type="radio" name="attr_Abi4" value="5" /><span></span>
</div>
</div>
<div class="sheet-col sheet-spec">
@@ -478,7 +478,8 @@
<input type="radio" name="attr_Computer" value="3" /><span></span>
<input type="radio" name="attr_Computer" value="4" /><span></span>
<input type="radio" name="attr_Computer" value="5" /><span></span>
</div> <div class="sheet-row">
</div>
<div class="sheet-row">
<input type="radio" name="attr_Cosmology" value="0" class="zero" checked/><span></span>
<input type="radio" name="attr_Cosmology" value="1" /><span></span>
<input type="radio" name="attr_Cosmology" value="2" /><span></span>
@@ -1527,3 +1528,22 @@
</fieldset>
</div>
</div>
<script type="text/worker">
// Every time the sheet is opened, this runs asychronously so it shouldn't slow anything down
on("sheet:opened", function() {
// Get the misspelled attr if it exists
getAttrs(['bi4'], function(attrs) {
var updates = {};
// Check if the attribute exists and is not blank
if(attrs.bi4 && attrs.bi4 !== '') {
// Copy value to new, correctly spelled attr
updates.Abi4 = attrs.bi4;
// Blank old value, so it won't get coppied next time
updates.bi4 = '';
// Push the new values to the respective attrs
setAttrs(updates);
}
});
});
</script>