mirror of
https://github.com/Ellpeck/ObsidianSimpleTimeTracker.git
synced 2024-11-27 19:48:34 +01:00
Compare commits
2 commits
f11ce3e807
...
578eac6007
Author | SHA1 | Date | |
---|---|---|---|
|
578eac6007 | ||
|
29ee1614e9 |
2 changed files with 6 additions and 16 deletions
|
@ -1 +0,0 @@
|
|||
**
|
|
@ -370,23 +370,13 @@ class EditableTimestampField extends EditableField {
|
|||
}
|
||||
}
|
||||
|
||||
function addEditableTableRow(
|
||||
tracker: Tracker,
|
||||
entry: Entry,
|
||||
table: HTMLTableElement,
|
||||
newSegmentNameBox: TextComponent,
|
||||
trackerRunning: boolean,
|
||||
file: string,
|
||||
getSectionInfo: () => MarkdownSectionInformation,
|
||||
settings: SimpleTimeTrackerSettings,
|
||||
indent: number
|
||||
): void {
|
||||
function addEditableTableRow(tracker: Tracker, entry: Entry, table: HTMLTableElement, newSegmentNameBox: TextComponent, trackerRunning: boolean, file: string, getSectionInfo: () => MarkdownSectionInformation, settings: SimpleTimeTrackerSettings, indent: number): void {
|
||||
let entryRunning = getRunningEntry(tracker.entries) == entry;
|
||||
let row = table.createEl("tr");
|
||||
|
||||
let nameField = new EditableField(row, indent, entry.name);
|
||||
let startField = new EditableTimestampField(row, entry.startTime, settings);
|
||||
let endField = new EditableTimestampField(row, entry.endTime, settings);
|
||||
let startField = new EditableTimestampField(row, (entry.startTime), settings);
|
||||
let endField = new EditableTimestampField(row, (entry.endTime), settings);
|
||||
|
||||
row.createEl("td", {text: entry.endTime || entry.subEntries ? formatDuration(getDuration(entry), settings) : ""});
|
||||
|
||||
|
@ -440,7 +430,8 @@ function addEditableTableRow(
|
|||
});
|
||||
|
||||
if (entry.subEntries) {
|
||||
for (let sub of orderedEntries(entry.subEntries, settings)) addEditableTableRow(tracker, sub, table, newSegmentNameBox, trackerRunning, file, getSectionInfo, settings, indent + 1);
|
||||
for (let sub of orderedEntries(entry.subEntries, settings))
|
||||
addEditableTableRow(tracker, sub, table, newSegmentNameBox, trackerRunning, file, getSectionInfo, settings, indent + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue