Popup Message
Hi,
Can anyone guide me on how to show pop welcome message which disappears in 10 seconds after page is loaded.
Any help will be highly appreciated.
Best Regards,
Saira
Like
The topic was discussed in the post by the link below:
https://community.creatio.com/questions/show-popup-welcome-message
Alina Kazmirchuk,
Hi Alina,
Thanks for the reply.
I tried the solution you suggested in page 'BaseIntroPageSchema' and an alert is showing on page load as shown below.
But when I try to create replacing module for 'PortalMainPageModule', below message is coming and not getting created. I wanted to show pop up message in portal main page. Can you please help.
Regards,
Saira
Saira Mathew,
In order to add the message to the main portal page please override the
PortalMainPageModule. Create a new module for that and add
override: "Terrasoft.PortalMainPageModule" .
The example is below:
define("UsrPortalMainPageModule", ["jQuery","PortalClientConstants", "MainHeaderSchema", "DashboardsModule",
"PortalMainPageBuilder"],
function(jQuery, PortalClientConstants) {
/**
* @class Terrasoft.configuration.PortalMainPageModule
* Portal main page module.
*/
Ext.define("Terrasoft.configuration.UsrPortalMainPageModule", {
override: "Terrasoft.PortalMainPageModule",
alternateClassName: "Terrasoft.UsrPortalMainPageModule",
/**
* Base portal main page view model class name.
* @type {String}
*/
viewModelClassName: "Terrasoft.BasePortalMainPageViewModel",
/**
* Portal main page builder class name.
* @type {String}
*/
builderClassName: "Terrasoft.PortalMainPageBuilder",
/**
* Portal main page view generator class name.
* @type {String}
*/
viewConfigClass: "Terrasoft.PortalMainPageViewConfig",
/**
* @inheritDoc Terrasoft.configuration.BaseSchemaModule#getProfileKey
* @overridden
*/
getProfileKey: function() {
return "PortalMainPageId";
},
/**
* @inheritDoc Terrasoft.configuration.DashboardsModule#getDashboardSectionId
* @override
*/
getDashboardSectionId: function() {
return PortalClientConstants.SysModule.PortalMainPageSectionId;
},
init: function(){
this.callParent(arguments);
this.showInformationDialog("Hello!");
setTimeout(this.closeDialog, 10000);
},
showInformationDialog: function(message, handler) {
Terrasoft.utils.showMessage({
caption: message,
buttons: [Terrasoft.MessageBoxButtons.YES],
defaultButton: 0,
style: Terrasoft.MessageBoxStyles.BLUE,
handler: handler,
scope: this
});
},
closeDialog: function(){
$(".t-btn-wrapper.t-btn-text.t-btn-style-blue").click();
}
});
return Terrasoft.PortalMainPageModule;
}
);
Please note that for closing the message dialog jQuery is used.
After that create a replacing schema for the MainHeaderSchema and add the newly created module as dependency to define():
define("MainHeaderSchema", ["PortalClientConstants", "UsrPortalMainPageModule"],
function(PortalConstants, UsrPortalMainPageModule) {
return {
attributes: {},
methods: {}
};
});
Hi Alina,
Thank you soo much for your help.
Best Regards,
Saira