...
See: Pulsar FSL Lightning Bolt Menu Customizations
Accessing the Bridge
The 3-2. Pulsar Platform - JS Bridge API is fully accessible from any custom document running in the Pulsar FSL environment.
...
Code Block | ||
---|---|---|
| ||
var pulsar = window.parent.pulsar;
// Go back to the previous Pulsar page
// * only relevant to pages launched from a Pulsar SObject page
// * Tab bar pages will be the "root" of that tab, so back will be ignored
pulsar.goBack();
// Go home to the schedule page
// * useful if you navigate from one custom document to another
// * safe way to exist a stack of custom navigated pages
pulsar.goHome();
// Go back to the last non-custom-document on this tab's navigation history.
// * a user can create a series of custom documents which work together and
// and then call this method to dismiss them all and return to the initial
// page in the navigation history that launched the first custom document.
pulsar.goBackToTab();
// Open another custom document
// * Important - you must specify a document Id or title. If both are null,
// this method will fail, if you want to open by title, pass null for the Id
pulsar.displayContentDocument(aDocumentId, aDocumentTitle, { "someParameter": "a value" }, function () {
alert("Document has been displayed.");
});
// Show/Hide a Spinner that disables the Pulsar FSL UI
pulsar.showSpinner();
// do some time consuming work
pulsar.hideSpinner();
// Set Page Title
// Custome pages will have an empty title unless set explicitly.
pulsar.setTitle("My Title");
// Show/Hide the Pulsar FSL navigation bar
pulsar.hideNavBar();
// Your page is responsible for re-displaying the navigation bar
pulsar.showNavBar();
// Create a named handler that will execute whenever a sync finishes
// IMPORTANT: Please clean up your handler as shown below.
pulsar.addSyncFinishedHandler('myHandler', function(syncFinishedInfo) {
console.log('Sync finished with info!', syncFinishedInfo);
pulsar.removeSyncFinishedHandler('myHandler');
});
// Create a named handler that will execute whenever a sync update event occurs
// IMPORTANT: Please clean up your handler as shown below.
pulsar.addSyncUpdateHandler('myHandler', function(updateInfo) {
console.log('Sync updated with info!', updateInfo);
pulsar.removeSyncUpdateHandler('myHandler');
});
|
Page and Component Resizing
...