Created
July 28, 2014 14:28
-
-
Save keeganbrown/5405c1d959a04cbc3866 to your computer and use it in GitHub Desktop.
Console Dump of methods and properties on Acrobat Doc object with Acrobat JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ( var i in this ) { | |
console.println( i + " : " + this[i] ); | |
} | |
hidden : false | |
info : [object Info] | |
layout : SinglePage | |
filesize : 2421706 | |
documentFileName : TESTING.pdf | |
path : /Macintosh HD/Users/XXXXXXX/TESTING.pdf | |
numPages : 2 | |
pageNum : 1 | |
zoom : 63 | |
zoomType : FitPage | |
pane : N | |
view : [object Dest] | |
viewState : [object ViewState] | |
requiresFullSave : false | |
external : false | |
baseURL : | |
URL : file:///Users/XXXXXXX/TESTING.pdf | |
securityHandler : null | |
docID : FEE3150114644F26B01708948A8B3E26,F804B537C92F4B3C9385C7E3B8163269 | |
metadata : [xml] | |
closed : false | |
certified : false | |
wireframe : false | |
mouseX : 169 | |
mouseY : 642 | |
isModal : false | |
isInCollection : false | |
disclosed : false | |
gotoNamedDest : function gotoNamedDest() { | |
[native code] | |
} | |
print : function print() { | |
[native code] | |
} | |
getPrintParams : function getPrintParams() { | |
[native code] | |
} | |
printWithParams : function printWithParams() { | |
[native code] | |
} | |
printSeps : function printSeps() { | |
[native code] | |
} | |
getPrintSepsParams : function getPrintSepsParams() { | |
[native code] | |
} | |
printSepsWithParams : function printSepsWithParams() { | |
[native code] | |
} | |
scroll : function scroll() { | |
[native code] | |
} | |
mailDoc : function mailDoc() { | |
[native code] | |
} | |
getURL : function getURL() { | |
[native code] | |
} | |
deletePages : function deletePages() { | |
[native code] | |
} | |
replacePages : function replacePages() { | |
[native code] | |
} | |
insertPages : function insertPages() { | |
[native code] | |
} | |
movePage : function movePage() { | |
[native code] | |
} | |
getPageBox : function getPageBox() { | |
[native code] | |
} | |
setPageBoxes : function setPageBoxes() { | |
[native code] | |
} | |
addThumbnails : function addThumbnails() { | |
[native code] | |
} | |
removeThumbnails : function removeThumbnails() { | |
[native code] | |
} | |
addWeblinks : function addWeblinks() { | |
[native code] | |
} | |
removeWeblinks : function removeWeblinks() { | |
[native code] | |
} | |
getPageLabel : function getPageLabel() { | |
[native code] | |
} | |
setPageLabels : function setPageLabels() { | |
[native code] | |
} | |
getPageTransition : function getPageTransition() { | |
[native code] | |
} | |
setPageTransitions : function setPageTransitions() { | |
[native code] | |
} | |
getPageRotation : function getPageRotation() { | |
[native code] | |
} | |
setPageRotations : function setPageRotations() { | |
[native code] | |
} | |
getPageNthWord : function getPageNthWord() { | |
[native code] | |
} | |
getPageNumWords : function getPageNumWords() { | |
[native code] | |
} | |
selectPageNthWord : function selectPageNthWord() { | |
[native code] | |
} | |
getPageNthWordQuads : function getPageNthWordQuads() { | |
[native code] | |
} | |
closeDoc : function closeDoc() { | |
[native code] | |
} | |
bringToFront : function bringToFront() { | |
[native code] | |
} | |
saveAs : function saveAs() { | |
[native code] | |
} | |
extractPages : function extractPages() { | |
[native code] | |
} | |
requestPermission : function requestPermission() { | |
[native code] | |
} | |
newPage : function newPage() { | |
[native code] | |
} | |
setAction : function setAction() { | |
[native code] | |
} | |
addScript : function addScript() { | |
[native code] | |
} | |
removeScript : function removeScript() { | |
[native code] | |
} | |
setPageAction : function setPageAction() { | |
[native code] | |
} | |
addWatermarkFromText : function addWatermarkFromText() { | |
[native code] | |
} | |
addWatermarkFromFile : function addWatermarkFromFile() { | |
[native code] | |
} | |
addRequirement : function addRequirement() { | |
[native code] | |
} | |
removeRequirement : function removeRequirement() { | |
[native code] | |
} | |
getColorConvertAction : function getColorConvertAction() { | |
[native code] | |
} | |
colorConvertPage : function colorConvertPage() { | |
[native code] | |
} | |
embedOutputIntent : function embedOutputIntent() { | |
[native code] | |
} | |
applyRedactions : function applyRedactions() { | |
[native code] | |
} | |
disableWindows : function disableWindows() { | |
[native code] | |
} | |
enableWindows : function enableWindows() { | |
[native code] | |
} | |
isInProtectedView : false | |
title : | |
subject : | |
author : | |
keywords : | |
creator : Adobe InDesign CC (Macintosh) | |
producer : Adobe PDF Library 11.0 | |
creationDate : Fri Jul 25 2014 11:51:25 GMT-0500 (CDT) | |
modDate : Fri Jul 25 2014 12:17:45 GMT-0500 (CDT) | |
app : [object App] | |
sounds : null | |
getSound : function getSound() { | |
[native code] | |
} | |
deleteSound : function deleteSound() { | |
[native code] | |
} | |
importSound : function importSound() { | |
[native code] | |
} | |
dataObjects : null | |
getDataObject : function getDataObject() { | |
[native code] | |
} | |
removeDataObject : function removeDataObject() { | |
[native code] | |
} | |
embedDocAsDataObject : function embedDocAsDataObject() { | |
[native code] | |
} | |
importDataObject : function importDataObject() { | |
[native code] | |
} | |
exportDataObject : function exportDataObject() { | |
[native code] | |
} | |
createDataObject : function createDataObject() { | |
[native code] | |
} | |
getDataObjectContents : function getDataObjectContents() { | |
[native code] | |
} | |
setDataObjectContents : function setDataObjectContents() { | |
[native code] | |
} | |
openDataObject : function openDataObject() { | |
[native code] | |
} | |
bookmarkRoot : [object Bookmark="Root"] | |
icons : null | |
getIcon : function getIcon() { | |
[native code] | |
} | |
importIcon : function importIcon() { | |
[native code] | |
} | |
deleteIcon : function deleteIcon() { | |
[native code] | |
} | |
createIcon : function createIcon() { | |
[native code] | |
} | |
addIcon : function addIcon() { | |
[native code] | |
} | |
numIcons : 0 | |
getNthIconName : function getNthIconName() { | |
[native code] | |
} | |
removeIcon : function removeIcon() { | |
[native code] | |
} | |
getOCGs : function getOCGs() { | |
[native code] | |
} | |
getOCGOrder : function getOCGOrder() { | |
[native code] | |
} | |
setOCGOrder : function setOCGOrder() { | |
[native code] | |
} | |
getAnnots3D : function getAnnots3D() { | |
[native code] | |
} | |
getAnnot3D : function getAnnot3D() { | |
[native code] | |
} | |
media : [object DocMedia] | |
preflight : function preflight() { | |
[native code] | |
} | |
getPreflightAuditTrail : function getPreflightAuditTrail() { | |
[native code] | |
} | |
validatePreflightAuditTrail : function validatePreflightAuditTrail() { | |
[native code] | |
} | |
removePreflightAuditTrail : function removePreflightAuditTrail() { | |
[native code] | |
} | |
spellDictionaryOrder : null | |
spellLanguageOrder : null | |
addLink : function addLink() { | |
[native code] | |
} | |
getLinks : function getLinks() { | |
[native code] | |
} | |
removeLinks : function removeLinks() { | |
[native code] | |
} | |
collection : null | |
getAnnotRichMedia : function getAnnotRichMedia() { | |
[native code] | |
} | |
getAnnotsRichMedia : function getAnnotsRichMedia() { | |
[native code] | |
} | |
permStatusReady : true | |
flattenPages : function flattenPages() { | |
[native code] | |
} | |
getLegalWarnings : function getLegalWarnings() { | |
[native code] | |
} | |
getSignatureStatus : function getSignatureStatus() { | |
[native code] | |
} | |
getUIPerms : function getUIPerms() { | |
[native code] | |
} | |
setUIPerms : function setUIPerms() { | |
[native code] | |
} | |
timestampSign : function timestampSign() { | |
[native code] | |
} | |
certifyInvisibleSign : function certifyInvisibleSign() { | |
[native code] | |
} | |
getModifications : function getModifications() { | |
[native code] | |
} | |
setUserPerms : function setUserPerms() { | |
[native code] | |
} | |
encryptForRecipients : function encryptForRecipients() { | |
[native code] | |
} | |
addRecipientListCryptFilter : function addRecipientListCryptFilter() { | |
[native code] | |
} | |
encryptUsingPolicy : function encryptUsingPolicy() { | |
[native code] | |
} | |
rightsManagement : undefined | |
dirty : false | |
calculate : true | |
numFields : 0 | |
delay : false | |
dynamicXFAForm : false | |
XFAForeground : false | |
calculateNow : function calculateNow() { | |
[native code] | |
} | |
submitForm : function submitForm() { | |
[native code] | |
} | |
resetForm : function resetForm() { | |
[native code] | |
} | |
mailForm : function mailForm() { | |
[native code] | |
} | |
exportAsFDF : function exportAsFDF() { | |
[native code] | |
} | |
exportAsXFDF : function exportAsXFDF() { | |
[native code] | |
} | |
exportAsText : function exportAsText() { | |
[native code] | |
} | |
exportXFAData : function exportXFAData() { | |
[native code] | |
} | |
importAnFDF : function importAnFDF() { | |
[native code] | |
} | |
importAnXFDF : function importAnXFDF() { | |
[native code] | |
} | |
importXFAData : function importXFAData() { | |
[native code] | |
} | |
importTextData : function importTextData() { | |
[native code] | |
} | |
getField : function getField() { | |
[native code] | |
} | |
getNthFieldName : function getNthFieldName() { | |
[native code] | |
} | |
addNewField : function addNewField() { | |
[native code] | |
} | |
addField : function addField() { | |
[native code] | |
} | |
removeField : function removeField() { | |
[native code] | |
} | |
setPageTabOrder : function setPageTabOrder() { | |
[native code] | |
} | |
templates : null | |
getTemplate : function getTemplate() { | |
[native code] | |
} | |
createTemplate : function createTemplate() { | |
[native code] | |
} | |
removeTemplate : function removeTemplate() { | |
[native code] | |
} | |
numTemplates : 0 | |
getNthTemplate : function getNthTemplate() { | |
[native code] | |
} | |
spawnPageFromTemplate : function spawnPageFromTemplate() { | |
[native code] | |
} | |
exportAsFDFStr : function exportAsFDFStr() { | |
[native code] | |
} | |
exportAsXFDFStr : function exportAsXFDFStr() { | |
[native code] | |
} | |
exportAsTextStr : function exportAsTextStr() { | |
[native code] | |
} | |
exportAsXFAStr : function exportAsXFAStr() { | |
[native code] | |
} | |
stampAPFromPage : function stampAPFromPage() { | |
[native code] | |
} | |
syncAnnotScan : function syncAnnotScan() { | |
[native code] | |
} | |
addAnnot : function addAnnot() { | |
[native code] | |
} | |
getAnnot : function getAnnot() { | |
[native code] | |
} | |
getAnnots : function getAnnots() { | |
[native code] | |
} | |
selectedAnnots : undefined | |
annotFilter : [object Aggregate] | |
Collab : [object Collab] | |
R : [object AnnotRichMedia] | |
N : RM1 | |
V : [object AnnotRichMedia] | |
i : i | |
global : [object Global] | |
console : [object Console] | |
util : [object Util] | |
search : [object Search] | |
catalog : [object Catalog] | |
identity : [object Identity] | |
shareIdentity : [object ShareIdentity] | |
EScriptString : [object stringGetterObj] | |
Preflight : [object Preflight] | |
PreflightResult : [object PreflightResult] | |
PreflightProfile : [object PreflightProfile] | |
PreflightAuditTrail : [object PreflightAuditTrail] | |
tts : [object TTS] | |
sendmail : [object sendmail] | |
FormsString : [object stringGetterObj] | |
IPM : [object IPM] | |
security : [object Security] | |
XMLData : [object XMLData] | |
FormWorkflow : [object FormWorkflow] | |
cTableOddRowColor : #FFFFFF | |
cTableEvenRowColor : #F8F8F8 | |
cTableHeaderColor : #E4E4FF | |
CollabIPM_Location : 13 | |
CollabIPM_Context : 76 | |
IWEmailSteps : [object Object] | |
IWEmailFormSteps : [object Object] | |
IWSteps : [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] | |
IWFDSteps : [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] | |
ShareFileSteps : [object Object],[object Object],[object Object],[object Object],[object Object] | |
UploadFileSteps : [object Object],[object Object],[object Object],[object Object] | |
DocCenterLoginSteps : [object Object],[object Object],[object Object] | |
DocCenterSignupSteps : [object Object],[object Object] | |
OldSRIWsteps : [object Object],[object Object],[object Object],[object Object] | |
filesAtDocCenter : null | |
deadlineDate : No deadline | |
internalDeadlineDate : | |
objectDeadlineDate : Mon Jul 28 2014 09:06:39 GMT-0500 (CDT) | |
RT : undefined | |
SharedReviewDocCenterInitiator : [object Object] | |
SharedReviewWebDAVInitiator : [object Object] | |
SharedReviewAppleiDiskInitiator : [object Object] | |
SharedReviewSMBInitiator : [object Object] | |
SharedReviewSharepointInitiator : [object Object] | |
IDS_GREATER_THAN : Invalid value: must be greater than or equal to %s. | |
IDS_GT_AND_LT : Invalid value: must be greater than or equal to %s and less than or equal to %s. | |
IDS_LESS_THAN : Invalid value: must be less than or equal to %s. | |
IDS_INVALID_MONTH : ** Invalid ** | |
IDS_INVALID_DATE : Invalid date/time: please ensure that the date/time exists. Field | |
IDS_INVALID_DATE2 : should match format | |
IDS_INVALID_VALUE : The value entered does not match the format of the field | |
IDS_AM : am | |
IDS_PM : pm | |
IDS_MONTH_INFO : January[1]February[2]March[3]April[4]May[5]June[6]July[7]August[8]September[9]October[10]November[11]December[12]Sept[9]Jan[1]Feb[2]Mar[3]Apr[4]Jun[6]Jul[7]Aug[8]Sep[9]Oct[10]Nov[11]Dec[12] | |
IDS_STARTUP_CONSOLE_MSG : Acrobat EScript Built-in Functions Version | |
RE_NUMBER_ENTRY_DOT_SEP : [+-]?\d*\.?\d* | |
RE_NUMBER_COMMIT_DOT_SEP : [+-]?\d+(\.\d+)?,[+-]?\.\d+,[+-]?\d+\. | |
RE_NUMBER_ENTRY_COMMA_SEP : [+-]?\d*,?\d* | |
RE_NUMBER_COMMIT_COMMA_SEP : [+-]?\d+([.,]\d+)?,[+-]?[.,]\d+,[+-]?\d+[.,] | |
RE_ZIP_ENTRY : \d{0,5} | |
RE_ZIP_COMMIT : \d{5} | |
RE_ZIP4_ENTRY : \d{0,5}(\.|[- ])?\d{0,4} | |
RE_ZIP4_COMMIT : \d{5}(\.|[- ])?\d{4} | |
RE_PHONE_ENTRY : \d{0,3}(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4},\(\d{0,3},\(\d{0,3}\)(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4},\(\d{0,3}(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4},\d{0,3}\)(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4},011(\.|[- \d])* | |
RE_PHONE_COMMIT : \d{3}(\.|[- ])?\d{4},\d{3}(\.|[- ])?\d{3}(\.|[- ])?\d{4},\(\d{3}\)(\.|[- ])?\d{3}(\.|[- ])?\d{4},011(\.|[- \d])* | |
RE_SSN_ENTRY : \d{0,3}(\.|[- ])?\d{0,2}(\.|[- ])?\d{0,4} | |
RE_SSN_COMMIT : \d{3}(\.|[- ])?\d{2}(\.|[- ])?\d{4} | |
color : [object Object] | |
font : [object Object] | |
border : [object Object] | |
style : [object Object] | |
highlight : [object Object] | |
zoomtype : [object Object] | |
cursor : [object Object] | |
trans : [object Object] | |
position : [object Object] | |
scaleWhen : [object Object] | |
scaleHow : [object Object] | |
display : [object Object] | |
permission : [object Object] | |
submitFormUsageRights : [object Object] | |
fileSystem : [object Object] | |
encoding : [object Object] | |
requirements : [object Object] | |
HostContainerDisclosurePolicy : [object Object] | |
AFDigitsRegExp : /\d+/ | |
AFPMRegExp : /pm/i | |
AFAMRegExp : /am/i | |
AFTimeLongRegExp : /\d{1,2}:\d{1,2}:\d{1,2}/ | |
AFTimeShortRegExp : /\d{1,2}:\d{1,2}/ | |
AFTimeGarbageRegExp : /\d{1,2}:\d{1,2}(:\d{1,2})?(\s)*(am|pm)?/i | |
AFNumberDotSepEntryRegExp : /[+-]?\d*\.?\d*/i | |
AFNumberDotSepCommitRegExp : /[+-]?\d+(\.\d+)?/i,/[+-]?\.\d+/i,/[+-]?\d+\./i | |
AFNumberCommaSepEntryRegExp : /[+-]?\d*,?\d*/i | |
AFNumberCommaSepCommitRegExp : /[+-]?\d+([.,]\d+)?/i,/[+-]?[.,]\d+/i,/[+-]?\d+[.,]/i | |
AFZipEntryRegExp : /\d{0,5}/i | |
AFZipCommitRegExp : /\d{5}/i | |
AFZip4EntryRegExp : /\d{0,5}(\.|[- ])?\d{0,4}/i | |
AFZip4CommitRegExp : /\d{5}(\.|[- ])?\d{4}/i | |
AFPhoneEntryRegExp : /\d{0,3}(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4}/i,/\(\d{0,3}/i,/\(\d{0,3}\)(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4}/i,/\(\d{0,3}(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4}/i,/\d{0,3}\)(\.|[- ])?\d{0,3}(\.|[- ])?\d{0,4}/i,/011(\.|[- \d])*/i | |
AFPhoneCommitRegExp : /\d{3}(\.|[- ])?\d{4}/i,/\d{3}(\.|[- ])?\d{3}(\.|[- ])?\d{4}/i,/\(\d{3}\)(\.|[- ])?\d{3}(\.|[- ])?\d{4}/i,/011(\.|[- \d])*/i | |
AFSSNEntryRegExp : /\d{0,3}(\.|[- ])?\d{0,2}(\.|[- ])?\d{0,4}/i | |
AFSSNCommitRegExp : /\d{3}(\.|[- ])?\d{2}(\.|[- ])?\d{4}/i | |
AFMonthsRegExp : /January/i,/February/i,/March/i,/April/i,/May/i,/June/i,/July/i,/August/i,/September/i,/October/i,/November/i,/December/i,/Sept/i,/Jan/i,/Feb/i,/Mar/i,/Apr/i,/Jun/i,/Jul/i,/Aug/i,/Sep/i,/Oct/i,/Nov/i,/Dec/i,/(?:)/i | |
ANSB_None : 0 | |
ANSB_Page : 1 | |
ANSB_Seq : 2 | |
ANSB_Author : 3 | |
ANSB_ModDate : 4 | |
ANSB_Type : 5 | |
ANSB_Subject : 6 | |
ANFB_ShouldPrint : 0 | |
ANFB_ShouldView : 1 | |
ANFB_ShouldEdit : 2 | |
ANFB_ShouldAppearInPanel : 3 | |
ANFB_ShouldSummarize : 4 | |
ANFB_ShouldExport : 5 | |
ANFB_ShouldCollaborate : 6 | |
ANFB_ShouldNone : 7 | |
IPV6Type : 1 | |
IPV4Type : 0 | |
CBCanDoReviewWorkflowCheckExpr : ((function () {return app.viewerVersion >= 6 && !app.viewerType.match(/Reader/) || app.viewerVersion >= 7 && requestPermission(permission.annot, permission.create) == permission.granted;})()) | |
CBCanDoWorkflowCheckExprAPR : ((function () {return (app.viewerVersion >= 7 && app.viewerType.match(/Reader/) != null) && requestPermission(permission.annot, permission.create) == permission.granted;})()) | |
ANsums : function (a) { | |
return "*None*"; | |
},function (a) { | |
return AnnotsString.IDS_SUM_PAGE1 + a.doc.getPageLabel(a.page) + AnnotsString.IDS_SUM_PAGE2; | |
},function (a, s) { | |
return AnnotsString.IDS_SUM_SEQ1 + (s ? s : a.seqNum) + AnnotsString.IDS_SUM_SEQ2; | |
},function (a) { | |
return AnnotsString.IDS_SUM_AUTHOR1 + a.author + AnnotsString.IDS_SUM_AUTHOR2; | |
},function (a) { | |
var d = a.modDate; | |
return AnnotsString.IDS_SUM_DATE1 + (d ? util.printd(2, a.modDate) : AnnotsString.IDS_DATE_INDETERMINATE) + AnnotsString.IDS_SUM_DATE2; | |
},function (a) { | |
return AnnotsString.IDS_SUM_TYPE1 + a.uiType + AnnotsString.IDS_SUM_TYPE2; | |
},function (a) { | |
var s = a.subject; | |
return s ? AnnotsString.IDS_SUM_SUBJ1 + s + AnnotsString.IDS_SUM_SUBJ2 : ""; | |
} | |
ANsumorder : 1,3,6,4 | |
CBFNiceTableName : 1 | |
CBFNiceDBName : 2 | |
CBFDBPerDoc : 4 | |
CBannotdata : [object Object] | |
AnnotsString : [object stringGetterObj] | |
SOAPString : [object stringGetterObj] | |
RSS : [object RSS] | |
Net : [object Net] | |
SOAP : [object SOAP] | |
ScriptBridgeUtils : [object Object] | |
SOAPMessageStyle : [object Object] | |
SOAPVersion : [object Object] | |
StreamDigest : [object Object] | |
ServiceDiscovery : [object Object] | |
SOAPRequestStyle : [object Object] | |
ADBCAnnotEnumerator : function ADBCAnnotEnumerator(parent, sorted) { | |
this.parent = parent; | |
this.sorted = sorted; | |
this.next = function () {var e;try {if (!this.conn) {this.conn = CBconnect(this.parent.desc, true);this.conn.stmt.execute("select CONTENTS\tfrom \"" + this.parent.desc.tableName + "\"\twhere AUTHOR not like '~%~'" + (this.sorted ? " order by\tPAGE, NAME;" : ";"));}this.conn.stmt.nextRow();return eval(this.conn.stmt.getColumn("CONTENTS").value);} catch (e) {debugExcept(e);return false;}}; | |
} | |
ADBCAnnotStore : function ADBCAnnotStore(doc, user) { | |
this.desc = CBgetTableDesc(doc, user); | |
this.enumerate = function (sorted) {return new ADBCAnnotEnumerator(this, sorted);}; | |
this.complete = function (toComplete) {var i;var conn = CBconnect(this.desc, true);if (conn) {for (i = 0; toComplete && i < toComplete.length; i++) {if (CBannotdata[toComplete[i].type]) {var e;try {conn.stmt.execute("select DATA from\t\"" + this.desc.tableName + "\"\twhere PAGE = ? and NAME\tlike ?;", toComplete[i].page, toComplete[i].name);conn.stmt.nextRow();var cos = Collab.newWrStreamToCosObj();conn.stmt.getColumn("DATA", ADBC.Binary | ADBC.Stream, cos);CBannotSetData(toComplete[i], cos.getCosObj());} catch (e) {debugExcept(e);return false;}}}} else {return false;}return true;}; | |
this.update = function (toDelete, toAdd, toUpdate) {var i;var e;var conn = CBconnect(this.desc);if (conn == null) {return false;}for (i = 0; toDelete && i < toDelete.length; i++) {try {conn.stmt.execute("delete from \"" + this.desc.tableName + "\" where PAGE =\t? and NAME like\t?;", toDelete[i].page, toDelete[i].name);} catch (e) {debugExcept(e);return false;}}for (i = 0; toAdd && i < toAdd.length; i++) {try {conn.stmt.execute("insert into \"" + this.desc.tableName + "\" (AUTHOR,\tPAGE, NAME,\tCONTENTS, DATA)\tvalues (?, ?, ?, ?,\t?);", toAdd[i].author, toAdd[i].page, toAdd[i].name, CBStrToLongColumnThing(ANClipPrec3(toAdd[i]).toSource()), CBannotData(toAdd[i]));} catch (e) {debugExcept(e);return false;}}for (i = 0; toUpdate && i < toUpdate.length; i++) {try {conn.stmt.execute("update \"" + this.desc.tableName + "\" set CONTENTS = ?,\tDATA = ? where PAGE\t= ?\tand\tNAME like ?;", CBStrToLongColumnThing(ANClipPrec3(toUpdate[i]).toSource()), CBannotData(toUpdate[i]), toUpdate[i].page, toUpdate[i].name);} catch (e) {debugExcept(e);return false;}}return true;}; | |
} | |
AFBuildRegExps : function AFBuildRegExps(array) { | |
var retVal = new Array; | |
retVal.length = array.length; | |
for (var it = 0; it < array.length; it++) { | |
retVal[it] = new RegExp; | |
retVal[it].compile(array[it], "i"); | |
} | |
return retVal; | |
} | |
AFDateFromYMD : function AFDateFromYMD(nYear, nMonth, nDate) { | |
var dDate = new Date; | |
dDate.setFullYear(nYear, nMonth, nDate); | |
if (dDate.getFullYear() != nYear) { | |
return null; | |
} | |
if (dDate.getMonth() != nMonth) { | |
return null; | |
} | |
if (dDate.getDate() != nDate) { | |
return null; | |
} | |
return dDate; | |
} | |
AFDateHorizon : function AFDateHorizon(nYear) { | |
if (nYear < 100 && nYear >= 50) { | |
nYear += 1900; | |
} else if (nYear >= 0 && nYear < 50) { | |
nYear += 2000; | |
} | |
return nYear; | |
} | |
AFDate_Format : function AFDate_Format(pdf) { | |
var cOldFormats = new Array("m/d", "m/d/yy", "mm/dd/yy", "mm/yy", "d-mmm", "d-mmm-yy", "dd-mmm-yy", "yy-mm-dd", "mmm-yy", "mmmm-yy", "mmm d, yyyy", "mmmm d, yyyy", "m/d/yy h:MM tt", "m/d/yy HH:MM"); | |
AFDate_FormatEx(cOldFormats[pdf]); | |
} | |
AFDate_FormatEx : function AFDate_FormatEx(cFormat) { | |
if (!event.value) { | |
return; | |
} | |
if (event.value.indexOf("GMT+") != -1) { | |
var gmtDate = AFParseGMTDateString(event.value); | |
if (gmtDate) { | |
event.value = util.printd(cFormat, gmtDate); | |
return; | |
} | |
} | |
var date = AFParseDateEx(event.value, cFormat); | |
if (!date) { | |
event.value = ""; | |
return; | |
} | |
event.value = util.printd(cFormat, date); | |
} | |
AFDate_Keystroke : function AFDate_Keystroke(pdf) { | |
var cOldFormats = new Array("m/d", "m/d/yy", "mm/dd/yy", "mm/yy", "d-mmm", "d-mmm-yy", "dd-mmm-yy", "yy-mm-dd", "mmm-yy", "mmmm-yy", "mmm d, yyyy", "mmmm d, yyyy", "m/d/yy h:MM tt", "m/d/yy HH:MM"); | |
AFDate_KeystrokeEx(cOldFormats[pdf]); | |
} | |
AFDate_KeystrokeEx : function AFDate_KeystrokeEx(cFormat) { | |
if (event.willCommit && !AFParseDateEx(AFMergeChange(event), cFormat)) { | |
if (event.willCommit && !event.silenceErrors) { | |
var cAlert = EScriptString.IDS_INVALID_DATE; | |
var cAlert2 = EScriptString.IDS_INVALID_DATE2; | |
if (event.target != null) { | |
cAlert += "[ " + event.target.name + " ]"; | |
} | |
cAlert += cAlert2 + cFormat; | |
app.alert(cAlert); | |
} else { | |
app.beep(0); | |
} | |
event.rc = false; | |
} | |
} | |
AFExactMatch : function AFExactMatch(rePatterns, sString) { | |
var it; | |
if (!rePatterns.length && | |
rePatterns.test(sString) && RegExp.lastMatch == sString) { | |
return true; | |
} | |
for (it = 0; it < rePatterns.length; it++) { | |
if (rePatterns[it].test(sString) && RegExp.lastMatch == sString) { | |
return it + 1; | |
} | |
} | |
return 0; | |
} | |
AFExtractNums : function AFExtractNums(string) { | |
var nums = new Array; | |
if (string.charAt(0) == "." || string.charAt(0) == ",") { | |
string = "0" + string; | |
} | |
while (AFDigitsRegExp.test(string)) { | |
nums.length++; | |
nums[nums.length - 1] = RegExp.lastMatch; | |
string = RegExp.rightContext; | |
} | |
if (nums.length >= 1) { | |
return nums; | |
} | |
return null; | |
} | |
AFExtractRegExp : function AFExtractRegExp(rePattern, string) { | |
var retVal = new Array; | |
if (rePattern.test(string)) { | |
retVal.length = 2; | |
retVal[0] = RegExp.leftContext + RegExp.rightContext; | |
retVal[1] = RegExp.lastMatch; | |
return retVal; | |
} | |
return null; | |
} | |
AFExtractTime : function AFExtractTime(string) { | |
var pm = ""; | |
var info; | |
info = AFExtractRegExp(AFPMRegExp, string); | |
if (info) { | |
pm = info[1]; | |
string = info[0]; | |
} | |
info = AFExtractRegExp(AFAMRegExp, string); | |
if (info) { | |
string = info[0]; | |
} | |
info = AFExtractRegExp(AFTimeLongRegExp, string); | |
if (info) { | |
info[1] += pm; | |
return info; | |
} | |
info = AFExtractRegExp(AFTimeShortRegExp, string); | |
if (info) { | |
info[1] += pm; | |
return info; | |
} | |
return null; | |
} | |
AFGetMonthIndex : function AFGetMonthIndex(string) { | |
var monthre = new RegExp(string + "\\[(\\d+)\\]", "i"); | |
var result = monthre.exec(EScriptString.IDS_MONTH_INFO); | |
if (string && result) { | |
return 1 * result[1]; | |
} | |
return 0; | |
} | |
AFGetMonthString : function AFGetMonthString(index) { | |
var monthre = new RegExp("(\\w+)\\[" + index + "\\]"); | |
var result = monthre.exec(EScriptString.IDS_MONTH_INFO); | |
if (result) { | |
return result[1]; | |
} | |
return EScriptString.IDS_INVALID_MONTH; | |
} | |
AFMakeArrayFromList : function AFMakeArrayFromList(string) { | |
var type = typeof string; | |
if (type == "string") { | |
var reSep = new RegExp; | |
reSep.compile(",[ ]?"); | |
return string.split(reSep); | |
} | |
return string; | |
} | |
AFMakeNumber : function AFMakeNumber(string) { | |
var type = typeof string; | |
if (type == "number") { | |
return string; | |
} | |
if (type != "string") { | |
return null; | |
} | |
var array = AFExtractNums(string); | |
if (array) { | |
var joined = array.join("."); | |
if (string.indexOf("-.") >= 0) { | |
joined = "0." + joined; | |
} | |
return joined * (string.indexOf("-") >= 0 ? -1 : 1); | |
} else { | |
return null; | |
} | |
} | |
AFMatchMonth : function AFMatchMonth(string) { | |
for (var it = 0; it < AFMonthsRegExp.length; it++) { | |
if (AFMonthsRegExp[it].test(string)) { | |
return AFGetMonthIndex(RegExp.lastMatch); | |
} | |
} | |
return 0; | |
} | |
AFMergeChange : function AFMergeChange(event) { | |
var prefix, postfix; | |
var value = event.value; | |
if (event.willCommit) { | |
return event.value; | |
} | |
if (event.selStart >= 0) { | |
prefix = value.substring(0, event.selStart); | |
} else { | |
prefix = ""; | |
} | |
if (event.selEnd >= 0 && event.selEnd <= value.length) { | |
postfix = value.substring(event.selEnd, value.length); | |
} else { | |
postfix = ""; | |
} | |
return prefix + event.change + postfix; | |
} | |
AFNumber_Format : function AFNumber_Format(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend) { | |
var value = AFMakeNumber(event.value); | |
var sign = value < 0 ? -1 : 1; | |
var f = event.target; | |
var formatStr = ""; | |
if (value == null) { | |
event.value = ""; | |
return; | |
} | |
if (negStyle == 1 || negStyle == 3) { | |
if (sign > 0) { | |
f.textColor = color.black; | |
} else { | |
f.textColor = color.red; | |
} | |
} | |
value = new String(util.printf("%," + sepStyle + "." + nDec + "f", value)); | |
if ((negStyle != 0 || bCurrencyPrepend) && value.substring(0, 1) == "-") { | |
value = value.substring(1); | |
} | |
if (sign < 0 && bCurrencyPrepend && negStyle == 0) { | |
formatStr = "-"; | |
} | |
if ((negStyle == 2 || negStyle == 3) && sign < 0) { | |
formatStr = formatStr + "("; | |
} | |
if (bCurrencyPrepend) { | |
formatStr = formatStr + strCurrency; | |
} | |
formatStr = formatStr + value; | |
if (!bCurrencyPrepend) { | |
formatStr = formatStr + strCurrency; | |
} | |
if ((negStyle == 2 || negStyle == 3) && sign < 0) { | |
formatStr = formatStr + ")"; | |
} | |
event.value = formatStr; | |
} | |
AFNumber_Keystroke : function AFNumber_Keystroke(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend) { | |
var value = AFMergeChange(event); | |
var commit, noCommit; | |
if (!value) { | |
return; | |
} | |
if (sepStyle > 1) { | |
commit = AFNumberCommaSepCommitRegExp; | |
noCommit = AFNumberCommaSepEntryRegExp; | |
} else { | |
commit = AFNumberDotSepCommitRegExp; | |
noCommit = AFNumberDotSepEntryRegExp; | |
} | |
if (!AFExactMatch(event.willCommit ? commit : noCommit, value)) { | |
if (event.willCommit && !event.silenceErrors) { | |
var cAlert = EScriptString.IDS_INVALID_VALUE; | |
if (event.target != null) { | |
cAlert += " [ " + event.target.name + " ]"; | |
} | |
app.alert(cAlert); | |
} else { | |
app.beep(0); | |
} | |
event.rc = false; | |
} | |
if (event.willCommit && sepStyle > 1) { | |
strval = event.value; | |
commas = new RegExp; | |
commas.compile(","); | |
strval = strval.replace(commas, "."); | |
event.value = strval * 1; | |
} | |
} | |
AFParseDate : function AFParseDate(string, longEntry, shortEntry, wordMonthEntry, monthYearEntry) { | |
var nums; | |
var year, month; | |
var date; | |
var info = AFExtractTime(string); | |
if (!string) { | |
return new Date; | |
} | |
if (info) { | |
string = info[0]; | |
} | |
date = new Date; | |
nums = AFExtractNums(string); | |
if (!nums) { | |
return null; | |
} | |
if (nums.length == 3) { | |
year = 1 * nums[eval(longEntry.charAt(0))]; | |
year = AFDateHorizon(year); | |
date = AFDateFromYMD(year, nums[eval(longEntry.charAt(1))] - 1, nums[eval(longEntry.charAt(2))]); | |
if (info) { | |
date = AFParseTime(info[1], date); | |
} | |
return date; | |
} | |
month = AFMatchMonth(string); | |
if (nums.length == 2) { | |
if (month) { | |
year = 1 * nums[eval(wordMonthEntry.charAt(0))]; | |
year = AFDateHorizon(year); | |
date = AFDateFromYMD(year, month - 1, nums[eval(wordMonthEntry.charAt(1))]); | |
if (info) { | |
date = AFParseTime(info[1], date); | |
} | |
return date; | |
} | |
if (monthYearEntry) { | |
year = 1 * nums[eval(monthYearEntry.charAt(0))]; | |
year = AFDateHorizon(year); | |
date = AFDateFromYMD(year, nums[eval(monthYearEntry.charAt(1))] - 1, 1); | |
} else { | |
date = AFDateFromYMD(date.getFullYear(), nums[eval(shortEntry.charAt(0))] - 1, nums[eval(shortEntry.charAt(1))]); | |
} | |
if (info) { | |
date = AFParseTime(info[1], date); | |
} | |
return date; | |
} | |
if (month && nums.length == 1) { | |
if (monthYearEntry) { | |
year = 1 * nums[0]; | |
year = AFDateHorizon(year); | |
date = AFDateFromYMD(year, month - 1, 1); | |
} else { | |
date = AFDateFromYMD(date.getFullYear(), month - 1, nums[0]); | |
} | |
if (info) { | |
date = AFParseTime(info[1], date); | |
} | |
return date; | |
} | |
return null; | |
} | |
AFParseDateEx : function AFParseDateEx(cString, cFormat) { | |
var nYear; | |
var nMonth; | |
var nDate; | |
var nYCount; | |
var cOrder; | |
var dDate = new Date; | |
dDate.setHours(12, 0, 0); | |
if (!cString) { | |
return dDate; | |
} | |
nYCount = AFParseDateYCount(cFormat); | |
cOrder = AFParseDateOrder(cFormat); | |
var info = AFExtractTime(cString); | |
if (info) { | |
cString = info[0]; | |
} | |
var aNums = AFExtractNums(cString); | |
if (!aNums) { | |
return null; | |
} | |
if (aNums.length == 3) { | |
nYear = 1 * aNums[cOrder.indexOf("y")]; | |
if (nYCount > 2 && nYear < 100 || nYear > 9999) { | |
return null; | |
} | |
nYear = AFDateHorizon(nYear); | |
dDate = AFDateFromYMD(nYear, aNums[cOrder.indexOf("m")] - 1, aNums[cOrder.indexOf("d")]); | |
if (info) { | |
dDate = AFParseTime(info[1], dDate); | |
} else if (dDate) { | |
dDate.setHours(0, 0, 0); | |
} | |
return dDate; | |
} | |
nMonth = AFMatchMonth(cString); | |
if (aNums.length == 2) { | |
if (nMonth) { | |
if (cOrder.indexOf("y") < cOrder.indexOf("d")) { | |
nYear = 1 * aNums[0]; | |
nDate = aNums[1]; | |
} else { | |
nYear = 1 * aNums[1]; | |
nDate = aNums[0]; | |
} | |
if (nYCount > 2 && nYear < 100 || nYear > 9999) { | |
return null; | |
} | |
nYear = AFDateHorizon(nYear); | |
dDate = AFDateFromYMD(nYear, nMonth - 1, nDate); | |
if (info) { | |
dDate = AFParseTime(info[1], dDate); | |
} else if (dDate) { | |
dDate.setHours(0, 0, 0); | |
} | |
return dDate; | |
} | |
if (cOrder.indexOf("y") < cOrder.indexOf("d")) { | |
if (cOrder.indexOf("y") < cOrder.indexOf("m")) { | |
nYear = 1 * aNums[0]; | |
nMonth = aNums[1]; | |
} else { | |
nYear = 1 * aNums[1]; | |
nMonth = aNums[0]; | |
} | |
if (nYCount > 2 && nYear < 100 || nYear > 9999) { | |
return null; | |
} | |
nYear = AFDateHorizon(nYear); | |
dDate = AFDateFromYMD(nYear, nMonth - 1, 1); | |
} else { | |
nYear = dDate.getFullYear(); | |
if (cOrder.indexOf("d") < cOrder.indexOf("m")) { | |
dDate = AFDateFromYMD(nYear, aNums[1] - 1, aNums[0]); | |
} else { | |
dDate = AFDateFromYMD(nYear, aNums[0] - 1, aNums[1]); | |
} | |
} | |
if (info) { | |
dDate = AFParseTime(info[1], dDate); | |
} else if (dDate) { | |
dDate.setHours(0, 0, 0); | |
} | |
return dDate; | |
} | |
if (aNums.length == 1) { | |
if (nMonth) { | |
if (cOrder.indexOf("y") < cOrder.indexOf("d")) { | |
nYear = 1 * aNums[0]; | |
if (nYCount > 2 && nYear < 100 || nYear > 9999) { | |
return null; | |
} | |
nYear = AFDateHorizon(nYear); | |
dDate = AFDateFromYMD(nYear, nMonth - 1, 1); | |
} else { | |
nYear = dDate.getFullYear(); | |
dDate = AFDateFromYMD(nYear, nMonth - 1, aNums[0]); | |
} | |
if (info) { | |
dDate = AFParseTime(info[1], date); | |
} else if (dDate) { | |
dDate.setHours(0, 0, 0); | |
} | |
return dDate; | |
} | |
if (cFormat.length != cString.length) { | |
return null; | |
} | |
nYear = ""; | |
nMonth = ""; | |
nDate = ""; | |
for (var i = 0; i < cFormat.length; i++) { | |
switch (cFormat.charAt(i)) { | |
case "\\": | |
i++; | |
break; | |
case "y": | |
nYear += cString.charAt(i); | |
break; | |
case "m": | |
nMonth += cString.charAt(i); | |
break; | |
case "d": | |
nDate += cString.charAt(i); | |
break; | |
default:; | |
} | |
} | |
nYear *= 1; | |
nMonth *= 1; | |
nDate *= 1; | |
if (nMonth) { | |
nMonth -= 1; | |
} | |
if (!nDate) { | |
nDate += 1; | |
} | |
if (nYCount > 2 && nYear < 100 || nYear > 9999) { | |
return null; | |
} | |
nYear = AFDateHorizon(nYear); | |
dDate = AFDateFromYMD(nYear, nMonth, nDate); | |
if (info) { | |
dDate = AFParseTime(info[1], date); | |
} else if (dDate) { | |
dDate.setHours(0, 0, 0); | |
} | |
return dDate; | |
} | |
return null; | |
} | |
AFParseDateOrder : function AFParseDateOrder(cFormat) { | |
var cOrder = ""; | |
for (var i = 0; i < cFormat.length; i++) { | |
switch (cFormat.charAt(i)) { | |
case "\\": | |
i++; | |
break; | |
case "m": | |
if (cOrder.indexOf("m") == -1) { | |
cOrder += "m"; | |
} | |
break; | |
case "d": | |
if (cOrder.indexOf("d") == -1) { | |
cOrder += "d"; | |
} | |
break; | |
case "j": | |
case "y": | |
if (cOrder.indexOf("y") == -1) { | |
cOrder += "y"; | |
} | |
break; | |
default:; | |
} | |
} | |
if (cOrder.indexOf("m") == -1) { | |
cOrder += "m"; | |
} | |
if (cOrder.indexOf("d") == -1) { | |
cOrder += "d"; | |
} | |
if (cOrder.indexOf("y") == -1) { | |
cOrder += "y"; | |
} | |
return cOrder; | |
} | |
AFParseDateWithPDF : function AFParseDateWithPDF(value, pdf) { | |
var cOldFormats = new Array("m/d", "m/d/yy", "mm/dd/yy", "mm/yy", "d-mmm", "d-mmm-yy", "dd-mmm-yy", "yy-mm-dd", "mmm-yy", "mmmm-yy", "mmm d, yyyy", "mmmm d, yyyy", "m/d/yy h:MM tt", "m/d/yy HH:MM"); | |
return AFParseDateEx(value, cOldFormats[pdf]); | |
} | |
AFParseDateYCount : function AFParseDateYCount(cFormat) { | |
var yCount = 0; | |
for (var i = 0; i < cFormat.length; i++) { | |
switch (cFormat.charAt(i)) { | |
case "\\": | |
i++; | |
break; | |
case "y": | |
yCount += 1; | |
break; | |
default:; | |
} | |
} | |
return yCount; | |
} | |
AFParseGMTDateString : function AFParseGMTDateString(cGMTDateString) { | |
if (!cGMTDateString) { | |
return null; | |
} | |
if (cGMTDateString.indexOf("GMT+") == -1) { | |
return null; | |
} | |
var timeStamp = Date.parse(cGMTDateString); | |
if (isNaN(timeStamp) == false) { | |
var date = new Date(timeStamp); | |
return date; | |
} else { | |
return null; | |
} | |
} | |
AFParseTime : function AFParseTime(string, date) { | |
var pm, am; | |
var nums = AFExtractNums(string); | |
if (!date) { | |
date = new Date; | |
} | |
var hour, minutes, seconds; | |
if (!string) { | |
return date; | |
} | |
if (!(AFTimeGarbageRegExp.test(string) && string == RegExp.lastMatch)) { | |
return null; | |
} | |
if (!nums) { | |
return null; | |
} | |
if (nums.length < 2 || nums.length > 3) { | |
return null; | |
} | |
if (AFPMRegExp.test(string)) { | |
pm = true; | |
} else { | |
pm = false; | |
} | |
if (AFAMRegExp.test(string)) { | |
am = true; | |
} else { | |
am = false; | |
} | |
hour = new Number(nums[0]); | |
if (pm) { | |
if (hour < 12) { | |
hour += 12; | |
} | |
} else if (am) { | |
if (hour >= 12) { | |
hour -= 12; | |
} | |
} | |
minutes = nums[1]; | |
if (nums.length == 3) { | |
seconds = nums[2]; | |
} else { | |
seconds = 0; | |
} | |
date.setHours(hour); | |
date.setMinutes(minutes); | |
date.setSeconds(seconds); | |
if (date.getHours() != hour) { | |
return null; | |
} | |
if (date.getMinutes() != minutes) { | |
return null; | |
} | |
if (date.getSeconds() != seconds) { | |
return null; | |
} | |
return date; | |
} | |
AFPercent_Format : function AFPercent_Format(nDec, sepStyle, bPercentPrepend) { | |
var value = AFMakeNumber(event.value) * 100; | |
var formatStr = "%," + sepStyle + "." + nDec + "f"; | |
if (value == null) { | |
event.value = ""; | |
return; | |
} | |
value = util.printf(formatStr, value); | |
if (bPercentPrepend) { | |
event.value = "%" + value; | |
} else { | |
event.value = value + "%"; | |
} | |
} | |
AFPercent_Keystroke : function AFPercent_Keystroke(nDec, sepStyle) { | |
AFNumber_Keystroke(nDec, sepStyle, 0, 0, "", true); | |
} | |
AFRange_Validate : function AFRange_Validate(bGreaterThan, nGreaterThan, bLessThan, nLessThan) { | |
var cError = ""; | |
if (event.value == "") { | |
return; | |
} | |
if (bGreaterThan && bLessThan) { | |
if (event.value < nGreaterThan || event.value > nLessThan) { | |
cError = util.printf(EScriptString.IDS_GT_AND_LT, nGreaterThan, nLessThan); | |
} | |
} else if (bGreaterThan) { | |
if (event.value < nGreaterThan) { | |
cError = util.printf(EScriptString.IDS_GREATER_THAN, nGreaterThan); | |
} | |
} else if (bLessThan) { | |
if (event.value > nLessThan) { | |
cError = util.printf(EScriptString.IDS_LESS_THAN, nLessThan); | |
} | |
} | |
if (cError != "") { | |
if (!event.silenceErrors) { | |
app.alert(cError, 0); | |
} | |
event.rc = false; | |
} | |
} | |
AFSignatureLock : function AFSignatureLock(doc, cOperation, cFields, bLock) { | |
var aFields = AFMakeArrayFromList(cFields); | |
if (cOperation != "THESE") { | |
for (var i = 0; i < doc.numFields; i++) { | |
var f = doc.getField(doc.getNthFieldName(i)); | |
f.readonly = bLock; | |
} | |
} | |
if (cOperation == "EXCEPT") { | |
bLock = !bLock; | |
} | |
if (cOperation == "THESE" || (cOperation == "EXCEPT" && !bLock)) { | |
for (var i = 0; i < aFields.length; i++) { | |
var f = doc.getField(aFields[i]); | |
var a = f.getArray(); | |
for (var j = 0; j < a.length; j++) { | |
a[j].readonly = bLock; | |
} | |
} | |
} | |
} | |
AFSignature_Format : function AFSignature_Format(cOperation, cFields) { | |
var bLock = event.value != ""; | |
AFSignatureLock(this, cOperation, cFields, bLock); | |
} | |
AFSimple : function AFSimple(cFunction, nValue1, nValue2) { | |
var nValue = 1 * nValue1; | |
nValue1 = 1 * nValue1; | |
nValue2 = 1 * nValue2; | |
switch (cFunction) { | |
case "AVG": | |
case "SUM": | |
nValue = nValue1 + nValue2; | |
break; | |
case "PRD": | |
nValue = nValue1 * nValue2; | |
break; | |
case "MIN": | |
nValue = Math.min(nValue1, nValue2); | |
break; | |
case "MAX": | |
nValue = Math.max(nValue1, nValue2); | |
break; | |
default:; | |
} | |
return nValue; | |
} | |
AFSimpleInit : function AFSimpleInit(cFunction) { | |
switch (cFunction) { | |
case "PRD": | |
return 1; | |
break; | |
default:; | |
} | |
return 0; | |
} | |
AFSimple_Calculate : function AFSimple_Calculate(cFunction, cFields) { | |
var nFields = 0; | |
var nValue = AFSimpleInit(cFunction); | |
var aFields = AFMakeArrayFromList(cFields); | |
for (var i = 0; i < aFields.length; i++) { | |
var f = this.getField(aFields[i]); | |
var a = f.getArray(); | |
for (var j = 0; j < a.length; j++) { | |
var nTemp = AFMakeNumber(a[j].value); | |
if (i == 0 && | |
j == 0 && (cFunction == "MIN" || cFunction == "MAX")) { | |
nValue = nTemp; | |
} | |
nValue = AFSimple(cFunction, nValue, nTemp); | |
nFields++; | |
} | |
} | |
if (cFunction == "AVG" && nFields > 0) { | |
nValue /= nFields; | |
} | |
if (cFunction == "AVG" || cFunction == "SUM" || cFunction == "PRD") { | |
nValue = nValue.toFixed(6) * 1; | |
} | |
event.value = nValue; | |
} | |
AFSpecial_Format : function AFSpecial_Format(psf) { | |
var value = event.value; | |
if (!value) { | |
return; | |
} | |
switch (psf) { | |
case 0: | |
var formatStr = "99999"; | |
break; | |
case 1: | |
var formatStr = "99999-9999"; | |
break; | |
case 2: | |
var NumbersStr = util.printx("9999999999", value); | |
if (NumbersStr.length >= 10) { | |
var formatStr = "(999) 999-9999"; | |
} else { | |
var formatStr = "999-9999"; | |
} | |
break; | |
case 3: | |
var formatStr = "999-99-9999"; | |
break; | |
default:; | |
} | |
event.value = util.printx(formatStr, value); | |
} | |
AFSpecial_Keystroke : function AFSpecial_Keystroke(psf) { | |
var value = AFMergeChange(event); | |
var commit, noCommit; | |
if (!value) { | |
return; | |
} | |
switch (psf) { | |
case 0: | |
commit = AFZipCommitRegExp; | |
noCommit = AFZipEntryRegExp; | |
break; | |
case 1: | |
commit = AFZip4CommitRegExp; | |
noCommit = AFZip4EntryRegExp; | |
break; | |
case 2: | |
commit = AFPhoneCommitRegExp; | |
noCommit = AFPhoneEntryRegExp; | |
break; | |
case 3: | |
commit = AFSSNCommitRegExp; | |
noCommit = AFSSNEntryRegExp; | |
break; | |
default:; | |
} | |
if (!AFExactMatch(event.willCommit ? commit : noCommit, value)) { | |
if (event.willCommit && !event.silenceErrors) { | |
var cAlert = EScriptString.IDS_INVALID_VALUE; | |
if (event.target != null) { | |
cAlert += " [ " + event.target.name + " ]"; | |
} | |
app.alert(cAlert); | |
} else { | |
app.beep(0); | |
} | |
event.rc = false; | |
} | |
} | |
AFSpecial_KeystrokeEx : function AFSpecial_KeystrokeEx(mask) { | |
var value = AFMergeChange(event); | |
if (!value || !mask.length) { | |
return; | |
} | |
var cAlert = EScriptString.IDS_INVALID_VALUE + " = \"" + mask + "\""; | |
if (event.willCommit) { | |
if (indexOfNextEssential(mask, value.length) != -1) { | |
if (!event.silenceErrors) { | |
app.alert(cAlert); | |
} | |
event.rc = false; | |
return; | |
} else { | |
event.value = event.value + mask.substring(value.length, mask.length); | |
return; | |
} | |
} | |
var nMaskIndex = 0; | |
var nValueIndex = 0; | |
var nOffset = 0; | |
var nChangeStart = event.selStart; | |
while (nValueIndex < value.length) { | |
var mChar = mask.charAt(nMaskIndex); | |
var vChar = value.charAt(nValueIndex); | |
if (!maskSatisfied(vChar, mChar)) { | |
var nextEssential = indexOfNextEssential(mask, nMaskIndex); | |
var nChangeEnd = event.selStart + event.change.length + nOffset; | |
if ((nMaskIndex < mask.length && !isReservedMaskChar(mChar)) && | |
nextEssential != -1 && | |
maskSatisfied(vChar, mask.charAt(nextEssential)) && | |
(nValueIndex + nOffset) >= nChangeStart && | |
((nValueIndex + nOffset) <= nChangeEnd)) { | |
var maskSubstring = mask.substring(nMaskIndex, nextEssential); | |
event.change = event.change.substring(0, nValueIndex + nOffset - nChangeStart) + maskSubstring + event.change.substring(nValueIndex + nOffset - nChangeStart); | |
nOffset = nOffset + maskSubstring.length; | |
nMaskIndex = nextEssential; | |
} else { | |
if (!event.silenceErrors) { | |
app.alert(cAlert); | |
} | |
event.rc = false; | |
return; | |
} | |
} | |
nValueIndex++; | |
nMaskIndex++; | |
} | |
} | |
AFStringReplace : function AFStringReplace(cString, oRegExp, cReplacement) { | |
return cString.replace(oRegExp, cReplacement); | |
} | |
AFTime_Format : function AFTime_Format(ptf) { | |
if (!event.value) { | |
return; | |
} | |
var date = AFParseTime(event.value, null); | |
if (!date) { | |
event.value = ""; | |
return; | |
} | |
var cFormats = new Array("HH:MM", "h:MM tt", "HH:MM:ss", "h:MM:ss tt"); | |
event.value = util.printd(cFormats[ptf], date); | |
} | |
AFTime_FormatEx : function AFTime_FormatEx(cFormat) { | |
if (!event.value) { | |
return; | |
} | |
var date = AFParseTime(event.value, null); | |
if (!date) { | |
event.value = ""; | |
return; | |
} | |
event.value = util.printd(cFormat, date); | |
} | |
AFTime_Keystroke : function AFTime_Keystroke(ptf) { | |
if (event.willCommit && !AFParseTime(event.value, null)) { | |
if (event.willCommit && !event.silenceErrors) { | |
var cAlert = EScriptString.IDS_INVALID_VALUE; | |
if (event.target != null) { | |
cAlert += " [ " + event.target.name + " ]"; | |
} | |
app.alert(cAlert); | |
} else { | |
app.beep(0); | |
} | |
event.rc = false; | |
} | |
} | |
ANApprovalGetStrings : function ANApprovalGetStrings(mode) { | |
var retData = new Object; | |
if (mode == -1) { | |
retData.title = "Title 1"; | |
retData.text = "First\r\nSecond\r\nThird"; | |
retData.dest = "Destination 1"; | |
retData.tip = "Tip 1"; | |
retData.subj = "Subject 1"; | |
retData.msg = "Message 1"; | |
retData.notify = "Notification 1"; | |
} else if (mode == 1) { | |
retData.title = AnnotsString.IDS_SEND_FOR_APPROVAL_TITLE_INITIATE; | |
retData.text = AnnotsString.IDS_SEND_FOR_APPROVAL_INST_INITIATE; | |
retData.dest = AnnotsString.IDS_SEND_FOR_APPROVAL_DEST_INITIATE; | |
retData.tip = AnnotsString.IDS_SEND_FOR_APPROVAL_TIP_INITIATE; | |
retData.subj = AnnotsString.IDS_SEND_FOR_APPROVAL_SUBJ_INITIATE; | |
retData.msg = AnnotsString.IDS_SEND_FOR_APPROVAL_MESG_INITIATE; | |
retData.notify = AnnotsString.IDS_SEND_FOR_APPROVAL_NOTIFY_INITIATE; | |
} else if (mode == 2) { | |
retData.title = AnnotsString.IDS_SEND_FOR_APPROVAL_TITLE_CONTINUE; | |
retData.text = AnnotsString.IDS_SEND_FOR_APPROVAL_INST_CONTINUE_UB; | |
retData.dest = AnnotsString.IDS_SEND_FOR_APPROVAL_DEST_CONTINUE; | |
retData.tip = AnnotsString.IDS_SEND_FOR_APPROVAL_TIP_CONTINUE; | |
retData.subj = AnnotsString.IDS_SEND_FOR_APPROVAL_SUBJ_CONTINUE; | |
retData.msg = AnnotsString.IDS_SEND_FOR_APPROVAL_MESG_CONTINUE_UB; | |
retData.notify = AnnotsString.IDS_SEND_FOR_APPROVAL_NOTIFY_CONTINUE; | |
} else if (mode == 3) { | |
retData.title = AnnotsString.IDS_SEND_FOR_APPROVAL_TITLE_CONTINUE; | |
retData.text = AnnotsString.IDS_SEND_FOR_APPROVAL_INST_CONTINUE_NOUB; | |
retData.dest = AnnotsString.IDS_SEND_FOR_APPROVAL_DEST_CONTINUE; | |
retData.tip = AnnotsString.IDS_SEND_FOR_APPROVAL_TIP_CONTINUE; | |
retData.subj = AnnotsString.IDS_SEND_FOR_APPROVAL_SUBJ_CONTINUE; | |
retData.msg = AnnotsString.IDS_SEND_FOR_APPROVAL_MESG_CONTINUE_NOUB; | |
retData.notify = AnnotsString.IDS_SEND_FOR_APPROVAL_NOTIFY_CONTINUE; | |
} else if (mode == 4) { | |
retData.title = AnnotsString.IDS_SEND_FOR_APPROVAL_TITLE_COMPLETE; | |
retData.text = AnnotsString.IDS_SEND_FOR_APPROVAL_INST_COMPLETE; | |
retData.dest = AnnotsString.IDS_SEND_FOR_APPROVAL_DEST_COMPLETE; | |
retData.tip = AnnotsString.IDS_SEND_FOR_APPROVAL_TIP_COMPLETE; | |
retData.subj = AnnotsString.IDS_SEND_FOR_APPROVAL_SUBJ_COMPLETE; | |
retData.msg = AnnotsString.IDS_SEND_FOR_APPROVAL_MESG_COMPLETE; | |
retData.notify = AnnotsString.IDS_SEND_FOR_APPROVAL_NOTIFY_COMPLETE; | |
} else if (mode == 5) { | |
retData.title = AnnotsString.IDS_SEND_FOR_APPROVAL_TITLE_REJECT; | |
retData.text = AnnotsString.IDS_SEND_FOR_APPROVAL_INST_REJECT; | |
retData.dest = AnnotsString.IDS_SEND_FOR_APPROVAL_DEST_REJECT; | |
retData.tip = AnnotsString.IDS_SEND_FOR_APPROVAL_TIP_REJECT; | |
retData.subj = AnnotsString.IDS_SEND_FOR_APPROVAL_SUBJ_REJECT; | |
retData.msg = AnnotsString.IDS_SEND_FOR_APPROVAL_MESG_REJECT; | |
retData.notify = AnnotsString.IDS_SEND_FOR_APPROVAL_NOTIFY_REJECT; | |
} | |
return retData; | |
} | |
ANAuthenticateResource : function (bCanStore, bStore, cServer, cRealm, bShowWarning) { | |
var auth = new Object; | |
auth.result = new Object; | |
auth.result.response = false; | |
if (cServer == undefined || cServer.length > 512) { | |
return auth.result; | |
} | |
if (cRealm == undefined || cRealm.length > 512) { | |
return auth.result; | |
} | |
auth.initialize = function (dialog) {dialog.enable({keyc: bCanStore});dialog.load({keyc: bCanStore ? bStore : false});dialog.visible({warn: bShowWarning});}; | |
auth.commit = function (dialog) {var values = dialog.store();this.result.Username = values.usrn;this.result.Password = values.pass;this.result.SaveCredential = values.keyc;this.result.response = true;}; | |
auth.description = {name: AnnotsString.IDS_SYNC_AUTHENTICATE_TITLE, elements: [{type: "view", align: "align_center", elements: [{type: "static_text", align: "align_left", item_id: "warn", name: AnnotsString.IDS_SYNC_AUTHENTICATE_WARNING_BASIC_NON_SSL}, {type: "cluster", name: AnnotsString.IDS_SYNC_AUTHENTICATE_CAPTION, align: "align_center", elements: [{type: "static_text", align: "align_left", name: cServer}, {type: "static_text", align: "align_left", name: cRealm}, {type: "view", align_children: "align_fill", elements: [{type: "view", align: "align_center", align_children: "align_row", elements: [{type: "static_text", name: AnnotsString.IDS_SYNC_AUTHENTICATE_USERNAME}, {type: "edit_text", item_id: "usrn", char_width: 20}]}, {type: "view", align: "align_center", align_children: "align_row", elements: [{type: "static_text", name: AnnotsString.IDS_SYNC_AUTHENTICATE_PASSWORD}, {type: "edit_text", item_id: "pass", char_width: 20, password: true}]}]}, {item_id: "keyc", type: "check_box", align: "align_left", name: AnnotsString.IDS_SYNC_AUTHENTICATE_SAVECRED}]}, {type: "ok_cancel"}]}]}; | |
app.beginPriv(); | |
app.execDialog(auth); | |
app.endPriv(); | |
return auth.result; | |
} | |
ANClipPrec3 : function ANClipPrec3(o) { | |
switch (typeof o) { | |
case "object": | |
for (var k in o) { | |
o[k] = ANClipPrec3(o[k]); | |
} | |
return o; | |
break; | |
case "number": | |
return Math.round(o * 1000) / 1000; | |
break; | |
default: | |
return o; | |
break; | |
} | |
} | |
ANContinueApproval : function ANContinueApproval(doc) { | |
return ANSendForApproval(doc, false, false, true, false, false); | |
} | |
ANCreateMLSEElementsFromArray : function ANCreateMLSEElementsFromArray(nameOrArray, width) { | |
if (nameOrArray == undefined) { | |
return []; | |
} | |
if (typeof nameOrArray.length == "undefined") { | |
return [ANCreateMLSElement(nameOrArray, width)]; | |
} | |
var a = []; | |
for (var i in nameOrArray) { | |
a = a.concat([ANCreateMLSElement(nameOrArray[i], width)]); | |
} | |
return a; | |
} | |
ANCreateMLSElement : function ANCreateMLSElement(name, width) { | |
var m = name.match(/^\%bullet\%(.*)/); | |
var e = {type: "static_text", name: name, wrap_name: true, width: width}; | |
if (m) { | |
e.width = {diff: [width, {zstring_width: "\u2022"}]}; | |
e.name = m[1]; | |
return {type: "view", align_children: "align_top", elements: [{type: "static_text", name: "\u2022"}, e]}; | |
} | |
return e; | |
} | |
ANCreateSkipElements : function ANCreateSkipElements(skipLabel, width) { | |
if (!skipLabel) { | |
return []; | |
} | |
return [{type: "view", width: width, elements: [{type: "check_box", item_id: "skip", alignment: "align_left", name: AnnotsString.IDS_DONT_SHOW_AGAIN}]}]; | |
} | |
ANCreateTipElements : function ANCreateTipElements(tip, width, tipDesc) { | |
if (!tip) { | |
return []; | |
} | |
return [{type: "cluster", width: width, elements: [{type: "view", align_children: "align_row", elements: [{type: "image", item_id: "tip1", width: Collab.tipIconWidth, height: Collab.tipIconHeight}, ANCreateMLSElement(tip, {diff: [width, Collab.tipIconWidth * 2]})]}].concat(tipDesc ? [{type: "view", align: "align_right", elements: tipDesc}] : [])}]; | |
} | |
ANDefaultInvite : function ANDefaultInvite(doc, bUpdate, decodedURL) { | |
if (!doc.external) { | |
return ANSendForReview(doc, bUpdate); | |
} | |
return CBBBRInvite(doc, decodedURL); | |
} | |
ANDoSend : function ANDoSend(doc, docID, from, to, position, cc, bcc, subject, body, bUB, bUI, bApproval, bNoMojo, toolbars, bInitiatorEmail) { | |
if ((typeof to == "undefined" || to.length == 0) && (bUI == false)) { | |
app.alert({cMsg: AnnotsString.IDS_SEND_FOR_REVIEW_NO_RECIPIENT, oDoc: doc}); | |
return 0; | |
} | |
var raddr = ""; | |
if (typeof from != "undefined" && (from.length != 0)) { | |
raddr = from; | |
} | |
var url = "mailto:"; | |
if (position == 0) { | |
url += escape(to); | |
} else { | |
var invitees = to.split(";"); | |
if (position > invitees.length + 1) { | |
url += escape(to); | |
} else { | |
url += escape(invitees[position - 1]); | |
} | |
} | |
url += "?"; | |
var firstParam = false; | |
if (typeof cc != "undefined" && (cc.length != 0)) { | |
if (firstParam) { | |
url += "&"; | |
} | |
url += "cc=" + escape(cc); | |
firstParam = true; | |
} | |
if (typeof bcc != "undefined" && bcc.length != 0 && (!bApproval)) { | |
if (firstParam) { | |
url += "&"; | |
} | |
url += "bcc=" + escape(bcc); | |
firstParam = true; | |
} | |
if (typeof subject != "undefined" && (subject.length != 0)) { | |
if (firstParam) { | |
url += "&"; | |
} | |
url += "subject=" + escape(subject); | |
firstParam = true; | |
} | |
if (typeof body != "undefined" && (body.length != 0)) { | |
if (firstParam) { | |
url += "&"; | |
} | |
url += "body=" + escape(body); | |
firstParam = true; | |
} | |
if (bUI) { | |
if (firstParam) { | |
url += "&"; | |
} | |
url += "ui=true"; | |
} else { | |
if (firstParam) { | |
url += "&"; | |
} | |
url += "ui=false"; | |
} | |
var startDate = new Date; | |
var script; | |
if (!bApproval) { | |
var params = {initiator: raddr, initScript: "", invitees: to, cc: cc, bcc: "", sentDate: startDate, toolbars: toolbars, selfDestruct: true}.toSource().replace("{", "$& doc: this, "); | |
CBCanDoEBRReviewWorkflowCheckExpr = "(" + CBEncodeMaybeInternalStrings(function () {var bReader = app.viewerType.match(/Reader/);var bResult = app.viewerVersion >= 6 && !bReader || app.viewerVersion >= 7 && requestPermission(permission.annot, permission.create) == permission.granted;if (bResult && external) {var err = bReader ? $$$IDS_EMAIL_WORKFLOW_IN_BROWSER_ERROR_READER : $$$IDS_EMAIL_WORKFLOW_IN_BROWSER_ERROR_ACROBAT;app.alert({cMsg: err});return false;}return bResult;}.toSource()) + "())"; | |
script = "if(!" + CBCanDoEBRReviewWorkflowCheckExpr + ") {" + " }\telse { Collab.registerReview(" + params + ");}"; | |
} else { | |
var params = {initiator: "", initScript: false, invitees: "", cc: bcc, bcc: "", initiatorEmail: bInitiatorEmail, selfDestruct: false}.toSource().replace("{", "$& doc: this, "); | |
CBCanDoApprovalWorkflowCheckExpr = "(" + CBEncodeMaybeInternalStrings(function () {var bReader = app.viewerType.match(/Reader/);var bResult = app.viewerVersion >= 9 && (!bReader || requestPermission(permission.annot, permission.create) == permission.granted);if (bResult && external) {var err = bReader ? $$$IDS_EMAIL_WORKFLOW_IN_BROWSER_ERROR_READER : $$$IDS_EMAIL_WORKFLOW_IN_BROWSER_ERROR_ACROBAT;app.alert({cMsg: err});return false;}return bResult;}.toSource()) + "())"; | |
script = "if(!" + CBCanDoApprovalWorkflowCheckExpr + ") {" + " }\telse { Collab.registerApproval(" + params + ");}"; | |
} | |
var result; | |
var raise = false; | |
var e; | |
try { | |
var submitParams = {cURL: url, cPermID: docID, bPDF: true, bCheckReqdFields: false}; | |
if (!bNoMojo) { | |
var docScriptName = "___ADBERMAIS___"; | |
var oneShotScript = script + "\nif(app.viewerVersion < 7) try{addScript(" + docScriptName.toSource() + ", ' ');} catch(e){}"; | |
var parms = {creator: "RMA", title: AnnotsString.IDS_SORT_WARNING_TITLE, r_vers: bApproval ? 9 : 7, a_vers: bApproval ? 9 : 6, wf: (bApproval ? "A" : "EBR") + (bUB ? "w" : "wo") + "RE"}; | |
var strPref = "IDS_VERERR_" + (bApproval ? "APP" : "EBR") + (bUB ? "_RE" : "") + "_"; | |
var vers = new Array; | |
if (!bApproval) { | |
vers.rold = {vern: parms.r_vers, sver: "R602", labl: "Old"}; | |
vers.aold = {vern: parms.a_vers, sver: "F4o5", labl: "Old"}; | |
} else { | |
vers.rold = {vern: parms.r_vers, sver: "R602", labl: "Old"}; | |
vers.a5 = {vern: 6, sver: "F4o5", labl: "5x"}; | |
vers.aold = {vern: parms.a_vers, sver: "F602", labl: "Old"}; | |
} | |
for (var v in vers) { | |
var sver = vers[v].sver; | |
var sname = strPref + sver; | |
var str = AnnotsString[sname]; | |
if (str) { | |
var strENU = null; | |
if (bApproval && app.language != "ENU") { | |
var snameENU = sname + "_ENU"; | |
strENU = AnnotsString[snameENU]; | |
} | |
parms[v] = {str: str, strenu: strENU, type: "url", prod: (sver.substring(0, 1) == "F") ? "Viewer" : "Reader", vern: vers[v].vern, labl: vers[v].labl}; | |
} | |
} | |
var scripts = CreateViewerVersionCheck70(parms); | |
submitParams.oJavaScript = {Doc: [docScriptName, oneShotScript]}; | |
for (var s in scripts) { | |
submitParams.oJavaScript.Doc = submitParams.oJavaScript.Doc.concat(s, scripts[s]); | |
} | |
} | |
if (bUB) { | |
submitParams.cUsageRights = submitFormUsageRights.RMA; | |
} | |
if (!bApproval && bUB) { | |
submitParams.bSetDocIDLater = true; | |
} | |
app.beginPriv(); | |
result = doc.submitForm(submitParams); | |
app.endPriv(); | |
} catch (e) { | |
app.alert({cMsg: e.message, oDoc: doc}); | |
raise = true; | |
} | |
var oResult = new Object; | |
oResult.submitFormResult = result; | |
oResult.raised = raise; | |
return oResult; | |
} | |
ANDocCenterLogin : function (bInSilentShowProgressMonitor) { | |
this.result = new Object; | |
this.result.response = false; | |
var data = {}; | |
data.reviewType = "DocCenterLogin"; | |
if (!SilentDocCenterLogin(data, {bShowProgressMonitor: bInSilentShowProgressMonitor})) { | |
var wiz = CBTrustPropagateWiz({finishString: AnnotsString.IDS_FINISH, title: AnnotsString.IDS_SHARED_REVIEW_ADOBE_DOC_CENTER, steps: DocCenterLoginSteps}); | |
CBRunSimpleWizNew(wiz, 0, -1, data); | |
if (data.result == "fnsh") { | |
if (data.swConn) { | |
this.result.response = true; | |
app.beginPriv(); | |
this.result.AuthToken = data.swConn.getAuthInfo("authToken"); | |
this.result.AuthTokenType = data.swConn.getAuthInfo("authTokenType"); | |
this.result.Timestamp = data.swConn.getAuthInfo("timeStamp"); | |
app.endPriv(); | |
} else { | |
this.result.response = false; | |
} | |
} else { | |
this.result.response = false; | |
} | |
} else { | |
if (data.swConn) { | |
this.result.response = true; | |
app.beginPriv(); | |
this.result.AuthToken = data.swConn.getAuthInfo("authToken"); | |
this.result.AuthTokenType = data.swConn.getAuthInfo("authTokenType"); | |
this.result.Timestamp = data.swConn.getAuthInfo("timeStamp"); | |
app.endPriv(); | |
} else { | |
this.result.response = false; | |
} | |
} | |
if (this.result.response == true) { | |
this.result.Username = data.user; | |
this.result.Password = data.pswd; | |
this.result.SaveCredential = data.rememberPassword; | |
} | |
ANDumpObj(this.result); | |
return this.result; | |
} | |
Cannot continue printing to the console. | |
ANDocCenterSignup : function () { | |
this.result = new Object; | |
this.result.response = false; | |
app.beginPriv(); | |
var disabled = Collab.isDocCentreSignupDisabled(); | |
app.endPriv(); | |
if (disabled) { | |
var desc = IWSharedReviewDocCenterEligibilityErrorDialog(); | |
app.beginPriv(); | |
var result = app.execDialog(desc); | |
app.endPriv(); | |
return this.result; | |
} | |
var data = {}; | |
data.reviewType = "DocCenterSignup"; | |
var wiz = CBTrustPropagateWiz({finishString: AnnotsString.IDS_FINISH, title: AnnotsString.IDS_SHARED_REVIEW_ADOBE_DOC_CENTER, steps: DocCenterSignupSteps}); | |
CBRunSimpleWizNew(wiz, 0, -1, data); | |
if (data.result == "fnsh") { | |
if (data.swConn) { | |
this.result.response = true; | |
} else { | |
this.result.response = false; | |
} | |
} else { | |
this.result.response = false; | |
} | |
if (this.result.response == true) { | |
this.result.Username = data.user; | |
this.result.Password = data.pswd; | |
this.result.SaveCredential = data.rememberPassword; | |
} | |
ANDumpObj(this.result); | |
return this.result; | |
} | |
Cannot continue printing to the console. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment