# Split View Navigation Events
These events are in split_view_nav.js
file.
# Ti.App.fireEvent('loadFinished')
Fired when loading the content is finished.
Example:
Ti.App.fireEvent('loadFinished')
NOTE
iOS: This event is not available for split_view_nav_portrait.js
.
# Ti.App.fireEvent('didScroll')
Handles scroll action.
Example:
Ti.App.fireEvent('didScroll', {
parameters: 'XXX|YYYYY'
})
parameters
- X and Y coordinate of the position after scroll.
# Ti.App.fireEvent('takeScreenshot')
Takes screenshot.
Example:
Ti.App.fireEvent('takeScreenshot', {
blob: { screenshotImageInfo: {} }
})
blob
- Object that holds information regarding to screenshot image. This image will be resized before shown.
# Ti.App.fireEvent('goToLink')
Jumps to a location within presentation with the link parameter.
If not in playlist mode and scrollView.touchEnabled is false, then this listener does nothing and simply quits.
Example:
Ti.App.fireEvent('goToLink', {
skipCalculation: true,
link: 'myURL'
})
skipCalculation
- Flag that holds information regarding to whether calculation is skipped or not. If true, then it automatically jumps to page index in URL; else, it will first tries jump operation on custom deck with same page number and if that is false, then it will try it with normal jumpToSlide function.link
- Contains information of jump point, it can be either chapter or slideName and slidePage.
NOTE
iOS: No skipCalculation
parameter needed for split_view_nav_portrait.js
.
# Ti.App.fireEvent('didZoom')
Handles zoom action.
Example:
Ti.App.fireEvent('didZoom', {
parameters: 2.3
})
parameters
- Scale value of the zoom action.
# Ti.App.fireEvent('openAccountInSF')
Opens Pitcher Zero Card showing account information.
Example:
Ti.App.fireEvent('openAccountInSF', {
forceMode: 'online', // (can be offline also)
objectType: 'myType',
contactID: 123456789,
source: 'mySource',
x: 365,
y: 364,
width: 363,
height: 362,
accountID: 987654321,
customID: true,
refreshAfterwards: true,
noPopover: true,
customSFID: 456789123,
create: true,
createObject: 'myCreateObject',
fixForceMode: true,
createMode: true,
index: 0
})
forceMode
- How the information is gathered for PZeroCard, can be "online" or "offline".objectType
- Object type of the content that will be shown in Pitcher Zero Card. can be "Account", "Contact", "Attachment".contactID
- ID of the contact.source
- source webview. Can be "homescreen", "postcall", "accountView", "contactSelection", "slide", "modal", "popover", "precall".x
- x coordinate of the newly opened PZeroCard.y
- y coordinate of the newly opened PZeroCard.width
- width of the newly opened PZeroCard.height
- height of the newly opened PZeroCard.accountID
- ID of the account.customID
- if set, last SFE account will not include contactID and accountID. Thus, if set to true and objectType is null or "Attachment", then last offline custom object will be updated current one.refreshAfterwards
- if true, get CRM contacs from salesforce.noPopover
- if true, then popover will be closed.customSFID
- used in query while gathering information from DB.create
- if true, set accountID and contactID to null and create new object with type createType.createObject
- new object type for creation.fixForceMode
- if true, set accountID to customSFID.createMode
- if true, change URL to "create.html"index
- if 0, then call hideBlock function adn allow whide on sfPopover.
NOTE
iOS: Only accountID
parameter is needed for split_view_nav_portrait.js
.
# Ti.App.fireEvent('refreshCRM')
Refreshes CRM with getting CRM contacts from Salesforce.
iOS: No parameters needed for split_view_nav_portrait.js.
Example:
Ti.App.fireEvent('refreshCRM', {
customCacheSubset: {},
skipCustomCaches: true
})
customCacheSubset
- custom subset for cache.skipCustomCaches
- if false, clear auto sync interval.
NOTE
iOS: No parameters needed for split_view_nav_portrait.js
.
# Ti.App.fireEvent('goNextChapter')
Goes to next chapter in presentation.
Example:
Ti.App.fireEvent('goNextChapter', {})
# Ti.App.fireEvent('goPrevChapter')
Goes to previous chapter in presentation.
Example:
Ti.App.fireEvent('goPrevChapter', {})
# Ti.App.fireEvent('goNextSlide')
Goes to next slide in presentation by firing a goToLink
event like: Ti.App.fireEvent('goToLink', { link: "horizontal?1" })
Example:
Ti.App.fireEvent('goNextSlide', {})
# Ti.App.fireEvent('goPrevSlide')
Goes to previous slide in presentation by firing a goToLink
event like: Ti.App.fireEvent('goToLink', { link: "horizontal?-1" })
Example:
Ti.App.fireEvent('goPrevSlide', {})
# Ti.App.fireEvent('showReferencePopup')
Shows reference popup.
While viewing a file, if there are any references for a file, these are shown in a popup with this event.
Example:
Ti.App.fireEvent('showReferencePopup', {})
# Ti.App.fireEvent('loadPresentation')
Loads a presentation.
iOS: For the event in split_view_nav_portrait.js, there is an extra parameter 'isPortrait' that mentions whether the presentation is portrait or not. Also, there is no need for 'isRemote' parameter.
Example:
Ti.App.fireEvent('loadPresentation', {
isRemote: true,
dataOfPres: `{
"ID": "myID", // id of file
"vSubFolder": "myVSubFolder", // folder name
"isCustom": true, // is file custom?
"slideOrder": "1,3,5,7,9", // slide order of the presentation.
"fakeCustom": true, // is last slide fake
"containsMultiple": true, // does presentation contains multiple parts
"presentationName": "myTitle", // name of the presentation file
"timeValue": "myTimeValue", // notify that content was loaded
"vNumber": 12, // number of slides
"chapters": "", // chapter information read from chapters.json
"setupJSON": '{ "navMode": "1(2)" }' // setup information read from setup.json
}`,
jumpSlide: 5,
isFullScreen: true,
chapterOrder: '[1,2,3,4,5]',
url: 'myURL',
source: 'mySource',
failingURL: 'myFailingURL'
})
isRemote
- if true, launch file with ID given in dataOfPres and jumpSlide, then return.dataOfPres
- extra information regarding to the presentation.jumpSlide
- which slide to start?isFullScreen
- default true. If false, then change width and height of thumbnails.chapterOrder
- order of the chapters of the presentation.navMode
- if 1, does not enable chapter grouping. If 2, enable chapter grouping.url
- hotspot url, handled in manageHotSpots.source
- webview parameter, used in manageHotSpots.failingURL
- if the operation fails, use this url: 'pitcherHttp://'(fires 'loadWebPage' event), 'pitcherDo://' and 'pitcherEvent://'(fires 'closeScrollWeb' event and exits), 'pitcherSlide://'(fires 'goToLink' event), 'veeva:' and 'pitcherVeeva:'(find pitcherSlide link and fire 'goToLink' event). This parameter is given in error event listener for the webView.
# Ti.App.fireEvent('showLinkedFilesForPres')
Shows linked files of the active presentation.
Example:
Ti.App.fireEvent('showLinkedFilesForPres', {})
# Ti.App.fireEvent('launchContentWithID')
Launches content with fileID.
Example:
Ti.App.fireEvent('launchContentWithID', {
fileID: 'myFileID',
currentID: 'myCurrentID',
subID: 'mySubID',
forceChange: true
})
fileID
: ID of content.currentID
: If null and any presentation is active, set to lastOpenFileID. Used while opening the linked content.subID
: subID of the file.forceChange
: If true, update last file's information using this file's information.
NOTE
iOS: For split_view_nav_portrait.js, no need for 'forceChange' parameter.