...
Warning |
---|
Important!Names of objects and properties in JavaScript are case-sensitive. E.g. 'wizardstate' and 'startingpointdata' may not work, while 'wizardState' and 'startingPointData' will. |
Operators Methods, objects, functions used in Docupace Start JavaScript expressions:
Code Block |
---|
window.connectApi = {};
//
window.connectApi.closeAppInIframe = function () {
$rootScope.documentViewerType='FORM';
$rootScope.$broadcast('reloadTaskDocuments');
$rootScope.reloadCurrentDocument();
window.location.reload();
};
//
window.connectApi.previewDocument = function (domainId, id) {
$rootScope.openDocumentNewWindow($rootScope.buildDocumentUrl(domainId, id));
};
//
window.connectApi.showFileUploadDialog = function(uploadOptions, uploaderSpecialOptions, onCompleteItemCallback) {
$rootScope.showFileUploadDialog(uploadOptions, uploaderSpecialOptions, onCompleteItemCallback)
};
//
window.connectApi.hideModalDialog = function() {
$rootScope.hideModalDialog();
};
//
window.connectApi.navigate = function (url, params) {
if(params) {
$location.path(url).search(params);
}
else if (url){
$location.path(url);
}
else {
$location.path();
}
};
//
window.connectApi.search = function (name, value) {
$location.search(name, value)
};
//
window.connectApi.getRouteParams = function () {
return $routeParams
};
//
window.connectApi.getModalDialogData = function () {
return $rootScope.modalDialogData;
};
//
window.connectApi.http = function () {
return $http;
};
//
window.connectApi.handleError = function (error) {
ErrorService.handleError(error);
};
//
window.connectApi.addAlert = function (alert) {
$rootScope.addAlert(alert);
};
//
window.connectApi.reload = function (params) {
if(params) {
var url = location.pathname;
url = url + "#" + $location.path();
url = url + "?" + $.param(params);
location.href=url;
location.reload();
}
else {
location.reload();
}
};
//
window.connectApi.disableThirdPartyAppConfirmationDialog = function () {
$rootScope.confirmationDialogEnabled = false;
};
//
window.connectApi.dataFactory = function () {
return dataFactory;
};
//
window.connectApi.q = function () {
return $q;
};
//
window.connectApi.launchInterfaceWithData = function (interfaceIdOrKey, payload, params) {
$rootScope.launchInterfaceWithData(interfaceIdOrKey, payload, params);
};
//
window.connectApi.showWidgetDialog = function (title, widgetId, data, addClass, onClose) {
return $rootScope.showWidgetDialog(title, widgetId, data, addClass, onClose);
};
//
window.connectApi.openTaskByWorkItem = function (workItemId, callbackFn) {
$rootScope.openTaskByWorkItem(workItemId, callbackFn);
};
//
window.connectApi.getWorkItemInfo = function (workItemId) {
return dataFactory.getWorkItemInfo(workItemId);
};
//
|