Remove last traces of old articles
This commit is contained in:
parent
05156f37c6
commit
e5791efe4d
2 changed files with 13 additions and 24 deletions
|
@ -85,7 +85,7 @@ class AccountManager {
|
||||||
$('#id_on_acc').val(this.account.id);
|
$('#id_on_acc').val(this.account.id);
|
||||||
this.display();
|
this.display();
|
||||||
|
|
||||||
kpsul._env.articleSelect.focus();
|
kpsul.article_manager.focus();
|
||||||
kpsul._env.updateBasketAmount();
|
kpsul._env.updateBasketAmount();
|
||||||
kpsul._env.updateBasketRel();
|
kpsul._env.updateBasketRel();
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ class CheckoutManager {
|
||||||
if (kpsul.account_manager.is_empty()) {
|
if (kpsul.account_manager.is_empty()) {
|
||||||
kpsul.account_manager.focus();
|
kpsul.account_manager.focus();
|
||||||
} else {
|
} else {
|
||||||
kpsul._env.articleSelect.focus().select();
|
kpsul.article_manager.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,7 +482,11 @@ class ArticleManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
this._$input.focus();
|
if this.is_empty()
|
||||||
|
this._$input.focus();
|
||||||
|
else
|
||||||
|
this._$nb.focus();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
commentDialog.open({
|
commentDialog.open({
|
||||||
callback: confirm_callback,
|
callback: confirm_callback,
|
||||||
next_focus: articleSelect
|
next_focus: kpsul.article_manager;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ $(document).ready(function() {
|
||||||
else
|
else
|
||||||
displayErrors(getErrorsHtml(response));
|
displayErrors(getErrorsHtml(response));
|
||||||
},
|
},
|
||||||
next_focus: articleSelect,
|
next_focus: kpsul.article_manager,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,15 +273,6 @@ $(document).ready(function() {
|
||||||
cancelOperations();
|
cancelOperations();
|
||||||
});
|
});
|
||||||
|
|
||||||
// -----
|
|
||||||
// Articles data
|
|
||||||
// -----
|
|
||||||
|
|
||||||
var articleSelect = $('#article_autocomplete');
|
|
||||||
var articleId = $('#article_id');
|
|
||||||
var articleNb = $('#article_number');
|
|
||||||
var articlesList = [];
|
|
||||||
|
|
||||||
// -----
|
// -----
|
||||||
// Basket
|
// Basket
|
||||||
// -----
|
// -----
|
||||||
|
@ -527,11 +518,9 @@ $(document).ready(function() {
|
||||||
addDeposit(amount);
|
addDeposit(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
var next_focus = articleSelect.val() ? articleNb : articleSelect ;
|
|
||||||
|
|
||||||
depositDialog.open({
|
depositDialog.open({
|
||||||
callback: callback,
|
callback: callback,
|
||||||
next_focus: next_focus,
|
next_focus: kpsul.article_manager,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -547,11 +536,9 @@ $(document).ready(function() {
|
||||||
addEdit(amount);
|
addEdit(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
var next_focus = articleSelect.val() ? articleNb : articleSelect ;
|
|
||||||
|
|
||||||
editDialog.open({
|
editDialog.open({
|
||||||
callback: callback,
|
callback: callback,
|
||||||
next_focus: next_focus,
|
next_focus: kpsul.article_manager,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,11 +554,9 @@ $(document).ready(function() {
|
||||||
addWithdraw(amount);
|
addWithdraw(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
var next_focus = articleSelect.val() ? articleNb : articleSelect ;
|
|
||||||
|
|
||||||
withdrawDialog.open({
|
withdrawDialog.open({
|
||||||
callback: callback,
|
callback: callback,
|
||||||
next_focus: next_focus,
|
next_focus: kpsul.article_manager,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,7 +847,7 @@ $(document).ready(function() {
|
||||||
} else {
|
} else {
|
||||||
// F2 - Basket reset
|
// F2 - Basket reset
|
||||||
resetBasket();
|
resetBasket();
|
||||||
articleSelect.focus();
|
kpsul.article_manager.focus();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case 114:
|
case 114:
|
||||||
|
|
Loading…
Reference in a new issue