[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 198/219: Task #001381 : reinitialize the sear
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 198/219: Task #001381 : reinitialize the search_form |
Date: |
Mon, 18 Dec 2017 13:23:02 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 5d3f0caef958c31fda8b9d52991db935f9c3b0bc
Author: Dany De Bontridder <address@hidden>
Date: Sun Dec 10 17:09:09 2017 +0100
Task #001381 : reinitialize the search_form
---
html/js/acc_ledger.js | 28 +++++++++++++++++++++++++++-
include/template/ledger_search.php | 1 +
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 9203659..661ec5f 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -1372,4 +1372,30 @@ function delete_filter (p_div,p_dossier,p_filter_id) {
}
})
-}
\ No newline at end of file
+}
+/**
+ * Reset the search_form and reinitialize all the input but ledger_type
+ * @param p_div prefix for DOM Element
+ */
+function reset_filter(p_div) {
+ // clean all the input fields but ledger_type remains
+ var
elt=['date_start','date_end','date_paid_start','date_paid_end','desc','amount_min','amount_max','qcode','accounting'];
+ for (var i=0;i<elt.length;i++) {
+ var idx=elt[i];
+ console.log("idx = "+p_div+idx);
+ $(p_div+idx).value="";
+ }
+
+ // clean all the selected ledger
+ var eltLedgerId=$("ledger_id"+p_div);
+ eltLedgerId.innerHTML="";
+ var eltHidden=document.createElement("input");
+ eltHidden.setAttribute("name",p_div+"nb_jrn");
+ eltHidden.setAttribute("type","hidden");
+ eltHidden.setAttribute("id",p_div+"nb_jrn");
+ eltHidden.setAttribute("value",0);
+ eltLedgerId.appendChild(eltHidden);
+
+ // By default , unpaid is uncked
+ $(p_div+"unpaid").checked=false;
+}
\ No newline at end of file
diff --git a/include/template/ledger_search.php
b/include/template/ledger_search.php
index ccd65e3..fe75e6f 100644
--- a/include/template/ledger_search.php
+++ b/include/template/ledger_search.php
@@ -86,5 +86,6 @@ require_once NOALYSS_INCLUDE.'/lib/select_box.class.php';
$box=new Select_Box("{$this->div}button","Filtre");
$box->add_input(_('Ajout'), $save_filter);
$box->add_javascript(_('Gestion Filtre'), $search_filter);
+$box->add_javascript(_('Remise à zéro'), "reset_filter('{$this->div}')");
echo $box->input();
?>
- [Noalyss-commit] [noalyss] 174/219: space, (continued)
- [Noalyss-commit] [noalyss] 174/219: space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 114/219: Change max article in STOCK INV, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 16/219: Update test with new architecture, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 173/219: Improve calc, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 104/219: Réécriture de CFGPCMN pour utiliser ManageTable pas de delete proposé si compte utilisé, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 14/219: Infobulle : warning : esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 44/219: fix minor bug + doc, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 46/219: Manage_Table : Improve Javascript for adding / removing row of table, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 27/219: Task #0001443: opérations rapprochées : bug quand on utilise des tva avec autoliquidation Check with the view v_quant_detail and take into account the negative VAT, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 33/219: Task #0001324: Afficher la date (période) dans FSALDO, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 198/219: Task #001381 : reinitialize the search_form,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 154/219: Task #1440 CA - opération diverses inaccessibles Task #1370 les OD en comptabilité analytique - problème., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 209/219: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 186/219: Protect queryString with encodeURI, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 207/219: Task #1381 Change esthetic Search Filter, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 208/219: Fix search for reconcile, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 157/219: Fix issue with open_basedir, sometime set in the server config, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 196/219: Task #001381 : favori de filtre , table pour sauvegarder, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 109/219: Add button to pin the box, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 134/219: #0001414: LETTRAGE - montants différents non indiqués Apparation d'une bulle d'info avec la différence, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 147/219: ANC : ANC_TABLE replace PGPLSQL procedure by Php functions : Anc_Table:create_temp_account Anc_Table:create_temp_card, Dany De Bontridder, 2017/12/18