diff --git a/plan/plan.js b/plan/plan.js
index 560f01d..f63efc5 100644
--- a/plan/plan.js
+++ b/plan/plan.js
@@ -13,8 +13,8 @@ class Store {
html += "
";
html += "
"+this.title+"
";
html += "
";
- html += " ";
- html += " ";
+ html += " ";
+ html += " ";
html += "
";
html += "
";
html += "
";
@@ -38,7 +38,7 @@ class Store {
html += " ";
// html += " ";
html += "
";
- html += " ";
+ html += " ";
html += "
";
this.selector = $(html).appendTo("#stores");
@@ -53,12 +53,10 @@ class Store {
});
- this.selector.find('.editStoreName').one('click keyup', ev => { this.editNameFn(ev); });
+ this.selector.find('.editStoreName').one('click', ev => { this.editNameFn(ev); });
- this.selector.find('.removeStore').on('click keyup', ev => {
- if(ev.type === 'click' || ev.keyCode === 13){
- if(confirm("Are you sure you want to remove this store?")){ this.removeStore(); }
- }
+ this.selector.find('.removeStore').on('click', ev => {
+ if(confirm("Are you sure you want to remove this store?")){ this.removeStore(); }
});
$(function () {
@@ -71,7 +69,7 @@ class Store {
}
editNameFn(ev){
- if(ev.type === 'click' || ev.keyCode === 13){
+ if(ev.type === 'click'){
$(ev.target).parent().hide();
@@ -99,6 +97,7 @@ class Store {
});
headerElem.find(".newName").on('keyup', ev3 => { this.resetEditNameFn(ev3); });
+ headerElem.find('input').first().focus();
// $("body").one('click', ev3 => { this.resetEditNameFn(ev3); });
}
}
@@ -146,18 +145,18 @@ class Store {
html += "
";
html += " "+text+"";
- /*
+ /* * /
html += " ";
html += "
";
- html += " ";
- html += " ";
- html += " x"+price.toFixed(2)+" kr";
- html += " ";
+ html += " ";
+ html += " ";
+ html += " x"+price.toFixed(2)+"";
+ html += " ";
html += "
";
html += " ";
- */
- html += " "+price.toFixed(2)+" kr ";
- html += "";
+ /* */
+ html += "