Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/fAllgyFind.pas

    r830 r1679  
    66  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    77  fAutoSz, StdCtrls, ORFn, ORCtrls, ComCtrls, ImgList, VA508AccessibilityManager,
    8   VA508ImageListLabeler;
     8  VA508ImageListLabeler, ExtCtrls;
    99
    1010type
     
    2323    lblSearchCaption: TLabel;
    2424    imgLblAllgyFindTree: TVA508ImageListLabeler;
     25    NoAllergylbl508: TVA508StaticText;
    2526    procedure cmdSearchClick(Sender: TObject);
    2627    procedure cmdCancelClick(Sender: TObject);
     
    4243{$R *.DFM}
    4344
    44 uses rODAllergy, fARTFreeTextMsg;
     45uses rODAllergy, fARTFreeTextMsg, VA508AccessibilityRouter;
    4546
    4647const
     
    8788var
    8889  uFileCount: integer;
     90  ScreenReader: boolean;
    8991
    9092procedure AllergyLookup(var Allergy: string; NKAEnabled: boolean);
     
    9597  try
    9698    ResizeFormToFont(TForm(frmAllgyFind));
     99    //TDP - CQ#19731 Need adjust 508StaticText label slightly when font 12 or larger
     100    case frmAllgyFind.Font.Size of
     101      18: frmAllgyFind.NoAllergylbl508.Left := frmAllgyFind.NoAllergylbl508.Left - 10;
     102      14: frmAllgyFind.NoAllergylbl508.Left := frmAllgyFind.NoAllergylbl508.Left - 6;
     103      12: frmAllgyFind.NoAllergylbl508.Left := frmAllgyFind.NoAllergylbl508.Left - 3;
     104    end;
    97105    frmAllgyFind.ckNoKnownAllergies.Enabled := NKAEnabled;
     106    //TDP - CQ#19731 make sure NoAllergylbl508 is enabled and visible if
     107    //      ckNoKnownAllergies is disabled
     108    if (ScreenReaderSystemActive) and (frmAllgyFind.ckNoKnownAllergies.Enabled = False) then
     109    begin
     110      frmAllgyFind.NoAllergylbl508.Enabled := True;
     111      frmAllgyFind.NoAllergylbl508.Visible := True;
     112    end;
     113    //TDP - CQ#19731 make sure NoAllergylbl508 is not enabled or visible if
     114    //      ckNoKnownAllergies is enabled
     115    if frmAllgyFind.ckNoKnownAllergies.Enabled = True then
     116    begin
     117      frmAllgyFind.NoAllergylbl508.Enabled := False;
     118      frmAllgyFind.NoAllergylbl508.Visible := False;
     119    end;
    98120    frmAllgyFind.ShowModal;
    99121    Allergy := frmAllgyFind.FAllergy;
     
    108130  FAllergy := '';
    109131  cmdOK.Enabled := False;
     132  //TDP - CQ#19731 Allow tab to empty search results (tvAgent) when JAWS running
     133  //      and provide 508 hint
     134  if ScreenReaderSystemActive then
     135  begin
     136    tvAgent.TabStop := True;
     137    amgrMain.AccessText[tvAgent] := 'No Search Items to Display';
     138    ScreenReader := True;
     139  end;
    110140end;
    111141
     
    147177      cmdSearch.Default := True;
    148178      stsFound.SimpleText := ST_NONE_FOUND;
     179
     180      //TDP - CQ#19731 Provide 508 hint for empty search results (tvAgent) when JAWS active.
     181      if ScreenReader then amgrMain.AccessText[tvAgent] := 'No Search Items to Display'
     182      //TDP - CQ#19731 Stop tab to empty search results (tvAgent) when JAWS not active.
     183      else tvAgent.TabStop := False;
     184
    149185      cmdOKClick(Self);
    150186    end else
     
    193229        end;
    194230      lblSelect.Visible := True;
     231
     232      //TDP - CQ#19731 Clear 508 hint when JAWS active.
     233      if ScreenReader then amgrMain.AccessText[tvAgent] := ''
     234      //TDP - CQ#19731 Allow tab to search results (tvAgent) when JAWS not active.
     235      else tvAgent.TabStop := True;
     236
    195237      tvAgent.SetFocus;
    196238      cmdSearch.Default := False;
     
    201243    AList.Free;
    202244    StatusText('');
     245    if stsFound.SimpleText = ''  then stsFound.TabStop := False
     246    else if ScreenReaderSystemActive then stsFound.TabStop := True;
    203247  end;
    204248end;
     
    300344      lblSelect.Enabled := not Checked;
    301345      tvAgent.Enabled   := not Checked;
    302       cmdOK.Enabled := Checked;
     346
     347      // CQ #15770 - Allow OK button again if unchecked and items exist - JCS
     348      //cmdOK.Enabled := Checked;
     349      if Checked then
     350        cmdOK.Enabled := True
     351      else
     352        cmdOK.Enabled := (tvAgent.Items.Count > 0);
    303353    end;
    304354end;
Note: See TracChangeset for help on using the changeset viewer.