File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
static/javascript/indigo/views
templates/indigo_api/document Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 64
64
// setup renderer
65
65
this . editorReady = $ . Deferred ( ) ;
66
66
this . setupRenderers ( ) ;
67
+
68
+ // fake a click on the most recent point in time for comparison
69
+ let mostRecent = document . querySelector ( '.show-pit-comparison.most-recent' ) ;
70
+ if ( mostRecent ) {
71
+ mostRecent . click ( ) ;
72
+ }
67
73
} ,
68
74
69
75
setupRenderers : function ( ) {
Original file line number Diff line number Diff line change 10
10
< button type ="button " class ="btn btn-outline-secondary dropdown-toggle " data-bs-toggle ="dropdown "> < i class ="fas fa-exchange-alt "> </ i > {% trans "Compare to" %}</ button >
11
11
< div class ="dropdown-menu ">
12
12
{% for exp in comparison_expressions %}
13
- < button class ="dropdown-item show-pit-comparison " data-id ="{{ exp.id }} ">
13
+ < button
14
+ class ="dropdown-item show-pit-comparison {% if forloop.counter0 == 1 %}most-recent{% endif %} "
15
+ data-id ="{{ exp.id }} "
16
+ >
14
17
{{ exp.expression_date|date:"Y-m-d" }}
15
18
{% if exp.id == document.id %}– {% trans "current point in time" %}{% endif %}
16
19
</ button >
You can’t perform that action at this time.
0 commit comments