mirror of
https://github.com/Ellpeck/ObsidianSimpleTimeTracker.git
synced 2024-11-28 12:08:34 +01:00
Compare commits
2 commits
f308679bd2
...
19f37fe56a
Author | SHA1 | Date | |
---|---|---|---|
|
19f37fe56a | ||
|
c587f83890 |
1 changed files with 3 additions and 7 deletions
|
@ -10,7 +10,7 @@ export interface Entry {
|
|||
startTime: string;
|
||||
endTime: string;
|
||||
subEntries: Entry[];
|
||||
collapsed?: number;
|
||||
collapsed?: boolean;
|
||||
}
|
||||
|
||||
export async function saveTracker(tracker: Tracker, app: App, fileName: string, section: MarkdownSectionInformation): Promise<void> {
|
||||
|
@ -328,16 +328,12 @@ function addEditableTableRow(tracker: Tracker, entry: Entry, table: HTMLTableEle
|
|||
if (entry.collapsed) {
|
||||
delete entry.collapsed;
|
||||
} else {
|
||||
entry.collapsed = 1;
|
||||
entry.collapsed = true;
|
||||
}
|
||||
await saveTracker(tracker, this.app, getFile(), getSectionInfo());
|
||||
});
|
||||
if (!entry.subEntries?.length) expandButton.buttonEl.style.visibility = 'hidden';
|
||||
let nameWrapper = nameField.cell.createDiv({cls: "simple-time-tracker-table-expandwrapper"});
|
||||
nameWrapper.style.marginLeft = nameField.label.style.marginLeft;
|
||||
nameField.label.style.marginLeft = null;
|
||||
nameWrapper.insertBefore(expandButton.buttonEl, null);
|
||||
nameWrapper.insertBefore(nameField.label, null);
|
||||
nameField.cell.insertBefore(expandButton.buttonEl, nameField.label);
|
||||
|
||||
let entryButtons = row.createEl("td");
|
||||
entryButtons.addClass("simple-time-tracker-table-buttons");
|
||||
|
|
Loading…
Reference in a new issue