Atozed Forums
How to use IW15+Bootstrap4 without CDN? - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: How to use IW15+Bootstrap4 without CDN? (/thread-1638.html)



How to use IW15+Bootstrap4 without CDN? - newsanti - 04-25-2020

Bootstrap3 Demo use CDN...
How to use Delphi 10.3.3+IW15+Bootstrap4 without CDN?


RE: How to use IW15+Bootstrap4 without CDN? - TPiotr - 04-25-2020

I do it like this:

In unit ServerController add uses IWBS4Global, and:


Code:
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
var cfg: TStringList;
begin
CacheDir := ExtractFilePath(ParamStr(0)) + 'cache\';

AllowMultipleSessionsPerUser := False;

JavaScriptOptions.RenderjQuery := False;

// IWBS4LibSetCDNS;

IWBS4Global.gIWBS4LibPath := '';

gIWBS4LibJQueryJs := '/<iwbspath>/jquery.min.js';

gIWBS4LibBootstrapCss := '/<iwbspath>/bootstrap.min.css';
gIWBS4LibBootstrapJs := '/<iwbspath>/bootstrap.min.js';

gIWBS4LibPopperJs := '/<iwbspath>/popper.min.js';

gIWBS4FontAwesomeCss := '/<iwbspath>/font-awesome.min.css';

gIWBS4LibIWBSCss := '/<iwbspath>/iwbs.css';
gIWBS4LibIWBSJs := '/<iwbspath>/iwbs.js';

gIWBS4LibPolyFillerJs := '/<iwbspath>/polyfiller.js';

gIWBS4LibDynamicTabsCss := '/<iwbspath>/bootstrap-dynamic-tabs.css';
gIWBS4LibDynamicTabsJs := '/<iwbspath>/bootstrap-dynamic-tabs.js';

end;


Copy the files you need from C:\Users\YourUserName\AppData\Roaming\IntraWeb 15\Source\iwbootstrap4\redist\wwwroot to C:\YourAppPath\wwwroot

Example:
Code:
From:
C:\Users\PCP\YourUserName\Roaming\IntraWeb 15\Source\iwbootstrap4\redist\wwwroot\boostrap-4.3.1\css\bootstrap.min.css
To:
C:\YourAppPath\wwwroot\bootstrap.min.css

From:
C:\Users\PCP\YourUserName\Roaming\IntraWeb 15\Source\iwbootstrap4\redist\wwwroot\boostrap-4.3.1\js\bootstrap.min.js
To:
C:\YourAppPath\wwwroot\bootstrap.min.css

From:
C:\Users\PCP\YourUserName\Roaming\IntraWeb 15\Source\iwbootstrap4\redist\wwwroot\jquery.slim.min.js
To:
C:\YourAppPath\wwwroot\jquery.min.js

(...)

You can download a newer version of bootstrap. I use Bootstrap v4.4.1.


RE: How to use IW15+Bootstrap4 without CDN? - newsanti - 04-25-2020

Thanks. I have resolved the issue.

ServerController Property > JavaScriptOptions.RenderjQuery = False *** Important ***
ServerController Property > SessionOptions.RestartExpiredSession = True *** important ***

procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
JavaScriptOptions.RenderjQuery := False;

gIWBS4LibPath:= '/iwbs/';
gIWBS4LibJQueryJs := '/<iwbspath>/jquery.slim.min.js';
gIWBS4LibPopperJs := '/<iwbspath>/popper.min.js';

gIWBS4LibBootstrapCss := '/<iwbspath>/bootstrap-4.4.1/css/bootstrap.min.css';
gIWBS4LibBootstrapJs := '/<iwbspath>/bootstrap-4.4.1/js/bootstrap.min.js';

gIWBS4FontAwesomeCss := '/<iwbspath>/font-awesome/4.7.0/css/font-awesome.min.css';

gIWBS4LibIWBSCss := '/<iwbspath>/iwbs.css';
gIWBS4LibIWBSJs := '/<iwbspath>/iwbs.js';

gIWBS4LibPolyFillerJs := '/<iwbspath>/webshim-1.15.10/js-webshim/minified/polyfiller.js';

gIWBS4LibDynamicTabsCss := '/<iwbspath>/dyntabs/bootstrap-dynamic-tabs.css';
gIWBS4LibDynamicTabsJs := '/<iwbspath>/dyntabs/bootstrap-dynamic-tabs.js';
end;