dynamically update title and visible durations for running records (#752)
This commit is contained in:
@@ -189,6 +189,9 @@
|
||||
});
|
||||
{# $.kimai.pauseRecord('li.messages-menu ul.menu li'); #}
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
new KimaiActiveRecordsDuration('[data-since]').updateRecords().registerUpdates(5000);
|
||||
});
|
||||
</script>
|
||||
{% set event = trigger(constant('App\\Event\\ThemeEvent::JAVASCRIPT')) %}
|
||||
{{ event.content|raw }}
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
</div>
|
||||
<h4>
|
||||
<span>{{ entry.activity.name }}</span>
|
||||
<small><i class="{{ 'timesheet'|icon }}"></i> {{ entry|duration }}</small>
|
||||
<small>
|
||||
<i class="{{ 'timesheet'|icon }}"></i>
|
||||
<span data-title="true" data-since="{{ entry.begin.format(constant('DATE_ISO8601')) }}" data-format="{{ get_format_duration() }}">{{ entry|duration }}</span>
|
||||
</small>
|
||||
</h4>
|
||||
<p>{{ entry.project.name }} ({{ entry.project.customer.name }})</p>
|
||||
</a>
|
||||
|
||||
@@ -59,7 +59,9 @@
|
||||
{% if not duration_only %}
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'endtime') }}">‐</td>
|
||||
{% endif %}
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'duration') }}"><i>{{ entry|duration }}</i></td>
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'duration') }}">
|
||||
<i data-since="{{ entry.begin.format(constant('DATE_ISO8601')) }}" data-format="{{ get_format_duration() }}">{{ entry|duration }}</i>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'rate') }}">
|
||||
{% if not entry.end or not is_granted('view_rate', entry) %}
|
||||
|
||||
@@ -77,7 +77,9 @@
|
||||
{% if not duration_only %}
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'endtime') }}">‐</td>
|
||||
{% endif %}
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'duration') }}"><i>{{ entry|duration }}</i></td>
|
||||
<td class="text-nowrap {{ tables.data_table_column_class(tableName, columns, 'duration') }}">
|
||||
<i data-since="{{ entry.begin.format(constant('DATE_ISO8601')) }}" data-format="{{ get_format_duration() }}">{{ entry|duration }}</i>
|
||||
</td>
|
||||
{% if canSeeRate %}
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'rate') }}">‐</td>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user