Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In the Landing Page, Panel Page, Header Configuration and Footer Configuration, once the template is rendered with contents via DOM, the events like click, focus, focus //out, double-click can be included to the contents to make an action.


For example, if the Landing Page template is loaded with workspaces and if the workspace needs to be clicked to open its subworkspaces, a click event can be binded to initiate the click and load the subworkspaces.


Example:


applyTemplate: function(template, tmpClass) {
if (!canvas.core.isEmpty(this.parentElem)) {
$(this.parentElem).append(template); 
} 
$(this.parentElem).find('.workspaceIconBlock').on('click', function(e) {
var workspaceID = $(this).attr('data-itemid');
canvas.workspace.metadata.getWorkspaceManager().getContainer().switchWorkspace(workspaceID);
}); 



  • No labels