Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit afb5f038 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

model.js, index.html: update menu with changeTimeFormat()

parent 970d34cd
...@@ -231,9 +231,9 @@ ...@@ -231,9 +231,9 @@
<div class="menu_box"> <div class="menu_box">
point key</br> point key</br>
<div class="buttonSelector" onclick="m.changeTimeFormat('name')"><input type="radio" name="time" value="name" checked>name</input></div> <div class="buttonSelector" onclick="m.changeTimeFormat('name', true)"><input type="radio" name="time" value="name" checked>name</input></div>
<div class="buttonSelector" onclick="m.changeTimeFormat('sampling_date')"><input type="radio" name="time" value="sampling_date" >sampling date</input></div> <div class="buttonSelector" onclick="m.changeTimeFormat('sampling_date', true)"><input type="radio" name="time" value="sampling_date" >sampling date</input></div>
<div class="buttonSelector" onclick="m.changeTimeFormat('delta_date')"><input type="radio" name="time" value="delta_date" >day after first sample</input></div> <div class="buttonSelector" onclick="m.changeTimeFormat('delta_date', true)"><input type="radio" name="time" value="delta_date">day after first sample</input></div>
</div> </div>
<div class="submenu" id="system_menu" style="display:none"> <div class="submenu" id="system_menu" style="display:none">
......
...@@ -60,7 +60,8 @@ Model.prototype = { ...@@ -60,7 +60,8 @@ Model.prototype = {
this.colorMethod = "Tag"; this.colorMethod = "Tag";
this.notation_type = "percent" this.notation_type = "percent"
this.time_type = "name" this.changeTimeFormat("name")
this.display_window = false this.display_window = false
this.isPlaying = false; this.isPlaying = false;
...@@ -457,7 +458,7 @@ Model.prototype = { ...@@ -457,7 +458,7 @@ Model.prototype = {
deltas = this.dateDiffMinMax() deltas = this.dateDiffMinMax()
myConsole.log(deltas) myConsole.log(deltas)
if (deltas.max > 1) if (deltas.max > 1)
this.time_type = "delta_date" this.changeTimeFormat("delta_date")
// NSIZE // NSIZE
var n_max = 0; var n_max = 0;
...@@ -1594,9 +1595,9 @@ Model.prototype = { ...@@ -1594,9 +1595,9 @@ Model.prototype = {
/* use name / date /* use name / date
* *
* */ * */
changeTimeFormat: function (time) { changeTimeFormat: function (time, update) {
this.time_type = time this.time_type = time
this.update(); if (update) this.update()
var radio = document.getElementsByName("time"); var radio = document.getElementsByName("time");
for(var elem in radio){ for(var elem in radio){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment