Ignore:
Timestamp:
Oct 2, 2012, 2:12:16 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Modul seznamu televizních kanálů TV.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Pages/UPageAdmin.pas

    r97 r99  
    1515    procedure DataModuleProduce(HandlerData: THTTPHandlerData);
    1616  private
     17    procedure HandleReload(HandlerData: THTTPHandlerData);
    1718    procedure HandleModuleList(HandlerData: THTTPHandlerData);
    1819    procedure HandleInstall(HandlerData: THTTPHandlerData);
     
    3233
    3334uses
    34   UCore, UXmlClasses, UHtmlClasses, UUtils, USqlDatabase, UModularSystem;
     35  UCore, UXmlClasses, UHtmlClasses, UUtils, USqlDatabase, UModularSystem,
     36  UModuleSystem;
    3537
    3638{$R *.lfm}
     
    5052      if PageName = '' then PageName := 'modulelist';
    5153      if PageName = 'modulelist' then HandleModuleList(HandlerData)
     54      else if PageName = 'reload' then HandleReload(HandlerData)
    5255      else if PageName = 'install' then HandleInstall(HandlerData)
    5356      else if PageName = 'uninstall' then HandleUninstall(HandlerData);
    5457    end;
    5558    GeneratePage(Self);
     59  end;
     60end;
     61
     62procedure TPageAdmin.HandleReload(HandlerData: THTTPHandlerData);
     63begin
     64  with TWebSession(HandlerData) do begin
     65    with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin
     66      TModuleSystem(Core.ModuleManager.FindModuleByName('System')).UpdateModuleList;
     67      Text := 'Seznam modulů synchronizován';
     68      Text := Text + '<br/><br/>';
     69      HandleModuleList(HandlerData);
     70    end;
    5671  end;
    5772end;
     
    7691        Text := Text + '</td></tr>';
    7792      end;
     93      Text := Text + '</table>';
     94      Text := Text + MakeLink('Obnovit seznam modulů', NavigationLink('/administration/reload'));
    7895    end;
    7996  end;
Note: See TracChangeset for help on using the changeset viewer.