cgmail2.js

Summary
cgmail2.js
Constants
GMAIL_MAIN_DOC_URLThe url of the mail document for gmail
GMAIL_MAIN_DOC_URL2The url of the mail document for gmail and https.
FireGPG.cGmail2This is the main class to manage gmail’s function with the new interface.
Variables
docA list of document who can be used.
docOccupedA list of document who wait to be checked.
currentThe current document id used (to be unique)
Functions
checkDocThis function check a document for sign and button to add on a page.
callBackThis function create a function witch is called when the user click on a button
getWriteMailContentReturn the content of a mail in composition (his selection if something is selected)
getWriteMailContentForDirectSendReturn the content of a mail in composition (his selection if something is selected)
iframeOrTextareaReturn iframe if the iframe is used to compose the mail, textarea if not.
getTheIframeReturn the iframe used to compose a mail
getTheTextareaReturn the textarea used to compose a mail
getToCcBccMailReturn the To, CC and BCC filds’ value of a mail in composition.
setWriteMailContentSet the content of a mail in composition (his selection if something is selected)
getMailContentRetrun the content of a mail, need the div object with the mail
setMailContentSet the content of a mail, need the div object with the mail
initSystemThis function init the class : she load specific options, and attach listeners to the webpages.
pageLoadedThis function is called when a page is loaded.
clickOnDockThis function is called when the user click on the page.
getMimeMailContensReturn the mime source of a mail

Constants

GMAIL_MAIN_DOC_URL

The url of the mail document for gmail

GMAIL_MAIN_DOC_URL2

The url of the mail document for gmail and https.

FireGPG.cGmail2

This is the main class to manage gmail’s function with the new interface.

Summary
Variables
docA list of document who can be used.
docOccupedA list of document who wait to be checked.
currentThe current document id used (to be unique)
Functions
checkDocThis function check a document for sign and button to add on a page.
callBackThis function create a function witch is called when the user click on a button
getWriteMailContentReturn the content of a mail in composition (his selection if something is selected)
getWriteMailContentForDirectSendReturn the content of a mail in composition (his selection if something is selected)
iframeOrTextareaReturn iframe if the iframe is used to compose the mail, textarea if not.
getTheIframeReturn the iframe used to compose a mail
getTheTextareaReturn the textarea used to compose a mail
getToCcBccMailReturn the To, CC and BCC filds’ value of a mail in composition.
setWriteMailContentSet the content of a mail in composition (his selection if something is selected)
getMailContentRetrun the content of a mail, need the div object with the mail
setMailContentSet the content of a mail, need the div object with the mail
initSystemThis function init the class : she load specific options, and attach listeners to the webpages.
pageLoadedThis function is called when a page is loaded.
clickOnDockThis function is called when the user click on the page.
getMimeMailContensReturn the mime source of a mail

Variables

doc

A list of document who can be used.

docOccuped

A list of document who wait to be checked.

current

The current document id used (to be unique)

Functions

checkDoc

checkDoc: function(id,
retry)

This function check a document for sign and button to add on a page.

Parameters

idThe document ‘s id of the click.

callBack

callBack: function(doc)

This function create a function witch is called when the user click on a button

Parameters

docThe document of the button.

getWriteMailContent

getWriteMailContent: function(dDocument,
boutonxboxnode,
betterTextOnly,
forMime)

Return the content of a mail in composition (his selection if something is selected)

Parameters

dDocument- The html document boutonxboxnode - The note with the buttons of the mails

getWriteMailContentForDirectSend

getWriteMailContentForDirectSend: function(dDocument,
boutonxboxnode)

Return the content of a mail in composition (his selection if something is selected)

Parameters

dDocument- The html document boutonxboxnode - The note with the buttons of the mails

iframeOrTextarea

iframeOrTextarea: function(dDocument,
boutonxboxnode)

Return iframe if the iframe is used to compose the mail, textarea if not.

Parameters

dDocument- The html document boutonxboxnode - The note with the buttons of the mails

getTheIframe

getTheIframe: function(dDocument,
boutonxboxnode)

Return the iframe used to compose a mail

Parameters

dDocument- The html document boutonxboxnode - The note with the buttons of the mails

getTheTextarea

getTheTextarea: function(dDocument,
boutonxboxnode)

Return the textarea used to compose a mail

Parameters

dDocument- The html document boutonxboxnode - The note with the buttons of the mails

getToCcBccMail

getToCcBccMail: function(dDocument,
boutonxboxnode,
onlyto,
onlycc,
onlybcc)

Return the To, CC and BCC filds’ value of a mail in composition.

Parameters

dDocument- The html document boutonxboxnode - The note with the buttons of the mails

setWriteMailContent

setWriteMailContent: function(dDocument,
boutonxboxnode,
newText)

Set the content of a mail in composition (his selection if something is selected)

Parameters

dDocument- The html document boutonxboxnode - The note with the buttons of the mails newText - The new text

getMailContent

getMailContent: function(i,
doc)

Retrun the content of a mail, need the div object with the mail

Parameters

iThe mail node
docThe document of the page.

setMailContent

setMailContent: function(papai,
doc,
data)

Set the content of a mail, need the div object with the mail

Parameters

iThe mail node
docThe document of the page.
dataThe html of the mail

initSystem

initSystem: function()

This function init the class : she load specific options, and attach listeners to the webpages.

pageLoaded

pageLoaded: function(aEvent)

This function is called when a page is loaded.  If it’s seem to be a gmail page, listeners are added.

Parameters

aEventThe event of the load

clickOnDock

clickOnDock: function(docid)

This function is called when the user click on the page.  She will call checkDoc 5s later.

Parameters

docidThe document ‘s id of the click.

getMimeMailContens

getMimeMailContens: function(id,
doc)

Return the mime source of a mail

Parameters

idThe mail’s id
checkDoc: function(id,
retry)
This function check a document for sign and button to add on a page.
callBack: function(doc)
This function create a function witch is called when the user click on a button
getWriteMailContent: function(dDocument,
boutonxboxnode,
betterTextOnly,
forMime)
Return the content of a mail in composition (his selection if something is selected)
getWriteMailContentForDirectSend: function(dDocument,
boutonxboxnode)
Return the content of a mail in composition (his selection if something is selected)
iframeOrTextarea: function(dDocument,
boutonxboxnode)
Return iframe if the iframe is used to compose the mail, textarea if not.
getTheIframe: function(dDocument,
boutonxboxnode)
Return the iframe used to compose a mail
getTheTextarea: function(dDocument,
boutonxboxnode)
Return the textarea used to compose a mail
getToCcBccMail: function(dDocument,
boutonxboxnode,
onlyto,
onlycc,
onlybcc)
Return the To, CC and BCC filds’ value of a mail in composition.
setWriteMailContent: function(dDocument,
boutonxboxnode,
newText)
Set the content of a mail in composition (his selection if something is selected)
getMailContent: function(i,
doc)
Retrun the content of a mail, need the div object with the mail
setMailContent: function(papai,
doc,
data)
Set the content of a mail, need the div object with the mail
initSystem: function()
This function init the class : she load specific options, and attach listeners to the webpages.
pageLoaded: function(aEvent)
This function is called when a page is loaded.
clickOnDock: function(docid)
This function is called when the user click on the page.
getMimeMailContens: function(id,
doc)
Return the mime source of a mail
Close