[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 219/323: Improve cal
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 219/323: Improve cal |
Date: |
Wed, 14 Mar 2018 17:38:52 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9581ba5958bedec40a77111fb91ed23211ac932b
Author: Dany De Bontridder <address@hidden>
Date: Sun Feb 18 21:31:49 2018 +0100
Improve cal
---
html/js/calc.js | 11 +++++++----
html/js/scripts.js | 4 ++--
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/html/js/calc.js b/html/js/calc.js
index 5460a7b..fe71536 100644
--- a/html/js/calc.js
+++ b/html/js/calc.js
@@ -62,20 +62,23 @@ function cal()
var str_sub="Total :"+p_variable+" = "+result.toString();
this.document.getElementById("sub_total").innerHTML=str_sub;
this.document.getElementById("listing").innerHTML=p_history;
- this.document.getElementById('inp').value="";
+ this.document.getElementById('inp').value=result;
}
// Clean
//
-function Clean()
+function CleanHistory()
{
this.document.getElementById('listing').innerHTML="";
- this.document.getElementById('result').innerHTML="";
this.document.getElementById('sub_total').innerHTML="";
this.document.getElementById('inp').value="";
this.document.getElementById('inp').focus();
}
-
+function Clean()
+{
+ this.document.getElementById('inp').value="";
+ this.document.getElementById('inp').focus();
+}
function Compute()
{
var tot=0;
diff --git a/html/js/scripts.js b/html/js/scripts.js
index 4e15b53..5634fb5 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -1077,10 +1077,10 @@ function show_calc()
var sid = 'calc1';
var shtml = '';
shtml +="<div class=\"bxbutton\">";
- shtml += '<a class="icon" onclick="pin(\'calc1\')"
id="pin_calc1"></a> <a onclick="removeDiv(\'calc1\');"
href="javascript:void(0)" id="close_div">X</a>';
+ shtml += '<a class="icon" onclick="pin(\'calc1\')"
id="pin_calc1"></a> <a onclick="removeDiv(\'calc1\');"
href="javascript:void(0)" title="" class="icon">⨉</a>';
shtml +="</div>";
shtml += ' <h2 class="title">Calculatrice</h2>';
- shtml += '<form name="calc_line" method="GET" onSubmit="cal();return
false;" >Calculatrice simplifiée: écrivez simplement les opérations que vous
voulez puis la touche retour. exemple : 1+2+3*(1/5) <input class="input_text"
type="text" size="30" id="inp" name="calculator"> <input type="button"
value="Efface tout" class="button" onClick="Clean();return false;" > <input
type="button" class="button" value="Fermer" onClick="removeDiv(\'calc1\')" >';
+ shtml += '<form name="calc_line" method="GET" onSubmit="cal();return
false;" >Calculatrice simplifiée: écrivez simplement les opérations que vous
voulez puis la touche retour. exemple : 1+2+3*(1/5) <input class="input_text"
type="text" size="30" id="inp" name="calculator"> <input type="button"
value="Efface" class="button" onClick="Clean();return false;" > <input
type="button" value="Efface historique" class="button"
onClick="CleanHistory();return false;" > <input type="button" clas [...]
shtml += '</form><span class="highligth" style="display:block"
id="sub_total"> Taper une formule (ex 20*5.1) puis enter </span><span
style="display:block" id="listing"> </span>';
var obj = {id: sid, html: shtml,
- [Noalyss-commit] [noalyss] 184/323: missing file, (continued)
- [Noalyss-commit] [noalyss] 184/323: missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 260/323: esthetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 311/323: Follow-up fix small bug with ag_ref, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 307/323: Task #0001563: check date limit VEN & ACH, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 212/323: Bug : Periode cannot add a new exercice, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 228/323: Document_Modele CFGDOC warning if there is no template, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 161/323: Esthetic : improve, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 222/323: TextArea : fix move when focus, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 203/323: Esthetic : menu administration, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 247/323: Javascript : improve exception management for fill_box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 219/323: Improve cal,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 237/323: Database : change SQL function, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 266/323: Upgrade : improve message, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 254/323: Tag : fix bug when adding a new tag, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 246/323: Javascript : improve exception management for fill_box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 253/323: ANCPLAN : fix bug when removing operation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 285/323: CSS : esthetic div.box (dashboard) width : 98%, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 178/323: User::check_module improve doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 180/323: Symbol zoom, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 259/323: fix box search reconcile, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 231/323: Bug : IDate readonly does not contain the ID, Dany De Bontridder, 2018/03/14