Author |
|
alfmos Newbie
Joined: 01 October 2020 Location: Italy
Online Status: Offline Posts: 3
|
Posted: 01 October 2020 at 10:14am | IP Logged
|
|
|
I include Webmail lite 8 in my website in an iframe.
To dinamically resize iframe, I use
http://davidjbradshaw.github.io/iframe-resizer/
To work , it needs to include a javascript also in the page that is inside the iframe.
In webmail 7 it was very easy to include a new js, but in 8 javascript are inserted in the page and bult with a gulp task.
I've tried inserting my script in app.js and rebuilding with gulp js_min, but it keeps telling me that js:min is not a task in my gulpfile.
Is there a better way to include a javascript inside Webmail lite 8?
Thansk
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6094
|
Posted: 02 October 2020 at 12:40am | IP Logged
|
|
|
You're right, by default the minified version of JS code is used - however, building is done from the modules, not from app.js, so such approach wouldn't work anyway. Instead, we suggest disabling the use of minified JS code, set UseAppMinJs to false in data/settings/config.json file. That way, app.js file will be used instead of app.min.js.
Hope this helps.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
alfmos Newbie
Joined: 01 October 2020 Location: Italy
Online Status: Offline Posts: 3
|
Posted: 02 October 2020 at 7:23am | IP Logged
|
|
|
Hi Igor,
thanks for the response.
I have set UseAppMinJs to false, and I have included my js in modules/CoreWebClient/js/App.js
but js are stil injected in the html page.
Following an extract from html page and App.js
<body>
<div class="auroraMain">
<div id="auroraContent">
<div class="screens"></div>
<div class="popups"></div>
</div>
<div id="pSevenHidden"></div>
<div>
<!-- templates-5765fa2a36ae202564c306c83737d674.cache --><script id="MailWebclient_ColorPickerView" type="text/html"><span class="color_table" data-bind="initDom: colorPickerDom"> <span class="title" data-bind="text: caption"></span> <span class="row" data-bind="foreach: aGreyColors"> <span class="color-item" data-bind="style: {backgroundColor: $data}, attr: {'data-color': $data}"></span> </span> <span class="row" data-bind="foreach: aBrightColors"> <span class="color-item" data-bind="style: {backgroundColor: $data}, attr: {'data-color': $data}"></span> </span> <span data-bind="foreach: aColorLines"> <span class="row" data-bind="foreach: $data"> <span class="color-item" data-bind="style: {backgroundColor: $data}, attr: {'data-color': $data}"></span> </span> </span> </span> </script><script id="MailWebclient_ComposePopup" type="text/html"><div class="compose_popup popup" style="display: none;"> <div class="mask" data-bind="click: minimize, visible: !minimized()"></div> <div class="popup_panel" data-bind="visible: !minimized()"> <span class
Here App.js (row 35)
require('%PathToCoreWebclientModule%/js/vendors/inputosaurus.js');
33
34 require('%PathToCoreWebclientModule%/js/vendors/jquery.cookie.js');
35 require('//www.dottnet.it/sdk/iframeResizer/iframeResizer.contentWindow.js');
36
37 function InitNotMobileRequires()
38 {
39 require('%PathToCoreWebclientModule%/js/CustomTooltip.js');
40 require('%PathToCoreWebclientModule%/js/koBindingsNotMobile.js');
41 }
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6094
|
Posted: 02 October 2020 at 7:56am | IP Logged
|
|
|
Quote:
I have included my js in modules/CoreWebClient/js/App.js |
|
|
Oh, I didn't mean that file, I was referring to static/js/app.js one. Making changes in modules' JavaScript would require rebuilding with gulp, whether you're using modified or non-modified JS.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
alfmos Newbie
Joined: 01 October 2020 Location: Italy
Online Status: Offline Posts: 3
|
Posted: 02 October 2020 at 9:39am | IP Logged
|
|
|
Igor,
it worked.
Thanks a lot!
Alfonso
|
Back to Top |
|
|