mirror of
https://github.com/ikrpg/ikrpg.github.io.git
synced 2026-05-13 14:27:22 +00:00
Added autocomplete to the character sheet.
This commit is contained in:
parent
11168c8ef8
commit
287ee28cf3
7 changed files with 675 additions and 155 deletions
|
|
@ -718,33 +718,493 @@ var ikrpg = ikrpg || {};
|
|||
|
||||
})();
|
||||
|
||||
// ## Benefits DB ##\\
|
||||
(function() {
|
||||
|
||||
var benefitsDB = {};
|
||||
|
||||
ikrpg.generator.db.benefit = benefitsDB;
|
||||
|
||||
})();
|
||||
|
||||
// ## Abilities DB ## \\
|
||||
(function() {
|
||||
|
||||
var abilitiesDB = {
|
||||
"'Jack Marshal": undefined,
|
||||
"Abomination": undefined,
|
||||
"Ace Commander": undefined,
|
||||
"Acrobatics": undefined,
|
||||
"Adaptable [Urban]": undefined,
|
||||
"Adjust Aim": undefined,
|
||||
"Advisor": undefined,
|
||||
"Aegis": undefined,
|
||||
"Always a Deal to be Made": undefined,
|
||||
"Ambush": undefined,
|
||||
"Anatomical Precision": undefined,
|
||||
"Anatomist": undefined,
|
||||
"Anestetize": undefined,
|
||||
"Animal Control": undefined,
|
||||
"Appraise": undefined,
|
||||
"Arcane Assassin": undefined,
|
||||
"Arcane Defenses": undefined,
|
||||
"Arcane Engineer": undefined,
|
||||
"Arcane Precision": undefined,
|
||||
"Arcane Scholar": undefined,
|
||||
"Archer": undefined,
|
||||
"Arcing Shot": undefined,
|
||||
"Artificer": undefined,
|
||||
"Astute": undefined,
|
||||
"Astute": undefined,
|
||||
"Athanc Shard": undefined,
|
||||
"Authority": undefined,
|
||||
"Awe Inspiring": undefined,
|
||||
"Backstab": undefined,
|
||||
"Balm of Dhunia": undefined,
|
||||
"Battle Commander": undefined,
|
||||
"Battle Plan: Battlefield Coordination": undefined,
|
||||
"Battle Plan: Brutal Charge": undefined,
|
||||
"Battle Plan: Call to Action": undefined,
|
||||
"Battle Plan: Close Fire": undefined,
|
||||
"Battle Plan: Coordinated Strike": undefined,
|
||||
"Battle Plan: Desperate Pace": undefined,
|
||||
"Battle Plan: Go to Ground": undefined,
|
||||
"Battle Plan: Orchestrate Fire": undefined,
|
||||
"Battle Plan: Press Forward": undefined,
|
||||
"Battle Plan: Reconnaissance": undefined,
|
||||
"Battle Plan: Relentless Charge": undefined,
|
||||
"Battle Plan: Shadow": undefined,
|
||||
"Battle Plan: Take Cover": undefined,
|
||||
"Bayonet Charge": undefined,
|
||||
"Beast Handler": undefined,
|
||||
"Beast Manipulation: Dominator": undefined,
|
||||
"Beast Manipulation: Enrage": undefined,
|
||||
"Beast Manipulation: Medicate": undefined,
|
||||
"Beast Manipulation: Toughen": undefined,
|
||||
"Berserk": undefined,
|
||||
"Big Game Hunter": undefined,
|
||||
"Binding": undefined,
|
||||
"Black Tongue": undefined,
|
||||
"Blade Shield": undefined,
|
||||
"Blaster": undefined,
|
||||
"Blood Drinker": undefined,
|
||||
"Blood Frenzy": undefined,
|
||||
"Blood Rites": undefined,
|
||||
"Blood Spiller": undefined,
|
||||
"Blood Trade": undefined,
|
||||
"Bloodletting": undefined,
|
||||
"Bloodlust": undefined,
|
||||
"Blur of Motion": undefined,
|
||||
"Boarding Action": undefined,
|
||||
"Bodge": undefined,
|
||||
"Body Slam": undefined,
|
||||
"Bodyguard": undefined,
|
||||
"Bomber": undefined,
|
||||
"Bond": undefined,
|
||||
"Bone Grinder": undefined,
|
||||
"Brawler": undefined,
|
||||
"Brew Master": undefined,
|
||||
"Broad Stroke": undefined,
|
||||
"Bull Rush": undefined,
|
||||
"Calm": undefined,
|
||||
"Camouflage": undefined,
|
||||
"Card Sharp": undefined,
|
||||
"Cataphract": undefined,
|
||||
"Cautious Advance": undefined,
|
||||
"Cavalry Charge": undefined,
|
||||
"Cavalry Fighter": undefined,
|
||||
"Chain Attack: Bleed Out": undefined,
|
||||
"Chain Attack: Body Slam": undefined,
|
||||
"Chain Attack: Pin Down": undefined,
|
||||
"Chain Attack: Smite": undefined,
|
||||
"Charmer": undefined,
|
||||
"Choir": undefined,
|
||||
"Circular Vision": undefined,
|
||||
"Cleave": undefined,
|
||||
"Clockwork Transcendence": undefined,
|
||||
"Close Shot": undefined,
|
||||
"Cold Steel": undefined,
|
||||
"Combat Rider": undefined,
|
||||
"Combo Strike (Praetorian Sword)": undefined,
|
||||
"Communion": undefined,
|
||||
"Conditioning": undefined,
|
||||
"Conniver": undefined,
|
||||
"Consume Essence": undefined,
|
||||
"Convergence Warcaster": undefined,
|
||||
"Corruptor": undefined,
|
||||
"Counter Offer": undefined,
|
||||
"Cover Identity": undefined,
|
||||
"Covering Fire": undefined,
|
||||
"Crackshot": undefined,
|
||||
"Craft Rune Shot": undefined,
|
||||
"Crossbowman": undefined,
|
||||
"Dark Dominion": undefined,
|
||||
"Dark Scribe": undefined,
|
||||
"Deadly Skill": undefined,
|
||||
"Death Mastery": undefined,
|
||||
"Defender": undefined,
|
||||
"Defensive Line": undefined,
|
||||
"Dig In": undefined,
|
||||
"Disease Resistance": undefined,
|
||||
"Dismember": undefined,
|
||||
"Dispel": undefined,
|
||||
"Distiller": undefined,
|
||||
"Divine Fortitude": undefined,
|
||||
"Dodger": undefined,
|
||||
"Dominating Presence": undefined,
|
||||
"Doom Gaze": undefined,
|
||||
"Double Powder Ration": undefined,
|
||||
"Draconic Eminence": undefined,
|
||||
"Drive: Ancillary Attack": undefined,
|
||||
"Drive: Assault": undefined,
|
||||
"Drive: Off Road": undefined,
|
||||
"Drive: Pronto": undefined,
|
||||
"Dual Fighter": undefined,
|
||||
"Dual Shot": undefined,
|
||||
"Earth Magic": undefined,
|
||||
"Electromancer": undefined,
|
||||
"Elemental Master": undefined,
|
||||
"Elusive Rider": undefined,
|
||||
"Empower": undefined,
|
||||
"Empower Weapon": undefined,
|
||||
"Energy Siphon": undefined,
|
||||
"Enigma Cipher": undefined,
|
||||
"Evasive Rider": undefined,
|
||||
"Exalted": undefined,
|
||||
"Exalted Dialogue": undefined,
|
||||
"Excruciator": undefined,
|
||||
"Expert Rider": undefined,
|
||||
"Exterminator": undefined,
|
||||
"Extoller": undefined,
|
||||
"Eye of the Storm": undefined,
|
||||
"Fabricator": undefined,
|
||||
"Fall Back": undefined,
|
||||
"Fast Cook": undefined,
|
||||
"Fast Draw": undefined,
|
||||
"Fast Rearm": undefined,
|
||||
"Fast Reload": undefined,
|
||||
"Fate Blessed": undefined,
|
||||
"Fearless": undefined,
|
||||
"Fearsome Howl": undefined,
|
||||
"Feat of Regeneration": undefined,
|
||||
"Fell Call: Cacophony": undefined,
|
||||
"Fell Call: Call of Defiance": undefined,
|
||||
"Fell Call: Ground Shaker": undefined,
|
||||
"Fell Call: Heroic Ballad": undefined,
|
||||
"Fell Call: Reverberation": undefined,
|
||||
"Fell Call: Signal Call": undefined,
|
||||
"Fell Call: Sonic Blast": undefined,
|
||||
"Field Alchemist": undefined,
|
||||
"Field Marshal: Counter Charge": undefined,
|
||||
"Field Marshal: Celestial Harmony": undefined,
|
||||
"Field Marshal: Hog Wild": undefined,
|
||||
"Field Marshal: Magical Attack": undefined,
|
||||
"Field Marshal: Poltergeist": undefined,
|
||||
"Field Marshal: Regenerate": undefined,
|
||||
"Field Marshal: Relentless Charge": undefined,
|
||||
"Field Marshal: Shield Guard": undefined,
|
||||
"Field Marshal: Sprint": undefined,
|
||||
"Field Marshal: Unyielding": undefined,
|
||||
"Find Cover": undefined,
|
||||
"Finisher": undefined,
|
||||
"Fire in the Hole!": undefined,
|
||||
"First to Fight": undefined,
|
||||
"Fist of God": undefined,
|
||||
"Flash Thief": undefined,
|
||||
"Fleet Foot": undefined,
|
||||
"Fleet Food": undefined,
|
||||
"Flesh of Steel": undefined,
|
||||
"Fleshcrafting": undefined,
|
||||
"Flying Fists": undefined,
|
||||
"Follow Up": undefined,
|
||||
"Foresight": undefined,
|
||||
"Free Style": undefined,
|
||||
"Gang": undefined,
|
||||
"Gatekeeper": undefined,
|
||||
"Get Away": undefined,
|
||||
"Ghost Shield": undefined,
|
||||
"Ghost Sight": undefined,
|
||||
"Gift of the Beast": undefined,
|
||||
"Girded": undefined,
|
||||
"Go to Ground": undefined,
|
||||
"Goad": undefined,
|
||||
"Good Breeding": undefined,
|
||||
"Grappler": undefined,
|
||||
"Grave Man": undefined,
|
||||
"Great Power": undefined,
|
||||
"Grenadier": undefined,
|
||||
"Gunfighter": undefined,
|
||||
"Gunner": undefined,
|
||||
"Hack": undefined,
|
||||
"Hard": undefined,
|
||||
"Hardened Strike": undefined,
|
||||
"Haruspex": undefined,
|
||||
"Head-Butt": undefined,
|
||||
"Heart Eater": undefined,
|
||||
"High-Pressure Fire": undefined,
|
||||
"Hit em' Low": undefined,
|
||||
"Hit the Deck!": undefined,
|
||||
"Hulking Presence": undefined,
|
||||
"Hunter": undefined,
|
||||
"Hunting Ground": undefined,
|
||||
"Hyper Awareness": undefined,
|
||||
"Imbue Weapon": undefined,
|
||||
"Immunity: Cold": undefined,
|
||||
"Immunity: Corrosion": undefined,
|
||||
"Immunity: Electricity": undefined,
|
||||
"Immunity: Fire": undefined,
|
||||
"Impelled Companions": undefined,
|
||||
"Imperishable Conviction": undefined,
|
||||
"Impervious Wall Stance": undefined,
|
||||
"Improvised Formula": undefined,
|
||||
"Inflict Pain": undefined,
|
||||
"Inscribe Formulae": undefined,
|
||||
"Inscribe Thrall Rune": undefined,
|
||||
"Instructor": undefined,
|
||||
"Iron Sentinel": undefined,
|
||||
"Iron Will": undefined,
|
||||
"Ironhead": undefined,
|
||||
"Keen Eyed": undefined,
|
||||
"Knife Thrower": undefined,
|
||||
"Language": undefined,
|
||||
"Legecy of Bragg": undefined,
|
||||
"Light Cavalry": undefined,
|
||||
"Line Breaker": undefined,
|
||||
"Live Drinker": undefined,
|
||||
"Load Bearing": undefined,
|
||||
"Long-Lived": undefined,
|
||||
"Lost in the Crowd": undefined,
|
||||
"Low Breeding": undefined,
|
||||
"Maestro": undefined,
|
||||
"Mage Killer": undefined,
|
||||
"Makeshift Engineering": undefined,
|
||||
"Maltreatment": undefined,
|
||||
"Man of Iron": undefined,
|
||||
"Marksman": undefined,
|
||||
"Master Chymist": undefined,
|
||||
"Maul": undefined,
|
||||
"Meat Alchemy": undefined,
|
||||
"Mend Flesh": undefined,
|
||||
"Mount Attack": undefined,
|
||||
"Mounted: Bounding Leap": undefined,
|
||||
"Mounted: Counter Charge": undefined,
|
||||
"Mounted: Outride": undefined,
|
||||
"Natural Leader": undefined,
|
||||
"Necromancer": undefined,
|
||||
"Night Fighter": undefined,
|
||||
"Oath of Silence": undefined,
|
||||
"Onslaught": undefined,
|
||||
"Opening Salvo": undefined,
|
||||
"Ossify": undefined,
|
||||
"Overpower": undefined,
|
||||
"Overtake": undefined,
|
||||
"Pack Hunter": undefined,
|
||||
"Pain Flow": undefined,
|
||||
"Pain Monger": undefined,
|
||||
"Parry": undefined,
|
||||
"Patch Up": undefined,
|
||||
"Pathfinder": undefined,
|
||||
"Perfect Timing": undefined,
|
||||
"Poison Glaze": undefined,
|
||||
"Poison Resistance": undefined,
|
||||
"Poisoner": undefined,
|
||||
"Poltergeist": undefined,
|
||||
"Port of Call": undefined,
|
||||
"Possession": undefined,
|
||||
"Power of Truth": undefined,
|
||||
"Powerstrain": undefined,
|
||||
"Precision Strike": undefined,
|
||||
"Press the Attack": undefined,
|
||||
"Previlege": undefined,
|
||||
"Prowl": undefined,
|
||||
"Pursuit": undefined,
|
||||
"Quick Chymist": undefined,
|
||||
"Quick Work": undefined,
|
||||
"Rallying Cry": undefined,
|
||||
"Range Amplifier": undefined,
|
||||
"Reclaim": undefined,
|
||||
"Reed in the Wind": undefined,
|
||||
"Relentless Advance": undefined,
|
||||
"Relentless Charge": undefined,
|
||||
"Ram": undefined,
|
||||
"Remedy": undefined,
|
||||
"Renowned": undefined,
|
||||
"Resonance: Devourer Warbeast": undefined,
|
||||
"Resonance: Farrow Warbeast": undefined,
|
||||
"Resonance: Skorne Warbeast": undefined,
|
||||
"Resonance: Swamp Warbeast": undefined,
|
||||
"Resonance: Trollblood Warbeast": undefined,
|
||||
"Resonance: Wold": undefined,
|
||||
"Resourceful": undefined,
|
||||
"Restoration": undefined,
|
||||
"Retaliatory Strike": undefined,
|
||||
"Return Fire": undefined,
|
||||
"Rhulic Warcaster": undefined,
|
||||
"Ride-by Attack": undefined,
|
||||
"Riposte": undefined,
|
||||
"Rock Solid": undefined,
|
||||
"Rock Steady": undefined,
|
||||
"Roll with It": undefined,
|
||||
"Runesmith": undefined,
|
||||
"Saddle Shot": undefined,
|
||||
"Sanguine Bond": undefined,
|
||||
"Scent": undefined,
|
||||
"Scoping it Out": undefined,
|
||||
"Scorched Earth": undefined,
|
||||
"Scrounge": undefined,
|
||||
"Sentry": undefined,
|
||||
"Serenity": undefined,
|
||||
"Serpent Strike": undefined,
|
||||
"Set Defence": undefined,
|
||||
"Shadow Magic": undefined,
|
||||
"Shield Guard": undefined,
|
||||
"Shield Slam": undefined,
|
||||
"Shifting Sands Stance": undefined,
|
||||
"Shootist": undefined,
|
||||
"Signal Howls": undefined,
|
||||
"Signal Language": undefined,
|
||||
"Silence": undefined,
|
||||
"Silver Tongued": undefined,
|
||||
"Skilled Trapper": undefined,
|
||||
"Snacking": undefined,
|
||||
"Snag & Slash": undefined,
|
||||
"Snap Fire": undefined,
|
||||
"Sniper": undefined,
|
||||
"Snow Wreathed": undefined,
|
||||
"Souie!": undefined,
|
||||
"Soul Guard": undefined,
|
||||
"Soul Taker": undefined,
|
||||
"Soul Thief": undefined,
|
||||
"Soulstorm": undefined,
|
||||
"Spawning Savant": undefined,
|
||||
"Specialization": undefined,
|
||||
"Spirit Eater": undefined,
|
||||
"Spirit Guide": undefined,
|
||||
"Spirit Vision": undefined,
|
||||
"Spiritual Harmony": undefined,
|
||||
"Sprint": undefined,
|
||||
"Staredown": undefined,
|
||||
"Stay Death": undefined,
|
||||
"Steady": undefined,
|
||||
"Steam Jockey": undefined,
|
||||
"Steam Savant": undefined,
|
||||
"Steamo": undefined,
|
||||
"Stone Scavenger": undefined,
|
||||
"Stone Warder": undefined,
|
||||
"Stone-and-Mortars Stance": undefined,
|
||||
"Stonecutter": undefined,
|
||||
"Storm Booster": undefined,
|
||||
"Strangler": undefined,
|
||||
"Street Survivor": undefined,
|
||||
"Street Sweeper": undefined,
|
||||
"Strength of Arms": undefined,
|
||||
"Student of Kexorus": undefined,
|
||||
"Studious": undefined,
|
||||
"Sucker!": undefined,
|
||||
"Suppressing Fire": undefined,
|
||||
"Survivalist": undefined,
|
||||
"Swift Hunter": undefined,
|
||||
"Swift Rider": undefined,
|
||||
"Tactical Coordination": undefined,
|
||||
"Take Down": undefined,
|
||||
"Tap Fury": undefined,
|
||||
"Targeteer": undefined,
|
||||
"Team Leader": undefined,
|
||||
"Team Player": undefined,
|
||||
"Test the Wind": undefined,
|
||||
"Thick Skin": undefined,
|
||||
"Tinkerer": undefined,
|
||||
"Torture": undefined,
|
||||
"Traceless Path": undefined,
|
||||
"Tracker": undefined,
|
||||
"Trained Rider": undefined,
|
||||
"Transcend the Flesh": undefined,
|
||||
"Treewalker": undefined,
|
||||
"Trick Rider": undefined,
|
||||
"Trip": undefined,
|
||||
"Troll Speaker": undefined,
|
||||
"Truth Reader": undefined,
|
||||
"Tune Up": undefined,
|
||||
"Two-Weapon Fighting": undefined,
|
||||
"Unhallowed": undefined,
|
||||
"University Education": undefined,
|
||||
"Urcaen's Gate": undefined,
|
||||
"Vampiric Harvest": undefined,
|
||||
"Vessel Upgrade": undefined,
|
||||
"Vivisectionist": undefined,
|
||||
"Warlock Bond": undefined,
|
||||
"Waylay": undefined,
|
||||
"Weapon Master (Javelin)": undefined,
|
||||
"Weapon Master (Praetorian Sword)": undefined,
|
||||
"Weatherman": undefined,
|
||||
"Weather Vane": undefined,
|
||||
"Whelp Companion": undefined,
|
||||
"Whirlwind": undefined,
|
||||
"Whispers of the Creator": undefined,
|
||||
"Wold Mastery": undefined,
|
||||
"Wolf Protector": undefined
|
||||
};
|
||||
|
||||
ikrpg.generator.db.ability = abilitiesDB;
|
||||
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
|
||||
// # Fill character sheet input fields with DB data # \\
|
||||
(function() {
|
||||
|
||||
// ## Fill spell data on title change ## \\
|
||||
// ## Spell changes ## \\
|
||||
(function() {
|
||||
|
||||
var db = ikrpg.generator.db.spell;
|
||||
|
||||
$(".character-sheet .spell .title").change(function(event) {
|
||||
var input = $(event.target);
|
||||
var title = input.val();
|
||||
var spell = input.parent();
|
||||
// ### Fill spell data on title change ### \\
|
||||
(function() {
|
||||
|
||||
var spellData = db[title];
|
||||
if(spellData) {
|
||||
spell.find(".cost").val(spellData["cost"]);
|
||||
spell.find(".rng").val(spellData["rng"]);
|
||||
spell.find(".aoe").val(spellData["aoe"]);
|
||||
spell.find(".pow").val(spellData["pow"]);
|
||||
spell.find(".up").val(spellData["up"]);
|
||||
spell.find(".off").val(spellData["off"]);
|
||||
spell.find(".description").val(spellData["description"]);
|
||||
$(".character-sheet .spell .title").change(function(event) {
|
||||
var input = $(event.target);
|
||||
var title = input.val();
|
||||
var spell = input.parent();
|
||||
|
||||
var spellData = db[title];
|
||||
if(spellData) {
|
||||
spell.find(".cost").val(spellData["cost"]);
|
||||
spell.find(".rng").val(spellData["rng"]);
|
||||
spell.find(".aoe").val(spellData["aoe"]);
|
||||
spell.find(".pow").val(spellData["pow"]);
|
||||
spell.find(".up").val(spellData["up"]);
|
||||
spell.find(".off").val(spellData["off"]);
|
||||
spell.find(".description").val(spellData["description"]);
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
// ### Autocomplete ### \\
|
||||
(function() {
|
||||
|
||||
var source = $.grep(Object.keys(db), function(key) {
|
||||
return db[key];
|
||||
});
|
||||
|
||||
function buildAutocomplete(selector) {
|
||||
$(selector + " .title").autocomplete({
|
||||
appendTo: selector,
|
||||
minLength: 0,
|
||||
source: source,
|
||||
select: function(event, ui) {
|
||||
event.target.value = ui.item.value;
|
||||
$(event.target).trigger("change");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(".character-sheet .spell").each(function(index, skill) {
|
||||
buildAutocomplete(".character-sheet #"+$(skill).attr("id"));
|
||||
});
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
|
|
@ -850,6 +1310,30 @@ var ikrpg = ikrpg || {};
|
|||
|
||||
})();
|
||||
|
||||
// ### Autocomplete ### \\
|
||||
(function() {
|
||||
|
||||
var source = $.grep(Object.keys(db), function(key) {
|
||||
return db[key];
|
||||
});
|
||||
|
||||
function buildAutocomplete(selector) {
|
||||
$(selector + " .title").autocomplete({
|
||||
appendTo: selector,
|
||||
minLength: 0,
|
||||
source: source,
|
||||
select: function(event, ui) {
|
||||
event.target.value = ui.item.value;
|
||||
$(event.target).trigger("change");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(".character-sheet .skill").each(function(index, skill) {
|
||||
buildAutocomplete(".character-sheet #"+$(skill).attr("id"));
|
||||
});
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
// ## Stat changes ## \\
|
||||
|
|
@ -901,21 +1385,50 @@ var ikrpg = ikrpg || {};
|
|||
|
||||
})();
|
||||
|
||||
// ## Update page value on ability change ## \\
|
||||
// ## Ability changes ## \\
|
||||
(function() {
|
||||
|
||||
var db = ikrpg.index.data;
|
||||
var db = ikrpg.generator.db.ability;
|
||||
|
||||
$(".character-sheet .ability").change(function(event) {
|
||||
var input = $(event.target);
|
||||
var title = input.val();
|
||||
var ability = input.parent();
|
||||
var entry = $.grep(db, function(e) { return e["name"] == title; });
|
||||
if(entry && entry.length > 0) {
|
||||
var page = entry[0]["page"];
|
||||
ability.find(".page").val(page);
|
||||
// ### Update page value on ability change ### \\
|
||||
(function() {
|
||||
|
||||
var data = ikrpg.index.data;
|
||||
|
||||
$(".character-sheet .ability").change(function(event) {
|
||||
var input = $(event.target);
|
||||
var title = input.val();
|
||||
var ability = input.parent();
|
||||
var entry = $.grep(data, function(e) { return e["name"] == title; });
|
||||
if(entry && entry.length > 0) {
|
||||
var page = entry[0]["page"];
|
||||
ability.find(".page").val(page);
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
// ### Autocomplete ### \\
|
||||
(function() {
|
||||
|
||||
var source = Object.keys(db);
|
||||
|
||||
function buildAutocomplete(selector) {
|
||||
$(selector + " .title").autocomplete({
|
||||
appendTo: selector,
|
||||
minLength: 0,
|
||||
source: source,
|
||||
select: function(event, ui) {
|
||||
event.target.value = ui.item.value;
|
||||
$(event.target).trigger("change");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(".character-sheet .ability").each(function(index, ability) {
|
||||
buildAutocomplete(".character-sheet #"+$(ability).attr("id"));
|
||||
});
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
|
|
@ -997,6 +1510,29 @@ var ikrpg = ikrpg || {};
|
|||
|
||||
})();
|
||||
|
||||
// ### Autocomplete ### \\
|
||||
(function() {
|
||||
|
||||
var source = $.grep(Object.keys(db), function(key) {
|
||||
return db[key];
|
||||
});
|
||||
|
||||
function buildAutocomplete(selector) {
|
||||
$(selector + " .name").autocomplete({
|
||||
appendTo: selector,
|
||||
minLength: 0,
|
||||
source: source,
|
||||
select: function(event, ui) {
|
||||
event.target.value = ui.item.value;
|
||||
$(event.target).trigger("change");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buildAutocomplete(".character-sheet #rat1");
|
||||
buildAutocomplete(".character-sheet #rat2");
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
// ## Melee Weapons ## \\
|
||||
|
|
@ -1089,6 +1625,29 @@ var ikrpg = ikrpg || {};
|
|||
|
||||
})();
|
||||
|
||||
// ### Autocomplete ### \\
|
||||
(function() {
|
||||
|
||||
var source = $.grep(Object.keys(db), function(key) {
|
||||
return db[key];
|
||||
});
|
||||
|
||||
function buildAutocomplete(selector) {
|
||||
$(selector + " .name").autocomplete({
|
||||
appendTo: selector,
|
||||
minLength: 0,
|
||||
source: source,
|
||||
select: function(event, ui) {
|
||||
event.target.value = ui.item.value;
|
||||
$(event.target).trigger("change");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
buildAutocomplete(".character-sheet #mat1");
|
||||
buildAutocomplete(".character-sheet #mat2");
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
// ## Computed Values (DEF, ARM, INI, CMD) ## \\
|
||||
|
|
@ -1278,6 +1837,30 @@ var ikrpg = ikrpg || {};
|
|||
|
||||
})();
|
||||
|
||||
// ### Autocomplete ### \\
|
||||
(function() {
|
||||
|
||||
var source = $.grep(Object.keys(db), function(key) {
|
||||
return db[key];
|
||||
});
|
||||
|
||||
function buildAutocomplete(selector) {
|
||||
$(selector + " .name").autocomplete({
|
||||
appendTo: selector,
|
||||
minLength: 0,
|
||||
source: source,
|
||||
select: function(event, ui) {
|
||||
event.target.value = ui.item.value;
|
||||
$(event.target).trigger("change");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(".character-sheet .wornarmor").each(function(index, wornArmor) {
|
||||
buildAutocomplete(".character-sheet #"+$(wornArmor).attr("id"));
|
||||
});
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -2045,7 +2045,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "FMF"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Counter Charge",
|
||||
name: "Field Marshal: Counter Charge",
|
||||
publication: "Unleashed Core Rules",
|
||||
page: "160",
|
||||
category: "Ability",
|
||||
|
|
@ -2053,7 +2053,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "IKU"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Celestial Harmony",
|
||||
name: "Field Marshal: Celestial Harmony",
|
||||
publication: "No Quarter #48",
|
||||
page: "66",
|
||||
category: "Ability",
|
||||
|
|
@ -2061,7 +2061,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "FMF"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Hog Wild",
|
||||
name: "Field Marshal: Hog Wild",
|
||||
publication: "Unleashed Core Rules",
|
||||
page: "160",
|
||||
category: "Ability",
|
||||
|
|
@ -2077,7 +2077,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "FMF"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Magical Attack",
|
||||
name: "Field Marshal: Magical Attack",
|
||||
publication: "Unleashed Core Rules",
|
||||
page: "160",
|
||||
category: "Ability",
|
||||
|
|
@ -2085,7 +2085,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "IKU"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Poltergeist",
|
||||
name: "Field Marshal: Poltergeist",
|
||||
publication: "Unleashed Core Rules",
|
||||
page: "160",
|
||||
category: "Ability",
|
||||
|
|
@ -2093,7 +2093,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "IKU"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Regenerate",
|
||||
name: "Field Marshal: Regenerate",
|
||||
publication: "Unleashed Core Rules",
|
||||
page: "160",
|
||||
category: "Ability",
|
||||
|
|
@ -2109,7 +2109,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "FMF"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Relentless Charge",
|
||||
name: "Field Marshal: Relentless Charge",
|
||||
publication: "Unleashed Core Rules",
|
||||
page: "160",
|
||||
category: "Ability",
|
||||
|
|
@ -2133,7 +2133,7 @@ var ikrpg = ikrpg || {};
|
|||
game: "IKU"
|
||||
},
|
||||
{
|
||||
name: "Field Marshall: Unyielding",
|
||||
name: "Field Marshal: Unyielding",
|
||||
publication: "Unleashed Core Rules",
|
||||
page: "160",
|
||||
category: "Ability",
|
||||
|
|
|
|||
6
static/javascripts/jquery-ui-1.10.4.min.js
vendored
6
static/javascripts/jquery-ui-1.10.4.min.js
vendored
File diff suppressed because one or more lines are too long
13
static/javascripts/jquery-ui-1.11.4.min.js
vendored
Executable file
13
static/javascripts/jquery-ui-1.11.4.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
|
|
@ -277,117 +277,46 @@ form#import-export:target { display: block; }
|
|||
.character-sheet #religiousbelief3 { position: absolute; margin-top: 549px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #gold { position: absolute; margin-top: 610px; margin-left: 698px; font-size: 50px; width: 100px; text-align: right; }
|
||||
|
||||
/*
|
||||
.character-sheet .gear { position: absolute; margin-left: 5px; }
|
||||
.character-sheet .gear .title { width: 285px; }
|
||||
.character-sheet .gear .benefit { margin-left: 125px; width: 160px; }
|
||||
.character-sheet #gear1 { margin-top: 38px; }
|
||||
.character-sheet #gear2 { margin-top: 58px; }
|
||||
.character-sheet #gear3 { margin-top: 78px; }
|
||||
.character-sheet #gear4 { margin-top: 97px; }
|
||||
.character-sheet #gear5 { margin-top: 117px; }
|
||||
.character-sheet #gear6 { margin-top: 137px; }
|
||||
.character-sheet #gear7 { margin-top: 157px; }
|
||||
.character-sheet #gear8 { margin-top: 177px; }
|
||||
.character-sheet #gear9 { margin-top: 197px; }
|
||||
.character-sheet #gear10 { margin-top: 217px; }
|
||||
.character-sheet #gear11 { margin-top: 237px; }
|
||||
.character-sheet #gear12 { margin-top: 257px; }
|
||||
.character-sheet #gear13 { margin-top: 276px; }
|
||||
.character-sheet #gear14 { margin-top: 296px; }
|
||||
.character-sheet #gear15 { margin-top: 316px; }
|
||||
.character-sheet #gear16 { margin-top: 336px; }
|
||||
.character-sheet #gear17 { margin-top: 356px; }
|
||||
.character-sheet #gear18 { margin-top: 376px; }
|
||||
.character-sheet #gear19 { margin-top: 396px; }
|
||||
.character-sheet .wornarmor { position: absolute; margin-left: 5px; }
|
||||
.character-sheet .wornarmor .name { width: 70px; }
|
||||
.character-sheet .wornarmor .notes { margin-left: 75px; width: 108px; }
|
||||
.character-sheet .wornarmor .spd { margin-left: 186px; width: 17px; text-align: center; }
|
||||
.character-sheet .wornarmor .def { margin-left: 225px; width: 17px; text-align: center; }
|
||||
.character-sheet .wornarmor .arm { margin-left: 260px; width: 17px; text-align: center; }
|
||||
.character-sheet #wornarmor1 { margin-top: 468px; }
|
||||
.character-sheet #wornarmor2 { margin-top: 488px; }
|
||||
.character-sheet #wornarmor3 { margin-top: 508px; }
|
||||
.character-sheet #wornarmor4 { margin-top: 528px; }
|
||||
.character-sheet .connection { position: absolute; margin-left: 5px; }
|
||||
.character-sheet .connection .name { width: 98px; }
|
||||
.character-sheet .connection .notes { margin-left: 98px; width: 140px; }
|
||||
.character-sheet .connection .page { margin-left: 238px; width: 48px; text-align: right; }
|
||||
.character-sheet #connection1 { margin-top: 600px; }
|
||||
.character-sheet #connection2 { margin-top: 620px; }
|
||||
.character-sheet #connection3 { margin-top: 640px; }
|
||||
.character-sheet #connection4 { margin-top: 660px; }
|
||||
.character-sheet #arcanetradition { position: absolute; margin: 12px 0 0 398px; width: 256px; }
|
||||
.character-sheet .spell { position: absolute; margin-left: 312px; }
|
||||
.character-sheet .spell .title { width: 134px; }
|
||||
.character-sheet .spell .cost { margin-left: 140px; width: 33px; text-align: center; }
|
||||
.character-sheet .spell .rng { margin-left: 178px; width: 32px; text-align: center; }
|
||||
.character-sheet .spell .aoe { margin-left: 215px; width: 32px; text-align: center; }
|
||||
.character-sheet .spell .pow { margin-left: 252px; width: 33px; text-align: center; }
|
||||
.character-sheet .spell .up { margin-left: 290px; width: 32px; text-align: center; }
|
||||
.character-sheet .spell .off { margin-left: 327px; width: 28px; text-align: center; }
|
||||
.character-sheet .spell .description { margin-top: 23px; width: 355px; }
|
||||
.character-sheet .iku .mechanika { display: none; }
|
||||
.character-sheet .mechanika { position: absolute; margin-left: 312px; }
|
||||
.character-sheet .mechanika .housing { width: 84px; }
|
||||
.character-sheet .mechanika .runeplate { margin-left: 90px; width: 84px; }
|
||||
.character-sheet .mechanika .capacitor { margin-left: 180px; width: 84px; }
|
||||
.character-sheet .mechanika .notes { margin-left: 270px; width: 84px; }
|
||||
.character-sheet #mechanika1 { margin-top: 486px; }
|
||||
.character-sheet #mechanika2 { margin-top: 506px; }
|
||||
.character-sheet #mechanika3 { margin-top: 526px; }
|
||||
.character-sheet #mechanika4 { margin-top: 546px; }
|
||||
.character-sheet #mechanika5 { margin-top: 566px; }
|
||||
.character-sheet .iku .runeplate { display: none; }
|
||||
.character-sheet .runeplate { position: absolute; margin-left: 312px; }
|
||||
.character-sheet .runeplate .title { width: 84px; }
|
||||
.character-sheet .runeplate .benefit { margin-left: 90px; width: 78px; }
|
||||
.character-sheet #runeplate1 { margin-top: 602px; }
|
||||
.character-sheet #runeplate2 { margin-top: 622px; }
|
||||
.character-sheet #runeplate3 { margin-top: 642px; }
|
||||
.character-sheet #runeplate4 { margin-top: 662px; }
|
||||
.character-sheet .iku .capacitor { display: none; }
|
||||
.character-sheet .capacitor { position: absolute; margin-left: 498px; }
|
||||
.character-sheet .capacitor .title { width: 78px; }
|
||||
.character-sheet .capacitor .charges { margin-left: 84px; width: 84px; }
|
||||
.character-sheet #capacitor1 { margin-top: 602px; }
|
||||
.character-sheet #capacitor2 { margin-top: 622px; }
|
||||
.character-sheet #capacitor3 { margin-top: 642px; }
|
||||
.character-sheet #capacitor4 { margin-top: 662px; }
|
||||
.character-sheet #spell1 { margin-top: 50px; }
|
||||
.character-sheet #spell2 { margin-top: 100px; }
|
||||
.character-sheet #spell3 { margin-top: 150px; }
|
||||
.character-sheet #spell4 { margin-top: 200px; }
|
||||
.character-sheet #spell5 { margin-top: 250px; }
|
||||
.character-sheet #spell6 { margin-top: 299px; }
|
||||
.character-sheet #spell7 { margin-top: 348px; }
|
||||
.character-sheet #spell8 { margin-top: 398px; }
|
||||
.character-sheet .note { position: absolute; margin-left: 698px; }
|
||||
.character-sheet .note .text { width: 265px; }
|
||||
.character-sheet #note1 { margin-top: 37px; }
|
||||
.character-sheet #note2 { margin-top: 56px; }
|
||||
.character-sheet #note3 { margin-top: 75px; }
|
||||
.character-sheet #note4 { margin-top: 94px; }
|
||||
.character-sheet #note5 { margin-top: 112px; }
|
||||
.character-sheet #note6 { margin-top: 131px; }
|
||||
.character-sheet #note7 { margin-top: 150px; }
|
||||
.character-sheet #note8 { margin-top: 168px; }
|
||||
.character-sheet #note9 { margin-top: 187px; }
|
||||
.character-sheet #note10 { margin-top: 206px; }
|
||||
.character-sheet #note11 { margin-top: 225px; }
|
||||
.character-sheet #note12 { margin-top: 244px; }
|
||||
.character-sheet #permanentinjury1 { position: absolute; margin-top: 310px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #permanentinjury2 { position: absolute; margin-top: 330px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #permanentinjury3 { position: absolute; margin-top: 350px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #spokenlanguage1 { position: absolute; margin-top: 411px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #spokenlanguage2 { position: absolute; margin-top: 431px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #spokenlanguage3 { position: absolute; margin-top: 451px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #religiousbelief1 { position: absolute; margin-top: 512px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #religiousbelief2 { position: absolute; margin-top: 532px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #religiousbelief3 { position: absolute; margin-top: 552px; margin-left: 698px; width: 265px; }
|
||||
.character-sheet #gold { position: absolute; margin-top: 613px; margin-left: 698px; font-size: 50px; width: 100px; text-align: right; }
|
||||
*/
|
||||
|
||||
ul.ui-autocomplete {
|
||||
z-index: 1000;
|
||||
position: absolute;
|
||||
font-size: 13px;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
margin-left: -1px;
|
||||
width: 140px !important;
|
||||
max-height: 200px;
|
||||
color: black;
|
||||
list-style-type: none;
|
||||
overflow-y: scroll;
|
||||
border: 2px solid black;
|
||||
}
|
||||
|
||||
ul.ui-autocomplete li.ui-menu-item {
|
||||
margin: 0 !important;
|
||||
padding: 0 3px !important;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
ul.ui-autocomplete li.ui-menu-item:not(:first-of-type) {
|
||||
border-top: 2px solid black;
|
||||
}
|
||||
|
||||
ul.ui-autocomplete li.ui-menu-item:nth-of-type(2n) {
|
||||
background-color: #F0F7EB;
|
||||
}
|
||||
|
||||
ul.ui-autocomplete li.ui-menu-item:nth-of-type(2n-1) {
|
||||
background-color: #CEE4BD;
|
||||
}
|
||||
|
||||
ul.ui-autocomplete li.ui-state-focus {
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@media print {
|
||||
html { zoom: 140%; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue