mirror of
https://github.com/ikrpg/ikrpg.github.io.git
synced 2026-05-13 14:27:22 +00:00
Removed focus artifact from character sheet
This commit is contained in:
parent
f1edfcbdf8
commit
760930cec1
1 changed files with 10 additions and 10 deletions
|
|
@ -91,7 +91,7 @@ function Heroic(Hero) {
|
||||||
var input = document.querySelector("input#"+attribute);
|
var input = document.querySelector("input#"+attribute);
|
||||||
updateSearchString = function() {
|
updateSearchString = function() {
|
||||||
Hero[attribute] = input.value;
|
Hero[attribute] = input.value;
|
||||||
Hero["focus"] = attribute;
|
//Hero["focus"] = attribute;
|
||||||
redirect();
|
redirect();
|
||||||
};
|
};
|
||||||
if (isDefined(input)) {
|
if (isDefined(input)) {
|
||||||
|
|
@ -103,7 +103,7 @@ function Heroic(Hero) {
|
||||||
updateSearchString = function(key, input) {
|
updateSearchString = function(key, input) {
|
||||||
return function() {
|
return function() {
|
||||||
Hero[attribute][key] = input.value;
|
Hero[attribute][key] = input.value;
|
||||||
Hero["focus"] = attribute;
|
//Hero["focus"] = attribute;
|
||||||
redirect();
|
redirect();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -146,13 +146,13 @@ function Heroic(Hero) {
|
||||||
hideElements([ r1m1, r2m1, r1m2, r2, rat1, rat2, mat3 ]);
|
hideElements([ r1m1, r2m1, r1m2, r2, rat1, rat2, mat3 ]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var focusLastInput = function(hero) {
|
//var focusLastInput = function(hero) {
|
||||||
if (isDefined(hero["focus"])) {
|
// if (isDefined(hero["focus"])) {
|
||||||
var input = document.querySelector("input#"+hero["focus"]);
|
// var input = document.querySelector("input#"+hero["focus"]);
|
||||||
if (input == null) input = document.querySelector("#"+hero["focus"]+" input");
|
// if (input == null) input = document.querySelector("#"+hero["focus"]+" input");
|
||||||
if (input != null) { input.focus(); input.scrollIntoView(); }
|
// if (input != null) { input.focus(); input.scrollIntoView(); }
|
||||||
}
|
// }
|
||||||
};
|
//};
|
||||||
var setPortrait = function(hero) {
|
var setPortrait = function(hero) {
|
||||||
var portrait = hero["portrait"]
|
var portrait = hero["portrait"]
|
||||||
, portraitDiv = document.querySelector("#portrait");
|
, portraitDiv = document.querySelector("#portrait");
|
||||||
|
|
@ -177,7 +177,7 @@ function Heroic(Hero) {
|
||||||
for (attribute in Hero) { fillOut(attribute, Hero[attribute]); }
|
for (attribute in Hero) { fillOut(attribute, Hero[attribute]); }
|
||||||
for (attribute in Hero) { saveOnChange(attribute, Hero[attribute]); }
|
for (attribute in Hero) { saveOnChange(attribute, Hero[attribute]); }
|
||||||
setPortrait(Hero);
|
setPortrait(Hero);
|
||||||
focusLastInput(Hero);
|
//focusLastInput(Hero);
|
||||||
|
|
||||||
//var names = document.querySelectorAll("section > input.name");
|
//var names = document.querySelectorAll("section > input.name");
|
||||||
//for (name in names) { names[name].value = Hero["name"]; }
|
//for (name in names) { names[name].value = Hero["name"]; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue