fix bug clear

feature/docker
Dmitriy Shesterkin 9 years ago
parent 9e6970c86a
commit f280d9dac3
  1. 2
      Makefile
  2. 24
      src/dokumentor/static/js/client/search-external-api.js
  3. 2
      src/dokumentor/templates/base.html

@ -17,7 +17,7 @@ build:
# target: build-stage - Build all docker containers, defined in docker-compose.stage.yml # target: build-stage - Build all docker containers, defined in docker-compose.stage.yml
build-stage: build-stage:
docker-compose build -f docker-compose.stage.yml docker-compose -f docker-compose.stage.yml build
# target: virtualenv - Make virtualenv # target: virtualenv - Make virtualenv
virtualenv: virtualenv:

@ -117,10 +117,8 @@ $(document).ready(function() {
if (!data) return; if (!data) return;
if (data.type === "LEGAL"|| data.type === "INDIVIDUAL" ) { if (data.type === "LEGAL"|| data.type === "INDIVIDUAL" ) {
confirmChangeDataPromise(clientInputs).then(function (answer) { confirmChangeDataPromise(clientInputs).then(function (answer) {
if (answer) { if (answer) { changeDataInInputs(data) }
changeDataInInputs(data) cleanSearchInput();
}
cleanSearchInput();
}) ; }) ;
} else { } else {
changeDataInInputs(data) changeDataInInputs(data)
@ -139,21 +137,19 @@ $(document).ready(function() {
} }
bankSearch.on('keyup',(function () { bankSearch.on('keyup',(function () {
// TODO: on clear button
if (bankSearch.val().length === 0) { if (bankSearch.val().length === 0) {
clearResultSearchDiv($("#searchBankResult")); clearResultSearchDiv($("#searchBankResult"));
clearSearchInputs([bankFullName, bankBic, bankCorrespondentAccount]); clearSearchInputs([bankFullName, bankBic, bankCorrespondentAccount]);
} }
})); }));
// TODO: on clear button
clientSearch.on('keyup',(function () { // clientSearch.on('keyup',(function () {
//
if (clientSearch.val().length === 0) { // if (clientSearch.val().length === 0) {
// console.log(clientSearch.val().length); // clearSearchInputs([clientName, clientInn, clientKpp, clientOqrn, clientAddress, clientNameShort, clientNameShortD, contactName]);
clearSearchInputs([clientName, clientInn, clientKpp, clientOqrn, clientAddress]); // }
} else { // }));
}
}));
fillInput(clientSearch, "PARTY", 5); fillInput(clientSearch, "PARTY", 5);
fillInput(bankSearch, "BANK", 1); fillInput(bankSearch, "BANK", 1);

@ -10,7 +10,7 @@
<link rel="shortcut icon" href="{% static 'favicon.ico' %}" /> <link rel="shortcut icon" href="{% static 'favicon.ico' %}" />
<link rel="stylesheet" href="{% static 'css/ui-lightness/jquery-ui-1.10.3.custom.css' %}" /> <link rel="stylesheet" href="{% static 'css/ui-lightness/jquery-ui-1.10.3.custom.css' %}" />
<link rel="stylesheet" href="{% static 'css/suggestions.css' %}" /> <link rel="stylesheet" href="{% static 'css/suggestions.css' %}" />
<link rel="stylesheet" href="{% static 'css/style.css' %}?t=1489695907" /> <link rel="stylesheet" href="{% static 'css/style.css' %}?t=1489695908" />
{% render_block "css" %} {% render_block "css" %}
</head> </head>
<body> <body>

Loading…
Cancel
Save