Commit afb5f038 authored by Mathieu Giraud's avatar Mathieu Giraud

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

parent 970d34cd
......@@ -231,9 +231,9 @@
<div class="menu_box">
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('sampling_date')"><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('name', true)"><input type="radio" name="time" value="name" checked>name</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', true)"><input type="radio" name="time" value="delta_date">day after first sample</input></div>
</div>
<div class="submenu" id="system_menu" style="display:none">
......
......@@ -60,7 +60,8 @@ Model.prototype = {
this.colorMethod = "Tag";
this.notation_type = "percent"
this.time_type = "name"
this.changeTimeFormat("name")
this.display_window = false
this.isPlaying = false;
......@@ -457,7 +458,7 @@ Model.prototype = {
deltas = this.dateDiffMinMax()
myConsole.log(deltas)
if (deltas.max > 1)
this.time_type = "delta_date"
this.changeTimeFormat("delta_date")
// NSIZE
var n_max = 0;
......@@ -1594,9 +1595,9 @@ Model.prototype = {
/* use name / date
*
* */
changeTimeFormat: function (time) {
changeTimeFormat: function (time, update) {
this.time_type = time
this.update();
if (update) this.update()
var radio = document.getElementsByName("time");
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