mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
cleaning up readme and js style in emailcomposer
This commit is contained in:
@@ -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 = {};
|
||||
|
||||
9
iPhone/EmailComposer/readme.md
Normal file
9
iPhone/EmailComposer/readme.md
Normal 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.
|
||||
@@ -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 \
|
||||
\
|
||||
\
|
||||
\
|
||||
}
|
||||
Reference in New Issue
Block a user