Commit 68ac3ea9 by Mac Stephens

Add scroll to row for copy entry, fix location of save/cancel buttons --> v0.9.3 Deployed

parent 0b6d8acf
...@@ -22,7 +22,7 @@ type ...@@ -22,7 +22,7 @@ type
public public
currentTaskId: string; currentTaskId: string;
currentTimeEntryDate: string; currentTimeEntryDate: string;
const clientVersion = '0.8.9'; const clientVersion = '0.9.3';
procedure InitApp(SuccessProc: TSuccessProc; procedure InitApp(SuccessProc: TSuccessProc;
UnauthorizedAccessProc: TUnauthorizedAccessProc); UnauthorizedAccessProc: TUnauthorizedAccessProc);
procedure SetClientConfig(Callback: TVersionCheckCallback); procedure SetClientConfig(Callback: TVersionCheckCallback);
......
...@@ -79,6 +79,7 @@ type ...@@ -79,6 +79,7 @@ type
procedure SetTimeEntriesLabel(const AName: string); procedure SetTimeEntriesLabel(const AName: string);
procedure CaptureTableScroll; procedure CaptureTableScroll;
procedure RestoreTableScroll; procedure RestoreTableScroll;
procedure ScrollToNewEntryRow;
procedure EditorInput(Event: TJSEvent); procedure EditorInput(Event: TJSEvent);
procedure RowFocusOut(Event: TJSEvent); procedure RowFocusOut(Event: TJSEvent);
procedure RowClick(Event: TJSEvent); procedure RowClick(Event: TJSEvent);
...@@ -523,7 +524,7 @@ begin ...@@ -523,7 +524,7 @@ begin
html := html + html := html +
'<tr class="time-new-entry-actions-row">' + '<tr class="time-new-entry-actions-row">' +
'<td colspan="7" class="p-0 border-0">' + '<td colspan="7" class="p-0 border-0">' +
'<div class="position-sticky d-flex justify-content-end py-1 pe-2" style="right:0; z-index:5; pointer-events:none;">' + '<div class="position-sticky d-inline-flex py-1 ps-2" style="left:0; z-index:5; pointer-events:none;">' +
'<div class="bg-body border rounded shadow-sm p-2 d-flex gap-2" style="pointer-events:auto;">' + '<div class="bg-body border rounded shadow-sm p-2 d-flex gap-2" style="pointer-events:auto;">' +
'<button type="button" id="btn_time_new_save" class="btn btn-sm btn-success">Save</button>' + '<button type="button" id="btn_time_new_save" class="btn btn-sm btn-success">Save</button>' +
'<button type="button" id="btn_time_new_cancel" class="btn btn-sm btn-outline-secondary">Cancel</button>' + '<button type="button" id="btn_time_new_cancel" class="btn btn-sm btn-outline-secondary">Cancel</button>' +
...@@ -1398,8 +1399,8 @@ begin ...@@ -1398,8 +1399,8 @@ begin
btnCopyEntry.Enabled := False; btnCopyEntry.Enabled := False;
HideRowValidationMessage; HideRowValidationMessage;
CaptureTableScroll;
RenderTable; RenderTable;
ScrollToNewEntryRow;
Result := True; Result := True;
end; end;
...@@ -1490,8 +1491,8 @@ begin ...@@ -1490,8 +1491,8 @@ begin
btnCopyEntry.Enabled := False; btnCopyEntry.Enabled := False;
HideRowValidationMessage; HideRowValidationMessage;
CaptureTableScroll;
RenderTable; RenderTable;
ScrollToNewEntryRow;
Result := True; Result := True;
end; end;
...@@ -1578,6 +1579,29 @@ begin ...@@ -1578,6 +1579,29 @@ begin
end; end;
end; end;
procedure TFTimeEntries.ScrollToNewEntryRow;
begin
asm
const row = document.querySelector('tr[data-idx="' + this.FNewEntryRowIndex + '"]');
if (!row) return;
row.scrollIntoView({
behavior: 'auto',
block: 'nearest',
inline: 'nearest'
});
const firstEditor =
row.querySelector('[data-field="taskId"]') ||
row.querySelector('[data-field="hours"]') ||
row.querySelector('.time-editor');
if (firstEditor)
firstEditor.focus();
end;
end;
procedure TFTimeEntries.SetTopControlsEnabled(AEnabled: Boolean); procedure TFTimeEntries.SetTopControlsEnabled(AEnabled: Boolean);
begin begin
edtWeekOf.Enabled := AEnabled; edtWeekOf.Enabled := AEnabled;
......
...@@ -94,14 +94,15 @@ ...@@ -94,14 +94,15 @@
<DCC_RemoteDebug>false</DCC_RemoteDebug> <DCC_RemoteDebug>false</DCC_RemoteDebug>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale> <VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=0.9.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.8.0;Comments=;LastCompiledTime=2018/08/27 15:18:29</VerInfo_Keys> <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=0.9.3.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.8.0;Comments=;LastCompiledTime=2018/08/27 15:18:29</VerInfo_Keys>
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode> <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
<VerInfo_MajorVer>0</VerInfo_MajorVer> <VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer> <VerInfo_MinorVer>9</VerInfo_MinorVer>
<TMSWebBrowser>1</TMSWebBrowser>
<TMSUseJSDebugger>2</TMSUseJSDebugger> <TMSUseJSDebugger>2</TMSUseJSDebugger>
<VerInfo_Release>3</VerInfo_Release>
<TMSWebOutputPath>..\emT3XDataServer\bin\static</TMSWebOutputPath> <TMSWebOutputPath>..\emT3XDataServer\bin\static</TMSWebOutputPath>
<TMSWebSingleInstance>1</TMSWebSingleInstance> <TMSWebSingleInstance>1</TMSWebSingleInstance>
<TMSWebBrowser>1</TMSWebBrowser>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''"> <PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
......
[Settings] [Settings]
MemoLogLevel=4 MemoLogLevel=4
FileLogLevel=4 FileLogLevel=4
webClientVersion=0.8.9 webClientVersion=0.9.3
LogFileNum=244 LogFileNum=245
[Database] [Database]
Server=192.168.102.133 Server=192.168.102.133
......
...@@ -114,11 +114,12 @@ ...@@ -114,11 +114,12 @@
<VerInfo_Locale>1033</VerInfo_Locale> <VerInfo_Locale>1033</VerInfo_Locale>
<DCC_ExeOutput>.\bin</DCC_ExeOutput> <DCC_ExeOutput>.\bin</DCC_ExeOutput>
<DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> <DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.0.1;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.11;Comments=</VerInfo_Keys> <VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.3.1;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.11;Comments=</VerInfo_Keys>
<VerInfo_MajorVer>0</VerInfo_MajorVer> <VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer> <VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion> <VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<VerInfo_Build>1</VerInfo_Build> <VerInfo_Build>1</VerInfo_Build>
<VerInfo_Release>3</VerInfo_Release>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''"> <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode> <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
......
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