Skip to content
Snippets Groups Projects
Commit 86eecacd authored by vas's avatar vas
Browse files

fix leg accessories, input field unfocus events

parent 87cc7bb5
Branches
Tags
1 merge request!2195another batch of RA fixes
...@@ -928,7 +928,7 @@ window.DefaultRules = (function() { ...@@ -928,7 +928,7 @@ window.DefaultRules = (function() {
// Asset Growth // Asset Growth
const growth_drugs = new Set(["breast injections", "intensive breast injections", "breast redistributors", "butt injections", "intensive butt injections", "butt redistributors", "lip injections", "lip atrophiers", "penis enhancement", "intensive penis enhancement", "penis atrophiers", "testicle enhancement", "intensive testicle enhancement", "testicle atrophiers", "hyper breast injections", "hyper butt injections", "hyper penis enhancement", "hyper testicle enhancement"]); const growth_drugs = new Set(["breast injections", "intensive breast injections", "breast redistributors", "butt injections", "intensive butt injections", "butt redistributors", "lip injections", "lip atrophiers", "penis enhancement", "intensive penis enhancement", "penis atrophiers", "testicle enhancement", "intensive testicle enhancement", "testicle atrophiers", "hyper breast injections", "hyper butt injections", "hyper penis enhancement", "hyper testicle enhancement"]);
if ((slave.drugs == "super fertility drugs" || slave.drugs == "fertility drugs") && isFertile(slave)) { if ((slave.drugs == "super fertility drugs" || slave.drugs == "fertility drugs") && isFertile(slave)) {
r += `<br>slave.slaveName is on slave.drugs and will not be considered for drug enhancement until that regime is complete.`; r += `<br>${slave.slaveName} is on ${slave.drugs} and will not be considered for drug enhancement until that regime is complete.`;
return; return;
} else if ((rule.growth_boobs == "no default setting" && rule.growth_butt == "no default setting" && rule.growth_lips == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_balls == "no default setting")) { } else if ((rule.growth_boobs == "no default setting" && rule.growth_butt == "no default setting" && rule.growth_lips == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_dick == "no default setting" && rule.growth_balls == "no default setting")) {
return; return;
......
...@@ -181,7 +181,6 @@ window.rulesAssistantOptions = (function() { ...@@ -181,7 +181,6 @@ window.rulesAssistantOptions = (function() {
value.setAttribute("type", "text"); value.setAttribute("type", "text");
value.classList.add("rajs-value"); // value.classList.add("rajs-value"); //
// call the variable binding when the input field is no longer being edited, and when the enter key is pressed // call the variable binding when the input field is no longer being edited, and when the enter key is pressed
value.onfocusout = () => { this.inputEdited(); };
value.onblur = () => {this.inputEdited(); }; value.onblur = () => {this.inputEdited(); };
value.onkeypress = (e) => { if (returnP(e)) this.inputEdited(); }; value.onkeypress = (e) => { if (returnP(e)) this.inputEdited(); };
} else { } else {
...@@ -477,7 +476,7 @@ window.rulesAssistantOptions = (function() { ...@@ -477,7 +476,7 @@ window.rulesAssistantOptions = (function() {
class RenameField extends Element { class RenameField extends Element {
constructor(root) { constructor(root) {
super(); super();
this.element.onfocusout = () => changeName(this.element.value, root); this.element.onblur = () => changeName(this.element.value, root);
this.element.onkeypress = (e) => { if (returnP(e)) changeName(this.element.value, root); }; this.element.onkeypress = (e) => { if (returnP(e)) changeName(this.element.value, root); };
} }
...@@ -661,7 +660,7 @@ window.rulesAssistantOptions = (function() { ...@@ -661,7 +660,7 @@ window.rulesAssistantOptions = (function() {
min.setAttribute("type", "text"); min.setAttribute("type", "text");
min.value = "" + data.value[0]; min.value = "" + data.value[0];
min.onkeypress = e => { if (returnP(e)) this.setmin(min.value); }; min.onkeypress = e => { if (returnP(e)) this.setmin(min.value); };
min.onfocusout = e => this.setmin(min.value); min.onblur = e => this.setmin(min.value);
this.min = min; this.min = min;
elem.appendChild(min); elem.appendChild(min);
...@@ -675,7 +674,7 @@ window.rulesAssistantOptions = (function() { ...@@ -675,7 +674,7 @@ window.rulesAssistantOptions = (function() {
max.setAttribute("type", "text"); max.setAttribute("type", "text");
max.value = "" + data.value[1]; max.value = "" + data.value[1];
max.onkeypress = e => { if (returnP(e)) this.setmax(max.value); }; max.onkeypress = e => { if (returnP(e)) this.setmax(max.value); };
max.onfocusout = e => this.setmax(max.value); max.onblur = e => this.setmax(max.value);
this.max = max; this.max = max;
elem.appendChild(max); elem.appendChild(max);
...@@ -734,7 +733,7 @@ window.rulesAssistantOptions = (function() { ...@@ -734,7 +733,7 @@ window.rulesAssistantOptions = (function() {
input.setAttribute("type", "text"); input.setAttribute("type", "text");
input.value = JSON.stringify(data.value); input.value = JSON.stringify(data.value);
input.onkeypress = e => { if (returnP(e)) this.setValue(input); }; input.onkeypress = e => { if (returnP(e)) this.setValue(input); };
input.onfocusout = e => this.setValue(input); input.onblur = e => this.setValue(input);
this.input = input; this.input = input;
elem.appendChild(input); elem.appendChild(input);
...@@ -1186,10 +1185,10 @@ window.rulesAssistantOptions = (function() { ...@@ -1186,10 +1185,10 @@ window.rulesAssistantOptions = (function() {
class LeggingsList extends List { class LeggingsList extends List {
constructor() { constructor() {
const items = [ const items = [
"no default settings", ["no default settings"],
"none", ["none"],
"short stockings", ["short stockings"],
"long stockings", ["long stockings"],
]; ];
super("Leg accessory", items); super("Leg accessory", items);
this.setValue(current_rule.set.legAccessory); this.setValue(current_rule.set.legAccessory);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment