cleaning up readme and js style in emailcomposer

This commit is contained in:
Max Ogden
2011-11-26 19:11:46 -08:00
parent 9b13940f5d
commit ef1b37c38b
3 changed files with 15 additions and 35 deletions

View File

@@ -1,12 +1,10 @@
// window.plugins.emailComposer
function EmailComposer()
{
function EmailComposer() {
this.resultCallback = null; // Function
}
EmailComposer.ComposeResultType =
{
EmailComposer.ComposeResultType = {
Cancelled:0,
Saved:1,
Sent:2,
@@ -18,8 +16,7 @@ EmailComposer.ComposeResultType =
// showEmailComposer : all args optional
EmailComposer.prototype.showEmailComposer = function(subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML)
{
EmailComposer.prototype.showEmailComposer = function(subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML) {
var args = {};
if(toRecipients)
args.toRecipients = toRecipients;
@@ -38,21 +35,18 @@ EmailComposer.prototype.showEmailComposer = function(subject,body,toRecipients,c
}
// this will be forever known as the orch-func -jm
EmailComposer.prototype.showEmailComposerWithCB = function(cbFunction,subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML)
{
EmailComposer.prototype.showEmailComposerWithCB = function(cbFunction,subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML) {
this.resultCallback = cbFunction;
this.showEmailComposer.apply(this,[subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML]);
}
EmailComposer.prototype._didFinishWithResult = function(res)
{
EmailComposer.prototype._didFinishWithResult = function(res) {
this.resultCallback(res);
}
PhoneGap.addConstructor(function()
{
PhoneGap.addConstructor(function() {
if(!window.plugins)
{
window.plugins = {};

View File

@@ -0,0 +1,9 @@
You will need to add MessageUI.framework to your project if it is not already included.
Just add the .m.h files to your project ( you can add them directly to your own project, you don't need to put them in phonegap lib ).
Place the .js file in your app root, and include it from your html.
This is intended to also demonstrate how to pass arguments to native code using the options/map object.
Please review the js file to understand the interface you can call, and reply with any questions.

View File

@@ -1,23 +0,0 @@
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290
{\fonttbl\f0\fswiss\fcharset0 ArialMT;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww12240\viewh15840\viewkind1
\deftab720
\pard\pardeftab720\ql\qnatural
\f0\fs26 \cf0 \
\
You will need to add MessageUI.framework to your project if it is not already included.\
\
\pard\pardeftab720\ql\qnatural
\cf0 Just add the .m.h files to your project ( you can add them directly to your own project, you don't need to put them in phonegap lib ).\
\
Place the .js file in your app root, and include it from your html.\
\
This is intended to also demonstrate how to pass arguments to native code using the options/map object. \'a0Please review the js file to understand the interface you can call, and reply with any questions.\
\pard\pardeftab720\ql\qnatural
\cf0 \
\
\
\
}