• R/O
  • SSH
  • HTTPS

mantisbtmonitor: Commit


Commit MetaInfo

Revision83 (tree)
Zeit2022-06-22 05:34:09
Autorderekwildstar

Log Message

Corrigido o problema do não carregamento do comentário na tela de edição de comentários
Agora a tela de status (sem o blender) é exibida ao executar a função de login

Ändern Zusammenfassung

Diff

--- trunk/client/prj/MantisBTMonitor.dproj (revision 82)
+++ trunk/client/prj/MantisBTMonitor.dproj (revision 83)
@@ -119,7 +119,7 @@
119119 <VerInfo_MinorVer>0</VerInfo_MinorVer>
120120 <VerInfo_Release>0</VerInfo_Release>
121121 <VerInfo_Locale>1033</VerInfo_Locale>
122- <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.837;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
122+ <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.863;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
123123 <Debugger_RunParams>/desenvolvimento</Debugger_RunParams>
124124 <VerInfo_AutoGenVersion>false</VerInfo_AutoGenVersion>
125125 <VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
@@ -126,7 +126,7 @@
126126 <DCC_DebugInformation>2</DCC_DebugInformation>
127127 <DCC_SymbolReferenceInfo>2</DCC_SymbolReferenceInfo>
128128 <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
129- <VerInfo_Build>837</VerInfo_Build>
129+ <VerInfo_Build>863</VerInfo_Build>
130130 <DCC_MapFile>3</DCC_MapFile>
131131 </PropertyGroup>
132132 <ItemGroup>
--- trunk/client/src/lib/UFunctions.pas (revision 82)
+++ trunk/client/src/lib/UFunctions.pas (revision 83)
@@ -29,9 +29,9 @@
2929 //: especiais de aprovação/reprovação de tarefas, apenas os cabeçalhos padrão de
3030 //: comentários de acordo com a unidade do usuário
3131 procedure AddCommentHeader(var AComment: String; AHeaderDescription: String = '');
32-function ShowStatusForm(AFormToBlock: TForm): TKRKFormBlender;
33-procedure HideStatusForm(AFormBlender: TKRKFormBlender);
34-procedure UpdateStatusForm(AFormBlender: TKRKFormBlender; ADescription: String);
32+function ShowStatusFormBlender(AFormToBlock: TForm): TKRKFormBlender;
33+procedure HideStatusFormBlender(AFormBlender: TKRKFormBlender);
34+procedure UpdateStatusFormBlender(AFormBlender: TKRKFormBlender; ADescription: String);
3535
3636 implementation
3737
@@ -1199,15 +1199,15 @@
11991199 end;
12001200 end;
12011201
1202-function ShowStatusForm(AFormToBlock: TForm): TKRKFormBlender;
1202+function ShowStatusFormBlender(AFormToBlock: TForm): TKRKFormBlender;
12031203 begin
12041204 if Assigned(AFormToBlock) then
1205- TKRKFormBlender.ShowMe(AFormToBlock,TFORMStatus,Result)
1205+ TKRKFormBlender.ShowMe(AFormToBlock,TFormStatus,Result)
12061206 else
12071207 Result := nil;
12081208 end;
12091209
1210-procedure HideStatusForm(AFormBlender: TKRKFormBlender);
1210+procedure HideStatusFormBlender(AFormBlender: TKRKFormBlender);
12111211 begin
12121212 if Assigned(AFormBlender) then
12131213 begin
@@ -1216,7 +1216,7 @@
12161216 end;
12171217 end;
12181218
1219-procedure UpdateStatusForm(AFormBlender: TKRKFormBlender; ADescription: String);
1219+procedure UpdateStatusFormBlender(AFormBlender: TKRKFormBlender; ADescription: String);
12201220 begin
12211221 if Assigned(AFormBlender) then
12221222 begin
--- trunk/client/src/lib/UScrapFunctions.pas (revision 82)
+++ trunk/client/src/lib/UScrapFunctions.pas (revision 83)
@@ -33,36 +33,41 @@
3333 Req: TRequestOptions;
3434 Res: TResponse;
3535 begin
36- ZeroMemory(@Req,SizeOf(TRequestOptions));
37- ZeroMemory(@Res,SizeOf(TResponse));
36+// FS: TFormStatus := TFormStatus.Create(Application);
37+ try
38+ ZeroMemory(@Req,SizeOf(TRequestOptions));
39+ ZeroMemory(@Res,SizeOf(TResponse));
3840
39- Req.AutoClearSSLState := True;
41+ Req.AutoClearSSLState := True;
4042
41- Req.InternetOpenParams.Agent := 'MantisBT Monitor';
42- Req.InternetOpenParams.AccessType := INTERNET_OPEN_TYPE_PRECONFIG;
43- Req.InternetConnectParams.ServerName := PChar(Configurations.MantisBTBaseUrl + '/mantis/logout_page.php');
44- Req.InternetConnectParams.Service := INTERNET_SERVICE_HTTP;
45- Req.InternetConnectParams.Context := AHandle;
43+ Req.InternetOpenParams.Agent := 'MantisBT Monitor';
44+ Req.InternetOpenParams.AccessType := INTERNET_OPEN_TYPE_PRECONFIG;
45+ Req.InternetConnectParams.ServerName := PChar(Configurations.MantisBTBaseUrl + '/mantis/logout_page.php');
46+ Req.InternetConnectParams.Service := INTERNET_SERVICE_HTTP;
47+ Req.InternetConnectParams.Context := AHandle;
4648
47- Req.HttpOpenRequestParams.Verb := 'GET';
48- Req.HttpOpenRequestParams.AcceptTypes := TStringList.Create;
49- try
50- Req.HttpOpenRequestParams.AcceptTypes.Add('*/*');
51- Req.HttpOpenRequestParams.Context := AHandle;
52- Req.HttpOpenRequestParams.AutoDetectHTTPS := True;
53- Req.HttpOpenRequestParams.IgnoreInvalidCertificates := True;
54- Req.HttpSendRequestParams.IgnoreInvalidCertificateCA := True;
55-
56- Res.Content := TStringStream.Create('',TEncoding.UTF8);
49+ Req.HttpOpenRequestParams.Verb := 'GET';
50+ Req.HttpOpenRequestParams.AcceptTypes := TStringList.Create;
5751 try
58- Request(Req,Res);
52+ Req.HttpOpenRequestParams.AcceptTypes.Add('*/*');
53+ Req.HttpOpenRequestParams.Context := AHandle;
54+ Req.HttpOpenRequestParams.AutoDetectHTTPS := True;
55+ Req.HttpOpenRequestParams.IgnoreInvalidCertificates := True;
56+ Req.HttpSendRequestParams.IgnoreInvalidCertificateCA := True;
5957
60- Result := Pos('<form id="login-form"',TStringStream(Res.Content).DataString) > 0;
58+ Res.Content := TStringStream.Create('',TEncoding.UTF8);
59+ try
60+ Request(Req,Res);
61+
62+ Result := Pos('<form id="login-form"',TStringStream(Res.Content).DataString) > 0;
63+ finally
64+ Res.Content.Free;
65+ end;
6166 finally
62- Res.Content.Free;
67+ Req.HttpOpenRequestParams.AcceptTypes.Free;
6368 end;
6469 finally
65- Req.HttpOpenRequestParams.AcceptTypes.Free;
70+
6671 end;
6772 end;
6873
@@ -247,53 +252,64 @@
247252 Req: TRequestOptions;
248253 Res: TResponse;
249254 begin
250- ZeroMemory(@Req,SizeOf(TRequestOptions));
251- ZeroMemory(@Res,SizeOf(TResponse));
252- ZeroMemory(@AUserInfo,SizeOf(TUserInfo));
255+ var FS: TFormStatus := TFormStatus.Create(Application);
256+ try
257+ FS.Position := poScreenCenter;
258+ FS.LABE.Caption := 'Favor aguardar enquanto o MantisBT Monitor está fazendo login na sua conta do Mantis...';
259+ FS.Show;
260+ FS.Update;
253261
254- Req.AutoClearSSLState := True;
262+ ZeroMemory(@Req,SizeOf(TRequestOptions));
263+ ZeroMemory(@Res,SizeOf(TResponse));
264+ ZeroMemory(@AUserInfo,SizeOf(TUserInfo));
255265
256- Req.Content := TStringStream.Create(Format('return=index.php&username=%s&password=%s&perm_login=on',[AUserName,APassword]));
257- try
258- Req.InternetOpenParams.Agent := 'MantisBT Monitor';
259- Req.InternetOpenParams.AccessType := INTERNET_OPEN_TYPE_PRECONFIG;
260- Req.InternetConnectParams.ServerName := PChar(Configurations.MantisBTBaseUrl + '/mantis/login.php');
261- Req.InternetConnectParams.Service := INTERNET_SERVICE_HTTP;
262- Req.InternetConnectParams.Context := AHandle;
266+ Req.AutoClearSSLState := True;
263267
264- Req.HttpOpenRequestParams.Verb := 'POST';
265- Req.HttpOpenRequestParams.AcceptTypes := TStringList.Create;
268+ Req.Content := TStringStream.Create(Format('return=index.php&username=%s&password=%s&perm_login=on',[AUserName,APassword]));
266269 try
267- Req.HttpOpenRequestParams.AcceptTypes.Add('*/*');
268- Req.HttpOpenRequestParams.Context := AHandle;
269- Req.HttpOpenRequestParams.AutoDetectHTTPS := True;
270- Req.HttpOpenRequestParams.IgnoreInvalidCertificates := True;
271- Req.HttpOpenRequestParams.Headers := TStringList.Create;
270+ Req.InternetOpenParams.Agent := 'MantisBT Monitor';
271+ Req.InternetOpenParams.AccessType := INTERNET_OPEN_TYPE_PRECONFIG;
272+ Req.InternetConnectParams.ServerName := PChar(Configurations.MantisBTBaseUrl + '/mantis/login.php');
273+ Req.InternetConnectParams.Service := INTERNET_SERVICE_HTTP;
274+ Req.InternetConnectParams.Context := AHandle;
275+
276+ Req.HttpOpenRequestParams.Verb := 'POST';
277+ Req.HttpOpenRequestParams.AcceptTypes := TStringList.Create;
272278 try
273- Req.HttpOpenRequestParams.Headers.Add('Content-Type: application/x-www-form-urlencoded');
274- Req.HttpSendRequestParams.IgnoreInvalidCertificateCA := True;
275-
276- Res.Content := TStringStream.Create('',TEncoding.UTF8);
279+ Req.HttpOpenRequestParams.AcceptTypes.Add('*/*');
280+ Req.HttpOpenRequestParams.Context := AHandle;
281+ Req.HttpOpenRequestParams.AutoDetectHTTPS := True;
282+ Req.HttpOpenRequestParams.IgnoreInvalidCertificates := True;
283+ Req.HttpOpenRequestParams.Headers := TStringList.Create;
277284 try
278- Request(Req,Res);
285+ Req.HttpOpenRequestParams.Headers.Add('Content-Type: application/x-www-form-urlencoded');
286+ Req.HttpSendRequestParams.IgnoreInvalidCertificateCA := True;
279287
280- Result := RegExMatch(TStringStream(Res.Content).DataString
281- ,'<a href="\/mantis\/account_page\.php">\s*([a-z]+)\s*\(\s*([^ ][\w\W ]+[^ ])\s*\)\s*<\/a>'
282- ,False
283- ,[]);
284- if Result then
285- Result := GetUserInfo(AHandle,AUserInfo);
288+ Res.Content := TStringStream.Create('',TEncoding.UTF8);
289+ try
290+ Request(Req,Res);
291+
292+ Result := RegExMatch(TStringStream(Res.Content).DataString
293+ ,'<a href="\/mantis\/account_page\.php">\s*([a-z]+)\s*\(\s*([^ ][\w\W ]+[^ ])\s*\)\s*<\/a>'
294+ ,False
295+ ,[]);
296+ if Result then
297+ Result := GetUserInfo(AHandle,AUserInfo);
298+ finally
299+ Res.Content.Free;
300+ end;
286301 finally
287- Res.Content.Free;
302+ Req.HttpOpenRequestParams.Headers.Free;
288303 end;
289304 finally
290- Req.HttpOpenRequestParams.Headers.Free;
305+ Req.HttpOpenRequestParams.AcceptTypes.Free;
291306 end;
292307 finally
293- Req.HttpOpenRequestParams.AcceptTypes.Free;
308+ Req.Content.Free;
294309 end;
295310 finally
296- Req.Content.Free;
311+ FS.Close;
312+ FS.Free;
297313 end;
298314 end;
299315
@@ -305,9 +321,9 @@
305321 HTMLDocument: IHTMLDocument;
306322 HTMLElement: IHTMLElement;
307323 begin
308- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
324+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
309325 try
310- UpdateStatusForm(FB,'Por favor aguarde enquanto o comentário está sendo atualizado...');
326+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto o comentário está sendo atualizado...');
311327
312328 ZeroMemory(@Req,SizeOf(TRequestOptions));
313329 ZeroMemory(@Res,SizeOf(TResponse));
@@ -380,7 +396,7 @@
380396 Req.Content.Free;
381397 end;
382398 finally
383- HideStatusForm(FB);
399+ HideStatusFormBlender(FB);
384400 end;
385401 end;
386402 {$WARN SYMBOL_PLATFORM ON}
@@ -1377,9 +1393,9 @@
13771393 Req: TRequestOptions;
13781394 Res: TResponse;
13791395 begin
1380- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
1396+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
13811397 try
1382- UpdateStatusForm(FB,'Por favor aguarde enquanto os detalhes da tarefa são obtidos...');
1398+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto os detalhes da tarefa são obtidos...');
13831399
13841400 ZeroMemory(@Req,SizeOf(TRequestOptions));
13851401 ZeroMemory(@Res,SizeOf(TResponse));
@@ -1413,7 +1429,7 @@
14131429 Req.HttpOpenRequestParams.AcceptTypes.Free;
14141430 end;
14151431 finally
1416- HideStatusForm(FB);
1432+ HideStatusFormBlender(FB);
14171433 end;
14181434 end;
14191435
@@ -1519,9 +1535,9 @@
15191535 Req: TRequestOptions;
15201536 Res: TResponse;
15211537 begin
1522- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
1538+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
15231539 try
1524- UpdateStatusForm(FB,'Por favor aguarde enquanto todas as suas tarefas são obtidas...');
1540+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto todas as suas tarefas são obtidas...');
15251541
15261542 ZeroMemory(@Req,SizeOf(TRequestOptions));
15271543 ZeroMemory(@Res,SizeOf(TResponse));
@@ -1555,7 +1571,7 @@
15551571 Req.HttpOpenRequestParams.AcceptTypes.Free;
15561572 end;
15571573 finally
1558- HideStatusForm(FB);
1574+ HideStatusFormBlender(FB);
15591575 end;
15601576 end;
15611577
@@ -1564,9 +1580,9 @@
15641580 Req: TRequestOptions;
15651581 Res: TResponse;
15661582 begin
1567- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
1583+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
15681584 try
1569- UpdateStatusForm(FB,'Por favor aguarde enquanto os dados do anexo são obtidos...');
1585+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto os dados do anexo são obtidos...');
15701586
15711587 ZeroMemory(@Req,SizeOf(TRequestOptions));
15721588 ZeroMemory(@Res,SizeOf(TResponse));
@@ -1603,7 +1619,7 @@
16031619 Req.HttpOpenRequestParams.AcceptTypes.Free;
16041620 end;
16051621 finally
1606- HideStatusForm(FB);
1622+ HideStatusFormBlender(FB);
16071623 end;
16081624 end;
16091625
@@ -1614,9 +1630,9 @@
16141630 Res: TResponse;
16151631 HTMLDocument: IHTMLdocument;
16161632 begin
1617- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
1633+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
16181634 try
1619- UpdateStatusForm(FB,'Por favor aguarde enquanto o comentário está sendo obtido...');
1635+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto o comentário está sendo obtido...');
16201636
16211637 ZeroMemory(@Req,SizeOf(TRequestOptions));
16221638 ZeroMemory(@Res,SizeOf(TResponse));
@@ -1670,7 +1686,7 @@
16701686 Req.HttpOpenRequestParams.AcceptTypes.Free;
16711687 end;
16721688 finally
1673- HideStatusForm(FB);
1689+ HideStatusFormBlender(FB);
16741690 end;
16751691 end;
16761692 {$WARN SYMBOL_PLATFORM ON}
@@ -1872,10 +1888,10 @@
18721888
18731889 Req.AutoClearSSLState := True;
18741890
1875- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
1891+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
18761892 Req.Content := TMemoryStream.Create;
18771893 try
1878- UpdateStatusForm(FB,'Por favor aguarde enquanto o comentário está sendo salvo...');
1894+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto o comentário está sendo salvo...');
18791895 // Adiciona o cabeçalho padrão de acordo com as configurações atuais, caso
18801896 // já não exista um cabeçalho
18811897 AddCommentHeader(AComment,ACommentHeaderDescription);
@@ -1933,7 +1949,7 @@
19331949 end;
19341950 finally
19351951 Req.Content.Free;
1936- HideStatusForm(FB);
1952+ HideStatusFormBlender(FB);
19371953 end;
19381954 end;
19391955
@@ -2066,9 +2082,9 @@
20662082 LastUpdated: String;
20672083 NewStatusId: Word;
20682084 begin
2069- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
2085+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
20702086 try
2071- UpdateStatusForm(FB,'Por favor aguarde enquanto a situação da tarefa é alterada...');
2087+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto a situação da tarefa é alterada...');
20722088
20732089 NewStatusId := Configurations.MantisConfigs.StatusByName[ANewStatus].Id;
20742090
@@ -2141,7 +2157,7 @@
21412157 end;
21422158 end;
21432159 finally
2144- HideStatusForm(FB);
2160+ HideStatusFormBlender(FB);
21452161 end;
21462162 end;
21472163
@@ -2194,13 +2210,13 @@
21942210
21952211 Req.AutoClearSSLState := True;
21962212
2197- var FB: TKRKFormBlender := ShowStatusForm(AFormToBlock);
2213+ var FB: TKRKFormBlender := ShowStatusFormBlender(AFormToBlock);
21982214 Req.Content := TMemoryStream.Create;
21992215 try
22002216 if AHomologation then
2201- UpdateStatusForm(FB,'Por favor aguarde enquanto a tarefa está sendo enviada para Homologação...')
2217+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto a tarefa está sendo enviada para Homologação...')
22022218 else
2203- UpdateStatusForm(FB,'Por favor aguarde enquanto a tarefa está sendo enviada para Testes...');
2219+ UpdateStatusFormBlender(FB,'Por favor aguarde enquanto a tarefa está sendo enviada para Testes...');
22042220
22052221 AddTextMultiPartFormData(TMemoryStream(Req.Content),'form-data','bug_update_token',RawByteString(ATask.AssignToToken),BOUNDARY);
22062222 AddTextMultiPartFormData(TMemoryStream(Req.Content),'form-data','last_updated',RawByteString(ATask.AssignToLastUpdated),BOUNDARY);
@@ -2254,7 +2270,7 @@
22542270 end;
22552271 finally
22562272 Req.Content.Free;
2257- HideStatusForm(FB);
2273+ HideStatusFormBlender(FB);
22582274 end;
22592275 end;
22602276
--- trunk/client/src/UFormManageNote.pas (revision 82)
+++ trunk/client/src/UFormManageNote.pas (revision 83)
@@ -7,7 +7,7 @@
77 Dialogs, UFormBasicDialog, StdCtrls, Buttons, UPngBitBtn, ExtCtrls, PngImage,
88 KRK.Internet.Edge, Winapi.ActiveX, Vcl.ComCtrls, UInterposersAndHelpers,
99 System.ImageList, Vcl.ImgList, Vcl.Menus, Vcl.ActnPopup, Vcl.XPStyleActnCtrls,
10- UTypes, UDamoTask;
10+ UTypes, UDamoTask, KRK.Vcl.Forms.FormBlender;
1111
1212 type
1313 TSpecialMode = (None,Reject,Impede,Execute,SendToTest,SendToHomologation);
@@ -45,6 +45,7 @@
4545 FAttachmentsOnly: Boolean;
4646 FPostContent: TStringStream;
4747 FSpecialMode: TSpecialMode;
48+ FFB: TKRKFormBlender;
4849
4950 procedure DoDropFiles(ASender: TObject; const ADropHandle: LRESULT; out AMessageResult: LRESULT);
5051 procedure ConfigureCommentsPage;
@@ -51,6 +52,8 @@
5152 procedure ConfigureAttachmentsPage;
5253 procedure AddAttachment(AFileName: String; AFileSize: Cardinal);
5354 function AttachmentsTabIsVisible: Boolean;
55+ procedure LoadTinyMCE;
56+ procedure HandleTimerMessage(var AMsg: TWMTimer); message WM_TIMER;
5457 protected
5558 procedure ValidateSave; override;
5659 public
@@ -195,13 +198,15 @@
195198 procedure TFormManageNote.EDBRCreateWebViewCompleted(Sender: TCustomEdgeBrowser; AResult: HRESULT);
196199 begin
197200 inherited;
198- // Adiciona um filtro que, se satisfeito, executa o evento
199- // OnWebResourceRequested, no qual podemos alterar várias propriedades da
200- // requisição que está sendo feita, como o método (POST ou GET), cabeçalhos e
201- // conteúdo da requisição (requerido pelo método POST)
202- EDBR.AddWebResourceRequestedFilter('*MantisBTMonitorTinyMCEEditor.php',COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL);
203-
204- EDBR.Navigate(Configurations.MantisBTBaseUrl + '/mantis/mbtm/MantisBTMonitorTinyMCEEditor.php');
201+ FFB := ShowStatusFormBlender(Self);
202+ UpdateStatusFormBlender(FFB,'Por favor aguarde enquanto o editor está sendo carregado...');
203+ // Posterga por 2 segundos a obtenção do TinyMCE preenchido com o comentário.
204+ // Isso é necessário porque o evento atual ocorre dentro do OnShow, mas em um
205+ // momento que não é propício para a obtenção do TinyMCE, que ora carregava
206+ // com o conteúdo, ora não. Postergando esse carregamento de forma assíncrona,
207+ // faz com que o TinyMCE seja obtido APÓS a tela ter sido completamente
208+ // carregada, evitando assim o problema
209+ SetTimer(Self.Handle,1,2000,nil);
205210 end;
206211
207212 procedure TFormManageNote.EDBRExecuteScript(Sender: TCustomEdgeBrowser; AResult: HRESULT; const AResultObjectAsJson: string);
@@ -279,6 +284,15 @@
279284 ConfigureCommentsPage;
280285 end;
281286
287+procedure TFormManageNote.HandleTimerMessage(var AMsg: TWMTimer);
288+begin
289+ // Só existe um timer na janela atual, portanto não precisamos checar
290+ // AMsg.TimerID, basta apenas matá-lo imediatamente
291+ KillTimer(Self.Handle,AMsg.TimerID);
292+ LoadTinyMCE;
293+ HideStatusFormBlender(FFB);
294+end;
295+
282296 procedure TFormManageNote.LIVIAttachmentsChange(Sender: TObject; Item: TListItem; Change: TItemChange);
283297 begin
284298 inherited;
@@ -303,6 +317,16 @@
303317 end;
304318 end;
305319
320+procedure TFormManageNote.LoadTinyMCE;
321+begin
322+ // Adiciona um filtro que, se satisfeito, executa o evento
323+ // OnWebResourceRequested, no qual podemos alterar várias propriedades da
324+ // requisição que está sendo feita, como o método (POST ou GET), cabeçalhos e
325+ // conteúdo da requisição (requerido pelo método POST)
326+ EDBR.AddWebResourceRequestedFilter('*MantisBTMonitorTinyMCEEditor.php',COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL);
327+ EDBR.Navigate(Configurations.MantisBTBaseUrl + '/mantis/mbtm/MantisBTMonitorTinyMCEEditor.php');
328+end;
329+
306330 class function TFormManageNote.ShowMeModal(ADamoTask: TDamoTask; ASpecialMode: TSpecialMode; ATaskId: Cardinal; out AComment: String; out APrivate: Boolean; out AAttachments: TArray<String>): TModalResult;
307331 begin
308332 with Self.Create(ADamoTask.Owner) do
Show on old repository browser