36 Commits
Author SHA1 Message Date
sarumugam cec2193433 deleting ipkg 2012-08-01 13:51:04 -07:00
Nitika korla 09e6842b37 Contacts app for OpenWebOS 2012-08-01 13:51:04 -07:00
Nitika korla ff68302d50 Calendar app for OpenWebOS 2012-08-01 13:51:04 -07:00
sarumugam d041171766 Adding Email and Accounts Apps 2012-08-01 13:51:03 -07:00
Nitika korla 222261887c Clocl app for openWEBOS 2012-08-01 13:51:03 -07:00
suresh arumugam 83da9b7b43 Readme.md file modified 2012-08-01 10:02:02 -07:00
sarumugam 74321a4cb4 Removing unwanted files 2012-07-31 20:00:28 -07:00
sarumugam 0ab1a784e0 Removing unwanted files 2012-07-31 19:47:01 -07:00
sarumugam 13b8e2d6cd Removing unwanted files 2012-07-31 19:34:52 -07:00
sarumugam ab153597db Adding .gitignore 2012-07-31 19:21:39 -07:00
sarumugam 106ca47f47 deleting ipkg 2012-07-31 14:42:57 -07:00
Suresh Arumugam 4a0624f6a4 Merge pull request #4 from perezerah/master
README.md
2012-07-25 10:48:36 -07:00
tracy thorpe 48db68363f README.md update 2012-07-25 13:43:49 -04:00
tracy thorpe 4c6e6eaab3 README file update 2012-07-24 17:30:14 -04:00
tracy thorpe 1e5d77dce5 README.md update 2012-07-24 16:29:41 -04:00
Suresh Arumugam c826c9b935 Merge pull request #3 from perezerah/master
Readme.md update
2012-07-24 10:51:06 -07:00
tracy thorpe 8d168e1ebc READme.md update 2012-07-23 19:41:36 -04:00
tracy thorpe 1c4ce3d813 READme update 2012-07-23 19:28:25 -04:00
tracy thorpe 002f2cc6e9 READme update 2012-07-23 19:16:25 -04:00
tracy thorpe abc09fd2b6 Readme update 2012-07-20 16:26:33 -04:00
Suresh Arumugam 0fb362b960 Merge pull request #2 from perezerah/master
README.md
2012-07-18 14:59:23 -07:00
tracy thorpe ba06c6c989 Readme update 2012-07-18 17:54:18 -04:00
Suresh Arumugam 0f08ecf6be Merge pull request #1 from perezerah/master
README.md
2012-07-18 14:51:03 -07:00
Tracy Thorpe 16f3c2f80a Merge pull request #1 from openwebos/master
README.md
2012-07-18 13:11:39 -07:00
perezerah 88f631eaff Added README.md file 2012-07-17 14:52:41 -07:00
Nitika korla 91ceecf756 Contacts app for OpenWebOS 2012-07-05 15:20:27 -07:00
Nitika korla 1d3f040311 Calendar app for OpenWebOS 2012-07-05 14:56:21 -07:00
sarumugam 61083ec26d Merge branch 'master' of github.com:/openwebos/core-apps 2012-07-05 13:51:55 -07:00
sarumugam 8a24eb2b53 Adding Email and Accounts Apps 2012-07-05 13:51:01 -07:00
Nitika Korla 963f656315 Updated README.md file 2012-07-05 11:35:52 -07:00
Nitika Korla 8a92a6e307 Added README.md file 2012-07-05 11:19:36 -07:00
sarumugam 33fbec58ec Replaced README.txt with README.md 2012-07-05 09:51:38 -07:00
sarumugam 722c90bec8 Merge branch 'master' of github.com:/openwebos/core-apps 2012-07-05 09:43:59 -07:00
Nitika korla fba91b17a2 Merge branch 'master' of github.com:openwebos/core-apps 2012-07-03 15:15:17 -07:00
Nitika korla 05a4535494 Clocl app for openWEBOS 2012-07-03 15:06:11 -07:00
Suresh f362229539 Memo App for Open webOS 2012-07-03 14:31:56 -07:00
824 changed files with 98167 additions and 16 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
BuildResults
+42
View File
@@ -0,0 +1,42 @@
# core-apps
Core-apps includes the following Enyo 1.0 applications:
* accounts
* calculator
* calendar
* clock
* contacts
* email
* memos
Note: This release is provided for informational purposes only.
## Dependencies
Core-apps have the following dependencies:
* Enyo Framework 1.0: https://github.com/enyojs/enyo-1.0
* app-services https://github.com/openwebos/app-services are the services for the core applications contained in Open webOS 1.0. Services include both NodeJS services and C++ services.
## Limitations
Note: The following limitations apply to this July 2012 Beta release. Additional functionality will be supported in the future.
* Third-party accounts such as Google, Yahoo, Facebook, etc... are not supported at this time.
* You can create imap/pop email accounts.
* You can create local contacts and local calendars. The contacts and calendar events that you create will be stored locally and will not sync to external servers.
## Additional Information
* For more information about an individual core-app, refer to the core-app's README.md file.
* For information about the Enyo application structure, see: https://developer.palm.com/content/api/dev-guide/enyo/application-structure.html
# Copyright and License Information
All content, including all source code files and documentation files in this repository are:
Copyright (c) 2011-2012 Hewlett-Packard Development Company, L.P.
All content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.palm.app.accounts</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+42
View File
@@ -0,0 +1,42 @@
# Copyright and License Information
All content, including all source code files and documentation files in this repository except otherwise noted are:
Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
All content, including all source code files and documentation files in this repository except otherwise noted are:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this content except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Quick Info
-----------
Account preference Application for webOS. It was built using Enyo 1.0.
Core
-------
This repository contains Accounts Preference Application for webOS.
index.html - This is the main html file which creates the main JS object for the App.
source / - App Source Code folder. It contains all the JS files.
css/ - This folder contains the CSS stylesheets used by APP UI.
images/ - This folder contains all the UI images.
appinfo.json - App description file.
depends.js - Required by Enyo 1.0. This file contains the list of all Javascript and CSS files that are used by the App.
mock - This folder contains the db8 service responses. This mock data is used by the App when it's running on the browser. Please note that the launch=nobridge parameter
has to be set in the index.html in order to use the mock responses.
+11
View File
@@ -0,0 +1,11 @@
{
"id": "com.palm.app.accounts",
"version": "1.0.0",
"vendor": "HP",
"type": "web",
"main": "index.html",
"title": "Accounts",
"icon": "icon.png",
"splashicon": "icon-256x256.png",
"uiRevision": 2
}
+47
View File
@@ -0,0 +1,47 @@
/* @@@LICENSE
*
* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* LICENSE@@@ */
.text-breakword {
word-wrap: break-word;
}
.accountsListSelector .enyo-listselector-item {
width:260px;
overflow:hidden;
white-space: nowrap;
text-overflow:ellipsis;
}
.enyo-item.enyo-single {
/*
due to webos webkit bug, must have a non-zero border when -webkit-gradient
and border-radius are used together or else the border radius will be ignored.
*/
/* border: 0;*/
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
}
.enyo-item.enyo-first {
-webkit-border-top-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
}
.enyo-item.enyo-last {
-webkit-border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
}
+42
View File
@@ -0,0 +1,42 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.depends(
"$enyo-lib/accounts/",
"source/AccountManager.js",
"css/PalmID.css",
"source/FirstLaunch.js",
"source/palmID/PalmID.js",
"source/palmID/Initialize.js",
"source/palmID/PalmIDUtilities.js",
"source/palmID/Accounts.js",
"source/palmID/ProfileSettings.js",
"source/palmID/NameDialog.js",
"source/palmID/EmailDialog.js",
"source/palmID/PasswdDialog.js",
"source/palmID/DeviceInfoDialog.js",
"source/palmID/DeviceEraseConfirmDialog.js",
"source/palmID/SecDialog.js",
"source/palmID/SecAnswerDialog.js",
"source/palmID/ProfileLoginPasswordDialog.js",
"source/palmID/PasswordRecoverDialog.js",
"source/palmID/CommErrorDialog.js",
"source/palmID/SpinnerOverlay.js",
'$enyo/g11n/name/javascript/name.js',
'$enyo/g11n/name/javascript/format.js'
);
@@ -0,0 +1,3 @@
{
"logLevel": 99
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+30
View File
@@ -0,0 +1,30 @@
<!doctype html>
<!-- LICENSE@@@
Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@@LICENSE -->
<html>
<head>
<title>Accounts</title>
<script src="/usr/palm/frameworks/enyo/0.10/framework/enyo.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
new AccountManager().renderInto(document.body);
</script>
</body>
</html>
@@ -0,0 +1,827 @@
{
"results": [
{
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png"
},
"id": "com.palm.aol.aim",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "AIM",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_aim"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-logo.png"
},
"loc_name": "AIM",
"templateId": "com.palm.aol",
"validator": "palm:\/\/com.palm.imaccountvalidator\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.boxnet.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_48.png",
"loc_64x64": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_64.png"
},
"loc_name": "Box.net",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.boxnet",
"validator": "palm:\/\/com.palm.service.boxnet\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.dropbox.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-48x48.png"
},
"loc_name": "Dropbox",
"templateId": "com.palm.dropbox",
"validator": "palm:\/\/com.palm.service.dropbox\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"id": "com.palm.other.mail"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"loc_name": "Email Account",
"readPermissions": [
],
"templateId": "com.palm.othermail",
"validator": {
"address": "palm:\/\/com.palm.dummy\/dummy",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.facebook:1",
"calendarevent": "com.palm.calendarevent.facebook:1"
},
"id": "com.palm.facebook.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.facebook\/",
"onCreate": "palm:\/\/com.palm.service.calendar.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.facebook\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.calendar.facebook\/sync"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.facebook:1"
},
"id": "com.palm.facebook.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.facebook\/",
"onCreate": "palm:\/\/com.palm.service.contacts.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.facebook\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.facebook\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.facebook\/sync"
},
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-48x48.png"
},
"loc_name": "Facebook",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
],
"templateId": "com.palm.facebook",
"validator": "palm:\/\/com.palm.service.contacts.facebook\/checkCredentials",
"writePermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.google:1"
},
"id": "com.palm.google.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.google\/",
"onCreate": "palm:\/\/com.palm.service.contacts.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.google\/onEnabled",
"refetchPhoto": "palm:\/\/com.palm.service.contacts.google\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.google\/sync"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"chatWithNonBuddies": false,
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png"
},
"id": "com.palm.google.talk",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "Google",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_gtalk"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.google:1",
"calendarevent": "com.palm.calendarevent.google:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-48x48.png"
},
"id": "com.palm.google.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.google\/",
"onCreate": "palm:\/\/com.palm.service.calendar.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.google\/onEnabled",
"subKind": "com.palm.calendarevent.google:1",
"sync": "palm:\/\/com.palm.service.calendar.google\/sync",
"validator": "palm:\/\/com.palm.service.calendar.google\/checkCredentials"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "imap.gmail.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "smtp.gmail.com",
"useSmtpAuth": true
},
"syncFrequencyMins": 15
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.google.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "DOCUMENTS",
"id": "com.palm.google.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-48x48.png"
},
"loc_name": "Google",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.google",
"validator": "palm:\/\/com.palm.service.contacts.google\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"id": "com.palm.palmprofile.contacts",
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"alwaysOn": true,
"capability": "PHONE",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"id": "com.palm.palmprofile.voice",
"loc_name": "Carrier",
"loc_shortName": "Carrier"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"id": "com.palm.palmprofile.sms",
"loc_name": "SMS Account",
"loc_shortName": "Text"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "HP webOS Account",
"templateId": "com.palm.palmprofile"
},
{
"templateId": "com.palm.imap",
"loc_name": "IMAP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.imap\/validateAccount"
},
"readPermissions": [
"com.palm.imap"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.imap.mail",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"subKind": "com.palm.imap.email:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.linkedin:1"
},
"id": "com.palm.linkedin.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.linkedin\/",
"onCreate": "palm:\/\/com.palm.service.contacts.linkedin\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.linkedin\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.linkedin\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.linkedin\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.linkedin\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.linkedin\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-48x48.png"
},
"loc_name": "LinkedIn",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.linkedin",
"validator": "palm:\/\/com.palm.service.contacts.linkedin\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"dbkinds": {
"task": "com.palm.email.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.mail",
"implementation": "palm:\/\/com.palm.eas\/",
"onCreate": "palm:\/\/com.palm.eas\/accountCreated",
"onDelete": "palm:\/\/com.palm.eas\/accountDeleted",
"subKind": "com.palm.email.eas:1"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.contacts",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.contact.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllContacts"
},
{
"capability": "REMOTECONTACTS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts48.png"
},
"id": "com.palm.eas.remotecontacts",
"implementation": "palm:\/\/com.palm.eas\/",
"loc_name": "Global Address Lookup",
"query": "palm:\/\/com.palm.eas\/queryGal"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendarevent": "com.palm.calendarevent.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.calendar",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.calendarevent.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllCalendars"
},
{
"capability": "TASKS",
"dbkinds": {
"task": "com.palm.task.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks48.png"
},
"id": "com.palm.eas.tasks",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.task.eas:1"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"loc_name": "Microsoft Exchange",
"onCapabilitiesChanged": "palm:\/\/com.palm.eas\/accountCapabilities",
"onCredentialsChanged": "palm:\/\/com.palm.eas\/accountUpdated",
"readPermissions": [
"com.palm.eas"
],
"templateId": "com.palm.eas",
"validator": {
"address": "palm:\/\/com.palm.eas\/validateAccount",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.mobileme.documents"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.mobileme.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
}
],
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-32x31.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-48x47.png"
},
"loc_name": "MobileMe",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.imap"
],
"templateId": "com.palm.mobileme",
"validator": "palm:\/\/com.palm.service.mobileme\/checkCredentials",
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/48.png"
},
"loc_name": "Photobucket",
"templateId": "com.palm.photobucket",
"validator": "palm:\/\/com.palm.service.photos.photobucket\/checkCredentials"
},
{
"templateId": "com.palm.pop",
"loc_name": "POP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.pop\/validateAccount"
},
"readPermissions": [
"com.palm.pop"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.pop.mail",
"implementation": "palm:\/\/com.palm.pop\/",
"onCreate": "palm:\/\/com.palm.pop\/accountCreated",
"onDelete": "palm:\/\/com.palm.pop\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.pop\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.pop\/credentialsChanged",
"subKind": "com.palm.email.pop:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"db_kinds": {
"contact": "com.palm.contact.sim:1"
},
"id": "com.palm.sim.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.sim\/",
"onCreate": "palm:\/\/com.palm.service.contacts.sim\/onCreate",
"onDelete": "palm:\/\/com.palm.service.contacts.sim\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.sim\/onEnabled",
"readOnlyData": false,
"sync": "palm:\/\/com.palm.service.contacts.sim\/sync"
}
],
"disableRemove": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png"
},
"loc_name": "SIM",
"templateId": "com.palm.sim"
},
{
"templateId": "com.palm.skype",
"loc_name": "Skype",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png"
},
"validator": {
"customUI": {
"appId": "com.palm.app.skype",
"name": "validator.html"
},
"address": "palm:\/\/com.palm.skypevalidator\/updateCredentials"
},
"onCredentialsChanged": "palm:\/\/com.palm.skypevalidator\/credentialsChanged",
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"id": "com.palm.skype.messaging",
"loc_shortName": "Skype",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png"
},
"implementation": "palm:\/\/com.palm.skype\/",
"onEnabled": "palm:\/\/com.palm.skype\/onEnabled",
"serviceName": "type_skype",
"dbkinds": {
"immessage": "com.palm.immessage.skypem:1",
"imcommand": "com.palm.imcommand.skypem:1"
},
"settingsUI": {
"appId": "com.palm.app.skype",
"sceneName": "accountlogin"
},
"invites": {
"supportsCustomMessage": true,
"loc_bannerText": "Skype contact request"
},
"groupChat": {
"supported": true,
"topicsSupported": true,
"invitesSupportMessages": false
},
"chatWithNonBuddies": true
},
{
"capability": "CONTACTS",
"id": "com.palm.skype.contacts",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"sync": "palm:\/\/com.palm.skype\/sync",
"readOnlyData": true,
"db_kinds": {
"contact": "com.palm.contact.skypem:1"
}
},
{
"capability": "PHONE",
"id": "com.palm.skype.call",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"serviceName": "type_skype",
"wanAllowed": true,
"wifiAllowed": true,
"pausePrompt": false,
"pauseCode": [
],
"waitCode": [
],
"keyHoldMappings": [
],
"launchCode": "##"
}
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/48.png"
},
"loc_name": "Snapfish",
"templateId": "com.palm.snapfish",
"validator": "palm:\/\/com.palm.service.photos.snapfish\/checkCredentials"
},
{
"templateId": "com.palm.telephony",
"loc_name": "Telephony Interface Layer",
"hidden": true,
"invisible": true,
"disableRemove": true,
"capabilityProviders": [
{
"id": "com.palm.telephony",
"capability": "PHONE",
"implementation": "palm:\/\/com.palm.telephony\/",
"serviceName": "com.palm.telephony",
"wanAllowed": true,
"wifiAllowed": false,
"pausePrompt": true,
"pauseCode": [
"p"
],
"waitCode": [
"w"
],
"keyHoldMappings": [
{
"0": "+"
},
{
"*": "p"
},
{
"#": "w"
}
]
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.yahoo:1"
},
"id": "com.palm.yahoo.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.contacts.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.yahoo\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.contacts.yahoo\/sync",
"validator": "palm:\/\/com.palm.service.contacts.yahoo\/checkCredentials"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.yahoo:1",
"immessage": "com.palm.immessage.yahoo:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png"
},
"id": "com.palm.yahoo.im",
"implementation": "palm:\/\/com.palm.imyahoo\/",
"invites": {
"supportsCustomMessage": true
},
"loc_shortName": "Yahoo!",
"onCredentialsChanged": "palm:\/\/com.palm.imyahoo\/onCredentialsChanged",
"onEnabled": "palm:\/\/com.palm.imyahoo\/onEnabled",
"serviceName": "type_yahoo"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "palm.imap.mail.yahoo.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "palm.smtp.mail.yahoo.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.yahoo.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.yahoo:1",
"calendarevent": "com.palm.calendarevent.yahoo:1"
},
"id": "com.palm.yahoo.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.calendar.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.yahoo\/onEnabled",
"subKind": "com.palm.calendarevent.yahoo:1",
"sync": "palm:\/\/com.palm.service.calendar.yahoo\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-48x48.png"
},
"loc_name": "Yahoo!",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.yahoo",
"validator": "palm:\/\/com.palm.yahoo\/validate"
},
{
"capabilityProviders": [
{
"capability": "VIDEO.UPLOAD",
"id": "com.palm.youtube.videoupload",
"implementation": "palm:\/\/com.palm.service.videos.youtube\/"
}
],
"hidden": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-48x48.png"
},
"loc_name": "YouTube",
"templateId": "com.palm.youtube",
"validator": "palm:\/\/com.palm.service.videos.youtube\/checkCredentials"
}
],
"returnValue": true
}
@@ -0,0 +1,777 @@
{
"results": [
{
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png"
},
"id": "com.palm.aol.aim",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "AIM",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_aim"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-logo.png"
},
"loc_name": "AIM",
"username":"myusername@palm.com",
"templateId": "com.palm.aol",
"validator": "palm:\/\/com.palm.imaccountvalidator\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.boxnet.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_48.png",
"loc_64x64": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_64.png"
},
"loc_name": "Box.net",
"username":"myusername@palm.com",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.boxnet",
"validator": "palm:\/\/com.palm.service.boxnet\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.dropbox.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-48x48.png"
},
"loc_name": "Dropbox",
"username":"myusername@palm.com",
"templateId": "com.palm.dropbox",
"validator": "palm:\/\/com.palm.service.dropbox\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.facebook:1",
"calendarevent": "com.palm.calendarevent.facebook:1"
},
"id": "com.palm.facebook.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.facebook\/",
"onCreate": "palm:\/\/com.palm.service.calendar.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.facebook\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.calendar.facebook\/sync"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.facebook:1"
},
"id": "com.palm.facebook.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.facebook\/",
"onCreate": "palm:\/\/com.palm.service.contacts.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.facebook\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.facebook\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.facebook\/sync"
},
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-48x48.png"
},
"loc_name": "Facebook",
"username":"myusername@palm.com",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
],
"templateId": "com.palm.facebook",
"validator": "palm:\/\/com.palm.service.contacts.facebook\/checkCredentials",
"writePermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.google:1"
},
"id": "com.palm.google.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.google\/",
"onCreate": "palm:\/\/com.palm.service.contacts.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.google\/onEnabled",
"refetchPhoto": "palm:\/\/com.palm.service.contacts.google\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.google\/sync"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"chatWithNonBuddies": false,
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png"
},
"id": "com.palm.google.talk",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "Google",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_gtalk"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.google:1",
"calendarevent": "com.palm.calendarevent.google:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-48x48.png"
},
"id": "com.palm.google.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.google\/",
"onCreate": "palm:\/\/com.palm.service.calendar.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.google\/onEnabled",
"subKind": "com.palm.calendarevent.google:1",
"sync": "palm:\/\/com.palm.service.calendar.google\/sync",
"validator": "palm:\/\/com.palm.service.calendar.google\/checkCredentials"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "imap.gmail.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "smtp.gmail.com",
"useSmtpAuth": true
},
"syncFrequencyMins": 15
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.google.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "DOCUMENTS",
"id": "com.palm.google.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-48x48.png"
},
"loc_name": "Google",
"username":"myusername@palm.com",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.google",
"validator": "palm:\/\/com.palm.service.contacts.google\/checkCredentials",
"_id": "++HPlviwkPg7BY90"
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"id": "com.palm.palmprofile.contacts",
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"alwaysOn": true,
"capability": "PHONE",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"id": "com.palm.palmprofile.voice",
"loc_name": "Carrier",
"loc_shortName": "Carrier"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"id": "com.palm.palmprofile.sms",
"loc_name": "SMS Account",
"loc_shortName": "Text"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "HP webOS Account",
"templateId": "com.palm.palmprofile"
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.linkedin:1"
},
"id": "com.palm.linkedin.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.linkedin\/",
"onCreate": "palm:\/\/com.palm.service.contacts.linkedin\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.linkedin\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.linkedin\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.linkedin\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.linkedin\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.linkedin\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-48x48.png"
},
"loc_name": "LinkedIn",
"username":"myusername@palm.com",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.linkedin",
"validator": "palm:\/\/com.palm.service.contacts.linkedin\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"dbkinds": {
"task": "com.palm.email.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.mail",
"implementation": "palm:\/\/com.palm.eas\/",
"onCreate": "palm:\/\/com.palm.eas\/accountCreated",
"onDelete": "palm:\/\/com.palm.eas\/accountDeleted",
"subKind": "com.palm.email.eas:1"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.contacts",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.contact.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllContacts"
},
{
"capability": "REMOTECONTACTS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts48.png"
},
"id": "com.palm.eas.remotecontacts",
"implementation": "palm:\/\/com.palm.eas\/",
"loc_name": "Global Address Lookup",
"query": "palm:\/\/com.palm.eas\/queryGal"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendarevent": "com.palm.calendarevent.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.calendar",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.calendarevent.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllCalendars"
},
{
"capability": "TASKS",
"dbkinds": {
"task": "com.palm.task.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks48.png"
},
"id": "com.palm.eas.tasks",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.task.eas:1"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"loc_name": "Microsoft Exchange",
"username":"myusername@palm.com",
"onCapabilitiesChanged": "palm:\/\/com.palm.eas\/accountCapabilities",
"onCredentialsChanged": "palm:\/\/com.palm.eas\/accountUpdated",
"readPermissions": [
"com.palm.eas"
],
"templateId": "com.palm.eas",
"validator": {
"address": "palm:\/\/com.palm.eas\/validateAccount",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.mobileme.documents"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.mobileme.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
}
],
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-32x31.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-48x47.png"
},
"loc_name": "MobileMe",
"username":"myusername@palm.com",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.imap"
],
"templateId": "com.palm.mobileme",
"validator": "palm:\/\/com.palm.service.mobileme\/checkCredentials",
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/48.png"
},
"loc_name": "Photobucket",
"username":"myusername@palm.com",
"templateId": "com.palm.photobucket",
"validator": "palm:\/\/com.palm.service.photos.photobucket\/checkCredentials"
},
{
"templateId": "com.palm.pop",
"loc_name": "POP",
"username":"myusername@palm.com",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.pop\/validateAccount"
},
"readPermissions": [
"com.palm.pop"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.pop.mail",
"implementation": "palm:\/\/com.palm.pop\/",
"onCreate": "palm:\/\/com.palm.pop\/accountCreated",
"onDelete": "palm:\/\/com.palm.pop\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.pop\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.pop\/credentialsChanged",
"subKind": "com.palm.email.pop:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"db_kinds": {
"contact": "com.palm.contact.sim:1"
},
"id": "com.palm.sim.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.sim\/",
"onCreate": "palm:\/\/com.palm.service.contacts.sim\/onCreate",
"onDelete": "palm:\/\/com.palm.service.contacts.sim\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.sim\/onEnabled",
"readOnlyData": false,
"sync": "palm:\/\/com.palm.service.contacts.sim\/sync"
}
],
"disableRemove": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png"
},
"loc_name": "SIM",
"username":"myusername@palm.com",
"templateId": "com.palm.sim"
},
{
"templateId": "com.palm.skype",
"loc_name": "Skype",
"username":"myusername@palm.com",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png"
},
"validator": {
"customUI": {
"appId": "com.palm.app.skype",
"name": "validator.html"
},
"address": "palm:\/\/com.palm.skypevalidator\/updateCredentials"
},
"onCredentialsChanged": "palm:\/\/com.palm.skypevalidator\/credentialsChanged",
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"id": "com.palm.skype.messaging",
"loc_shortName": "Skype",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png"
},
"implementation": "palm:\/\/com.palm.skype\/",
"onEnabled": "palm:\/\/com.palm.skype\/onEnabled",
"serviceName": "type_skype",
"dbkinds": {
"immessage": "com.palm.immessage.skypem:1",
"imcommand": "com.palm.imcommand.skypem:1"
},
"settingsUI": {
"appId": "com.palm.app.skype",
"sceneName": "accountlogin"
},
"invites": {
"supportsCustomMessage": true,
"loc_bannerText": "Skype contact request"
},
"groupChat": {
"supported": true,
"topicsSupported": true,
"invitesSupportMessages": false
},
"chatWithNonBuddies": true
},
{
"capability": "CONTACTS",
"id": "com.palm.skype.contacts",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"sync": "palm:\/\/com.palm.skype\/sync",
"readOnlyData": true,
"db_kinds": {
"contact": "com.palm.contact.skypem:1"
}
},
{
"capability": "PHONE",
"id": "com.palm.skype.call",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"serviceName": "type_skype",
"wanAllowed": true,
"wifiAllowed": true,
"pausePrompt": false,
"pauseCode": [
],
"waitCode": [
],
"keyHoldMappings": [
],
"launchCode": "##"
}
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/48.png"
},
"loc_name": "Snapfish",
"username":"myveryveryveryverylongusername@palm.com",
"templateId": "com.palm.snapfish",
"validator": "palm:\/\/com.palm.service.photos.snapfish\/checkCredentials"
},
{
"templateId": "com.palm.telephony",
"loc_name": "Telephony Interface Layer",
"hidden": true,
"invisible": true,
"disableRemove": true,
"capabilityProviders": [
{
"id": "com.palm.telephony",
"capability": "PHONE",
"implementation": "palm:\/\/com.palm.telephony\/",
"serviceName": "com.palm.telephony",
"wanAllowed": true,
"wifiAllowed": false,
"pausePrompt": true,
"pauseCode": [
"p"
],
"waitCode": [
"w"
],
"keyHoldMappings": [
{
"0": "+"
},
{
"*": "p"
},
{
"#": "w"
}
]
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.yahoo:1"
},
"id": "com.palm.yahoo.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.contacts.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.yahoo\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.contacts.yahoo\/sync",
"validator": "palm:\/\/com.palm.service.contacts.yahoo\/checkCredentials"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.yahoo:1",
"immessage": "com.palm.immessage.yahoo:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png"
},
"id": "com.palm.yahoo.im",
"implementation": "palm:\/\/com.palm.imyahoo\/",
"invites": {
"supportsCustomMessage": true
},
"loc_shortName": "Yahoo!",
"onCredentialsChanged": "palm:\/\/com.palm.imyahoo\/onCredentialsChanged",
"onEnabled": "palm:\/\/com.palm.imyahoo\/onEnabled",
"serviceName": "type_yahoo"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "palm.imap.mail.yahoo.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "palm.smtp.mail.yahoo.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.yahoo.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.yahoo:1",
"calendarevent": "com.palm.calendarevent.yahoo:1"
},
"id": "com.palm.yahoo.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.calendar.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.yahoo\/onEnabled",
"subKind": "com.palm.calendarevent.yahoo:1",
"sync": "palm:\/\/com.palm.service.calendar.yahoo\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-48x48.png"
},
"loc_name": "Yahoo!",
"username":"myveryveryverylongusername@palm.com",
"_id": "++HPlviwkPg7BY90",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.yahoo",
"validator": "palm:\/\/com.palm.yahoo\/validate"
},
{
"capabilityProviders": [
{
"capability": "VIDEO.UPLOAD",
"id": "com.palm.youtube.videoupload",
"implementation": "palm:\/\/com.palm.service.videos.youtube\/"
}
],
"hidden": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-48x48.png"
},
"loc_name": "YouTube",
"username":"myusername@palm.com",
"templateId": "com.palm.youtube",
"validator": "palm:\/\/com.palm.service.videos.youtube\/checkCredentials"
}
],
"returnValue": true
}
@@ -0,0 +1,313 @@
{
"returnValue": true,
"results": [
{
"_kind": "com.palm.account:1",
"_id": "++HUEXlwxiNk5Ijt",
"_rev": 359,
"_sync": true,
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "168",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"_id": "169",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "16a",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "16b",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "16c",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"loc_name": "SMS Account",
"loc_shortName": "Text"
},
{
"_id": "16d",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "Carrier",
"loc_shortName": "Carrier"
}
],
"templateId": "com.palm.palmprofile",
"username": "Dr. Skipped Firstuse",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "Palm Profile"
},
{
"_id": "++HPlvPGTDw1pjOw",
"_kind": "com.palm.account:1",
"_rev": 114193,
"_sync": true,
"alias": "AIM",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be12",
"capability": "MESSAGING",
"id": "com.palm.aol.aim"
}
],
"templateId": "com.palm.aol",
"username": "blowfishtest2@aol.com"
},
{
"_id": "++HPlugpfg0nLyfz",
"_kind": "com.palm.account:1",
"_rev": 113250,
"_sync": true,
"alias": "Palm",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1ba63",
"capability": "MAIL",
"id": "com.palm.eas.mail"
},
{
"_id": "1ba64",
"capability": "CONTACTS",
"id": "com.palm.eas.contacts"
},
{
"_id": "1ba65",
"capability": "REMOTECONTACTS",
"id": "com.palm.eas.remotecontacts"
},
{
"_id": "1ba66",
"capability": "CALENDAR",
"id": "com.palm.eas.calendar"
},
{
"_id": "1ba67",
"capability": "TASKS",
"id": "com.palm.eas.tasks"
}
],
"templateId": "com.palm.eas",
"username": "myusername@palm.com"
},
{
"_id": "++HPIZiOdv07oOtD",
"_kind": "com.palm.account:1",
"_rev": 71055,
"_sync": true,
"alias": "Facebook",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "11590",
"capability": "CALENDAR",
"id": "com.palm.facebook.calendar"
},
{
"_id": "11591",
"capability": "CONTACTS",
"id": "com.palm.facebook.contacts"
},
{
"_id": "11592",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.facebook.photoupload"
},
{
"_id": "11593",
"capability": "VIDEO.UPLOAD",
"id": "com.palm.facebook.videoupload"
}
],
"templateId": "com.palm.facebook",
"username": "petere@gmail.com"
},
{
"_id": "++HOWhlSEMh08y+t",
"_kind": "com.palm.account:1",
"_rev": 571,
"_sync": true,
"alias": "Whizoo",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "23c",
"capability": "CONTACTS",
"id": "com.palm.google.contacts"
},
{
"_id": "23d",
"capability": "MESSAGING",
"id": "com.palm.google.talk"
},
{
"_id": "23e",
"capability": "CALENDAR",
"id": "com.palm.google.calendar"
},
{
"_id": "23f",
"capability": "MAIL",
"id": "com.palm.google.mail"
}
],
"templateId": "com.palm.google",
"username": "palmqa@whizoo.com"
},
{
"_id": "++HOWqj5r8gtPsPc",
"_kind": "com.palm.account:1",
"_rev": 876,
"_sync": true,
"alias": "Fastmail",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "36d",
"capability": "MAIL",
"id": "com.palm.imap.mail"
}
],
"templateId": "com.palm.imap",
"username": "ppp06059@fastmail.fm"
},
{
"_id": "++HPluxXg7ZtJ58B",
"_kind": "com.palm.account:1",
"_rev": 114159,
"_sync": true,
"alias": "LinkedIn",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1bdf0",
"capability": "CONTACTS",
"id": "com.palm.linkedin.contacts"
}
],
"templateId": "com.palm.linkedin",
"username": "petere@gmail.com"
},
{
"_id": "++HO6e02HTlqdiBw",
"_kind": "com.palm.account:1",
"_rev": 64535,
"_sync": true,
"alias": "Palm Profile",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "13a",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts"
},
{
"_id": "13b",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "13c",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "13d",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "13e",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms"
},
{
"_id": "13f",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice"
}
],
"templateId": "com.palm.palmprofile",
"username": "Dr. Skipped Firstuse"
},
{
"_id": "++HPlvEx2PgTAfGD",
"_kind": "com.palm.account:1",
"_rev": 114189,
"_sync": true,
"alias": "Photobucket",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be0e",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.photobucket.photoupload"
}
],
"templateId": "com.palm.photobucket",
"username": "blowfishtest2"
},
{
"_id": "++HPlviwkPg7BY90",
"_kind": "com.palm.account:1",
"_rev": 114205,
"_sync": true,
"alias": "Yahoo!",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be1e",
"capability": "CONTACTS",
"id": "com.palm.yahoo.contacts"
},
{
"_id": "1be1f",
"capability": "MESSAGING",
"id": "com.palm.yahoo.im"
},
{
"_id": "1be20",
"capability": "MAIL",
"id": "com.palm.yahoo.mail"
},
{
"_id": "1be21",
"capability": "CALENDAR",
"id": "com.palm.yahoo.calendar"
}
],
"templateId": "com.palm.yahoo",
"username": "blowfishtest2@yahoo.com"
}
]
}
@@ -0,0 +1,827 @@
{
"results": [
{
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png"
},
"id": "com.palm.aol.aim",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "AIM",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_aim"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-logo.png"
},
"loc_name": "AIM",
"templateId": "com.palm.aol",
"validator": "palm:\/\/com.palm.imaccountvalidator\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.boxnet.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_48.png",
"loc_64x64": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_64.png"
},
"loc_name": "Box.net",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.boxnet",
"validator": "palm:\/\/com.palm.service.boxnet\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.dropbox.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-48x48.png"
},
"loc_name": "Dropbox",
"templateId": "com.palm.dropbox",
"validator": "palm:\/\/com.palm.service.dropbox\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"id": "com.palm.other.mail"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"loc_name": "Email Account",
"readPermissions": [
],
"templateId": "com.palm.othermail",
"validator": {
"address": "palm:\/\/com.palm.dummy\/dummy",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.facebook:1",
"calendarevent": "com.palm.calendarevent.facebook:1"
},
"id": "com.palm.facebook.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.facebook\/",
"onCreate": "palm:\/\/com.palm.service.calendar.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.facebook\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.calendar.facebook\/sync"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.facebook:1"
},
"id": "com.palm.facebook.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.facebook\/",
"onCreate": "palm:\/\/com.palm.service.contacts.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.facebook\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.facebook\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.facebook\/sync"
},
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-48x48.png"
},
"loc_name": "Facebook",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
],
"templateId": "com.palm.facebook",
"validator": "palm:\/\/com.palm.service.contacts.facebook\/checkCredentials",
"writePermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.google:1"
},
"id": "com.palm.google.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.google\/",
"onCreate": "palm:\/\/com.palm.service.contacts.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.google\/onEnabled",
"refetchPhoto": "palm:\/\/com.palm.service.contacts.google\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.google\/sync"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"chatWithNonBuddies": false,
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png"
},
"id": "com.palm.google.talk",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "Google",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_gtalk"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.google:1",
"calendarevent": "com.palm.calendarevent.google:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-48x48.png"
},
"id": "com.palm.google.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.google\/",
"onCreate": "palm:\/\/com.palm.service.calendar.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.google\/onEnabled",
"subKind": "com.palm.calendarevent.google:1",
"sync": "palm:\/\/com.palm.service.calendar.google\/sync",
"validator": "palm:\/\/com.palm.service.calendar.google\/checkCredentials"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "imap.gmail.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "smtp.gmail.com",
"useSmtpAuth": true
},
"syncFrequencyMins": 15
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.google.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "DOCUMENTS",
"id": "com.palm.google.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-48x48.png"
},
"loc_name": "Google",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.google",
"validator": "palm:\/\/com.palm.service.contacts.google\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"id": "com.palm.palmprofile.contacts",
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"alwaysOn": true,
"capability": "PHONE",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"id": "com.palm.palmprofile.voice",
"loc_name": "Carrier",
"loc_shortName": "Carrier"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"id": "com.palm.palmprofile.sms",
"loc_name": "SMS Account",
"loc_shortName": "Text"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "HP webOS Account",
"templateId": "com.palm.palmprofile"
},
{
"templateId": "com.palm.imap",
"loc_name": "IMAP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.imap\/validateAccount"
},
"readPermissions": [
"com.palm.imap"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.imap.mail",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"subKind": "com.palm.imap.email:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.linkedin:1"
},
"id": "com.palm.linkedin.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.linkedin\/",
"onCreate": "palm:\/\/com.palm.service.contacts.linkedin\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.linkedin\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.linkedin\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.linkedin\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.linkedin\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.linkedin\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-48x48.png"
},
"loc_name": "LinkedIn",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.linkedin",
"validator": "palm:\/\/com.palm.service.contacts.linkedin\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"dbkinds": {
"task": "com.palm.email.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.mail",
"implementation": "palm:\/\/com.palm.eas\/",
"onCreate": "palm:\/\/com.palm.eas\/accountCreated",
"onDelete": "palm:\/\/com.palm.eas\/accountDeleted",
"subKind": "com.palm.email.eas:1"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.contacts",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.contact.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllContacts"
},
{
"capability": "REMOTECONTACTS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts48.png"
},
"id": "com.palm.eas.remotecontacts",
"implementation": "palm:\/\/com.palm.eas\/",
"loc_name": "Global Address Lookup",
"query": "palm:\/\/com.palm.eas\/queryGal"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendarevent": "com.palm.calendarevent.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.calendar",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.calendarevent.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllCalendars"
},
{
"capability": "TASKS",
"dbkinds": {
"task": "com.palm.task.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks48.png"
},
"id": "com.palm.eas.tasks",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.task.eas:1"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"loc_name": "Microsoft Exchange",
"onCapabilitiesChanged": "palm:\/\/com.palm.eas\/accountCapabilities",
"onCredentialsChanged": "palm:\/\/com.palm.eas\/accountUpdated",
"readPermissions": [
"com.palm.eas"
],
"templateId": "com.palm.eas",
"validator": {
"address": "palm:\/\/com.palm.eas\/validateAccount",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.mobileme.documents"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.mobileme.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
}
],
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-32x31.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-48x47.png"
},
"loc_name": "MobileMe",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.imap"
],
"templateId": "com.palm.mobileme",
"validator": "palm:\/\/com.palm.service.mobileme\/checkCredentials",
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/48.png"
},
"loc_name": "Photobucket",
"templateId": "com.palm.photobucket",
"validator": "palm:\/\/com.palm.service.photos.photobucket\/checkCredentials"
},
{
"templateId": "com.palm.pop",
"loc_name": "POP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.pop\/validateAccount"
},
"readPermissions": [
"com.palm.pop"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.pop.mail",
"implementation": "palm:\/\/com.palm.pop\/",
"onCreate": "palm:\/\/com.palm.pop\/accountCreated",
"onDelete": "palm:\/\/com.palm.pop\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.pop\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.pop\/credentialsChanged",
"subKind": "com.palm.email.pop:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"db_kinds": {
"contact": "com.palm.contact.sim:1"
},
"id": "com.palm.sim.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.sim\/",
"onCreate": "palm:\/\/com.palm.service.contacts.sim\/onCreate",
"onDelete": "palm:\/\/com.palm.service.contacts.sim\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.sim\/onEnabled",
"readOnlyData": false,
"sync": "palm:\/\/com.palm.service.contacts.sim\/sync"
}
],
"disableRemove": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png"
},
"loc_name": "SIM",
"templateId": "com.palm.sim"
},
{
"templateId": "com.palm.skype",
"loc_name": "Skype",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png"
},
"validator": {
"customUI": {
"appId": "com.palm.app.skype",
"name": "validator.html"
},
"address": "palm:\/\/com.palm.skypevalidator\/updateCredentials"
},
"onCredentialsChanged": "palm:\/\/com.palm.skypevalidator\/credentialsChanged",
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"id": "com.palm.skype.messaging",
"loc_shortName": "Skype",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png"
},
"implementation": "palm:\/\/com.palm.skype\/",
"onEnabled": "palm:\/\/com.palm.skype\/onEnabled",
"serviceName": "type_skype",
"dbkinds": {
"immessage": "com.palm.immessage.skypem:1",
"imcommand": "com.palm.imcommand.skypem:1"
},
"settingsUI": {
"appId": "com.palm.app.skype",
"sceneName": "accountlogin"
},
"invites": {
"supportsCustomMessage": true,
"loc_bannerText": "Skype contact request"
},
"groupChat": {
"supported": true,
"topicsSupported": true,
"invitesSupportMessages": false
},
"chatWithNonBuddies": true
},
{
"capability": "CONTACTS",
"id": "com.palm.skype.contacts",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"sync": "palm:\/\/com.palm.skype\/sync",
"readOnlyData": true,
"db_kinds": {
"contact": "com.palm.contact.skypem:1"
}
},
{
"capability": "PHONE",
"id": "com.palm.skype.call",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"serviceName": "type_skype",
"wanAllowed": true,
"wifiAllowed": true,
"pausePrompt": false,
"pauseCode": [
],
"waitCode": [
],
"keyHoldMappings": [
],
"launchCode": "##"
}
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/48.png"
},
"loc_name": "Snapfish",
"templateId": "com.palm.snapfish",
"validator": "palm:\/\/com.palm.service.photos.snapfish\/checkCredentials"
},
{
"templateId": "com.palm.telephony",
"loc_name": "Telephony Interface Layer",
"hidden": true,
"invisible": true,
"disableRemove": true,
"capabilityProviders": [
{
"id": "com.palm.telephony",
"capability": "PHONE",
"implementation": "palm:\/\/com.palm.telephony\/",
"serviceName": "com.palm.telephony",
"wanAllowed": true,
"wifiAllowed": false,
"pausePrompt": true,
"pauseCode": [
"p"
],
"waitCode": [
"w"
],
"keyHoldMappings": [
{
"0": "+"
},
{
"*": "p"
},
{
"#": "w"
}
]
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.yahoo:1"
},
"id": "com.palm.yahoo.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.contacts.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.yahoo\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.contacts.yahoo\/sync",
"validator": "palm:\/\/com.palm.service.contacts.yahoo\/checkCredentials"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.yahoo:1",
"immessage": "com.palm.immessage.yahoo:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png"
},
"id": "com.palm.yahoo.im",
"implementation": "palm:\/\/com.palm.imyahoo\/",
"invites": {
"supportsCustomMessage": true
},
"loc_shortName": "Yahoo!",
"onCredentialsChanged": "palm:\/\/com.palm.imyahoo\/onCredentialsChanged",
"onEnabled": "palm:\/\/com.palm.imyahoo\/onEnabled",
"serviceName": "type_yahoo"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "palm.imap.mail.yahoo.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "palm.smtp.mail.yahoo.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.yahoo.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.yahoo:1",
"calendarevent": "com.palm.calendarevent.yahoo:1"
},
"id": "com.palm.yahoo.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.calendar.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.yahoo\/onEnabled",
"subKind": "com.palm.calendarevent.yahoo:1",
"sync": "palm:\/\/com.palm.service.calendar.yahoo\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-48x48.png"
},
"loc_name": "Yahoo!",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.yahoo",
"validator": "palm:\/\/com.palm.yahoo\/validate"
},
{
"capabilityProviders": [
{
"capability": "VIDEO.UPLOAD",
"id": "com.palm.youtube.videoupload",
"implementation": "palm:\/\/com.palm.service.videos.youtube\/"
}
],
"hidden": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-48x48.png"
},
"loc_name": "YouTube",
"templateId": "com.palm.youtube",
"validator": "palm:\/\/com.palm.service.videos.youtube\/checkCredentials"
}
],
"returnValue": true
}
@@ -0,0 +1,15 @@
{
"returnValue": true,
"results": [
{
"_id": "++HPlviwkPg7BY9Q",
"_kind": "com.palm.account.syncstate:1",
"_rev": "35",
"accountId": "++HPlviwkPg7BY90",
"capabilityProvider": "com.palm.app.accounts",
"errorCode": "CREDENTIALS_NOT_FOUND",
"syncState": "ERROR"
}
]
}
@@ -0,0 +1,338 @@
{
"returnValue": true,
"results": [
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"db_kinds": {
"contact": "com.palm.contact.sim:1"
},
"id": "com.palm.sim.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.sim\/",
"onCreate": "palm:\/\/com.palm.service.contacts.sim\/onCreate",
"onDelete": "palm:\/\/com.palm.service.contacts.sim\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.sim\/onEnabled",
"readOnlyData": false,
"sync": "palm:\/\/com.palm.service.contacts.sim\/sync"
}
],
"disableRemove": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png"
},
"loc_name": "SIM",
"username": "4885823459792",
"templateId": "com.palm.sim"
},
{
"_kind": "com.palm.account:1",
"_id": "++HUEXlwxiNk5Ijt",
"_rev": 359,
"_sync": true,
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "168",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"_id": "169",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "16a",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "16b",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "16c",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"loc_name": "SMS Account",
"loc_shortName": "Text"
},
{
"_id": "16d",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "Carrier",
"loc_shortName": "Carrier"
}
],
"templateId": "com.palm.palmprofile",
"username": "Dr. Skipped Firstuse",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "Palm Profile"
},
{
"_id": "++HPlvPGTDw1pjOw",
"_kind": "com.palm.account:1",
"_rev": 114193,
"_sync": true,
"alias": "AIM",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be12",
"capability": "MESSAGING",
"id": "com.palm.aol.aim"
}
],
"templateId": "com.palm.aol",
"username": "blowfishtest2@aol.com"
},
{
"_id": "++HPlugpfg0nLyfz",
"_kind": "com.palm.account:1",
"_rev": 113250,
"_sync": true,
"alias": "Palm",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1ba63",
"capability": "MAIL",
"id": "com.palm.eas.mail"
},
{
"_id": "1ba64",
"capability": "CONTACTS",
"id": "com.palm.eas.contacts"
},
{
"_id": "1ba65",
"capability": "REMOTECONTACTS",
"id": "com.palm.eas.remotecontacts"
},
{
"_id": "1ba66",
"capability": "CALENDAR",
"id": "com.palm.eas.calendar"
},
{
"_id": "1ba67",
"capability": "TASKS",
"id": "com.palm.eas.tasks"
}
],
"templateId": "com.palm.eas",
"username": "myusername@palm.com"
},
{
"_id": "++HPIZiOdv07oOtD",
"_kind": "com.palm.account:1",
"_rev": 71055,
"_sync": true,
"alias": "Facebook",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "11590",
"capability": "CALENDAR",
"id": "com.palm.facebook.calendar"
},
{
"_id": "11591",
"capability": "CONTACTS",
"id": "com.palm.facebook.contacts"
},
{
"_id": "11592",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.facebook.photoupload"
},
{
"_id": "11593",
"capability": "VIDEO.UPLOAD",
"id": "com.palm.facebook.videoupload"
}
],
"templateId": "com.palm.facebook",
"username": "petere@gmail.com"
},
{
"_id": "++HOWhlSEMh08y+t",
"_kind": "com.palm.account:1",
"_rev": 571,
"_sync": true,
"alias": "Whizoo",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "23c",
"capability": "CONTACTS",
"id": "com.palm.google.contacts"
},
{
"_id": "23d",
"capability": "MESSAGING",
"id": "com.palm.google.talk"
},
{
"_id": "23e",
"capability": "CALENDAR",
"id": "com.palm.google.calendar"
},
{
"_id": "23f",
"capability": "MAIL",
"id": "com.palm.google.mail"
}
],
"templateId": "com.palm.google",
"username": "palmqa@whizoo.com"
},
{
"_id": "++HOWqj5r8gtPsPc",
"_kind": "com.palm.account:1",
"_rev": 876,
"_sync": true,
"alias": "Fastmail",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "36d",
"capability": "MAIL",
"id": "com.palm.imap.mail"
}
],
"templateId": "com.palm.imap",
"username": "ppp06059@fastmail.fm"
},
{
"_id": "++HPluxXg7ZtJ58B",
"_kind": "com.palm.account:1",
"_rev": 114159,
"_sync": true,
"alias": "LinkedIn",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1bdf0",
"capability": "CONTACTS",
"id": "com.palm.linkedin.contacts"
}
],
"templateId": "com.palm.linkedin",
"username": "petere@gmail.com"
},
{
"_id": "++HO6e02HTlqdiBw",
"_kind": "com.palm.account:1",
"_rev": 64535,
"_sync": true,
"alias": "Palm Profile",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "13a",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts"
},
{
"_id": "13b",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "13c",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "13d",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "13e",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms"
},
{
"_id": "13f",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice"
}
],
"templateId": "com.palm.palmprofile",
"username": "Dr. Skipped Firstuse"
},
{
"_id": "++HPlvEx2PgTAfGD",
"_kind": "com.palm.account:1",
"_rev": 114189,
"_sync": true,
"alias": "Photobucket",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be0e",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.photobucket.photoupload"
}
],
"templateId": "com.palm.photobucket",
"username": "blowfishtest2"
},
{
"_id": "++HPlviwkPg7BY90",
"_kind": "com.palm.account:1",
"_rev": 114205,
"_sync": true,
"alias": "Yahoo!",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be1e",
"capability": "CONTACTS",
"id": "com.palm.yahoo.contacts"
},
{
"_id": "1be1f",
"capability": "MESSAGING",
"id": "com.palm.yahoo.im"
},
{
"_id": "1be20",
"capability": "MAIL",
"id": "com.palm.yahoo.mail"
},
{
"_id": "1be21",
"capability": "CALENDAR",
"id": "com.palm.yahoo.calendar"
}
],
"templateId": "com.palm.yahoo",
"username": "blowfishtest2@yahoo.com"
}
]
}
@@ -0,0 +1,329 @@
{
"returnValue": true,
"results": [
{
"_kind": "com.palm.account:1",
"_id": "++HUEXlwxiNk5Ijt",
"_rev": 359,
"_sync": true,
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "168",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"_id": "169",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "16a",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "16b",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "16c",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"loc_name": "SMS Account",
"loc_shortName": "Text"
},
{
"_id": "16d",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "Carrier",
"loc_shortName": "Carrier"
}
],
"templateId": "com.palm.palmprofile",
"username": "Dr. Skipped Firstuse",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "Palm Profile"
},
{
"_id": "++HPlvPGTDw1pjOw",
"_kind": "com.palm.account:1",
"_rev": 114193,
"_sync": true,
"alias": "AIM",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be12",
"capability": "MESSAGING",
"id": "com.palm.aol.aim"
}
],
"templateId": "com.palm.aol",
"username": "blowfishtest2@aol.com"
},
{
"_id": "++HPlugpfg0nLyfz",
"_kind": "com.palm.account:1",
"_rev": 113250,
"_sync": true,
"alias": "Palm",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1ba63",
"capability": "MAIL",
"id": "com.palm.eas.mail"
},
{
"_id": "1ba64",
"capability": "CONTACTS",
"id": "com.palm.eas.contacts"
},
{
"_id": "1ba65",
"capability": "REMOTECONTACTS",
"id": "com.palm.eas.remotecontacts"
},
{
"_id": "1ba66",
"capability": "CALENDAR",
"id": "com.palm.eas.calendar"
},
{
"_id": "1ba67",
"capability": "TASKS",
"id": "com.palm.eas.tasks"
}
],
"templateId": "com.palm.eas",
"username": "myusername@palm.com"
},
{
"_id": "++HPIZiOdv07oOtD",
"_kind": "com.palm.account:1",
"_rev": 71055,
"_sync": true,
"alias": "Facebook",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "11590",
"capability": "CALENDAR",
"id": "com.palm.facebook.calendar"
},
{
"_id": "11591",
"capability": "CONTACTS",
"id": "com.palm.facebook.contacts"
},
{
"_id": "11592",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.facebook.photoupload"
},
{
"_id": "11593",
"capability": "VIDEO.UPLOAD",
"id": "com.palm.facebook.videoupload"
}
],
"templateId": "com.palm.facebook",
"username": "petere@gmail.com"
},
{
"_id": "++HOWhlSEMh08y+t",
"_kind": "com.palm.account:1",
"_rev": 571,
"_sync": true,
"alias": "Whizoo",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "23c",
"capability": "CONTACTS",
"id": "com.palm.google.contacts"
},
{
"_id": "23d",
"capability": "MESSAGING",
"id": "com.palm.google.talk"
},
{
"_id": "23e",
"capability": "CALENDAR",
"id": "com.palm.google.calendar"
},
{
"_id": "23f",
"capability": "MAIL",
"id": "com.palm.google.mail"
}
],
"templateId": "com.palm.google",
"username": "palmqa@whizoo.com"
},
{
"_id": "++HOWqj5r8gtPsPc",
"_kind": "com.palm.account:1",
"_rev": 876,
"_sync": true,
"alias": "Fastmail",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "36d",
"capability": "MAIL",
"id": "com.palm.imap.mail"
}
],
"templateId": "com.palm.imap",
"username": "ppp06059@fastmail.fm"
},
{
"_id": "++HPluxXg7ZtJ58B",
"_kind": "com.palm.account:1",
"_rev": 114159,
"_sync": true,
"alias": "LinkedIn",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1bdf0",
"capability": "CONTACTS",
"id": "com.palm.linkedin.contacts"
}
],
"templateId": "com.palm.linkedin",
"username": "petere@gmail.com"
},
{
"_id": "++HO6e02HTlqdiBw",
"_kind": "com.palm.account:1",
"_rev": 64535,
"_sync": true,
"alias": "Palm Profile",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "13a",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts"
},
{
"_id": "13b",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "13c",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "13d",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "13e",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms"
},
{
"_id": "13f",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice"
}
],
"templateId": "com.palm.palmprofile",
"username": "Dr. Skipped Firstuse"
},
{
"_id": "++HPlvEx2PgTAfGD",
"_kind": "com.palm.account:1",
"_rev": 114189,
"_sync": true,
"alias": "Photobucket",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be0e",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.photobucket.photoupload"
}
],
"templateId": "com.palm.photobucket",
"username": "blowfishtest2"
},
{
"_id": "++HO6ecfILw4PvYP",
"_kind": "com.palm.account:1",
"_rev": 509,
"_sync": true,
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1fe",
"capability": "CONTACTS",
"id": "com.palm.sim.contacts"
}
],
"templateId": "com.palm.sim",
"username": "310410121063947"
},
{
"_id": "++HPlviwkPg7BY90",
"_kind": "com.palm.account:1",
"_rev": 114205,
"_sync": true,
"alias": "Yahoo!",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be1e",
"capability": "CONTACTS",
"id": "com.palm.yahoo.contacts"
},
{
"_id": "1be1f",
"capability": "MESSAGING",
"id": "com.palm.yahoo.im"
},
{
"_id": "1be20",
"capability": "MAIL",
"id": "com.palm.yahoo.mail"
},
{
"_id": "1be21",
"capability": "CALENDAR",
"id": "com.palm.yahoo.calendar"
}
],
"templateId": "com.palm.yahoo",
"username": "blowfishtest2@yahoo.com"
}
]
}
@@ -0,0 +1,827 @@
{
"results": [
{
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png"
},
"id": "com.palm.aol.aim",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "AIM",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_aim"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-logo.png"
},
"loc_name": "AIM",
"templateId": "com.palm.aol",
"validator": "palm:\/\/com.palm.imaccountvalidator\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.boxnet.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_48.png",
"loc_64x64": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_64.png"
},
"loc_name": "Box.net",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.boxnet",
"validator": "palm:\/\/com.palm.service.boxnet\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.dropbox.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-48x48.png"
},
"loc_name": "Dropbox",
"templateId": "com.palm.dropbox",
"validator": "palm:\/\/com.palm.service.dropbox\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"id": "com.palm.other.mail"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"loc_name": "Email Account",
"readPermissions": [
],
"templateId": "com.palm.othermail",
"validator": {
"address": "palm:\/\/com.palm.dummy\/dummy",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.facebook:1",
"calendarevent": "com.palm.calendarevent.facebook:1"
},
"id": "com.palm.facebook.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.facebook\/",
"onCreate": "palm:\/\/com.palm.service.calendar.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.facebook\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.calendar.facebook\/sync"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.facebook:1"
},
"id": "com.palm.facebook.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.facebook\/",
"onCreate": "palm:\/\/com.palm.service.contacts.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.facebook\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.facebook\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.facebook\/sync"
},
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-48x48.png"
},
"loc_name": "Facebook",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
],
"templateId": "com.palm.facebook",
"validator": "palm:\/\/com.palm.service.contacts.facebook\/checkCredentials",
"writePermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.google:1"
},
"id": "com.palm.google.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.google\/",
"onCreate": "palm:\/\/com.palm.service.contacts.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.google\/onEnabled",
"refetchPhoto": "palm:\/\/com.palm.service.contacts.google\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.google\/sync"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"chatWithNonBuddies": false,
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png"
},
"id": "com.palm.google.talk",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "Google",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_gtalk"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.google:1",
"calendarevent": "com.palm.calendarevent.google:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-48x48.png"
},
"id": "com.palm.google.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.google\/",
"onCreate": "palm:\/\/com.palm.service.calendar.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.google\/onEnabled",
"subKind": "com.palm.calendarevent.google:1",
"sync": "palm:\/\/com.palm.service.calendar.google\/sync",
"validator": "palm:\/\/com.palm.service.calendar.google\/checkCredentials"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "imap.gmail.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "smtp.gmail.com",
"useSmtpAuth": true
},
"syncFrequencyMins": 15
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.google.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "DOCUMENTS",
"id": "com.palm.google.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-48x48.png"
},
"loc_name": "Google",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.google",
"validator": "palm:\/\/com.palm.service.contacts.google\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"id": "com.palm.palmprofile.contacts",
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"alwaysOn": true,
"capability": "PHONE",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"id": "com.palm.palmprofile.voice",
"loc_name": "Carrier",
"loc_shortName": "Carrier"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"id": "com.palm.palmprofile.sms",
"loc_name": "SMS Account",
"loc_shortName": "Text"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "HP webOS Account",
"templateId": "com.palm.palmprofile"
},
{
"templateId": "com.palm.imap",
"loc_name": "IMAP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.imap\/validateAccount"
},
"readPermissions": [
"com.palm.imap"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.imap.mail",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"subKind": "com.palm.imap.email:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.linkedin:1"
},
"id": "com.palm.linkedin.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.linkedin\/",
"onCreate": "palm:\/\/com.palm.service.contacts.linkedin\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.linkedin\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.linkedin\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.linkedin\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.linkedin\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.linkedin\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-48x48.png"
},
"loc_name": "LinkedIn",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.linkedin",
"validator": "palm:\/\/com.palm.service.contacts.linkedin\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"dbkinds": {
"task": "com.palm.email.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.mail",
"implementation": "palm:\/\/com.palm.eas\/",
"onCreate": "palm:\/\/com.palm.eas\/accountCreated",
"onDelete": "palm:\/\/com.palm.eas\/accountDeleted",
"subKind": "com.palm.email.eas:1"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.contacts",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.contact.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllContacts"
},
{
"capability": "REMOTECONTACTS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts48.png"
},
"id": "com.palm.eas.remotecontacts",
"implementation": "palm:\/\/com.palm.eas\/",
"loc_name": "Global Address Lookup",
"query": "palm:\/\/com.palm.eas\/queryGal"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendarevent": "com.palm.calendarevent.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.calendar",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.calendarevent.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllCalendars"
},
{
"capability": "TASKS",
"dbkinds": {
"task": "com.palm.task.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks48.png"
},
"id": "com.palm.eas.tasks",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.task.eas:1"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"loc_name": "Microsoft Exchange",
"onCapabilitiesChanged": "palm:\/\/com.palm.eas\/accountCapabilities",
"onCredentialsChanged": "palm:\/\/com.palm.eas\/accountUpdated",
"readPermissions": [
"com.palm.eas"
],
"templateId": "com.palm.eas",
"validator": {
"address": "palm:\/\/com.palm.eas\/validateAccount",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.mobileme.documents"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.mobileme.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
}
],
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-32x31.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-48x47.png"
},
"loc_name": "MobileMe",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.imap"
],
"templateId": "com.palm.mobileme",
"validator": "palm:\/\/com.palm.service.mobileme\/checkCredentials",
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/48.png"
},
"loc_name": "Photobucket",
"templateId": "com.palm.photobucket",
"validator": "palm:\/\/com.palm.service.photos.photobucket\/checkCredentials"
},
{
"templateId": "com.palm.pop",
"loc_name": "POP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.pop\/validateAccount"
},
"readPermissions": [
"com.palm.pop"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.pop.mail",
"implementation": "palm:\/\/com.palm.pop\/",
"onCreate": "palm:\/\/com.palm.pop\/accountCreated",
"onDelete": "palm:\/\/com.palm.pop\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.pop\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.pop\/credentialsChanged",
"subKind": "com.palm.email.pop:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"db_kinds": {
"contact": "com.palm.contact.sim:1"
},
"id": "com.palm.sim.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.sim\/",
"onCreate": "palm:\/\/com.palm.service.contacts.sim\/onCreate",
"onDelete": "palm:\/\/com.palm.service.contacts.sim\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.sim\/onEnabled",
"readOnlyData": false,
"sync": "palm:\/\/com.palm.service.contacts.sim\/sync"
}
],
"disableRemove": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png"
},
"loc_name": "SIM",
"templateId": "com.palm.sim"
},
{
"templateId": "com.palm.skype",
"loc_name": "Skype",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png"
},
"validator": {
"customUI": {
"appId": "com.palm.app.skype",
"name": "validator.html"
},
"address": "palm:\/\/com.palm.skypevalidator\/updateCredentials"
},
"onCredentialsChanged": "palm:\/\/com.palm.skypevalidator\/credentialsChanged",
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"id": "com.palm.skype.messaging",
"loc_shortName": "Skype",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png"
},
"implementation": "palm:\/\/com.palm.skype\/",
"onEnabled": "palm:\/\/com.palm.skype\/onEnabled",
"serviceName": "type_skype",
"dbkinds": {
"immessage": "com.palm.immessage.skypem:1",
"imcommand": "com.palm.imcommand.skypem:1"
},
"settingsUI": {
"appId": "com.palm.app.skype",
"sceneName": "accountlogin"
},
"invites": {
"supportsCustomMessage": true,
"loc_bannerText": "Skype contact request"
},
"groupChat": {
"supported": true,
"topicsSupported": true,
"invitesSupportMessages": false
},
"chatWithNonBuddies": true
},
{
"capability": "CONTACTS",
"id": "com.palm.skype.contacts",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"sync": "palm:\/\/com.palm.skype\/sync",
"readOnlyData": true,
"db_kinds": {
"contact": "com.palm.contact.skypem:1"
}
},
{
"capability": "PHONE",
"id": "com.palm.skype.call",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"serviceName": "type_skype",
"wanAllowed": true,
"wifiAllowed": true,
"pausePrompt": false,
"pauseCode": [
],
"waitCode": [
],
"keyHoldMappings": [
],
"launchCode": "##"
}
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/48.png"
},
"loc_name": "Snapfish",
"templateId": "com.palm.snapfish",
"validator": "palm:\/\/com.palm.service.photos.snapfish\/checkCredentials"
},
{
"templateId": "com.palm.telephony",
"loc_name": "Telephony Interface Layer",
"hidden": true,
"invisible": true,
"disableRemove": true,
"capabilityProviders": [
{
"id": "com.palm.telephony",
"capability": "PHONE",
"implementation": "palm:\/\/com.palm.telephony\/",
"serviceName": "com.palm.telephony",
"wanAllowed": true,
"wifiAllowed": false,
"pausePrompt": true,
"pauseCode": [
"p"
],
"waitCode": [
"w"
],
"keyHoldMappings": [
{
"0": "+"
},
{
"*": "p"
},
{
"#": "w"
}
]
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.yahoo:1"
},
"id": "com.palm.yahoo.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.contacts.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.yahoo\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.contacts.yahoo\/sync",
"validator": "palm:\/\/com.palm.service.contacts.yahoo\/checkCredentials"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.yahoo:1",
"immessage": "com.palm.immessage.yahoo:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png"
},
"id": "com.palm.yahoo.im",
"implementation": "palm:\/\/com.palm.imyahoo\/",
"invites": {
"supportsCustomMessage": true
},
"loc_shortName": "Yahoo!",
"onCredentialsChanged": "palm:\/\/com.palm.imyahoo\/onCredentialsChanged",
"onEnabled": "palm:\/\/com.palm.imyahoo\/onEnabled",
"serviceName": "type_yahoo"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "palm.imap.mail.yahoo.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "palm.smtp.mail.yahoo.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.yahoo.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.yahoo:1",
"calendarevent": "com.palm.calendarevent.yahoo:1"
},
"id": "com.palm.yahoo.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.calendar.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.yahoo\/onEnabled",
"subKind": "com.palm.calendarevent.yahoo:1",
"sync": "palm:\/\/com.palm.service.calendar.yahoo\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-48x48.png"
},
"loc_name": "Yahoo!",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.yahoo",
"validator": "palm:\/\/com.palm.yahoo\/validate"
},
{
"capabilityProviders": [
{
"capability": "VIDEO.UPLOAD",
"id": "com.palm.youtube.videoupload",
"implementation": "palm:\/\/com.palm.service.videos.youtube\/"
}
],
"hidden": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-48x48.png"
},
"loc_name": "YouTube",
"templateId": "com.palm.youtube",
"validator": "palm:\/\/com.palm.service.videos.youtube\/checkCredentials"
}
],
"returnValue": true
}
@@ -0,0 +1,5 @@
{
"returnValue": true,
"emailAddress": "myusername@palm.com"
}
@@ -0,0 +1,6 @@
{
"returnValue": true,
"name":"Russ Sonnenschein",
"isValid" : true
}
@@ -0,0 +1,5 @@
{
"returnValue": true,
"erased": true
}
@@ -0,0 +1,5 @@
{
"returnValue": true,
"email":"myusername@palm.com"
}
@@ -0,0 +1,3 @@
{
"returnValue": true
}
@@ -0,0 +1,3 @@
{
"returnValue": true
}
@@ -0,0 +1,5 @@
{
"returnValue": true,
"name":"Russ Sonnenschein"
}
@@ -0,0 +1,3 @@
{
"returnValue": true,
}
@@ -0,0 +1,3 @@
{
"returnValue": true,
}
@@ -0,0 +1,3 @@
{
"returnValue": true,
}
@@ -0,0 +1,3 @@
{
"returnValue": true,
}
@@ -0,0 +1,68 @@
{
"returnValue": true,
"accountDevices": [{
"deviceFamily": "Castle",
"deviceID": "IMEI:133714510198482",
"deviceModel": "Pre 2",
"deviceName": "Russ's Phone",
"deviceType": "Phone",
"osMajor": 1,
"osMinor": 30,
"osRevision": 51,
"webOSDisplayName": "webOS 1.3.51"
}
],
"accountInfo": {
"accountState": "B",
"accountType": "CONSUMER",
"country": "US",
"email": "fordaz@hotmail.com",
"firstName": "John",
"guid": "9127e28f-0263-46ff-822d-a1e0fd8ea421",
"hasCR": true,
"id": -1,
"jabberId": "4004ef854d7e8be42f4c",
"language": "en",
"lastName": "Doe6",
"postalCode": "",
"uniqueId": "M4656EE1C1973558FBB72C024F808C2EF"
},
"acctChallengeQuestions": {
"id": 1001,
"question": "Where did your parents meet?"
},
"challengeQuestions": [
{
"id": 1002,
"question": "Who was your favorite teacher?"
},
{
"id": 1003,
"question": "What country would you most like to visit?"
},
{
"id": 1001,
"question": "Where did your parents meet?"
},
{
"id": 1004,
"question": "What was your first car?"
},
{
"id": 1005,
"question": "Who is your hero?"
},
{
"id": 1006,
"question": "Which pro sport do you wish you could play?"
},
{
"id": 1007,
"question": "What is the name of your favorite animal?"
}]
}
@@ -0,0 +1,9 @@
{
"returnValue": true,
"deviceInfo" : {
"nduId" : "23424"
}
}
@@ -0,0 +1,264 @@
{
"returnValue": true,
"results": [
{
"_id": "++HPlvPGTDw1pjOw",
"_kind": "com.palm.account:1",
"_rev": 114193,
"_sync": true,
"alias": "AIM",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be12",
"capability": "MESSAGING",
"id": "com.palm.aol.aim"
}
],
"templateId": "com.palm.aol",
"username": "blowfishtest2@aol.com"
},
{
"_id": "++HPlugpfg0nLyfz",
"_kind": "com.palm.account:1",
"_rev": 113250,
"_sync": true,
"alias": "Palm",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1ba63",
"capability": "MAIL",
"id": "com.palm.eas.mail"
},
{
"_id": "1ba64",
"capability": "CONTACTS",
"id": "com.palm.eas.contacts"
},
{
"_id": "1ba65",
"capability": "REMOTECONTACTS",
"id": "com.palm.eas.remotecontacts"
},
{
"_id": "1ba66",
"capability": "CALENDAR",
"id": "com.palm.eas.calendar"
},
{
"_id": "1ba67",
"capability": "TASKS",
"id": "com.palm.eas.tasks"
}
],
"templateId": "com.palm.eas",
"username": "myusername@palm.com"
},
{
"_id": "++HPIZiOdv07oOtD",
"_kind": "com.palm.account:1",
"_rev": 71055,
"_sync": true,
"alias": "Facebook",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "11590",
"capability": "CALENDAR",
"id": "com.palm.facebook.calendar"
},
{
"_id": "11591",
"capability": "CONTACTS",
"id": "com.palm.facebook.contacts"
},
{
"_id": "11592",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.facebook.photoupload"
},
{
"_id": "11593",
"capability": "VIDEO.UPLOAD",
"id": "com.palm.facebook.videoupload"
}
],
"templateId": "com.palm.facebook",
"username": "petere@gmail.com"
},
{
"_id": "++HOWhlSEMh08y+t",
"_kind": "com.palm.account:1",
"_rev": 571,
"_sync": true,
"alias": "Whizoo",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "23c",
"capability": "CONTACTS",
"id": "com.palm.google.contacts"
},
{
"_id": "23d",
"capability": "MESSAGING",
"id": "com.palm.google.talk"
},
{
"_id": "23e",
"capability": "CALENDAR",
"id": "com.palm.google.calendar"
},
{
"_id": "23f",
"capability": "MAIL",
"id": "com.palm.google.mail"
}
],
"templateId": "com.palm.google",
"username": "palmqa@whizoo.com"
},
{
"_id": "++HOWqj5r8gtPsPc",
"_kind": "com.palm.account:1",
"_rev": 876,
"_sync": true,
"alias": "Fastmail",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "36d",
"capability": "MAIL",
"id": "com.palm.imap.mail"
}
],
"templateId": "com.palm.imap",
"username": "ppp06059@fastmail.fm"
},
{
"_id": "++HPluxXg7ZtJ58B",
"_kind": "com.palm.account:1",
"_rev": 114159,
"_sync": true,
"alias": "LinkedIn",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1bdf0",
"capability": "CONTACTS",
"id": "com.palm.linkedin.contacts"
}
],
"templateId": "com.palm.linkedin",
"username": "petere@gmail.com"
},
{
"_id": "++HO6e02HTlqdiBw",
"_kind": "com.palm.account:1",
"_rev": 64535,
"_sync": true,
"alias": "Palm Profile",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "13a",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts"
},
{
"_id": "13b",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "13c",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "13d",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "13e",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms"
},
{
"_id": "13f",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice"
}
],
"templateId": "com.palm.palmprofile",
"username": "Dr. Skipped Firstuse"
},
{
"_id": "++HPlvEx2PgTAfGD",
"_kind": "com.palm.account:1",
"_rev": 114189,
"_sync": true,
"alias": "Photobucket",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be0e",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.photobucket.photoupload"
}
],
"templateId": "com.palm.photobucket",
"username": "blowfishtest2"
},
{
"_id": "++HO6ecfILw4PvYP",
"_kind": "com.palm.account:1",
"_rev": 509,
"_sync": true,
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1fe",
"capability": "CONTACTS",
"id": "com.palm.sim.contacts"
}
],
"templateId": "com.palm.sim",
"username": "310410121063947"
},
{
"_id": "++HPlviwkPg7BY90",
"_kind": "com.palm.account:1",
"_rev": 114205,
"_sync": true,
"alias": "Yahoo!",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be1e",
"capability": "CONTACTS",
"id": "com.palm.yahoo.contacts"
},
{
"_id": "1be1f",
"capability": "MESSAGING",
"id": "com.palm.yahoo.im"
},
{
"_id": "1be20",
"capability": "MAIL",
"id": "com.palm.yahoo.mail"
},
{
"_id": "1be21",
"capability": "CALENDAR",
"id": "com.palm.yahoo.calendar"
}
],
"templateId": "com.palm.yahoo",
"username": "blowfishtest2@yahoo.com"
}
]
}
@@ -0,0 +1,827 @@
{
"results": [
{
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png"
},
"id": "com.palm.aol.aim",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "AIM",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_aim"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.aol\/images\/aim-logo.png"
},
"loc_name": "AIM",
"templateId": "com.palm.aol",
"validator": "palm:\/\/com.palm.imaccountvalidator\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.boxnet.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_48.png",
"loc_64x64": "\/usr\/palm\/public\/accounts\/com.palm.boxnet\/images\/box_net_64.png"
},
"loc_name": "Box.net",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.boxnet",
"validator": "palm:\/\/com.palm.service.boxnet\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.dropbox.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.dropbox\/images\/dropbox-48x48.png"
},
"loc_name": "Dropbox",
"templateId": "com.palm.dropbox",
"validator": "palm:\/\/com.palm.service.dropbox\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"id": "com.palm.other.mail"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.othermail\/images\/othermail48.png"
},
"loc_name": "Email Account",
"readPermissions": [
],
"templateId": "com.palm.othermail",
"validator": {
"address": "palm:\/\/com.palm.dummy\/dummy",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.facebook:1",
"calendarevent": "com.palm.calendarevent.facebook:1"
},
"id": "com.palm.facebook.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.facebook\/",
"onCreate": "palm:\/\/com.palm.service.calendar.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.facebook\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.calendar.facebook\/sync"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.facebook:1"
},
"id": "com.palm.facebook.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.facebook\/",
"onCreate": "palm:\/\/com.palm.service.contacts.facebook\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.facebook\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.facebook\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.facebook\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.facebook\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.facebook\/sync"
},
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.facebook\/images\/facebook-48x48.png"
},
"loc_name": "Facebook",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
],
"templateId": "com.palm.facebook",
"validator": "palm:\/\/com.palm.service.contacts.facebook\/checkCredentials",
"writePermissions": [
"com.palm.app.facebook",
"com.palm.app.facebook.beta",
"com.palm.app.enyo-facebook"
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.google:1"
},
"id": "com.palm.google.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.google\/",
"onCreate": "palm:\/\/com.palm.service.contacts.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.google\/onEnabled",
"refetchPhoto": "palm:\/\/com.palm.service.contacts.google\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.google\/sync"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"chatWithNonBuddies": false,
"dbkinds": {
"imcommand": "com.palm.imcommand.libpurple:1",
"immessage": "com.palm.immessage.libpurple:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/gtalk-32x32.png"
},
"id": "com.palm.google.talk",
"implementation": "palm:\/\/com.palm.imlibpurple\/",
"loc_shortName": "Google",
"onEnabled": "palm:\/\/com.palm.imlibpurple\/onEnabled",
"readOnlyData": true,
"serviceName": "type_gtalk"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.google:1",
"calendarevent": "com.palm.calendarevent.google:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/googlecalendar-48x48.png"
},
"id": "com.palm.google.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.google\/",
"onCreate": "palm:\/\/com.palm.service.calendar.google\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.google\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.google\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.google\/onEnabled",
"subKind": "com.palm.calendarevent.google:1",
"sync": "palm:\/\/com.palm.service.calendar.google\/sync",
"validator": "palm:\/\/com.palm.service.calendar.google\/checkCredentials"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "imap.gmail.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "smtp.gmail.com",
"useSmtpAuth": true
},
"syncFrequencyMins": 15
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.google.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "DOCUMENTS",
"id": "com.palm.google.documents"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.google\/images\/google-48x48.png"
},
"loc_name": "Google",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.google",
"validator": "palm:\/\/com.palm.service.contacts.google\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.palmprofile:1"
},
"id": "com.palm.palmprofile.contacts",
"refetchPhoto": "palm:\/\/com.palm.service.contacts\/refetchPhoto"
},
{
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"alwaysOn": true,
"capability": "PHONE",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"id": "com.palm.palmprofile.voice",
"loc_name": "Carrier",
"loc_shortName": "Carrier"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "SMS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/sms-32x32.png"
},
"id": "com.palm.palmprofile.sms",
"loc_name": "SMS Account",
"loc_shortName": "Text"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.palmprofile\/images\/mypalm-48x48.png"
},
"loc_name": "HP webOS Account",
"templateId": "com.palm.palmprofile"
},
{
"templateId": "com.palm.imap",
"loc_name": "IMAP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.imap\/validateAccount"
},
"readPermissions": [
"com.palm.imap"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.imap.mail",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.imap\/images\/imapmail48.png"
},
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"subKind": "com.palm.imap.email:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.linkedin:1"
},
"id": "com.palm.linkedin.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.linkedin\/",
"onCreate": "palm:\/\/com.palm.service.contacts.linkedin\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.linkedin\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.linkedin\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.linkedin\/onEnabled",
"readOnlyData": true,
"refetchPhoto": "palm:\/\/com.palm.service.contacts.linkedin\/refetchPhoto",
"sync": "palm:\/\/com.palm.service.contacts.linkedin\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.linkedin\/images\/linkedin-48x48.png"
},
"loc_name": "LinkedIn",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.linkedin",
"validator": "palm:\/\/com.palm.service.contacts.linkedin\/checkCredentials"
},
{
"capabilityProviders": [
{
"capability": "MAIL",
"dbkinds": {
"task": "com.palm.email.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.mail",
"implementation": "palm:\/\/com.palm.eas\/",
"onCreate": "palm:\/\/com.palm.eas\/accountCreated",
"onDelete": "palm:\/\/com.palm.eas\/accountDeleted",
"subKind": "com.palm.email.eas:1"
},
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.contacts",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.contact.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllContacts"
},
{
"capability": "REMOTECONTACTS",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eascontacts48.png"
},
"id": "com.palm.eas.remotecontacts",
"implementation": "palm:\/\/com.palm.eas\/",
"loc_name": "Global Address Lookup",
"query": "palm:\/\/com.palm.eas\/queryGal"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendarevent": "com.palm.calendarevent.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"id": "com.palm.eas.calendar",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.calendarevent.eas:1",
"sync": "palm:\/\/com.palm.eas\/syncAllCalendars"
},
{
"capability": "TASKS",
"dbkinds": {
"task": "com.palm.task.eas:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/eastasks48.png"
},
"id": "com.palm.eas.tasks",
"implementation": "palm:\/\/com.palm.eas\/",
"subKind": "com.palm.task.eas:1"
}
],
"hidden": false,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.eas\/images\/easmail48.png"
},
"loc_name": "Microsoft Exchange",
"onCapabilitiesChanged": "palm:\/\/com.palm.eas\/accountCapabilities",
"onCredentialsChanged": "palm:\/\/com.palm.eas\/accountUpdated",
"readPermissions": [
"com.palm.eas"
],
"templateId": "com.palm.eas",
"validator": {
"address": "palm:\/\/com.palm.eas\/validateAccount",
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
}
},
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "DOCUMENTS",
"id": "com.palm.mobileme.documents"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.mobileme.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
}
],
"config": {
"encryption": "ssl",
"port": 993,
"server": "mail.me.com",
"smtpConfig": {
"encryption": "tls",
"port": 587,
"server": "smtp.me.com",
"useSmtpAuth": true
}
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-32x31.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.mobileme\/images\/mobileme-48x47.png"
},
"loc_name": "MobileMe",
"loc_usernameLabel": "EMAIL ADDRESS",
"readPermissions": [
"com.palm.imap"
],
"templateId": "com.palm.mobileme",
"validator": "palm:\/\/com.palm.service.mobileme\/checkCredentials",
"writePermissions": [
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.photobucket\/images\/48.png"
},
"loc_name": "Photobucket",
"templateId": "com.palm.photobucket",
"validator": "palm:\/\/com.palm.service.photos.photobucket\/checkCredentials"
},
{
"templateId": "com.palm.pop",
"loc_name": "POP",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.pop\/images\/popmail48.png"
},
"hidden": true,
"validator": {
"customUI": {
"appId": "com.palm.app.email",
"name": "accounts\/wizard.html"
},
"address": "palm:\/\/com.palm.pop\/validateAccount"
},
"readPermissions": [
"com.palm.pop"
],
"writePermissions": [
],
"capabilityProviders": [
{
"capability": "MAIL",
"id": "com.palm.pop.mail",
"implementation": "palm:\/\/com.palm.pop\/",
"onCreate": "palm:\/\/com.palm.pop\/accountCreated",
"onDelete": "palm:\/\/com.palm.pop\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.pop\/accountEnabled",
"onCredentialsChanged": "palm:\/\/com.palm.pop\/credentialsChanged",
"subKind": "com.palm.email.pop:1"
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"db_kinds": {
"contact": "com.palm.contact.sim:1"
},
"id": "com.palm.sim.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.sim\/",
"onCreate": "palm:\/\/com.palm.service.contacts.sim\/onCreate",
"onDelete": "palm:\/\/com.palm.service.contacts.sim\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.sim\/onEnabled",
"readOnlyData": false,
"sync": "palm:\/\/com.palm.service.contacts.sim\/sync"
}
],
"disableRemove": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.sim\/images\/sim-32x32.png"
},
"loc_name": "SIM",
"templateId": "com.palm.sim"
},
{
"templateId": "com.palm.skype",
"loc_name": "Skype",
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png"
},
"validator": {
"customUI": {
"appId": "com.palm.app.skype",
"name": "validator.html"
},
"address": "palm:\/\/com.palm.skypevalidator\/updateCredentials"
},
"onCredentialsChanged": "palm:\/\/com.palm.skypevalidator\/credentialsChanged",
"capabilityProviders": [
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"id": "com.palm.skype.messaging",
"loc_shortName": "Skype",
"alwaysOn": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.skype\/images\/skype32.png"
},
"implementation": "palm:\/\/com.palm.skype\/",
"onEnabled": "palm:\/\/com.palm.skype\/onEnabled",
"serviceName": "type_skype",
"dbkinds": {
"immessage": "com.palm.immessage.skypem:1",
"imcommand": "com.palm.imcommand.skypem:1"
},
"settingsUI": {
"appId": "com.palm.app.skype",
"sceneName": "accountlogin"
},
"invites": {
"supportsCustomMessage": true,
"loc_bannerText": "Skype contact request"
},
"groupChat": {
"supported": true,
"topicsSupported": true,
"invitesSupportMessages": false
},
"chatWithNonBuddies": true
},
{
"capability": "CONTACTS",
"id": "com.palm.skype.contacts",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"sync": "palm:\/\/com.palm.skype\/sync",
"readOnlyData": true,
"db_kinds": {
"contact": "com.palm.contact.skypem:1"
}
},
{
"capability": "PHONE",
"id": "com.palm.skype.call",
"alwaysOn": true,
"implementation": "palm:\/\/com.palm.skype\/",
"serviceName": "type_skype",
"wanAllowed": true,
"wifiAllowed": true,
"pausePrompt": false,
"pauseCode": [
],
"waitCode": [
],
"keyHoldMappings": [
],
"launchCode": "##"
}
]
},
{
"capabilityProviders": [
{
"capability": "PHOTO",
"id": "com.palm.service.photos",
"implementation": "palm:\/\/com.palm.service.photos",
"onDelete": "palm:\/\/com.palm.service.photos\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.photos\/onEnabled"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.snapfish\/images\/48.png"
},
"loc_name": "Snapfish",
"templateId": "com.palm.snapfish",
"validator": "palm:\/\/com.palm.service.photos.snapfish\/checkCredentials"
},
{
"templateId": "com.palm.telephony",
"loc_name": "Telephony Interface Layer",
"hidden": true,
"invisible": true,
"disableRemove": true,
"capabilityProviders": [
{
"id": "com.palm.telephony",
"capability": "PHONE",
"implementation": "palm:\/\/com.palm.telephony\/",
"serviceName": "com.palm.telephony",
"wanAllowed": true,
"wifiAllowed": false,
"pausePrompt": true,
"pauseCode": [
"p"
],
"waitCode": [
"w"
],
"keyHoldMappings": [
{
"0": "+"
},
{
"*": "p"
},
{
"#": "w"
}
]
}
]
},
{
"capabilityProviders": [
{
"capability": "CONTACTS",
"dbkinds": {
"contact": "com.palm.contact.yahoo:1"
},
"id": "com.palm.yahoo.contacts",
"implementation": "palm:\/\/com.palm.service.contacts.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.contacts.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.contacts.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.contacts.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.contacts.yahoo\/onEnabled",
"readOnlyData": true,
"sync": "palm:\/\/com.palm.service.contacts.yahoo\/sync",
"validator": "palm:\/\/com.palm.service.contacts.yahoo\/checkCredentials"
},
{
"capability": "MESSAGING",
"capabilitySubtype": "IM",
"dbkinds": {
"imcommand": "com.palm.imcommand.yahoo:1",
"immessage": "com.palm.immessage.yahoo:1"
},
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-48x48.png",
"splitter": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yim-32x32.png"
},
"id": "com.palm.yahoo.im",
"implementation": "palm:\/\/com.palm.imyahoo\/",
"invites": {
"supportsCustomMessage": true
},
"loc_shortName": "Yahoo!",
"onCredentialsChanged": "palm:\/\/com.palm.imyahoo\/onCredentialsChanged",
"onEnabled": "palm:\/\/com.palm.imyahoo\/onEnabled",
"serviceName": "type_yahoo"
},
{
"capability": "MAIL",
"config": {
"encryption": "ssl",
"port": 993,
"server": "palm.imap.mail.yahoo.com",
"smtpConfig": {
"encryption": "ssl",
"port": 465,
"server": "palm.smtp.mail.yahoo.com",
"useSmtpAuth": true
}
},
"dbkinds": {
"email": "com.palm.imap.email:1"
},
"id": "com.palm.yahoo.mail",
"implementation": "palm:\/\/com.palm.imap\/",
"onCreate": "palm:\/\/com.palm.imap\/accountCreated",
"onCredentialsChanged": "palm:\/\/com.palm.imap\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.imap\/accountDeleted",
"onEnabled": "palm:\/\/com.palm.imap\/accountEnabled",
"subKind": "com.palm.imap.email:1"
},
{
"capability": "CALENDAR",
"dbkinds": {
"calendar": "com.palm.calendar.yahoo:1",
"calendarevent": "com.palm.calendarevent.yahoo:1"
},
"id": "com.palm.yahoo.calendar",
"implementation": "palm:\/\/com.palm.service.calendar.yahoo\/",
"onCreate": "palm:\/\/com.palm.service.calendar.yahoo\/onCreate",
"onCredentialsChanged": "palm:\/\/com.palm.service.calendar.yahoo\/credentialsChanged",
"onDelete": "palm:\/\/com.palm.service.calendar.yahoo\/onDelete",
"onEnabled": "palm:\/\/com.palm.service.calendar.yahoo\/onEnabled",
"subKind": "com.palm.calendarevent.yahoo:1",
"sync": "palm:\/\/com.palm.service.calendar.yahoo\/sync"
}
],
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.yahoo\/images\/yahoo-48x48.png"
},
"loc_name": "Yahoo!",
"loc_usernameLabel": "EMAIL ADDRESS",
"templateId": "com.palm.yahoo",
"validator": "palm:\/\/com.palm.yahoo\/validate"
},
{
"capabilityProviders": [
{
"capability": "VIDEO.UPLOAD",
"id": "com.palm.youtube.videoupload",
"implementation": "palm:\/\/com.palm.service.videos.youtube\/"
}
],
"hidden": true,
"icon": {
"loc_32x32": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-32x32.png",
"loc_48x48": "\/usr\/palm\/public\/accounts\/com.palm.youtube\/images\/youtube-48x48.png"
},
"loc_name": "YouTube",
"templateId": "com.palm.youtube",
"validator": "palm:\/\/com.palm.service.videos.youtube\/checkCredentials"
}
],
"returnValue": true
}
@@ -0,0 +1,264 @@
{
"returnValue": true,
"results": [
{
"_id": "++HPlvPGTDw1pjOw",
"_kind": "com.palm.account:1",
"_rev": 114193,
"_sync": true,
"alias": "AIM",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be12",
"capability": "MESSAGING",
"id": "com.palm.aol.aim"
}
],
"templateId": "com.palm.aol",
"username": "blowfishtest2@aol.com"
},
{
"_id": "++HPlugpfg0nLyfz",
"_kind": "com.palm.account:1",
"_rev": 113250,
"_sync": true,
"alias": "Palm",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1ba63",
"capability": "MAIL",
"id": "com.palm.eas.mail"
},
{
"_id": "1ba64",
"capability": "CONTACTS",
"id": "com.palm.eas.contacts"
},
{
"_id": "1ba65",
"capability": "REMOTECONTACTS",
"id": "com.palm.eas.remotecontacts"
},
{
"_id": "1ba66",
"capability": "CALENDAR",
"id": "com.palm.eas.calendar"
},
{
"_id": "1ba67",
"capability": "TASKS",
"id": "com.palm.eas.tasks"
}
],
"templateId": "com.palm.eas",
"username": "myusername@palm.com"
},
{
"_id": "++HPIZiOdv07oOtD",
"_kind": "com.palm.account:1",
"_rev": 71055,
"_sync": true,
"alias": "Facebook",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "11590",
"capability": "CALENDAR",
"id": "com.palm.facebook.calendar"
},
{
"_id": "11591",
"capability": "CONTACTS",
"id": "com.palm.facebook.contacts"
},
{
"_id": "11592",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.facebook.photoupload"
},
{
"_id": "11593",
"capability": "VIDEO.UPLOAD",
"id": "com.palm.facebook.videoupload"
}
],
"templateId": "com.palm.facebook",
"username": "petere@gmail.com"
},
{
"_id": "++HOWhlSEMh08y+t",
"_kind": "com.palm.account:1",
"_rev": 571,
"_sync": true,
"alias": "Whizoo",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "23c",
"capability": "CONTACTS",
"id": "com.palm.google.contacts"
},
{
"_id": "23d",
"capability": "MESSAGING",
"id": "com.palm.google.talk"
},
{
"_id": "23e",
"capability": "CALENDAR",
"id": "com.palm.google.calendar"
},
{
"_id": "23f",
"capability": "MAIL",
"id": "com.palm.google.mail"
}
],
"templateId": "com.palm.google",
"username": "palmqa@whizoo.com"
},
{
"_id": "++HOWqj5r8gtPsPc",
"_kind": "com.palm.account:1",
"_rev": 876,
"_sync": true,
"alias": "Fastmail",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "36d",
"capability": "MAIL",
"id": "com.palm.imap.mail"
}
],
"templateId": "com.palm.imap",
"username": "ppp06059@fastmail.fm"
},
{
"_id": "++HPluxXg7ZtJ58B",
"_kind": "com.palm.account:1",
"_rev": 114159,
"_sync": true,
"alias": "LinkedIn",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1bdf0",
"capability": "CONTACTS",
"id": "com.palm.linkedin.contacts"
}
],
"templateId": "com.palm.linkedin",
"username": "petere@gmail.com"
},
{
"_id": "++HO6e02HTlqdiBw",
"_kind": "com.palm.account:1",
"_rev": 64535,
"_sync": true,
"alias": "Palm Profile",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "13a",
"capability": "CONTACTS",
"id": "com.palm.palmprofile.contacts"
},
{
"_id": "13b",
"capability": "CALENDAR",
"id": "com.palm.palmprofile.calendar"
},
{
"_id": "13c",
"capability": "TASKS",
"id": "com.palm.palmprofile.tasks"
},
{
"_id": "13d",
"capability": "MEMOS",
"id": "com.palm.palmprofile.memos"
},
{
"_id": "13e",
"capability": "MESSAGING",
"id": "com.palm.palmprofile.sms"
},
{
"_id": "13f",
"capability": "VOICE",
"id": "com.palm.palmprofile.voice"
}
],
"templateId": "com.palm.palmprofile",
"username": "StyleLoadingAccounts"
},
{
"_id": "++HPlvEx2PgTAfGD",
"_kind": "com.palm.account:1",
"_rev": 114189,
"_sync": true,
"alias": "Photobucket",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be0e",
"capability": "PHOTO.UPLOAD",
"id": "com.palm.photobucket.photoupload"
}
],
"templateId": "com.palm.photobucket",
"username": "blowfishtest2"
},
{
"_id": "++HO6ecfILw4PvYP",
"_kind": "com.palm.account:1",
"_rev": 509,
"_sync": true,
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1fe",
"capability": "CONTACTS",
"id": "com.palm.sim.contacts"
}
],
"templateId": "com.palm.sim",
"username": "310410121063947"
},
{
"_id": "++HPlviwkPg7BY90",
"_kind": "com.palm.account:1",
"_rev": 114205,
"_sync": true,
"alias": "Yahoo!",
"beingDeleted": false,
"capabilityProviders": [
{
"_id": "1be1e",
"capability": "CONTACTS",
"id": "com.palm.yahoo.contacts"
},
{
"_id": "1be1f",
"capability": "MESSAGING",
"id": "com.palm.yahoo.im"
},
{
"_id": "1be20",
"capability": "MAIL",
"id": "com.palm.yahoo.mail"
},
{
"_id": "1be21",
"capability": "CALENDAR",
"id": "com.palm.yahoo.calendar"
}
],
"templateId": "com.palm.yahoo",
"username": "blowfishtest2@yahoo.com"
}
]
}
@@ -0,0 +1,2 @@
{"results":[{"capabilityProviders":[{"capability":"MESSAGING","capabilitySubtype":"IM","dbkinds":{"imcommand":"com.palm.imcommand.libpurple:1","immessage":"com.palm.immessage.libpurple:1"},"icon":{"splitter":"/usr/palm/public/accounts/com.palm.aol/images/aim-32x32.png"},"id":"com.palm.aol.aim","implementation":"palm://com.palm.imlibpurple/","loc_shortName":"AIM","onEnabled":"palm://com.palm.imlibpurple/onEnabled","readOnlyData":true,"serviceName":"type_aim"}],"icon":{"loc_32x32":"/usr/palm/public/accounts/com.palm.aol/images/aim-32x32.png","loc_48x48":"/usr/palm/public/accounts/com.palm.aol/images/aim-logo.png"},"loc_name":"AIM","templateId":"com.palm.aol","validator":"palm://com.palm.imaccountvalidator/checkCredentials"},{"capabilityProviders":[{"capability":"MAIL","icon":{"loc_32x32":"/usr/palm/public/accounts/com.palm.othermail/images/othermail32.png","loc_48x48":"/usr/palm/public/accounts/com.palm.othermail/images/othermail48.png"},"id":"com.palm.other.mail"}],"hidden":false,"icon":{"loc_32x32":"/usr/palm/public/accounts/com.palm.othermail/images/othermail32.png","loc_48x48":"/usr/palm/public/accounts/com.palm.othermail/images/othermail48.png"},"loc_name":"Email Account","readPermissions":[],"templateId":"com.palm.othermail","validator":{"address":"palm://com.palm.dummy/dummy","customUI":{"appId":"com.palm.app.email","name":"wizard"}},"writePermissions":[]},{"capabilityProviders":[{"capability":"CALENDAR","dbkinds":{"calendar":"com.palm.calendar.facebook:1","calendarevent":"com.palm.calendarevent.facebook:1"},"id":"com.palm.facebook.calendar","implementation":"palm://com.palm.service.calendar.facebook/","onCreate":"palm://com.palm.service.calendar.facebook/onCreate","onDelete":"palm://com.palm.service.calendar.facebook/onDelete","onEnabled":"palm://com.palm.service.calendar.facebook/onEnabled","readOnlyData":true,"sync":"palm://com.palm.service.calendar.facebook/sync"},{"capability":"CONTACTS","dbkinds":{"contact":"com.palm.contact.facebook:1"},"id":"com.palm.facebook.contacts","implementation":"palm://com.palm.service.contacts.facebook/","onCreate":"palm://com.palm.service.contacts.facebook/onCreate","onDelete":"palm://com.palm.service.contacts.facebook/onDelete","onEnabled":"palm://com.palm.service.contacts.facebook/onEnabled","readOnlyData":true,"refetchPhoto":"palm://com.palm.service.contacts.facebook/refetchPhoto","sync":"palm://com.palm.service.contacts.facebook/sync"},{"capability":"PHOTO.UPLOAD","id":"com.palm.facebook.photoupload","implementation":"palm://com.palm.service.photos.facebook/upload"},{"capability":"VIDEO.UPLOAD","id":"com.palm.facebook.videoupload","implementation":"palm://com.palm.service.videos.facebook/"}],"icon":{"loc_32x32":"/usr/palm/public/accounts/com.palm.facebook/images/facebook-32x32.png","loc_48x48":"/usr/palm/public/accounts/com.palm.facebook/images/facebook-48x48.png"},"loc_name":"Facebook","loc_usernameLabel":"email address","readPermissions":["com.palm.app.facebook","com.palm.app.facebook.beta"],"templateId":"com.palm.facebook","validator":"palm://com.palm.service.contacts.facebook/checkCredentials","writePermissions":["com.palm.app.facebook","com.palm.app.facebook.beta"]},{"capabilityProviders":[{"capability":"CONTACTS","dbkinds":{"contact":"com.palm.contact.google:1"},"id":"com.palm.google.contacts","implementation":"palm://com.palm.service.contacts.google/","onCreate":"palm://com.palm.service.contacts.google/onCreate","onDelete":"palm://com.palm.service.contacts.google/onDelete","onEnabled":"palm://com.palm.service.contacts.google/onEnabled","refetchPhoto":"palm://com.palm.service.contacts.google/refetchPhoto","sync":"palm://com.palm.service.contacts.google/sync"},{"capability":"MESSAGING","capabilitySubtype":"IM","chatWithNonBuddies":false,"dbkinds":{"imcommand":"com.palm.imcommand.libpurple:1","immessage":"com.palm.immessage.libpurple:1"},"icon":{"loc_32x32":"/usr/palm/public/accounts/com.palm.google/images/gtalk-32x32.png","loc_48x48":"/usr/palm/public/accounts/com.palm.google/images/gtalk-48x48.png","splitter":"/usr/palm/public/accounts/com.palm.google/images/gtalk-32x32.png"},"id":"com.palm.google.talk","implementation":"palm://com.palm.imlibpurple/","loc_shortName":"Google","onEnabled":"palm://com.palm.imlibpurple/onEnabled","readOnlyData":true,"serviceName":"type_gtalk"},{"capability":"CALENDAR","dbkinds":{"calendar":"com.palm.calendar.google:1","calendarevent":"com.palm.calendarevent.google:1"},"icon":{"loc_32x32":"/usr/palm/public/accounts/com.palm.google/images/googlecalendar-32x32.png","loc_48x48":"/usr/palm/public/accounts/com.palm.google/images/googlecalendar-48x48.png"},"id":"com.palm.google.calendar","implementation":"palm://com.palm.service.calendar.google/","onCreate":"palm://com.palm.service.calendar.google/onCreate","onDelete":"palm://com.palm.service.calendar.google/onDelete","onEnabled":"palm://com.palm.service.calendar.google/onEnabled","subKind":"com.palm.calendarevent.google:1","sync":"palm://com.palm.service.calendar.google/sync","valLine truncated
]}
@@ -0,0 +1,260 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
// AccountManager
enyo.kind({
name: "AccountManager",
kind: "Pane",
flex:1,
capability: undefined,
components: [
// The first view shows "Loading Accounts ..."
{kind: "VFlexBox", name: "loadingAccounts", className:"enyo-bg", components: [
{kind:"Toolbar", className:"enyo-toolbar-light accounts-header", pack:"center", components: [
{kind: "Image", src: "images/acounts-48x48.png"},
{kind: "Control", content: AccountsUtil.PAGE_TITLE_ACCOUNTS}
]},
{className:"accounts-header-shadow"},
{kind: "HFlexBox", className:"box-center", flex:1, pack:"center", align:"center", components: [
{kind:"Spinner", name: "getAccountsSpinner"},
{content: $L("Loading Accounts...")}
]},
]},
// The second view is the main Accounts view
{kind: "VFlexBox", name: "prefsAndAccounts", className:"enyo-bg", components: [
{kind:"Toolbar", className:"enyo-toolbar-light accounts-header", pack:"center", components: [
{kind: "Image", src: "images/acounts-48x48.png"},
{kind: "Control", content: AccountsUtil.PAGE_TITLE_ACCOUNTS}
]},
{className:"accounts-header-shadow"},
{kind: "Scroller", flex: 1, components: [
{kind:"Control", className:"box-center", components: [
{kind: "RowGroup", className:"accounts-group", caption:$L("HP WEBOS ACCOUNT"), components: [
{kind: "Item", layoutKind: "HFlexLayout", tapHighlight: true, disabled:true, className:"enyo-single" , onclick: "editPalmidProfile", align:"center", components:[
{kind: "Image", name: "profileIcon", className:"icon-image"},
{name:"palmProfileName", className:"enyo-text-ellipsis", flex:1}
]}
]},
{kind: "RowGroup", className:"accounts-group", name: "synergyAccounts", caption:$L("SYNERGY ACCOUNTS"), components: [
// This is the one-line kind to get the list of accounts. It is initialized in your create method below
{kind: "Accounts.accountsList", name: "accountsList", onAccountsList_AccountSelected: "editAccount", onAccountsList_Ready: "listReady"}
]},
{kind: "RowGroup", className:"accounts-group", name: "simAccountGroup", components: [
{kind: "Accounts.accountsList", name: "SIMAccountsList", onAccountsList_AccountSelected: "editAccount", onAccountsList_Ready: "listReady"}
]},
// You'll probably want an "Add Account" button
{kind: "Button", label: $L("Add an Account"), className:"enyo-button-dark accounts-btn", onclick: "AddAccount"}
]}
]},
]},
// This kind controls the view when a user is adding an account. You should switch to this view when
// the user taps on the "Add Account" button and return to the "prefsAndAccounts" view when
// onAccountsUI_Done event is received
{kind: "AccountsUI", name: "AccountsView", lazy:true, capability: this.capability, onAccountsUI_Done: "accountsDone"},
// If your app is 'EMAIL' then you need to define your "Edit account" view here. Otherwise use this view
// "components" is optional, but it allows you to specify additional preferences on the page that will appear
// under the "Remove Account" button. All events generated by these components are forwarded to your app.
{kind: "AccountsModify", name: "AccountsModify", lazy:true, capability: this.capability, onAccountsModify_Done: "accountsDone"},
{kind: "MyApps.PalmID", name: "palmprofile", lazy:true, capability: this.capability, onAccountsModify_Done: "accountsDone"},
{kind: "Accounts.getAccounts", name: "accounts", onGetAccounts_AccountsAvailable: "onAccountsAvailable"},
{kind:"VFlexBox", components: [
{name: "appMenu", kind: "AppMenu", components: [{kind: "HelpMenu", target: "http://help.palm.com/accountsmgr/index.html"}]},
]},
{kind: "PalmService", name: "getPalmProfileAccountInfo", service: "palm://com.palm.accountservices/", method: "getAccountInfo", onSuccess: "setPalmProfileNameSuccess"},
{kind: "PalmService", name: "modifyPalmProfileAccountName", service: enyo.palmServices.accounts, method: "modifyAccount"},
],
create: function() {
this.inherited(arguments);
// Setup the Accounts and SIM lists first so that they are available as soon and the view renders
this.lists = 0;
this.$.accountsList.getAccountsList(this.capability, ['com.palm.palmprofile', 'com.palm.sim']);
this.$.SIMAccountsList.getAccountsList('com.palm.sim');
// Start the spinner
this.$.getAccountsSpinner.show();
},
listReady: function () {
// One of the Accounts or SIM lists is ready to be rendered
this.lists++;
// If both lists are ready, get the list of accounts so that the entire view can be drawn
if (this.lists === 2)
this.$.accounts.getAccounts();
},
// App was launched to change credentials
windowParamsChangeHandler: function(inSender, inEvent) {
var p = inEvent.params;
if (p && p.launchType === "changelogin" && p.accountId) {
console.log("Accounts app: Change credentials for " + p.accountId);
// Wait until all the accounts are retrieved before acting on this information
this.changeLoginAccountId = p.accountId;
}
},
// App was already running when credential dashboard was tapped
applicationRelaunchHandler: function(inSender, inEvent) {
var p = inEvent.params;
if (p && p.launchType === "changelogin" && p.accountId) {
console.log("Accounts app: Change credentials for " + p.accountId);
// Are the accounts available?
if (this.accounts) {
// Find the account
for (var i=0, l=this.accounts.length; i<l; i++) {
if (this.accounts[i]._id === p.accountId) {
this.selectViewByName("AccountsModify");
this.$.AccountsModify.ModifyCredentials(this.accounts[i]);
}
}
}
else {
// Wait until all the accounts are retrieved before acting on this information
this.changeLoginAccountId = p.accountId;
}
}
},
onAccountsAvailable: function(inSender, inResponse) {
this.accounts = inResponse.accounts; // Accounts are returned as an array
this.templates = inResponse.templates;
var simAccounts = 0;
// Separate the Profile and SIM accounts from the others
this.accounts = this.accounts.filter(function(account) {
if (account.templateId === "com.palm.palmprofile") {
if (this.palmProfileAccount === undefined) {
//Jira: CWS-4249
//We just want to reset the account name if for some reason it changed on the server.
this.$.getPalmProfileAccountInfo.call({});
}
this.palmProfileAccount = account;
return false;
}
if (account.templateId === "com.palm.sim") {
simAccounts++;
return false;
}
return true;
}.bind(this));
// Update the Profile username and icon
this.$.palmProfileName.setContent(enyo.string.escapeHtml(this.palmProfileAccount.username));
this.$.profileIcon.src = this.palmProfileAccount.icon.loc_32x32;
this.$.profileIcon.srcChanged();
// Change the SIM header based on the number of SIM Accounts
if (simAccounts === 0)
this.$.simAccountGroup.hide();
else {
this.$.simAccountGroup.show();
var t = new enyo.g11n.Template($L("1#SIM ACCOUNT|#SIM ACCOUNTS"));
this.$.simAccountGroup.setCaption(t.formatChoice(simAccounts, {}));
}
// Show the list of accounts if more than 1 account
if (this.accounts.length >= 1)
this.$.synergyAccounts.show();
else
this.$.synergyAccounts.hide();
// Was the accounts app launched to change credentials?
if (this.changeLoginAccountId) {
// Find the account
for (var i=0, l=this.accounts.length; i<l; i++) {
if (this.accounts[i]._id === this.changeLoginAccountId) {
delete this.changeLoginAccountId;
this.selectViewByName("AccountsModify");
this.$.AccountsModify.ModifyCredentials(this.accounts[i]);
}
}
}
else {
// Go to the Accounts view, if the current view is "Loading Accounts"
if (this.getViewName() === "loadingAccounts") {
this.selectViewByName("prefsAndAccounts");
// Prepare other views so they are ready when the user needs them
setTimeout(enyo.bind(this, "PrepareViews"), 500);
}
}
},
// Prepare the other views for display
PrepareViews: function() {
this.$.getAccountsSpinner.hide();
this.validateView("AccountsView");
this.validateView("AccountsModify");
},
// "Add Account" button was tapped
AddAccount: function(button) {
this.selectViewByName("AccountsView");
this.$.AccountsView.AddAccount(this.templates);
},
editPalmidProfile: function(inSender, inResults) {
console.log("editPalmidProfile")
this.selectViewByName("palmprofile");
this.$.palmprofile.initialize({palmProfileAccount: this.palmProfileAccount});
},
setPalmProfileNameSuccess: function(inSender, inResponse) {
console.log("setPalmProfileNameSuccess");
var accountName = inResponse.firstName + " " + inResponse.lastName;
var param = {
"accountId": this.palmProfileAccount._id,
"object": {"username": accountName}
}
console.log("PalmProfileName: " + JSON.stringify(param));
// Modify the account
this.$.modifyPalmProfileAccountName.call(param);
},
// User tapped on account to edit
editAccount: function(inSender, inResults) {
this.selectViewByName("AccountsModify");
this.$.AccountsModify.ModifyAccount(inResults.account);
},
// Go to the prefs and accounts view
accountsDone: function(inSender, e) {
this.selectViewByName("prefsAndAccounts");
},
// Open or close the App Menu
openAppMenuHandler: function() {
this.$.appMenu.open();
},
closeAppMenuHandler: function() {
this.$.appMenu.close();
}
});
+27
View File
@@ -0,0 +1,27 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
FirstUse.config = [
{name: "language", requires:{data: false}},
{name: "palm", requires:{data: true}},
{name: "signin", requires:{data: true}},
{name: "restoreComponent", requires:{data:true}},
{name: "google", requires:{data: false}},
{name: "namedevice", requires:{data: true}},
{name: "updates", requires:{data: true}},
];
@@ -0,0 +1,170 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.Accounts",
kind: enyo.VFlexBox,
published : {
accountAggregate : {},
deviceProfile: {},
backToViewCallback: {},
palmProfileAccount: {}
},
className:"enyo-bg",
components: [
{
name: "loginDialog",
kind: "MyApps.PalmID.ProfileLoginPasswordDialog",
},
{
name: "passwdDialog",
kind: "MyApps.PalmID.PasswdDialog",
},
{
name: "recoverDialog",
kind: "MyApps.PalmID.PasswordRecoverDialog",
},
{
kind: "enyo.Scroller",
name: "accountsContent",
flex: 1,
components: [
{kind:"Toolbar", className:"enyo-toolbar-light accounts-header", pack:"center", components:[
{kind: "Image", src: "images/acounts-48x48.png"},
{kind: "Control", content: $L("HP webOS Account")}
]},
{className:"accounts-header-shadow"},
{kind:"Control", className:"box-center", components: [
{
name: "profileList",
kind: "RowGroup",
className:"accounts-group",
caption: $L("NAME"),
components: [],
owner: this.owner
},
{
kind: "Button",
caption: $L("Login"),
className:"accounts-btn",
onclick: "login"
},
]},
]
},
{className:"accounts-footer-shadow"},
{kind:"Toolbar", className:"enyo-toolbar-light", components:[
{
kind: "Button",
name: "doneButton",
className:"accounts-toolbar-btn",
onclick: "done",
caption : $L("Back"),
},
]},
],
done: function()
{
this.backToViewCallback();
},
addAccount: function()
{
this.owner.next();
},
create: function()
{
this.inherited(arguments);
},
login: function() {
enyo.keyboard.setManualMode(true);
enyo.keyboard.show(1);
setTimeout(enyo.bind(this, function() { // delay for keyboard to show.
this.$.loginDialog.openThisDialog(
this.accountAggregate.accountInfo.email,
this.accountAggregate,
enyo.bind(this, this.loginSuccess),
enyo.bind(this, this.loginCancel),
enyo.bind(this, this.done));
}), 500)
},
loginSuccess: function(password) {
enyo.keyboard.hide();
enyo.keyboard.setManualMode(false);
this.accountAggregate.accountInfo.password = password;
this.loadAccount();
},
loginCancel: function() {
this.login();
},
setAccountInfo: function(accountAggregate)
{
this.accountAggregate = accountAggregate;
var account = accountAggregate.accountInfo;
var acctname = account.firstName + $L(" ") + account.lastName;
//this.$.profileList.build();
var list = this.$.profileList;
list.destroyControls();
list.createComponent({name: "account", kind: "MyApps.PalmID.ProfileItem", content: enyo.string.escapeHtml(acctname), className:"enyo-text-ellipsis", flex:1, owner: this, onclick: "login"});
this.render();
},
loadAccount: function()
{
console.log(enyo.json.stringify(this.accountAggregate));
var profile = this.owner.$.fullProfile;
profile.populateName(this.accountAggregate.accountInfo);
profile.populateLoginInfo(this.accountAggregate);
profile.populateDeviceList(this.accountAggregate.accountDevices);
this.applications = this.palmProfileAccount.capabilityProviders
/*
this.applications = [
{"name": $L("Contacts"), "id": 1, "state": true},
{"name": $L("Messaging"), "id": 2, "state": false},
{"name": $L("Calendar"), "id": 3, "state": true},
{"name": $L("Tasks"), "id": 4, "state": true},
{"name": $L("Memos"), "id": 5, "state": false}
//{"name": $L("Mail"), "id": 6, "state": false}
],
*/
profile.populateAppList(this.applications);
this.owner.next();
}
});
enyo.kind({
name: "MyApps.PalmID.ProfileItem",
kind: enyo.Item,
tapHighlight: false
});
@@ -0,0 +1,70 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
kind: "ModalDialog", lazy: false, name: "MyApps.PalmID.CommErrorDialog",
scrim: true,
components: [
{ name: "errorDialogText", className: "enyo-paragraph", content: "dummydummydummydummy"},
{kind:"HFlexBox", components:[
{ kind: "Button", caption: $L("Done"), flex:1, onclick: "close"},
{ name: "helpButton", kind: "Button", caption: $L("Help"), flex:1, onclick: "help", style: "display: none"}
]},
],
openAtCenter: function(error, helpCallback) {
var heading = $L("Error");
var msg = PALMIDUTILS_ERROR_CODES["-9999"]; // the default if it is unknown
if (error && error.errorCode) {
var errorText = PALMIDUTILS_ERROR_CODES[error.errorCode];
if (errorText) {
msg = enyo.string.escapeHtml(errorText);
} else {
heading = $L("Network Error");
}
}
if (error && error.errorCode) {
var errorHeadingText = PALMIDUTILS_ERROR_HEADING_CODES[error.errorCode]
if (errorHeadingText) {
heading = enyo.string.escapeHtml(errorHeadingText);
}
}
if (helpCallback) {
this.$.helpButton.applyStyle("display", "block");
this.helpCallback = helpCallback;
} else {
this.$.helpButton.applyStyle("display", "none");
}
console.log("error:" + enyo.json.stringify(error));
this.$.errorDialogText.setContent(msg);
this.setCaption(heading);
this.inherited(arguments);
},
help: function() {
this.helpCallback();
}
});
@@ -0,0 +1,102 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.DeviceEraseConfirmDialog",
kind: "ModalDialog",
lazy: false,
caption: $L("Erase Device"),
scrim: true,
components: [
{
kind: "PalmService",
name: "eraseDevice",
service: "palm://com.palm.storage/erase/",
method: "EraseAll",
parameters: {},
onSuccess: "setSuccess",
onFailure: "setFailure"
},
{
name: "alert_double_conf",
kind: "Control",
components: [
{ content: $L("Erasing this device wipes out all data and it is a permanent action that cannot be reversed. Once the device is erased it will no longer be usable until..."), className:"enyo-paragraph"},
{ kind:"HFlexBox", components:[
{ kind: "Button", caption: $L("Cancel"), flex:1, onclick: "close" },
{ kind: "Button", caption: $L("Erase Device"), flex:1, onclick: "eraseDeviceDoubleConf" }
]},
]
},
{
name: "alert_erase",
kind: "ModalDialog",
caption: $L("Erase Device"),
scrim: true,
components: [
{ content: $L("Are you really sure? You cannot undo this operation."), className:"enyo-paragraph"},
{ kind:"HFlexBox", components:[
{ kind: "Button", caption: $L("Cancel"), flex:1, onclick: "close_alert_erase" },
{ kind: "Button", caption: $L("Erase Device"), flex:1, onclick: "eraseDevice" }
]},
]
},
{kind: "MyApps.PalmID.CommErrorDialog", name: "errorDialog"},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
setDevice: function(deviceId) {
this.deviceID = deviceId;
},
eraseDeviceDoubleConf: function() {
this.close();
this.$.alert_erase.openAtCenter();
},
eraseDevice: function()
{
console.log('**************** ERASE ALL ***************');
this.$.spinnerOverlay.openAtCenter();
this.$.eraseDevice.call();
},
close_alert_erase: function() {
this.$.alert_erase.close();
},
setSuccess: function(result) {
console.log("**************** DEVICE ERASE SUCCESS *************************")
this.$.spinnerOverlay.close();
this.$.alert_erase.close();
},
setFailure: function(result){
console.log("**************** DEVICE ERASE FAILURE *************************")
this.$.spinnerOverlay.close();
this.$.errorDialog.openAtCenter(inResponse);
},
});
@@ -0,0 +1,125 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.DeviceInfoDialog",
kind: "ModalDialog", lazy: false,
caption: $L("Device Info"),
scrim: true,
dismissWithClick: true,
modal: true,
components: [
{
name: "mainAlert",
kind: "Control",
components: [
{kind: "RowGroup",
name: "deviceInfoRowGroup",
caption: "DEVICE INFO", // this will never show...hence not localized.
components: [
{
kind: "enyo.HFlexBox",
components: [
{
content: $L("Name"),
className:"enyo-label",
style: "padding-right:30px"
},
{
name: "deviceName",
className:"enyo-text-ellipsis",
style:"text-align:right",
flex: 1,
components: []
}
]
},
{
kind: "enyo.HFlexBox",
components: [
{
content: $L("Model"),
className:"enyo-label",
style: "padding-right:30px"
},
{
name: "deviceModel",
className:"enyo-text-ellipsis",
style:"text-align:right",
flex: 1,
components: []
}
]
},
{
kind: "enyo.HFlexBox",
components: [
{
content: $L("Version"),
className:"enyo-label",
style: "padding-right:30px"
},
{
name: "deviceSoftware",
className:"enyo-text-ellipsis",
style:"text-align:right",
flex: 1,
components: []
}
]
},
]
},
{ name: "eraseOption", style: "display: none", kind: "Button", caption: $L("Erase Device"), onclick: "doubleConfirm" },
{ kind: "Button", caption: $L("Done"), onclick: "close" },
{
name: "deviceEraseConfirmDialog",
kind: "MyApps.PalmID.DeviceEraseConfirmDialog",
}
]
}
],
setDevice: function(settings) {
this.deviceID = settings.device.nudid;
/*
if (!settings.thisDevice) {
this.$.eraseOption.applyStyle("display","none");
} else {
this.$.eraseOption.applyStyle("display","block");
}
*/
this.$.deviceInfoRowGroup.setCaption(enyo.string.escapeHtml(settings.device.deviceType));
this.$.deviceName.setContent(enyo.string.escapeHtml(settings.device.deviceName));
this.$.deviceModel.setContent(enyo.string.escapeHtml(settings.device.deviceModel));
this.$.deviceSoftware.setContent(enyo.string.escapeHtml(settings.device.webOSDisplayName));
},
doubleConfirm: function()
{
this.$.deviceEraseConfirmDialog.setDevice(this.deviceId);
this.$.deviceEraseConfirmDialog.openAtCenter();
this.close();
}
});
@@ -0,0 +1,214 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.EmailDialog",
kind: "ModalDialog", lazy: false,
caption: $L("Email"),
showKeyboardWhenOpening: true,
components: [{
kind: "PalmService",
name: "setEmailAddress",
service: "palm://com.palm.accountservices/",
method: "changeEmail",
onSuccess: "setSuccess",
onFailure: "setFailure"
}, {
className: "enyo-paragraph",
content: $L("Enter a new email address")
}, {
components: [{
kind: "RowGroup",
caption: $L("EMAIL"),
components: [{
name: "email",
kind: "Input",
onfocus: "setEmailKeyboard",
inputType: "email",
autoCapitalize: "lowercase", autocorrect: false, autocomplete: false, spellcheck: false
}, ],
}],
}, {
name: "emailError1",
content: "",
className: "enyo-paragraph enyo-text-error",
showing: false
}, {
kind: "RowGroup",
caption: $L("VERIFY EMAIL"),
components: [{
name: "emailConfirm",
kind: "Input",
onfocus: "setEmailKeyboard",
inputType: "email",
autoCapitalize: "lowercase", autocorrect: false, autocomplete: false, spellcheck: false
}, ],
}, {
name: "emailError2",
content: "",
className: "enyo-paragraph enyo-text-error",
showing: false
},
{ kind:"HFlexBox", components:[
{kind: "Button", caption: $L("Cancel"), flex:1, onclick: "close" },
{kind: "Button", caption: $L("Update"), flex:1, onclick: "update"}
]},
{
kind: "ModalDialog", lazy: false,
name: "verifyEmailDialog",
caption: $L("Verify Email"),
dismissWithClick: false,
modal: true,
components: [{
name: "verifyText",
className: "enyo-paragraph text-breakword",
content: "dummy"
}, {
kind: "Button",
caption: $L("Done"),
onclick: "closeVerifyEmailDialog"
}, ],
scrim: true,
}, {
kind: "MyApps.PalmID.CommErrorDialog",
name: "errorDialog"
},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
openThisDialog: function(parms){
this.sentCallback = parms.sentCallback;
this.defaultEmail = parms.defaultEmail;
this.openAtCenter();
},
prepareOpen: function() {
var r = this.inherited(arguments);
this.$.emailError1.setShowing(false);
this.$.emailError2.setShowing(false);
this.$.email.setValue(this.defaultEmail);
this.$.emailConfirm.setValue("");
return r;
},
afterOpen: function() {
var r = this.inherited(arguments);
this.$.email.forceSelect();
return r;
},
close: function() {
var r = this.inherited(arguments);
enyo.keyboard.hide();
enyo.keyboard.setManualMode(false);
return r;
},
setEmailKeyboard: function() {
enyo.keyboard.show(enyo.keyboard.typeEmail);
},
update: function(){
var util = new PalmIdUtilities();
var profile = this.owner;
var email = util.trim(this.$.email.value.toLowerCase());
var emailConfirm = util.trim(this.$.emailConfirm.value.toLowerCase());
this.email = email;
this.$.emailError1.setShowing(false);
this.$.emailError2.setShowing(false);
if (email.length == 0) {
this.$.emailError1.setContent($L("Please enter an email address."));
this.$.emailError1.setShowing(true);
this.$.email.forceFocus();
}
else
if (!util.isValidEmail(email)) {
this.$.emailError1.setContent($L("Please enter a valid email address."));
this.$.emailError1.setShowing(true);
if (this.$.email.value.length) {
this.$.email.forceSelect();
} else {
this.$.email.forceFocus();
}
}
else
if (emailConfirm.length == 0) {
this.$.emailError2.setContent($L("Please confirm your address."));
this.$.emailError2.setShowing(true);
this.$.emailConfirm.forceFocus();
}
else
if (email != emailConfirm) {
this.$.emailError2.setContent($L("Email addresses do not match."));
this.$.emailError2.setShowing(true);
}
else
if (email != profile.email) {
this.$.spinnerOverlay.openAtCenter();
this.$.setEmailAddress.call({
email: email
});
}
else {
this.close();
};
},
setSuccess: function(inSender, inResponse){
this.$.spinnerOverlay.close();
this.close();
this.sentCallback();
var template = new enyo.g11n.Template($L("Please respond to the verification email sent to #{email} from Palm_Inc@email.palmnewsletters.com. The new email address will not be updated until it has been verified."));
this.$.verifyText.setContent(template.evaluate({
email: enyo.string.escapeHtml(this.email)
}));
this.$.verifyEmailDialog.openAtCenter();
//should use a callback here()
var profile = this.owner;
profile.email = this.email;
},
setFailure: function(inSender, inResponse){
this.$.spinnerOverlay.close();
if (inResponse && inResponse.errorCode == "PAMS9998") {
this.$.errorDialog.openAtCenter(inResponse, enyo.bind(this, this.helpCallback));
} else {
this.$.errorDialog.openAtCenter(inResponse);
}
},
closeVerifyEmailDialog: function(){
this.$.verifyEmailDialog.close();
},
helpCallback: function() {
this.$.errorDialog.close();
this.$.errorDialog.openAtCenter({errorCode: "ACCCOUNT_EXPANDED_INVALIDEMAIL"});
}
});
@@ -0,0 +1,154 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
var INITIALIZE_ERRORTEXT = $L("Must be connected to a network to communicate with HP's Cloud Services. Check your network connection, or try again later.")
enyo.kind({
name: "MyApps.PalmID.Initialize",
kind: enyo.VFlexBox,
scrim: true,
style: "margin: 30px",
published : {
initialize: function(parms) {
this.$.spinner.show();
this.$.getDeviceInfo.call({});
enyo.keyboard.setResizesWindow(false);
this.backToViewCallback = function(){
if (enyo.keyboard.isManualMode()) {
enyo.keyboard.hide();
enyo.keyboard.setManualMode(false);
}
parms.backToViewCallback();
};
this.palmProfileAccount = parms.palmProfileAccount;
},
},
components: [
{
kind: "PalmService",
name: "getAccountInfo",
service: "palm://com.palm.accountservices/",
method: "getAggregatedAccountInfo",
onSuccess: "gotAccount",
onFailure: "accountFailure"
},
{
kind: "PalmService",
name: "getDeviceInfo",
service: "palm://com.palm.deviceprofile/",
method: "getDeviceProfile",
onSuccess: "gotDeviceProfile",
onFailure: "deviceInfoFailure"
},
{flex: 1, content:""},
{layoutKind: "HFlexLayout",
components: [
{flex: 1, content:""},
{name: "spinner", style: "text-align: center", kind: "enyo.SpinnerLarge"},
{flex: 1, content:""},
]
},
{flex: 1, content:""},
{
name: "errorPopup",
kind: "ModalDialog", lazy: false,
caption: $L("Error"),
scrim: true,
dismissWithClick: false,
modal: true,
components: [
{name: "serverIssue", className: "enyo-paragraph", content: INITIALIZE_ERRORTEXT},
{kind:"HFlexBox", components:[
{kind: "Button", caption: $L("Close"), flex:1, onclick: "back"},
{kind: "Button", caption: $L("Try Again"), flex:1, onclick: "retry"}
]},
],
},
],
create: function()
{
this.inherited(arguments);
},
//rendered: function () {
//},
gotDeviceProfile: function(inSender, inResponse) {
var accounts = this.owner.$.accounts;
accounts.setDeviceProfile(inResponse);
accounts.backToViewCallback = this.backToViewCallback;
accounts.palmProfileAccount = this.palmProfileAccount;
this.$.spinner.show();
this.$.getAccountInfo.call({locale: enyo.g11n.currentLocale().locale});
},
retry: function()
{
this.$.errorPopup.close();
this.$.spinner.show();
this.$.getAccountInfo.call({});
},
gotAccount: function(inSender, inResponse)
{
var accounts = this.owner.$.accounts;
accounts.setAccountInfo(inResponse);
this.$.spinner.hide();
this.owner.selectViewByName("accounts");
this.owner.$.accounts.login();
},
setErrorMessage: function(inResponse) {
//var msg = INITIALIZE_ERRORTEXT;
console.log("error:" + enyo.json.stringify(inResponse));
var errorText = (inResponse.errorCode) ? PALMIDUTILS_ERROR_CODES[inResponse.errorCode] : undefined;
if (errorText == undefined) errorText = INITIALIZE_ERRORTEXT;
this.$.serverIssue.setContent(errorText);
},
accountFailure: function(inSource, inResponse)
{
this.$.spinner.hide();
this.setErrorMessage(inResponse);
this.$.errorPopup.openAtCenter();
},
deviceInfoFailure: function(inSource, inResponse) {
this.$.spinner.hide();
this.setErrorMessage(inResponse);
this.$.errorPopup.openAtCenter();
},
back: function(inSource, inResponse) {
this.$.spinner.show();
this.$.errorPopup.close();
this.backToViewCallback();
}
})
@@ -0,0 +1,140 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.NameDialog",
kind: "ModalDialog",
caption: $L("Name"),
showKeyboardWhenOpening: true,
components: [
{
kind: "PalmService",
name: "setAccountName",
service: "palm://com.palm.accountservices/",
method: "updateAccountInfo",
onSuccess: "setSuccess",
onFailure: "setFailure"
},
{name: "modifyAccount", kind: "PalmService", service: enyo.palmServices.accounts, method: "modifyAccount"},
{
className: "enyo-paragraph",
content: $L("Enter a new name")
},
{
kind: "RowGroup",
caption: $L("FULL NAME"),
components: [
{ kind: "Input", name: "fullName",
autocorrect: false, spellcheck: false,
onfocus: "setTextKeyboard"
},
],
},
{ name: "error", content: "", className: "enyo-paragraph enyo-text-error", showing: false},
{kind:"HFlexBox", components:[
{ kind: "Button", caption: $L("Cancel"), flex:1, onclick: "close" },
{ kind: "Button",caption: $L("Update"), flex:1, onclick: "saveToServer" }
]},
{kind: "MyApps.PalmID.CommErrorDialog", name: "errorDialog"},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
openThisDialog: function(acctInfo, password) {
this.acctInfo = acctInfo;
this.password = password;
this.openAtCenter();
},
prepareOpen: function() {
var r = this.inherited(arguments);
this.$.fullName.setValue(this.acctInfo.firstName + " " + this.acctInfo.lastName);
this.$.error.setShowing(false);
return r;
},
afterOpen: function() {
var r = this.inherited(arguments);
this.$.fullName.forceSelect();
return r;
},
close: function() {
var r = this.inherited(arguments);
enyo.keyboard.hide();
enyo.keyboard.setManualMode(false);
return r;
},
setTextKeyboard: function() {
enyo.keyboard.show(enyo.keyboard.typeText);
},
saveToServer: function() {
var util = new PalmIdUtilities();
var profile = this.owner;
var fullName = util.trim(this.$.fullName.getValue());
this.fullName = fullName;
this.$.error.setShowing(false);
if (fullName.length == 0) {
this.$.error.setContent($L("Please enter an account name."));
this.$.error.setShowing(true);
this.$.fullName.forceFocus();
} else if (fullName.length > 50) {
this.$.error.setContent($L("Name must be less than 50 characters."));
this.$.error.setShowing(true);
this.$.fullName.forceFocus();
} else {
var firstName = util.getFirstName(this.$.fullName.getValue());
var lastName = util.getLastName(this.$.fullName.getValue());
this.firstName = firstName;
this.lastName = lastName;
this.$.spinnerOverlay.openAtCenter();
this.$.setAccountName.call({
firstName: firstName,
lastName: lastName,
email: this.acctInfo.email,
languageCode: this.acctInfo.language,
countryCode: this.acctInfo.country,
password: this.password});
};
},
setSuccess: function() {
this.$.spinnerOverlay.close();
var profile = this.owner;
profile.populateName({firstName: this.firstName, lastName: this.lastName});
var fullName = this.firstName + ((this.lastName && this.lastName.length > 0) ? " " + this.lastName : "");
profile.owner.nameChangeCallback(fullName);
var param = {
"accountId": profile.owner.palmProfileAccount._id,
"object": {"username": fullName}
}
// Modify the account
this.$.modifyAccount.call(param);
this.close();
},
setFailure: function(inSender, inResponse) {
this.$.spinnerOverlay.close();
this.$.errorDialog.openAtCenter(inResponse);
},
});
@@ -0,0 +1,63 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID",
kind: enyo.Pane,
published : {
palmProfileAccount: {},
initialize: function(parms) {
this.backToViewCallback = enyo.bind(this,
function() {
//parms.backToView();
this.doAccountsModify_Done();
this.selectView(this.$.dummy);
this.render();
this.$.initialize.destroy()
this.$.accounts.destroy()
this.$.fullProfile.destroy()
});
this.createComponents(
[
{name: "initialize", kind: "MyApps.PalmID.Initialize"},
{name: "accounts", kind: "MyApps.PalmID.Accounts"},
{name: "fullProfile", kind: "MyApps.PalmID.Profile"}
]
);
this.render();
this.selectView(this.$.initialize);
this.$.initialize.initialize({backToViewCallback: this.backToViewCallback, palmProfileAccount: parms.palmProfileAccount});
this.nameChangeCallback = function(){}; // not passed in anymore.
this.palmProfileAccount = parms.palmProfileAccount;
},
},
events: {
onAccountsModify_Done: "",
},
components: [
{name: "dummy", kind: enyo.VFlexBox, content:" "}
]
});
console.log("palm.js");
@@ -0,0 +1,123 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
var PALMIDUTILS_ERROR_CODES = {
"PAMS1001": $L("Please enter a password."),
"PAMS1002": $L("Password length should be between 6 and 20 characters and should not contain white spaces."),
"PAMS1003": $L("Your email address and password are too similar, please select a new password."),
"PAMS1005": $L("Please enter a valid email address."),
"PAMS1006": $L("Please select a security question."),
"PAMS1007": $L("Please provide answers to the security question."),
"PAMS1008": $L("Email address is already in use."),
"PAMS1018": $L("Answer is incorrect. Try again."),
"PAMS1033": $L("Unable to update user's password. Visit http://hpwebos.com/support for more information."),
"PAMS1100": $L("The password you entered is incorrect."),
"PAMS1101": $L("Account locked, Please try again in 15 min. Visit http://hpwebos.com/support for more information."),
"PAMS1106": $L("We couldn't find a webOS account. Visit http://hpwebos.com/support for more information."),
"PAMS1108": $L("Could not sign in to your account. Visit http://hpwebos.com/support for more information."),
"PAMS1123": $L("Cannot change to the same email address."),
"PAMS1201": $L("Account protected from password change. Visit http://hpwebos.com/support for more information."),
"PAMS1202": $L("Account protected from email change. Visit http://hpwebos.com/support for more information."),
"PAMS1203": $L("This email address is alreday in use by another account. Visit http://hpwebos.com/support for more information."),
"PAMS1114": $L("Account is already verified."),
"PAMS9998": $L("The United States Government prohibits HP from allowing you to use this email address to set up a webOS account."),
"ACCCOUNT_EXPANDED_INVALIDEMAIL": $L("The United States Government restricts exports to certain countries, including the country where your email address domain is issued. You can visit www.palm.com/us/company/legal for additional information."),
"ACCOUNT_NOT_DEFINED_ERROR" : $L("We were unable to locate your account information. Visit http://hpwebos.com/support for more information."),
"-9999": $L("Must be connected to a network to communicate with HP's Cloud Services. Check your network connection, or try again."),
};
var PALMIDUTILS_ERROR_HEADING_CODES = {
"-9999": $L("Network Error"),
"PAMS1008": $L("Invalid Email Address"),
"PAMS9998": $L("Invalid Email Address"),
"ACCCOUNT_EXPANDED_INVALIDEMAIL": $L("Invalid Email Address"),
}
function PalmIdUtilities() {
this.trim = function (string) {
return string.replace(/^\s+|\s+$/g,"");
};
this.isValidEmail = function(emailAddress) {
// return (/^\w+([\.\-]?\w+)*@\w+([\.\-]?\w+)*(\.\w{2,3})+$/.test(emailAddress));
emailAddress = this.trim(emailAddress);
var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
return !(emailAddress.search(emailRegEx) == -1);
};
//this is currently compatible with first use.
this.getFirstName = function(fullName){
fullName = this.trim(fullName);
var splitName = fullName.split(" ");
return this.trim(splitName[0]);
};
this.getLastName = function(fullName){
fullName = this.trim(fullName);
var splitName = fullName.split(" ");
var lastName = "";
for(i = 1; i < splitName.length; i++)
lastName = lastName + " " + splitName[i];
return this.trim(lastName);
};
/* Uhmm... how do we handle middle names?
this.getFirstName = function(fullName){
var splitName = new enyo.g11n.Name(this.trim(fullName));
var result = "";
if (splitName) {
if (splitName.prefix ||splitName.givenName) {
if (splitName.prefix) {
result = splitName.prefix;
}
if (splitName.givenName) {
result = (result.length) ? (result + " " + splitName.givenName) : splitName.givenName;
}
}
}
return result;
};
this.getLastName = function(fullName) {
var splitName = new enyo.g11n.Name(this.trim(fullName));
var result = "";
if (splitName) {
if (splitName.suffix ||splitName.familyName) {
if (splitName.familyName) {
result = splitName.familyName;
}
if (splitName.suffix) {
result = (result.length) ? (result + " " + splitName.suffix) : splitName.suffix;
}
}
}
return result;
};
*/
}
@@ -0,0 +1,209 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.PasswdDialog",
kind: "ModalDialog", lazy: false,
scrim: true,
dismissWithClick: false,
modal: true,
components: [
{
kind: "PalmService",
name: "setPasswdAddress",
service: "palm://com.palm.accountservices/",
method: "changePassword",
onSuccess: "setSuccess",
onFailure: "setFailure"
},
{
kind: "PalmService",
name: "getAccountToken",
service: "palm://com.palm.accountservices/",
method: "getAccountToken",
onSuccess: "getTokenSuccess",
onFailure: "getTokenFailure"
},
{ name: "passwordResetText", content: $L("Create a new password for your webOS account."), className:"enyo-paragraph"},
{
kind: "RowGroup",
caption: $L("PASSWORD"),
components: [
{ name: "passwd", kind: "PasswordInput", onfocus: "SetKeyboard" },
],
},
{ name: "error1", content: "", className: "enyo-paragraph enyo-text-error", showing: false},
{
kind: "RowGroup",
caption: $L("VERIFY PASSWORD"),
components: [
{ name: "passwdConfirm", kind: "PasswordInput", onfocus: "SetKeyboard" },
],
},
{ name: "error2", content: "", className: "enyo-paragraph enyo-text-error", showing: false},
{kind:"HFlexBox", components:[
{ name: "button2", kind: "Button", caption: $L("Cancel"), flex:1, onclick: "cancel" },
{ name: "button1", kind: "Button", caption: $L("Update"), flex:1, onclick: "update" }
]},
{kind: "MyApps.PalmID.CommErrorDialog", name: "errorDialog"},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
SetKeyboard: function() {
enyo.keyboard.show(enyo.keyboard.show);
},
openThisDialog: function(useResetUI, loginSuccess, loginCancel) {
this.$.error1.setShowing(false);
this.$.error2.setShowing(false);
this.$.passwd.setValue("");
this.$.passwdConfirm.setValue("");
this.setShowKeyboardWhenOpening(false);
this.useResetUI = useResetUI;
if (useResetUI) {
this.setShowKeyboardWhenOpening(true);
this.loginSuccess = loginSuccess;
this.loginCancel = loginCancel;
}
this.openAtCenter();
},
prepareOpen: function() {
var r = this.inherited(arguments);
if (this.useResetUI) {
this.setCaption($L("New Password"));
this.$.button1.setCaption($L("Sign In"));
this.$.button2.setShowing(true);
this.$.passwordResetText.setContent($L("Create a new password for your webOS account."));
} else {
this.setCaption($L("Password"));
this.$.button1.setCaption($L("Update"));
this.$.button2.setShowing(true);
this.$.passwordResetText.setContent($L("Enter a new password"));
}
return r;
},
afterOpen: function() {
var r = this.inherited(arguments);
if (this.$.passwd.value.length) {
this.$.passwd.forceSelect();
} else {
this.$.passwd.forceFocus();
}
return r;
},
close: function() {
var r = this.inherited(arguments);
enyo.keyboard.hide();
enyo.keyboard.setManualMode(false);
return r;
},
update: function() {
var util = new PalmIdUtilities();
var profile = this.owner;
var passwd = util.trim(this.$.passwd.value);
this.newPassword = passwd;
var confPasswd = util.trim(this.$.passwdConfirm.value);
this.passwd = passwd;
this.$.error1.setShowing(false);
this.$.error2.setShowing(false);
if (passwd.length == 0) {
this.$.error1.setContent($L("Please enter a new password."));
this.$.error1.setShowing(true);
this.$.passwd.forceFocus();
} else if (confPasswd.length == 0) {
this.$.error2.setContent($L("Please re-enter your password."));
this.$.error2.setShowing(true);
this.$.passwdConfirm.forceFocus();
} else if (passwd != confPasswd) {
this.$.error2.setContent($L("Passwords do not match."));
this.$.error2.setShowing(true);
} else if (passwd.length < 6 || passwd.length > 20) {
this.$.error1.setContent($L("Password must be 6-20 characters."));
this.$.error1.setShowing(true);
this.$.passwd.forceSelect();
} else {
this.$.error1.setShowing(false);
this.$.error2.setShowing(false);
if (passwd!=profile.email) {
this.$.spinnerOverlay.openAtCenter();
this.$.getAccountToken.call();
} else {
this.close();
};
}
},
getTokenSuccess: function(inSender, inResponse) {
this.$.spinnerOverlay.close();
if (!this.newPassword) {
this.error("Could not change password, no new password provided");
return;
}
if (inResponse && inResponse.token) {
this.$.spinnerOverlay.openAtCenter();
this.$.setPasswdAddress.call(
{ isResetPassword: true, newPassword: this.newPassword, idToken:inResponse.token}
);
} else {
this.setFailure(inSender, {errorText: "Get Account Token failed: no token available "});
}
},
getTokenFailure: function(inSender, inResponse) {
this.$.spinnerOverlay.close();
this.setFailure(inSender, inResponse);
},
setSuccess: function() {
this.$.error1.setShowing(false);
this.$.error2.setShowing(false);
this.$.spinnerOverlay.close();
this.close();
if (this.useResetUI) {
this.loginSuccess(this.newPassword)
} else {
this.owner.password = this.newPassword;
}
},
setFailure: function(inSender, inResponse){
this.$.error1.setShowing(false);
this.$.error2.setShowing(false);
this.$.spinnerOverlay.close();
this.$.errorDialog.openAtCenter(inResponse);
},
cancel: function() {
this.$.error1.setShowing(false);
this.$.error2.setShowing(false);
this.close();
if (this.useResetUI) {
this.loginCancel()
}
},
});
@@ -0,0 +1,201 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.PasswordRecoverDialog",
kind: "ModalDialog", lazy: false,
caption: $L("Recover Password"),
scrim: true,
dismissWithClick: false,
modal: true,
components: [{
kind: "PalmService",
name: "checkSecurityQuestionAnswer",
service: "palm://com.palm.accountservices/",
method: "authenticateAccountFromSecurityQuestion",
onSuccess: "setSuccess",
onFailure: "setFailure"
}, {
kind: "PalmService",
name: "sendRecoverEmail",
service: "palm://com.palm.accountservices/",
method: "requestPasswordResetEmail",
onSuccess: "setSendRecoverEmailSuccess",
onFailure: "setSendRecoverEmailFailure"
}, {
name: "secDialogText",
className:"enyo-paragraph",
content: $L("Answer your security question to reset your password.")
}, {
name: "questionText",
content: ""
}, {
kind: "RowGroup",
caption: $L("ANSWER"),
components: [{
name: "answer",
kind: "Input",
onfocus: "SetKeyboard",
autoCapitalize: "lowercase", autocorrect: false, spellcheck: false
}, ],
}, {
name: "error",
content: "",
className: "enyo-paragraph enyo-text-error",
showing: false
}, {
kind: "Button",
caption: $L("Next"),
className: "enyo-button-dark",
onclick: "update"
}, {
kind: "Button",
caption: $L("Forgot Answer"),
onclick: "callRecoverEmail"
},
{
kind: "Button",
caption: $L("Cancel"),
onclick: "cancel"
},
{
kind: "ModalDialog", lazy: false,
name: "recoverDialog",
caption: $L("Recover Password"),
dismissWithClick: false,
modal: true,
components: [{
className: "enyo-paragraph",
name: "recoverText",
allowHtml: true,
content: ""
}, {
kind: "Button",
caption: $L("Close"),
onclick: "closeRecoverDialog"
}, ],
scrim: true,
}, {
kind: "MyApps.PalmID.CommErrorDialog",
name: "errorDialog"
},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
SetKeyboard: function() {
enyo.keyboard.show(1);
},
initAndOpen: function(challengeQuestion, email, loginSuccess, loginCancel, loginDone){
this.loginSuccess = loginSuccess;
this.loginCancel = loginCancel;
this.loginDone = loginDone;
this.email = email;
this.$.error.setShowing(false);
this.$.questionText.setContent(enyo.string.escapeHtml(challengeQuestion.question));
this.questionId = challengeQuestion.id;
this.$.answer.setValue("");
this.autoRecover = false;
this.openAtCenter();
this.$.answer.forceFocus();
},
update: function(inSender){
var util = new PalmIdUtilities();
var answer = util.trim(this.$.answer.getValue());
this.answer = answer;
if (answer.length == 0) {
this.$.answer.setValue("");
this.$.answer.forceFocus("");
} else {
this.$.spinnerOverlay.openAtCenter();
this.$.checkSecurityQuestionAnswer.call({
"email": this.email,
"questionId": this.questionId,
"response": this.$.answer.getValue()
});
}
},
setSuccess: function(inSender, inResponse){
this.$.spinnerOverlay.close();
this.close();
this.owner.$.passwdDialog.openThisDialog(true, this.loginSuccess, this.loginCancel);
},
setFailure: function(inSender, inResponse){
this.$.spinnerOverlay.close();
var errorText = (inResponse.errorText) ? inResponse.errorText : undefined;
errorText = (inResponse.errorCode) ? PALMIDUTILS_ERROR_CODES[inResponse.errorCode] : errorText;
if(inResponse.errorCode == "PAMS1101"){
console.info("Account locked, send email and finish");
this.$.error.setShowing(false);
this.callRecoverEmail();
} else if (errorText && inResponse.errorCode != "-9999"){
this.$.error.setContent(enyo.string.escapeHtml(errorText));
this.$.error.setShowing(true);
this.$.answer.forceSelect();
} else {
this.$.error.setShowing(false);
this.$.errorDialog.openAtCenter(inResponse);
}
},
callRecoverEmail: function(){
this.$.spinnerOverlay.openAtCenter();
this.$.sendRecoverEmail.call({
email: this.email
});
},
setSendRecoverEmailSuccess: function(inSender, inResponse){
this.$.spinnerOverlay.close();
this.close();
var template = new enyo.g11n.Template($L("We sent an email to #{email}. If you don't receive the email shortly check your junk email folder.<P>Follow the link in that email to reset your password.<P>If you are unable to reset your password, visit http://hpwebos.com/support for more help."));
this.$.recoverText.setContent(template.evaluate({
email: enyo.string.escapeHtml(this.email)
}));
this.$.recoverDialog.openAtCenter();
},
closeRecoverDialog: function(){
this.$.recoverDialog.close();
if (this.loginDone) {
this.loginDone();
} else {
this.loginCancel()
};
},
setSendRecoverEmailFailure: function(inSender, inResponse){
this.$.spinnerOverlay.close();
this.$.errorDialog.openAtCenter(inResponse);
},
cancel: function(){
this.close();
this.loginCancel();
}
});
@@ -0,0 +1,146 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.ProfileLoginPasswordDialog",
kind: "ModalDialog", lazy: false,
caption: $L("Enter Account Password"),
scrim: true,
dismissWithClick: false,
modal: true,
components: [
{
kind: "PalmService",
name: "validateLogin",
service: "palm://com.palm.accountservices/",
method: "isUserValid",
onSuccess: "setSuccess",
onFailure: "setFailure"
},
{ name: "passwdDialogText", content: "", className:"text-breakword"},
{ components: [{
kind: "RowGroup",
caption: $L("PASSWORD"),
components: [{ name: "passwd", kind: "PasswordInput", onfocus: "SetKeyboard" },],
}],
},
{ name: "passwdError", content: "", className: "enyo-paragraph enyo-text-error", showing: false},
{ kind: "Button", caption: $L("Sign In"), onclick: "signIn", className: "enyo-button-dark" },
{ kind: "Button", caption: $L("Forgot Password"), onclick: "forgot" },
{ kind: "Button", caption: $L("Back"), onclick: "cancel" },
{kind: "MyApps.PalmID.CommErrorDialog", name: "errorDialog"},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
SetKeyboard: function() {
enyo.keyboard.show(1);
},
openThisDialog: function(accountName, accountAggregate, loginSuccess, loginCancel, loginDone) {
this.numTries = 0;
this.loginSuccess = loginSuccess;
this.loginCancel = loginCancel;
this.loginDone = loginDone;
this.accountAggregate = accountAggregate;
this.$.passwdError.setShowing(false);
this.$.passwdDialogText.setContent(accountName);
this.$.passwd.setValue("");
this.openAtCenter();
this.$.passwd.forceFocus();
},
signIn: function() {
var util = new PalmIdUtilities();
var profile = this.owner;
var passwd = util.trim(this.$.passwd.value);
this.passwd = passwd;
if (passwd.length == 0) {
this.$.passwd.setValue("");
this.$.passwd.forceFocus();
} else {
this.$.passwdError.setShowing(false);
this.$.spinnerOverlay.openAtCenter();
this.$.validateLogin.call({email:this.owner.accountAggregate.accountInfo.email, deviceId: this.owner.deviceProfile.deviceInfo.nduId ,password: passwd});
}
},
forgot: function () {
//TODO:
//Need to get the question from the server and then call this.
this.close();
this.owner.$.recoverDialog.initAndOpen(
this.accountAggregate.acctChallengeQuestions,
this.accountAggregate.accountInfo.email,
this.loginSuccess,
this.loginCancel,
this.loginDone
);
},
cancel: function () {
this.close();
//this.loginCancel();
this.owner.backToViewCallback();
},
setSuccess: function(inSender, inResponse) {
this.numTries++;
this.$.spinnerOverlay.close();
if(inResponse.isValid){
this.close();
this.loginSuccess(this.passwd);
} else if (this.numTries >= 3) {
this.numTries = 0;
this.forgot();
} else {
if (this.passwd.length < 6 || this.passwd.length > 20) {
this.$.passwdError.setContent($L("Password must be between 6 and 20 characters."));
} else {
this.$.passwdError.setContent($L("The password you entered is incorrect. Try again."));
}
this.$.passwdError.setShowing(true);
this.$.passwd.forceFocus();
this.$.passwd.forceSelect();
}
},
setFailure: function(inSender, inResponse){
this.$.spinnerOverlay.close();
var errorText = (inResponse.errorText) ? inResponse.errorText : undefined;
errorText = (inResponse.errorCode) ? PALMIDUTILS_ERROR_CODES[inResponse.errorCode] : errorText;
if (errorText && inResponse.errorCode != "-9999"){
this.$.passwdError.setContent(enyo.string.escapeHtml(errorText));
this.$.passwdError.setShowing(true);
} else {
this.$.passwdError.setShowing(false);
this.$.errorDialog.openAtCenter(inResponse);
}
},
});
@@ -0,0 +1,379 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.Profile",
kind: enyo.VFlexBox,
className:"enyo-bg",
components: [
/*
{
kind: "PalmService",
name: "setApplication",
service: "palm://com.palm.service.accounts/",
method: "setApplication",
onSuccess: "setApplicationSuccess",
onFailure: "SetApplicationFailure"
},
*/
{
kind: "PalmService",
name: "resendVerificationEmail",
service: "palm://com.palm.accountservices/",
method: "requestResendVerificationEmail",
onSuccess: "resendEmailSuccess",
onFailure: "resendEmailFailure"
},
{name: "modifyAccount", kind: "PalmService", service: enyo.palmServices.accounts, method: "modifyAccount"},
{kind:"Toolbar", className:"enyo-toolbar-light accounts-header", pack:"center", components: [
{kind: "Image", src: "images/acounts-48x48.png"},
{kind: "Control", content: $L("HP webOS Account")}
]},
{className:"accounts-header-shadow"},
{
name: "profileContent",
kind: enyo.Scroller,
flex: 1,
components: [
{kind:"Control", className:"box-center", components: [
{
name: "nameInfo",
kind: "RowGroup",
className:"accounts-group",
caption: $L("NAME"),
components: [
],
owner: this.owner
},
{
name:"resendVerification", kind: "Button", style:"display: none", className:"accounts-btn", caption: $L("Resend Verification Email"), onclick: "resendVerification"
},
{
name: "loginInfo",
kind: "RowGroup",
className:"accounts-group",
caption: $L("LOGIN INFORMATION"),
components: [
],
owner: this.owner
},
{
name: "deviceList",
kind: "RowGroup",
className:"accounts-group",
caption: $L("DEVICES"),
components: [
],
owner: this.owner
},
{
name: "appList",
kind: "RowGroup",
className:"accounts-group",
caption: $L("USE ACCOUNT WITH"),
components: [
],
owner: this.owner
},
{
name: "nameDialog",
kind: "MyApps.PalmID.NameDialog",
owner: this.owner
},
{
name: "secDialog",
kind: "MyApps.PalmID.SecDialog",
owner: this.owner
},
{
name: "secAnswerDialog",
kind: "MyApps.PalmID.SecAnswerDialog",
owner: this.owner
},
{
name: "emailDialog",
kind: "MyApps.PalmID.EmailDialog",
owner: this.owner
},
{
name: "passwdDialog",
kind: "MyApps.PalmID.PasswdDialog",
owner: this.owner
},
{
name: "deviceInfo",
kind: "MyApps.PalmID.DeviceInfoDialog",
owner: this.owner
},
]},
]
},
{className:"accounts-footer-shadow"},
{kind:"Toolbar", className:"enyo-toolbar-light", components:[
{
kind: "Button",
name: "doneButton",
className:"accounts-toolbar-btn",
onclick: "done",
caption : $L("Back")
}
]},
{ kind: "ModalDialog", lazy: false, name: "verifyEmailDialog", caption: $L("Email Sent"),
dismissWithClick: false,
modal: true,
components: [
{ name: "verifyText", className: "enyo-paragraph text-breakword", content: "dummy" },
{ kind: "Button", caption: $L("Done"), onclick: "closeVerifyEmailDialog"},
],
scrim: true,
},
{kind: "MyApps.PalmID.CommErrorDialog", name: "errorDialog"},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
populateName: function(accountInfo)
{
var fullName = accountInfo.firstName + " " + accountInfo.lastName;
if (this.userName != fullName) {
var name = fullName;
this.userName = name;
this.firstName = accountInfo.firstName;
this.lastName = accountInfo.lastName;
if (accountInfo.password) {
this.password = accountInfo.password;
}
this.$.nameInfo.destroyControls();
this.$.nameInfo.createComponent({
name: "nameItem",
kind: "MyApps.PalmID.SimpleItem",
components: [{
content: enyo.string.escapeHtml(name),
className: "enyo-text-ellipsis",
flex: 1,
owner: this,
onclick: "changeName"
}]
});
this.render();
}
},
populateLoginInfo: function(details)
{
this.$.loginInfo.destroyControls();
this.email = details.accountInfo.email;
this.details = details;
this.$.resendVerification.applyStyle("display",
(details.accountInfo.accountState=='A' || details.accountInfo.accountState=='C') ? "block" : "none");
var desc = { name: "emailDesc", content: $L("Email"), style:"padding-right:30px"};
var label = { name: "emailLabel", content: enyo.string.escapeHtml(details.accountInfo.email), flex: 1, className:"enyo-text-ellipsis", style:"text-align:right" };
this.$.loginInfo.createComponent({ name: "emailItem", kind: "MyApps.PalmID.SimpleItem", components: [ desc, label ], onclick: "changeEmail", owner: this });
desc = { name: "passDesc", content: $L("Password"), style:"padding-right:30px" };
label = { name: "passLabel", content: "**************", flex: 1, className:"enyo-text-ellipsis", style:"text-align:right"};
handler = this.changePassword;
this.$.loginInfo.createComponent({ name: "passItem", kind: "MyApps.PalmID.SimpleItem", components: [ desc, label ], onclick: "changePassword", owner: this });
desc = { name: "secDesc", content: $L("Security Question"), style:"padding-right:30px" };
label = { name: "secLabel", content: enyo.string.escapeHtml(this.details.acctChallengeQuestions.question), flex: 1, className:"enyo-text-ellipsis", style:"text-align:right"};
this.$.loginInfo.createComponent({ name: "secItem", kind: "MyApps.PalmID.SimpleItem", components: [ desc, label ], onclick: "changeSecQtn", owner: this });
this.render();
/*
desc = { name: "secAnswerDesc", content: $L("Answer"), flex: 1 };
label = { name: "secAnswerLabel", content: enyo.string.escapeHtml("**************")}; // can't get it as plain text although the UI spec had it like that
this.$.loginInfo.createComponent({ name: "secAnswerItem", kind: "MyApps.PalmID.SimpleItem", components: [ desc, label ], onclick: "changeSecAnswer", owner: this });
this.render();
*/
},
changeName: function()
{
this.$.nameDialog.openThisDialog(
{firstName: this.firstName,
lastName: this.lastName,
email: this.email,
country : this.details.accountInfo.country,
language: this.details.accountInfo.language}, this.password);
},
changeEmail: function()
{
this.$.emailDialog.openThisDialog({
defaultEmail: this.email,
sentCallback: enyo.bind(this, function(){
this.details.accountInfo.accountState = 'A';
//this.$.resendVerification.applyStyle("display", "block");
})
});
},
changePassword: function()
{
this.$.passwdDialog.openThisDialog(false);
},
changeSecQtn: function()
{
this.$.secDialog.initAndOpen(this.details.challengeQuestions, this.details.acctChallengeQuestions, this.details.securityQuestionSelectedAnswer);
},
changeSecAnswer: function()
{
this.$.secAnswerDialog.initAndOpen(this.details.acctChallengeQuestions, this.details.securityQuestionSelectedAnswer);
},
showDeviceInfo: function(inSender, inResponse, rowIndex)
{
this.gotDevice(this.deviceList[inSender.value]);
},
gotDevice: function(device)
{
this.$.deviceInfo.setDevice({device: device, thisDevice: (this.owner.$.accounts.deviceProfile.deviceInfo.deviceNduid == device.nduId)});
this.$.deviceInfo.openAtCenter();
},
populateDeviceList: function(deviceList)
{
deviceList = (deviceList.length) ? deviceList : [deviceList];
this.$.deviceList.destroyControls();
this.deviceList = deviceList;
for(var i = 0; i < deviceList.length; ++i)
{
this.$.deviceList.createComponent({
name: "deviceItem_"+ i, kind: "MyApps.PalmID.SimpleItem",
components: [ {content: enyo.string.escapeHtml(deviceList[i].deviceType), style:"padding-right:30px" },
{content: enyo.string.escapeHtml(deviceList[i].deviceName), flex: 1, className:"enyo-text-ellipsis", style:"text-align:right"}
],
onclick: "showDeviceInfo",
value: i,
owner: this
});
}
this.$.deviceList.render();
},
generateItemForAppList: function(capability, appIndex, onChange)
{
var capName = capability.capability;
if (capability.loc_name) {
capName = capability.loc_name;
}
if (capability.state == undefined) {
capability.state = (capability._id ? true : false);
}
var item = {
kind: "MyApps.PalmID.SimpleItem",
components: [
{ content: enyo.string.escapeHtml(AccountsUtil.getCapabilityText(capability.capability)), flex: 1},
//{ name: "app_" + appIndex, kind: "ToggleButton", state: capability.state, onChange: onChange, value: appIndex, disabled: capability.alwaysOn}
{ name: "app_" + appIndex, kind: "ToggleButton", state: capability.state, onChange: onChange, value: appIndex, disabled: true}
],
owner: this,
};
return item;
},
populateAppList: function(capabilities)
{
this.$.appList.destroyControls();
this.capabilities = capabilities;
for (var i = 0; i < capabilities.length; i++) {
this.$.appList.createComponent(this.generateItemForAppList(capabilities[i], i, "setAppState"));
};
this.render();
},
setAppState: function(inSender, inState) {
var param = {
"accountId": this.owner.palmProfileAccount._id,
"object": {}
}
this.capabilities[inSender.getName().split("_")[1] - 0].state = inState; //HACK: russ.
// See which capabilities are enabled
var enabledCapabilities = [];
for (var i = 0, l = this.capabilities.length; i < l; i++) {
if (this.capabilities[i].state)
enabledCapabilities.push({"id":this.capabilities[i].id});
}
param.object.capabilityProviders = enabledCapabilities;
this.$.modifyAccount.call(param);
},
setApplicationSuccess: function() {
},
setAppFailure: function(inSender, inResponse) {
this.$.errorDialog.openAtCenter(inResponse);
},
closeAppDialog: function() {
this.$.errorAppDialog.close();
},
resendVerification: function() {
this.$.spinnerOverlay.openAtCenter();
this.$.resendVerificationEmail.call({});
},
resendEmailSuccess: function() {
this.$.spinnerOverlay.close();
var template = new enyo.g11n.Template($L("A verification email was sent to #{email}."));
this.$.verifyText.setContent(template.evaluate({email: enyo.string.escapeHtml(this.email)}));
this.$.verifyEmailDialog.openAtCenter();
},
resendEmailFailure: function(inSender, inResponse) {
this.$.spinnerOverlay.close();
this.$.errorDialog.openAtCenter(inResponse);
},
closeVerifyEmailDialog: function() {
this.$.verifyEmailDialog.close();
},
create: function()
{
this.inherited(arguments);
},
done: function()
{
this.owner.backToViewCallback();
}
});
enyo.kind({
name: "MyApps.PalmID.SimpleItem",
kind: enyo.Item,
align: "center",
tapHighlight: false,
layoutKind: "HFlexLayout",
components: [
]
});
@@ -0,0 +1,103 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.SecAnswerDialog",
kind: "ModalDialog", lazy: false,
caption: $L("Answer"),
scrim: true,
dismissWithClick: false,
modal: true,
components: [
{
kind: "PalmService",
name: "setSecurityQuestion",
service: "palm://com.palm.accountservices/",
method: "updateChallengeQuestion",
onSuccess: "setSuccess",
onFailure: "setFailure"
},
{ name: "secDialogText"},
{
kind: "RowGroup",
caption: $L("ANSWER"),
components: [
{ name: "answer", kind: "Input" },
],
},
{ name: "error", style:"display: none;", className:"enyo-paragraph enyo-text-error"},
{kind:"HFlexBox", components:[
{ kind: "Button", caption: $L("Cancel"), flex:1, onclick: "close" },
{ kind: "Button", caption: $L("Update"), flex:1, onclick: "update" }
]},
{kind: "MyApps.PalmID.CommErrorDialog", name: "errorDialog"},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
initAndOpen: function(acctChallengeQuestions, answer) {
this.acctChallengeQuestions = acctChallengeQuestions;
this.$.error.applyStyle("display", "none");
this.$.secDialogText.setContent($L("Choose a new answer to your security question:\n") + enyo.string.escapeHtml(this.acctChallengeQuestions.question));
//this.$.answer.setValue(answer); -- currently we can't show the existing answer.
this.openAtCenter();
this.$.answer.forceFocus();
},
update: function(inSender) {
var util = new PalmIdUtilities();
var question = this.acctChallengeQuestions.question;
var answer = util.trim(this.$.answer.getValue());
this.answer = answer;
if (answer.length == 0) {
this.$.error.setContent($L("Please enter an answer."));
this.$.error.applyStyle("display", "block");
this.$.answer.forceFocus();
} else {
this.$.spinnerOverlay.openAtCenter();
this.$.setSecurityQuestion.call(
{"challengeQuestionId": this.acctChallengeQuestions.id, "challengeQuestionAns": this.$.answer.getValue()}
);
}
},
setSuccess: function() {
this.$.spinnerOverlay.close();
this.close();
},
setFailure: function(inSender, inResponse){
this.$.spinnerOverlay.close();
this.$.errorDialog.openAtCenter(inResponse);
},
listChange : function(inSender) {
this.$.answer.setValue("");
this.$.answer.forceFocus();
this.$.error.applyStyle("display", "none");
},
});
@@ -0,0 +1,172 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.SecDialog",
kind: "ModalDialog", lazy: false,
caption: $L("Security Question"),
showKeyboardWhenOpening: true,
components: [{
kind: "PalmService",
name: "setSecurityQuestion",
service: "palm://com.palm.accountservices/",
method: "updateChallengeQuestion",
onSuccess: "setSuccess",
onFailure: "setFailure"
}, {
className: "enyo-paragraph",
content: $L("Choose a new security question")
}, {
kind: "RowGroup",
caption: $L("SECURITY QUESTION"),
components: [{
name: "securityQuestionsSelect",
id: "securityQuestionsSelect",
kind: "ListSelector",
className:"accountsListSelector",
items: [],
onChange: "listChange",
}, ],
}, {
kind: "RowGroup",
caption: $L("ANSWER"),
components: [{
name: "answer",
kind: "Input",
autoCapitalize: "lowercase", autocorrect: false, spellcheck: false
}, ],
}, {
name: "error",
content: "",
className:"enyo-paragraph enyo-text-error"
},
{kind: "HFlexBox", components:[
{kind: "Button", caption: $L("Cancel"), flex:1, onclick: "closeIt"},
{kind: "Button", caption: $L("Update"), flex:1, onclick: "update"}
]},
{
kind: "MyApps.PalmID.CommErrorDialog",
name: "errorDialog"
},
{kind: "MyApps.PalmID.SpinnerOverlayPopup", name: "spinnerOverlay"},
],
initAndOpenAnswerChange: function(questionList, selectedItem, answer){
this.initAndOpen(questionList, selectedItem, answer, true)
},
initAndOpen: function(questionList, acctChallengeQuestions){
this.questionList = questionList;
this.acctChallengeQuestions = acctChallengeQuestions;
this.openAtCenter();
},
prepareOpen: function() {
var r = this.inherited(arguments);
this.$.error.setContent(" ");
this.$.securityQuestionsSelect.setItems([]);
var newItems = [];
for (var i = 0; i < this.questionList.length; i++) {
newItems[i] = {
caption: this.questionList[i].question,
value: this.questionList[i].id
};
}
this.$.securityQuestionsSelect.setItems(newItems);
return r;
},
afterOpen: function() {
var r = this.inherited(arguments);
this.initialID = this.acctChallengeQuestions.id;
this.$.securityQuestionsSelect.setValue(this.acctChallengeQuestions.id);
enyo.keyboard.show(enyo.keyboard.typeText);
//we can't get the answer to show. Differ's from spec.
//this.$.answer.setValue(answer);
this.$.answer.setValue("");
this.$.answer.forceFocus();
enyo.keyboard.setManualMode(false);
return r;
},
closeIt: function(inSender) {
this.$.securityQuestionsSelect.setValue(this.initialID);
this.close();
},
update: function(inSender){
var util = new PalmIdUtilities();
this.questionId = this.$.securityQuestionsSelect.getValue();
this.answer = util.trim(this.$.answer.getValue());
if (this.answer.length == 0) {
this.$.error.setContent($L("Please enter an answer."));
this.$.error.applyStyle("display", "block");
this.$.answer.forceFocus();
} else if (this.answer.length >= 50) {
this.$.error.setContent($L("Answer must be < 50 characters."));
this.$.error.applyStyle("display", "block");
this.$.answer.forceFocus();
} else {
this.$.error.setContent(" ");
this.$.spinnerOverlay.openAtCenter();
this.$.setSecurityQuestion.call({
"challengeQuestionId": this.questionId,
"challengeQuestionAns": this.$.answer.getValue()
});
}
},
setSuccess: function(inSender, inResponse){
this.$.spinnerOverlay.close();
var profile = this.owner;
var questionText = "";
var selId = 0;
for (var i = 0; i < this.questionList.length; i++) {
if (this.questionList[i].id == this.questionId) {
questionText = this.questionList[i].question;
selId = this.questionList[i].id;
break;
}
}
//should use a callback to set this
profile.$.secLabel.setContent(enyo.string.escapeHtml(questionText));
profile.details.acctChallengeQuestions.id = selId;
profile.details.acctChallengeQuestions.question = questionText;
this.close();
},
setFailure: function(inSender, inResponse){
this.$.spinnerOverlay.close();
this.$.errorDialog.openAtCenter(inResponse);
},
listChange: function(inSender){
this.$.answer.setValue("");
this.$.answer.forceFocus();
this.$.error.applyStyle("display", "none");
},
});
@@ -0,0 +1,45 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name: "MyApps.PalmID.SpinnerOverlayPopup",
kind: "HFlexBox",
pack: 'justify',
showing: false,
components: [
{kind: "Scrim", layoutKind: "VFlexLayout", align: "center", pack: "center",
components: [
{name: "spinner", kind: "SpinnerLarge"}
]
},
],
openAtCenter: function() {
this.$.spinner.show();
this.$.scrim.show();
this.show();
},
close: function() {
this.$.scrim.hide();
this.$.spinner.hide();
this.hide();
},
})
+36
View File
@@ -0,0 +1,36 @@
# Copyright and License Information
All content, including all source code files and documentation files in this repository except otherwise noted are:
Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
All content, including all source code files and documentation files in this repository except otherwise noted are:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this content except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Quick Info
----------
Calculator Application for webOS. It was built using Enyo 1.0.
Core
-------
index.html - This is the main html file which creates the main JS object for the App.
source / - App Source Code folder. It contains the following sub-folders
css/ - This folder contains the CSS stylesheets used by APP UI.
images/ - This folder contains all the UI images.
appinfo.json - App description file.
depends.js - Required by Enyo 1.0. This file contains the list of all Javascript and CSS files that are used by the App.
-16
View File
@@ -1,16 +0,0 @@
A simple desktop calculator.
* index.html is the enyo app.
* tests/SpecRunner.html is a Jasmine unit test runner.
Issues:
* Should we repeat unary operations with =?
e.g., 6561 sqrt = = ==> 3 or just 81
Mac and Mojo and current code give 81. iPhone gives 3.
ToDo:
* multiple layouts for different screen sizes/orientations
* preferences
* scientific notation
* thousands separators
* other operators (e.g., as a common scientific or "advanced" calculator)
+5
View File
@@ -0,0 +1,5 @@
source "http://rubygems.org"
gem "eris"
gem "jasmine"
gem "rake"
+52
View File
@@ -0,0 +1,52 @@
GEM
remote: http://rubygems.org/
specs:
childprocess (0.2.0)
ffi (~> 1.0.6)
curb (0.7.15)
diff-lcs (1.1.2)
eris (0.0.10)
curb
erubis
json
rack
sinatra
thor
erubis (2.7.0)
ffi (1.0.9)
jasmine (1.0.2.1)
json_pure (>= 1.4.3)
rack (>= 1.1)
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
json (1.5.3)
json_pure (1.5.3)
rack (1.3.2)
rake (0.9.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rubyzip (0.9.4)
selenium-webdriver (2.2.0)
childprocess (>= 0.1.9)
ffi (>= 1.0.7)
json_pure
rubyzip
sinatra (1.2.6)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
thor (0.14.6)
tilt (1.3.2)
PLATFORMS
ruby
DEPENDENCIES
eris
jasmine
rake
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+1
View File
@@ -0,0 +1 @@
DateJS 1.0 Alpha-1 by Coolite Inc. is licensed under the MIT License.
+43
View File
@@ -0,0 +1,43 @@
# Copyright and License Information
All content, including all source code files and documentation files in this repository unless otherwise noted are:
Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
All content, including all source code files and documentation files in this repository unless otherwise noted are:
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this content except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Quick Info
-----------
Calendar Application for webOS. It was built using Enyo 1.0.
Core
-------
This repository contains Calendar Application for webOS.
index.html - This is the main html file which creates the main JS object for the App.
app / - App Source Code folder. It contains all the JS files.
css/ - This folder contains the CSS stylesheets used by APP UI.
images/ - This folder contains all the UI images.
appinfo.json - App description file.
depends.js - Required by Enyo 1.0. This file contains the list of all Javascript and CSS files that are used by the App.
mock/ - This folder contains the db8 service responses. This mock data is used by the App when it's running on the browser. Please note that the launch=nobridge parameter
has to be set in the index.html in order to use the mock responses.
configuration/ - This folder contains webOS db8 (MojoDB) schema definitions and DB permissions.
+33
View File
@@ -0,0 +1,33 @@
require 'jasmine'
namespace :jasmine do
task :server do
require 'jasmine'
require 'eris/lib/jasmine_config_overrides'
puts "your tests are here:"
puts " http://localhost:8888/"
Jasmine::Config.new.start_server
end
desc "Run continuous integration tests"
task :ci do
require 'jasmine'
require 'eris/lib/jasmine_config_overrides'
require "rspec"
require "rspec/core/rake_task"
require 'eris'
ENV['JASMINE_BROWSER'] = 'chrome'
RSpec::Core::RakeTask.new(:jasmine_continuous_integration_runner) do |t|
t.rspec_opts = ["--color", "--format", "progress"]
t.verbose = true
t.pattern = ["#{Eris::FILE_PATH}/eris/lib/jasmine_rspec_runner.rb"]
end
Rake::Task["jasmine_continuous_integration_runner"].invoke
end
end
desc "Run specs with local config"
task :jasmine => ['jasmine:server']
+509
View File
@@ -0,0 +1,509 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: calendar.App is the Calendar app's controller.
**/
enyo.kind({
name : "calendar.App",
kind : enyo.Component,
published : {
createEvent : null, // Object : For watching create event requests.
currentDate : null, // Date : For watching when the current date changes.
firstLaunchDone: undefined, // Boolean : For watching when First Launch is done.
is24Hr : undefined, // Boolean : Undefined when not yet shared.
tzId : undefined // String : Undefined when not yet shared.
},
components: [
{kind : "ApplicationEvents",
// onApplicationRelaunch: "applicationRelaunchHandler". // Called by tapping on Calendar's Launcher icon while the app's carded or hidden via keep-alive.
onUnload : "unloadHandler",
onWindowActivated : "windowActivatedHandler",
onWindowDeactivated : "windowDeactivatedHandler",
onWindowParamsChange: "windowParamsChangeHandler"
},
{kind: enyo.SystemService, components: [
{name: "getSystemPrefs", method: "getPreferences", subscribe: true, onSuccess: "gotSystemPrefs", onFailure: "gotSystemPrefsFailure"},
{name: "getSystemTime", method: "time/getSystemTime", subscribe: true, onSuccess: "gotSystemTime", onFailure: "gotSystemTimeFailure"}
]},
{name: "checkFirstLaunch", kind: "Accounts.checkFirstLaunch", onCheckFirstLaunchResult: "checkFirstLaunchResult"},
{name: "appIcon", kind: "calendar.AppIcon"},
// NOTE: Load order is important here. We may want to modify this so that components load their respective dependencies.
{kind: "DatabaseManager"},
{kind: "CalendarsManager"},
{kind: "calendar.PrefsManager"},
{kind: "LunaAppManager"},
{kind: "calendar.CacheManager"},
{kind: "ReminderManager"}
],
constructor: function App() {
this.inherited(arguments);
DataHub.enhance(enyo.application);
},
create: function create() {
var enyoApp = enyo.application,
a = this.$;
this.timeMachine = new Date(); // For calculating date/times without creating new Date instances.
// Initialize external dependencies before beginning create flow.
this.loadLibraries();
!window.PalmSystem && MOCK.initialize({override: true}); // NOTE: Must initialize mock before creating CalendarsManager, DatabaseManager, and EventManager because it overrides their prototypes for the browser environment
// NOTE: We want to be first in line for these watches.
enyoApp.watch({createEvent: this}, {name: "App"});
enyoApp.watch({currentDate: this}, {wait: true}); // Watch currentDate synchronously so that the currentDate object on enyo.application is updated immediately
// Continue creating...
this.inherited(arguments);
// Set up utility functions / objects
enyoApp.shareCurrentDate = enyo.bind(this, this.shareCurrentDate);
enyoApp.showCalendarView = enyo.bind(this, this.showCalendarView);
enyoApp.fmts = new enyo.g11n.Fmts(); // Cached for getting format info.
// Make initial service requests
a.getSystemPrefs.call({keys: ["timeFormat"]});
a.getSystemTime.call();
// Start the clock
this.watchClock(true);
// Check to see if we need to show First Launch view.
this.$.checkFirstLaunch.shouldFirstLaunchBeShown("com.palm.app.calendar");
},
destroy: function destroy() {
var a = this.$,
enyoApp = enyo.application;
// Stop the clock
this.watchClock(false);
// Cancel service requests
a && a.getSystemPrefs && a.getSystemPrefs.cancel();
a && a.getSystemTime && a.getSystemTime.cancel();
// Disable keepAlive and close the app window (if it isn't already)
var appWindow = enyo.windows.fetchWindow("Calendar");
if (appWindow) {
appWindow.PalmSystem && appWindow.PalmSystem.keepAlive(false);
appWindow.close();
}
// Save preferences.
enyoApp.prefsManager.savePrefs(enyoApp.prefsManager.prefs);
// Continue destroying.
this.inherited(arguments);
// Stop watching.
enyoApp.ignore({createEvent: this, currentDate: this, firstLaunchDone: this});
// If a view exists, destroy it.
enyoApp.view && enyoApp.view.destroy();
// Cleanup references.
delete enyoApp.fmts;
delete enyoApp.shareCurrentDate;
delete enyoApp.app;
enyoApp.clearHub();
},
// BEGIN :-------: Framework Handlers :-----------------------------------------------------------------------------------------------------------------------//
applicationRelaunchHandler: function applicationRelaunchHandler() { // TODO: Re-enable now that enyo.ApplicationEvents supports this.
DEBUG && this.log("======= RELAUNCHED\t");
this.handleLaunchParams(enyo.windowParams);
},
unloadHandler: function unloadHandler() {
DEBUG && this.log("======= UNLOADING\t");
this.destroy();
},
windowActivatedHandler: function windowActivatedHandler() {
DEBUG && this.log("======= ACTIVATED\t");
},
windowDeactivatedHandler: function windowDeactivatedHandler() {
DEBUG && this.log("======= DEACTIVATED\t");
},
windowParamsChangeHandler: function windowParamsChangeHandler() {
DEBUG && this.log("======= PARAMS CHANGED\t");
this.handleLaunchParams(enyo.windowParams);
},
windowReactivatedHandler: function windowReactivatedHandler() { // enyo.ApplicationEvents doesn't call this...
DEBUG && this.log("======= REACTIVATED\t");
this.handleLaunchParams(enyo.windowParams);
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
createEventChanged: function createEventChanged(lastCreatedEvent) {
/* Handles "createEvent" requests:
{ createEvent:
{ event : Object - Partial or complete CalendarEvent object
, keepTime : Boolean - Whether to keep the event's specified time as is.
, then : Function - Function to send created event to.
}
}
*/
DEBUG && this.log("\tcreateEvent: ", this.createEvent, "\t");
var enyoApp = enyo.application,
calMgr = enyoApp.calendarsManager,
prefsMgr = enyoApp.prefsManager,
prefs = prefsMgr && prefsMgr.getPrefs(),
event = this.createEvent && this.createEvent.event,
keepTime = !!(this.createEvent && this.createEvent.keepTime),
accountId,
calendar,
alarm = event.alarm,
color = event.color,
start = event && parseInt(event.dtstart, 10),
end = event && parseInt(event.dtend, 10),
eventDate = this.timeMachine;
event = new CalendarEvent(event);
isNaN(start) && (event.dtstart = start = Date.now());
eventDate.setTime(start);
if (!keepTime) {
var hour = eventDate.getHours(), // Keep the event's start hour.
minute = Math.ceil(eventDate.getMinutes() / 15) * 15; // Calculate the closest 15 minute interval after the current time.
eventDate.clearTime(); // Set the event's start time to midnight.
eventDate.setHours(hour); // Set the event's start hour.
eventDate.setMinutes(minute); // Set the event's start minute. NOTE: DateJS' set ({minute:minute}) disallows minute=60.
event.dtstart = start = +eventDate; // Create event's dtstart timestamp.
}
if (!("calendarId" in event)) {
event.calendarId = prefsMgr.getDefaultCalendar();
}
if (!("accountId" in event)) {
calendar = calMgr.getCal(event.calendarId);
accountId = (calendar && calendar.accountId);
(accountId != null) && (event.accountId = accountId);
}
event.color = color == null // If the event had no color:
? ((calendar && calendar.color) || calMgr.getCalColor(event.calendarId) || "blue") // Use its calendar color or default to blue.
: color; // Otherwise reset its color since new CalendarEvent() strips it.
if (isNaN(event.dtend)) {
var duration = (prefs && prefs.defaultEventDuration && (prefs.defaultEventDuration * 6e4)) || 36e5 // Default to 1 hr. 6e4=60000ms=1minute, 36e5=3600000ms=1hour
event.dtend = start + duration;
}
if (!alarm) {
if (prefs) {
alarm = event.allDay ? prefs.defaultAllDayEventReminder : prefs.defaultEventReminder;
} else {
alarm = event.allDay ? "-P1D" : "-PT15M";
}
Utilities.setAlarm(event.alarm[0], alarm);
}
DEBUG && this.log("\tevent:", event, "\t");
var then = this.createEvent && this.createEvent.then;
enyo.isFunction(then) // If a then function was provided
&& setTimeout(enyo.bind(this, then, event), 15.625); // use it to return the newly created CalendarEvent asynchronously.
this.createEvent = null; // Clear the current "createEvent" request so its info won't be accidentally reused.
},
currentDateChanged: function currentDateChanged(oldDate) {
var enyoApp = enyo.application,
currentDate = enyoApp.currentDate;
!currentDate && (currentDate = new Date()); //use new Date, because we're setting the value into enyoApp.currentDate
this.currentDate && currentDate.setTime(+this.currentDate);
enyoApp.currentDate = currentDate.clearTime();
},
firstLaunchDoneChanged: function firstLaunchDoneChanged(oldFirstLaunchDone) {
var firstLaunchDone = !!this.firstLaunchDone;
if (firstLaunchDone) {
enyo.application.ignore({firstLaunchDone: this}); // Stop watching for First Launch to be done.
// Share the new firstLaunch state.
enyo.application.share({firstLaunch: false}, {keep: true});
this.$.checkFirstLaunch.firstLaunchHasBeenShown();
}
},
is24HrChanged: function is24HrChanged(oldIs24Hr) {
var is24Hr = !!this.is24Hr;
if (oldIs24Hr !== undefined && is24Hr == oldIs24Hr) { // 24Hr mode was previously defined and still has the same value:
return; // So do nothing.
}
var enyoApp = enyo.application;
enyoApp.fmts = new enyo.g11n.Fmts(); // Rebuild the formats object since 24Hr format changed.
enyoApp.share({is24Hr: is24Hr}, {keep: true}); // Share the 24Hr mode.
},
tzIdChanged: function tzIdChanged(oldTzId) {
var tzId = this.tzId;
if (oldTzId !== undefined && tzId == oldTzId) { // tzId was previously defined and still has the same value:
return; // So do nothing.
}
var enyoApp = enyo.application;
// We need to notify everyone that the timezone changed both by re-issuing the clock and by sharing the new timezone itself.
var time = {
tzId : tzId,
clock: new Date()
}
if (oldTzId || !enyoApp.currentDate) { // If we just changed from a previous timezone we use the "concept date" as currentDate. If no currentDate exists, share a new currentDate.
time.currentDate = new Date(enyoApp.currentDate ? enyoApp.cacheManager.eventManager.utils.timezoneManager.convertTime(+enyoApp.currentDate, tzId, oldTzId) : Date.now());
}
enyoApp.share(time, {keep: true});
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
checkFirstLaunchResult: function checkFirstLaunchResult(inSender, inResponse) {
var showFirstLaunch = !!(inResponse && inResponse.showFirstLaunch);
showFirstLaunch && enyo.application.watch({firstLaunchDone: this}, {wait: true}); // If we're going to show First Launch, watch for when it is done.
// Share the result so that when the window is ready it will receive it and launch the appropriate view synchronously (perf).
enyo.application.share({firstLaunch: showFirstLaunch}, {keep: true});
},
gotSystemPrefs: function gotSystemPrefs(from, response) {
/* System preferences (timeFormat) service success response handler.
*/
DEBUG && this.log("---:---: Got time format?", response.timeFormat);
this.setIs24Hr(response && response.timeFormat === "HH24");
},
gotSystemPrefsFailure: function gotSystemPrefsFailure(from, response) {
/* System preferences (timeFormat) service failure response handler.
*/
this.error("---:---: Failed to retrieve system time format.\n\t", response);
},
gotSystemTime: function gotSystemTime(from, response) {
/* System time service success response handler.
*/
var tzId = response.timezone;
DEBUG && this.log("---:---: Got system time? ", tzId);
this.tzId != tzId ? this.setTzId(tzId) : this.watchClock(true);
},
gotSystemTimeFailure: function gotSystemTimeFailure(from, response) {
/* System time service failure response handler.
NOTE: enyo Mock service supplies mock data when "returnValue: true" isn't specified and merged into the returned results. bug?
*/
this.error("---:---: Failed to retrieve system time.\n\t", response);
},
handleLaunchParams: function handleLaunchParams(params) {
DEBUG && this.log("\tparams: ", params, "\t");
if (params.launchedAtBoot) {
DEBUG && this.log("========= LAUNCHED AT BOOT");
return;
}
if (params.dayChange) {
DEBUG && this.log("========= LAUNCHED DAY CHANGE");
this.$.appIcon.handleLaunchParams(params);
return;
}
// THIS CHUNK OF CODE IS FOR TESTING REMINDER LAUNCH PARAMS
// if(!enyo.application.launchCount){
// console.info("========= SETTING windowParams.alarm");
// enyo.windowParams.alarm = [
// {"_kind": "com.palm.service.calendar.reminders:1", "_id": "FAKEREMINDER1", "eventId": "2+801", "subject": "Reminder 1", "location": "somewhere", "isAllDay": false, "attendees":[], "emailAccountId": "", "startTime": 1271714400000, "endTime": 1271718000000, "alarmTime": 1271714100000, "autoCloseTime": 1271718000000, "isRepeating": false},
// {"_kind": "com.palm.service.calendar.reminders:1", "_id": "FAKEREMINDER2", "eventId": "2+802", "subject": "Reminder 2", "location": "somewhere", "isAllDay": false,
// "emailAccountId": "", "startTime": 1271714400000, "endTime": 1271718000000, "alarmTime": 1271714100000, "autoCloseTime": 1271718000000, "isRepeating": false, attendees: [{commonName: "Dana Sculley (FBI)", email:"dana.sculley@fbi.gov", role: "REQ-PARTICIPANT", organizer: true}, {commonName: "Fox Mulder (FBI)", role: "REQ-PARTICIPANT", email:"fox.mulder@fbi.gov"}]},
// {"_kind": "com.palm.service.calendar.reminders:1", "_id": "FAKEREMINDER3", "eventId": "2+803", "subject": "Reminder 3", "location": "somewhere", "isAllDay": false, "attendees":[], "emailAccountId": "", "startTime": 1271714400000, "endTime": 1271718000000, "alarmTime": 1271714100000, "autoCloseTime": 1271718000000, "isRepeating": false}
// ];
// enyo.application.launchCount = 1;
// }
if (params.alarm || params.alarmClose || params.alarmDeleted || params.alarmUpdated) {
DEBUG && this.log("========= LAUNCHED REMINDER");
enyo.application.reminderManager.handleLaunchParams(params);
}
else {
// TODO: Going from no Calendar processes directly to launching a window means we initiate showing the view before we've gotten prefs. Thus we only get defaults. We need to defer until after we've gotten prefs.
this.showCalendarView(params);
DEBUG && this.log("======= LAUNCHING APP GUI...");
enyo.windows.activate("app/calendar.html", "Calendar", params); // Activate/open the Calendar GUI window.
}
// else if(params.makeABunchOfEvents){
// this.db.makeABunchOfEvents(params.makeABunchOfEvents);
// }
// else if (params.launchType == "passwordInvalid") {
// this.showPasswordNotification(params);
// }
// else{
// if(app.exists){
// if (params && params.reminders) {
// //show reminders list
// }
//
// if(params && params.launchType == "editPassword"){
// this.controller.closeStage("PasswordChangedNotification");
// stageController.pushScene ("prefs");
// stageController.pushScene ("accountlogin", params.accountId, params.login, null, null, "", null);
// }
// }
// }
},
loadLibraries: function loadLibraries(global) {
// Loads Calendar app's required libraries using MojoLoader:
var libsInfo = [
{
name : "calendar", // TODO: Create enyo-compatible version of Calendar loadable library.
ourName: "Calendar",
version: "1.0"
}
// , { name : "unittest"
// , ourName : "UnitTest"
// , version : "1.0"
// }
// , { name : "network.alerts" // Replaces ConnectionWidget which wasn't used.
// , ourName : "NetworkAlerts" // Will need for send by bluetooth and before
// , version : "1.0" // launching account login view.
// }
];
var results = { pass: [], fail: [] };
global = global || enyo.global || this.valueOf.apply() || this; // Get a reference to the global scope
// Attempt to load as many libraries as possible even if failures occur:
libsInfo.forEach(function loadEachLibrary(info) {
try {
var lib = MojoLoader.require(info);
if (info.ourName) {
if ("UnitTest" === info.ourName) {
global [info.ourName] = (global.Mojo || (Mojo = {})).Test = lib [info.name].UnitTest;
} else {
global [info.ourName] = lib [info.name];
}
}
results.pass.push(info.ourName ? info.ourName : info.name);
} catch (e) {
results.fail.push(info.ourName ? info.ourName : info.name);
e.stack && console.error(e.stack);
}
});
if (results.pass.length) {
DEBUG && this.log("---:---: Successfully loaded libraries: ", results.pass);
}
if (results.fail.length) {
this.error("---:---: Failed to load libraries: ", results.fail);
}
global.Calendar && (EventManager = Calendar.EventManager);
return results;
},
shareCurrentDate: function shareCurrentDate(params) {
enyo.application.share({
currentDate: ((params && params.date && isFinite(+params.date) && new Date(params.date)) || new Date())
}, {
keep : (params && params.keep) ? !!params.keep : true,
debug: (params && params.debug) ? !!params.debug : false
});
},
showCalendarView: function showCalendarView(params) {
var calendarWindow = enyo.windows.fetchWindow("Calendar"), // Find any pre-existing Calendar GUI Window.
enyoApp = enyo.application;
var launchDate,
timeMachine = this.timeMachine,
view;
if (params && params.view) {
view = params.view + ""; // Convert to string.
} else {
view = enyoApp.currentCalendarView || enyoApp.prefsManager.getNextLaunchView();
}
// Set up the launch date if there is one or if there isn't already a currentDate set && shared.
if (params && params.date && isFinite(params.date)) {
timeMachine.setTime(params.date);
launchDate = new Date(timeMachine);
} else if (!calendarWindow || !enyoApp.currentDate) {
launchDate = new Date();
}
view && enyoApp.share({showView: {view: view, autoDate: launchDate ? false : true}}, {keep: true});
if (launchDate) {
// If the launch date is different than the current date, share it.
timeMachine.setTime(+launchDate);
var launch = +timeMachine.clearTime(),
current = enyoApp.currentDate && (timeMachine.setTime(+enyoApp.currentDate), +timeMachine.clearTime());
if (!current || launch != current) {
enyoApp.share({currentDate: launchDate}, {keep: true});
}
}
},
watchClock: function defineWatchClock(keepGoing) {
function watchClock(keepGoing) {
/* Observes time changes and updates watchers.
*/
top.clearTimeout(watchClock.thread); // Clear any pre-existing watchClock timeout threads.
if (keepGoing === false) { // If asked to stop, don't setup a new watchClock call.
return;
}
var date = new Date(),
delay = ((60 - date.getMinutes()) * 60000) - (date.getSeconds() * 1000); // Calculate the milliseconds between now and the next hour
watchClock.thread = top.setTimeout(watchClock, delay); // then delay watchClock until then.
enyo.application.share({clock: date}, {keep: true}); // Share the current date and time with clock watchers.
}
var self = this; // Cache local reference to "this" used by local watchClock.
this.watchClock = watchClock; // Reassign this.watchClock to local watchClock closure.
watchClock(keepGoing); // First and only direct execution of local watchClock.
}
});
+143
View File
@@ -0,0 +1,143 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: calendar.AppIcon handles the app's icon changing responsibilities.
**/
enyo.kind({
name : "calendar.AppIcon",
kind : enyo.Component,
published : {
clock: null // Date : For watching clock changes.
},
components: [
{kind: enyo.PalmService, service: enyo.palmServices.application, components: [
{name: "updateIcon", method: "updateLaunchPointIcon", onSuccess: "updatedIcon", onFailure: "updateIconFailed"}
]},
{name: "setupMidnightIconUpdate", kind: enyo.PalmService, service: "palm://com.palm.activitymanager/", method: "create", onResponse: "setupMidnightIconUpdateResponse"},
{name: "activityComplete", kind: enyo.PalmService, service: "palm://com.palm.activitymanager/", method: "complete", onResponse: "activityCompleteResponse"}
],
constructor: function constructor() {
this.inherited(arguments);
this.timeMachine = new Date(); // For calculating date/times without creating new Date instances.
this.updatedIcon = enyo.bind(this, this.updatedIcon);
this.updateIconFailed = enyo.bind(this, this.updateIconFailed);
},
create: function create() {
this.inherited(arguments);
enyo.application.watch({clock: this});
},
destroy: function destroy() {
enyo.application.ignore({clock: this});
this.$.updateIcon && this.$.updateIcon.cancel();
this.inherited(arguments);
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
clockChanged: function clockChanged(oldClock) {
var clock = this.clock instanceof Date && this.clock || new Date();
this.updateIcon(clock.getDate());
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
activityCompleteResponse: function activityCompleteResponse(inSender, response) {
DEBUG && this.log("================== activity completed response received: ", response);
},
createRecurringIconUpdateActivity: function createRecurringIconUpdateActivity(params) {
var timeMachine = this.timeMachine;
timeMachine.setTime(Date.now());
timeMachine.setDate(timeMachine.getDate() + 1);
timeMachine.clearTime();
var dateString = Utilities.getUTCFormatDateString(timeMachine, {format: "activity"}); //YYYY-MM-DD HH:MM:SSZ
var activityArgs = {
"start" : true,
"replace" : true,
"activity": {
"name" : "calendar.updateIcon",
"description": "Update icon date at midnight",
"type" : {
"persist" : false,
"foreground": true
},
"schedule" : {"start": dateString},
"callback" : {
"method": "palm://com.palm.applicationManager/launch",
"params": {
"id" : "com.palm.app.calendar",
"params": {"dayChange": true}
}
}
}
}
this.$.setupMidnightIconUpdate.call(activityArgs);
this.$.activityComplete.call({activityId: params.$activity.activityId});
},
handleLaunchParams: function handleLaunchParams(params) {
if ("dayChange" in params) {
this.updateIcon();
this.createRecurringIconUpdateActivity(params);
}
},
setupMidnightIconUpdateResponse: function setupMidnightIconUpdateResponse(inSender, response) {
DEBUG && this.log("---:---: activity to update icon at midnight response received");
},
updatedIcon: function updatedIcon(inSender, response) {
DEBUG && this.log("---:---: app icon update worked");
},
updateIcon: function updateIcon(monthDay) {
isNaN(monthDay) && (monthDay = new Date().getDate());
if (monthDay < 10) {
var formatter = new enyo.g11n.DateFmt({date: "short"}),
zeroPadded = (formatter.dateTimeFormatHash.shortDate.search(/dd/i) !== -1);
zeroPadded && (monthDay = "0" + monthDay);
}
if (this.currentIcon && this.currentIcon === monthDay) { // Return if we don't need to change anything.
return;
}
this.currentIcon = monthDay;
var iconUrl = "images/launcher/icon-" + monthDay + ".png";
DEBUG && this.log("\tUpdating icon to ", iconUrl, "\t");
this.$.updateIcon.call({
icon : iconUrl,
launchPointId: "com.palm.app.calendar_default"
});
},
updateIconFailed: function updateIconFailed(inSender, response) {
this.error("---:---: app icon update failed");
this.currentIcon = undefined; // Reset currentIcon to undefined if the update failed.
}
});
+153
View File
@@ -0,0 +1,153 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: calendar.AppMenu is the Calendar app's Menu Handler.
TODO: PLAN: In a future release: Dynamically adjust menus.
**/
enyo.kind({
name : "calendar.AppMenu",
kind : enyo.AppMenu,
events : {
onCreateAllDayEvent : "",
onCreateEvent : "",
onDeleteEvent : "",
onJumpTo : "",
onShowHelp : "",
onShowMap : "",
onShowMapRoute : "",
onShowMissedReminders: "",
onShowPreferences : "",
onShowToday : "",
onSyncNow : ""
},
published : {
device: "", // String : Indicates what device the app is running on; used to adjust menu availability.
missedReminders: false, // Boolean : Indicates whether the missed reminders menu item should be enabled or disabled.
views: null // Object : {current: enyo.Control, last: enyo.Control}
},
components : [
{name: "menuNew", caption: $L("New"), showing: false, components: [
{name: "menuAllDay", caption: $L("All Day Event"), onclick: "doCreateAllDayEvent"},
{name: "menuEvent", caption: $L("Event"), onclick: "doCreateEvent"}
]},
{name: "menuMap", caption: $L("Event Location"), showing: false, components: [
{name: "menuMapIt", caption: $L("Show on map"), onclick: "showMap"},
{name: "menuMapRoute", caption: $L("Get Directions"), onclick: "showMap"}
]},
{name: "menuDelete", caption: $L("Delete event"), onclick: "deleteEvent", showing: false},
{name: "menuSync", caption: $L("Sync Now"), onclick: "doSyncNow", showing: false},
{name: "menuToday", caption: $L("Show today"), onclick: "doShowToday", showing: false},
// TODO: In a future release, set onresize showing:true
{name: "menuJump", caption: $L("Jump to..."), onclick: "doJumpTo", showing: false},
// TODO: In a future release, set onresize showing:true
{name: "menuReminders", caption: $L("Missed reminders..."), onclick: "doShowMissedReminders", showing: false},
// TODO: Enable when missed reminders view is completed.
{name: "menuPrefs", caption: $L("Preferences & Accounts"), onclick: "doShowPreferences", showing: false},
{name: "menuHelp", caption: $L("Help"), onclick: "doShowHelp"}
],
MENU_STATES: {
calendarView: {
menuNew : false,
menuAllDay: false,
menuEvent : false,
menuSync : true,
menuToday : false,
menuJump : false,
menuPrefs : true,
menuHelp : true
},
defaultView : {
menuHelp: true
},
editView : {
menuDelete : false,
menuMap : false,
menuMapIt : false,
menuMapRoute: false,
menuHelp : true
},
subView : {
menuPrefs: false, // Disabling since Preferences View will load under the popup's scrim.
menuHelp : true
}
},
create: function create() {
this.inherited(arguments); // Required for inheritance.
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
missedRemindersChanged: function missedRemindersChanged(missedRemindersLastTime) {
this.$.menuReminders.setShowing(!!this.missedReminders);
},
viewsChanged: function viewsChanged(lastViewChange) {
var views = this.views,
lastViewName = views.last && views.last.name,
viewName = views.current && views.current.name;
switch (viewName) {
case "calendarView":
this.toggleMenus(this.MENU_STATES.calendarView);
break;
case "detailView":
case "repeatView":
this.toggleMenus(this.MENU_STATES.subView);
break;
case "editView":
this.toggleMenus(this.MENU_STATES.editView);
break;
case "firstLaunchView" :
case "prefsView" :
default :
this.toggleMenus(this.MENU_STATES.defaultView);
break;
}
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
deleteEvent: function deleteEvent(from, domEvent) {
var view = this.views.current,
event = view && view.event;
this.doDeleteEvent(event);
},
showMap: function showMap(from, domEvent) {
var view = this.views.current,
event = view && view.event;
from == this.$.menuMap && this.doShowMap(event.location);
from == this.$.menuMapRoute && this.doShowMapRoute(event.location);
},
toggleMenus: function toggleMenus(menuStateMap) {
var menu = this.$;
for (var item in menu) {
if (menu.hasOwnProperty(item) && (item.indexOf("menu") == 0)) {
menu[item].setShowing(!!menuStateMap[item]);
}
}
}
});
+163
View File
@@ -0,0 +1,163 @@
/* @@@LICENSE
*
* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* LICENSE@@@ */
.calendar {
background : #fff url(header/images/calendar-list-background.png) repeat-x;
}
.calendar .debug { /* Used to quickly identify UI components when debugging on device/emulator */
border : 4px solid #f00 !important;
}
.enyo-modaldialog-customWidth { /* Added the width to override the modal dialog width only for details view and custom Repeat View*/
width: 400px;
}
.calendar .ellipsis {
overflow : hidden;
text-overflow : ellipsis;
white-space : nowrap;
}
.calendar .fade-in { opacity: 1; }
.calendar .fade-out { opacity: 0; }
.calendar .fade-in,
.calendar .fade-out { -webkit-transition: 4s opacity 2s;} /* CSS3 Fade transition attempt */
/* Calendar View (Day, Week, and Month Carousels) */
.calendar .view {
border : none;
margin : 0px 14px;
overflow : hidden;
}
/* Calendar Footer (Day, Week, Month Switcher) */
.calendar .view-controls {
padding : 0px 11px;
height : 45px;
}
.calendar .Rbutton .enyo-radiobutton {
font-size : 16px;
min-width : 90px;
height : 34px;
}
.calendar .Rbutton .enyo-button-depressed .enyo-button-icon { /* To fix the depressed state Icon Issue
TODO: remove once Fixed by Enyo */
background-position : 0 -32px;
}
/* Calendar Footer (Page effect) */
.footerPageEffect {
height : 6px;
-webkit-border-image : url(../images/pages.jpg) 0 4 0 4 repeat;
margin : -3px 0;
}
/* Calendar calendar.JumpToView */
.calendar-jump-to .jump-to-header {
font-size: 18px;
text-align: center;
}
.calendar-jump-to .enyo-picker-label {
text-transform: capitalize;
}
/* Calendar Events themes CSS */
.edit .theme-blue.legend,
.prefs .theme-blue.legend,
.calendar .theme-blue.legend,
.calendar .theme-blue:after, .theme-blue.held:after { background-color: #61a3e5; border-color: #0d71d7; }
.calendar .theme-blue.held { background-color: #f4f9ff; border-color: #0d71d7; }
.calendar-detail-view .theme-blue,
.calendar-repeat-view .theme-blue,
.calendar .theme-blue { background-color: #dbeaf9; border-color: #0d71d7; }
.calendar .theme-blue:before { border-color: #0d71d7; }
.edit .theme-green.legend,
.prefs .theme-green.legend,
.calendar .theme-green.legend,
.calendar .theme-green:after, .theme-green.held:after { background-color: #8ece59; border-color: #52b400; }
.calendar .theme-green.held { background-color: #f0ffe4; border-color: #52b400; }
.calendar-detail-view .theme-green,
.calendar-repeat-view .theme-green,
.calendar .theme-green { background-color: #e5f3d9; border-color: #52b400; }
.calendar .theme-green:before { border-color: #52b400; }
.edit .theme-orange.legend,
.prefs .theme-orange.legend,
.calendar .theme-orange.legend,
.calendar .theme-orange:after, .theme-orange.held:after { background-color: #ffa359; border-color: #ff7200; }
.calendar .theme-orange.held { background-color: #faf0e8; border-color: #ff7200; }
.calendar-detail-view .theme-orange,
.calendar-repeat-view .theme-orange,
.calendar .theme-orange { background-color: #ffead9; border-color: #ff7200; }
.calendar .theme-orange:before { border-color: #ff7200; }
.edit .theme-pink.legend,
.prefs .theme-pink.legend,
.calendar .theme-pink.legend,
.calendar .theme-pink:after, .theme-pink.held:after { background-color: #ff59c2; border-color: #ff00a2; }
.calendar .theme-pink.held { background-color: #fce9f5; border-color: #ff00a2; }
.calendar-detail-view .theme-pink,
.calendar-repeat-view .theme-pink,
.calendar .theme-pink { background-color: #ffd9f1; border-color: #ff00a2; }
.calendar .theme-pink:before { border-color: #ff00a2; }
.edit .theme-purple.legend,
.prefs .theme-purple.legend,
.calendar .theme-purple.legend,
.calendar .theme-purple:after, .theme-purple.held:after { background-color: #be59db; border-color: #9a00c7; }
.calendar .theme-purple.held { background-color: #f6eef9; border-color: #9a00c7; }
.calendar-detail-view .theme-purple,
.calendar-repeat-view .theme-purple,
.calendar .theme-purple { background-color: #f0d9f7; border-color: #9a00c7; }
.calendar .theme-purple:before { border-color: #9a00c7; }
.edit .theme-red.legend,
.prefs .theme-red.legend,
.calendar .theme-red.legend,
.calendar .theme-red:after, .theme-red.held:after { background-color: #ff5959; border-color: #ff0000; }
.calendar .theme-red.held { background-color: #fff3f3; border-color: #ff0000; }
.calendar-detail-view .theme-red,
.calendar-repeat-view .theme-red,
.calendar .theme-red { background-color: #ffd9d9; border-color: #ff0000; }
.calendar .theme-red:before { border-color: #ff0000; }
.edit .theme-teal.legend,
.prefs .theme-teal.legend,
.calendar .theme-teal.legend,
.calendar .theme-teal:after, .theme-teal.held:after { background-color: #59c5dc; border-color: #00a6c9; }
.calendar .theme-teal.held { background-color: #eff8fa; border-color: #00a6c9; }
.calendar-detail-view .theme-teal,
.calendar-repeat-view .theme-teal,
.calendar .theme-teal { background-color: #d9f2f7; border-color: #00a6c9; }
.calendar .theme-teal:before { border-color: #00a6c9; }
.edit .theme-yellow.legend,
.prefs .theme-yellow.legend,
.calendar .theme-yellow.legend,
.calendar .theme-yellow:after, .theme-yellow.held:after { background-color: #f8e359; border-color: #f4d400; }
.calendar .theme-yellow.held { background-color: #fbf9ed; border-color: #f4d400; }
.calendar-detail-view .theme-yellow,
.calendar-repeat-view .theme-yellow,
.calendar .theme-yellow { background-color: #fdf9d9; border-color: #f4d400; }
.calendar .theme-yellow:before { border-color: #f4d400; }
+397
View File
@@ -0,0 +1,397 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: calendar.AppView is the Calendar App's GUI controller.
TODO: PLAN: Move FirstUseView from calendar.App to here and rename to FirstLaunchView.
**/
enyo.kind({
name : "calendar.AppView",
className : "calendar",
kind : enyo.VFlexBox,
published : {
is24Hr : null,// Boolean : For watching 24hr clock mode changes.
showEvent: null // Object : For watching all show event requests (i.e. From Day, Week, or Month views, ReminderDialog, or Cross Launch).
},
components: [
{ kind : "ApplicationEvents",
onBack : "backHandler",
onUnload : "unloadHandler",
onWindowActivated : "windowActivatedHandler",
onWindowDeactivated : "windowDeactivatedHandler",
onWindowHidden : "windowHiddenHandler",
onWindowParamsChange: "windowParamsChangeHandler",
onWindowRotated : "windowRotatedHandler",
onWindowShown : "windowShownHandler"
},
{ name : "appMenu", kind: "calendar.AppMenu", lazy: false,
onCreateAllDayEvent : "createAllDayEvent",
onCreateEvent : "createTimedEvent",
// onDeleteEvent : "showDeleteConfirm",
onJumpTo : "showJumpTo",
onShowHelp : "showHelp",
// onShowMap : "showMap",
// onShowMapRoute : "showMap",
onShowMissedReminders: "showReminders",
onShowPreferences : "showPreferences",
onShowToday : "showDate",
onSyncNow : "syncNow"
},
{kind: enyo.Pane, flex: 1, onSelectView: "viewSelected", components: [
{name: "calendarView", kind: "calendar.CalendarView", flex: 1, onCreateNewEvent: "createTimedEvent", onShowJumpTo: "showJumpTo"},
{name: "editView", kind: "calendar.edit.EditView", lazy: true, showing: false, flex: 1, onExit: "closeView", onDelete: "showDeleteConfirm"},
{name: "prefsView", kind: "calendar.prefs.PreferencesView", lazy: true, showing: false, onExit: "closeView"}
]}
],
popups : [
// PERF: Store popups and dialogs separately from the main GUI components to avoid costly premature creation.
{name: "jumpToDialog", kind: enyo.ModalDialog, caption: $L("Jump To..."), scrim: true, showing: false, onClose: "resetMenu", components: [
{name: "jumpTo", kind: "calendar.JumpToView", onDateChanged: "jumpToDate"}
]},
{name: "detailPopup", kind: enyo.ModalDialog, scrim: true, caption: $L("Event Details"), className: "enyo-modaldialog-customWidth", showing: false, onClose: "resetMenu", components: [
{name: "detailView", kind: "calendar.edit.DetailView", showing: false, onEdit: "displayEvent", onDelete: "showDeleteConfirm"}
]},
{name: "deleteDialog", kind: enyo.ModalDialog, scrim: true, showing: false, components: [
{name: "deleteConfirm", kind: "calendar.edit.DeleteConfirm"}
]}
],
constructor: function AppView() {
this.inherited(arguments);
this.EventView = calendar.EventView;
this.timeMachine = new Date();
},
constructed: function constructed() {
this.createEventThen = enyo.bind(this, this.createEventThen);
this.createLaunchEventThen = enyo.bind(this, this.createLaunchEventThen);
this.handleUniversalSearch = enyo.bind(this, this.handleUniversalSearch);
this.inherited(arguments);
//(typeof HACKS != "undefined") && HACKS.HACK_ENYO_DEFAULT_TARGET_EVENT_HANDLER (this);
},
create: function create() { // PERF: new AppView() takes ~350 ms.
this.inherited(arguments);
window.PalmSystem && window.PalmSystem.keepAlive(true);
var enyoApp = enyo.application,
ui = this.$;
ui.pane.selectView(ui.calendarView);
this.createComponents(this.popups);
this.is24Hr = !enyoApp.fmts.isAmPm(); // Use the current 24hr mode system setting as default.
enyoApp.watch({is24Hr: this, showEvent: this});
},
destroy: function destroy() {
enyo.application.ignore({is24Hr: this, showEvent: this});
this.inherited(arguments);
},
// BEGIN :-------: Framework Handlers :-----------------------------------------------------------------------------------------------------------------------//
backHandler: function backHandler(from, event) {
// NOTE: As of v0.3 enyo doesn't seem to support nested "back" handlers so this method
// determines how to handle "back" events for each multi-view pane.
// event.preventDefault() is used to stop accidental cardmode on "back" events.
this.closeView();
(this.$.pane.getViewName() != "calendar") && event.preventDefault();
},
unloadHandler: function unloadHandler() {
DEBUG && this.log("======= UNLOADING...\t")
// Triggers the chain of destroy handlers (appview -> dayview -> etc.)
// Destroy handlers are where most views unsubscribe listeners from data hub and cancel service requests.
this.destroy();
},
windowActivatedHandler: function windowActivatedHandler() {
DEBUG && this.log("======= ACTIVATED\t");
},
windowDeactivatedHandler: function windowDeactivatedHandler() {
DEBUG && this.log("======= DEACTIVATED\t");
var calendarView = this.fetchCalendarView(),
enyoApp = enyo.application,
prefsManager = enyoApp.prefsManager;
enyoApp.currentCalendarView = calendarView; // When re-activating, use the currentCalendarView.
prefsManager.setNextLaunchView(calendarView); // Attempt to set the nextLaunchView.
},
windowHiddenHandler: function windowHiddenHandler() { // TODO: Set start date based on user's app preferences.
DEBUG && this.log("======= HIDDEN\t");
var enyoApp = enyo.application;
enyoApp.currentCalendarView = undefined; // Use the nextLaunchView for the next launch instead of the currentCalendarView.
enyoApp.showCalendarView(); // Show the nextLaunchView now so that the next time Calendar launches it will be ready.
},
windowParamsChangeHandler: function windowParamsChangeHandler() {
DEBUG && this.log("======= PARAMS CHANGED: ", enyo.windowParams, "\t");
this.handleLaunchParams(enyo.windowParams);
},
windowReactivatedHandler: function windowReactivatedHandler() {
DEBUG && this.log("======= REACTIVATED\t");
},
windowRotatedHandler: function windowRotatedHandler(from, event) {
DEBUG && this.log("======= ROTATED\t");
},
windowShownHandler: function windowShownHandler() {
DEBUG && this.log("======= SHOWN\t");
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
is24HrChanged: function is24HrChanged(oldIs24Hr) {
this.$.pane.broadcastMessage("is24Hr", [this.is24Hr]); // Since we only get 24Hr changes from App, we pass them on immediately.
},
showEventChanged: function showEventChanged(lastEventShown) {
this.log(" ENYO PERF: SINGLE CLICK OCCURED time: " + Date.now());
this.displayEvent(this, this.showEvent);
this.log(" ENYO PERF: TRANSITION DONE time: " + Date.now());
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
closeView: function closeView(event) {
this.$.pane.back();
},
createAllDayEvent: function createAllDayEvent(from, domEvent) {
var date = this.timeMachine;
date.setTime(Date.now());
var hour = date.getHours(),
minutes = date.getMinutes();
date.setTime(enyo.application.currentDate);
date.clearTime();
date.setHours(hour);
date.setMinutes(minutes);
var createEvent = {
event: {allDay: true, dtstart: +date},
then : this.createEventThen
};
enyo.application.share({createEvent: createEvent}); // Request event creation.
return true;
},
createEventThen: function createEventThen(event) {
if (!event) {
this.error("\tFailed to create event GUI using event [", event, "].\t");
return;
}
var addEvent = {event: event, show: true, then: undefined}; // "then" can be a Function or be omitted.
enyo.application.share({addEvent: addEvent}); // Request adding the event to a view.
},
createLaunchEventThen: function createLaunchEventThen(event) {
if (!event) {
this.error("\tFailed to create cross-launched event using these properties [", event, "].\t");
return;
}
enyo.application.shareCurrentDate({date: new Date(event.dtstart).clearTime(), wait: true});
event.saveAsIs = true; // Notifies Edit View that this event should be saved even if the user doesn't change it.
var addEvent = {event: event, show: true, then: undefined}; // "then" can be a Function, falsey or be omitted.
DEBUG && this.log("\tEvent: ", event, "\t");
enyo.application.share({addEvent: addEvent}, {keep: true}); // Request adding the event to a view.
},
createTimedEvent: function createTimedEvent(from, domEvent) {
var date = this.timeMachine;
date.setTime(Date.now());
var hour = date.getHours(),
minutes = date.getMinutes();
date.setTime(enyo.application.currentDate);
date.clearTime();
date.setHours(hour);
date.setMinutes(minutes);
var createEvent = {
event: {dtstart: +date},
then : this.createEventThen
};
enyo.application.share({createEvent: createEvent}); // Request event creation.
return true;
},
displayEvent: function displayEvent(from, eventGUIOrEvent) {
DEBUG && this.log("Event:", eventGUIOrEvent);
if (!eventGUIOrEvent) {
this.error("\tUnable to edit non-existent event.\t");
return;
}
var event = eventGUIOrEvent.event || eventGUIOrEvent;
var hasId = ("_id" in event),
ui = this.$,
view;
// Had to add an additional case below for when detailView hasn't been loaded yet. from == ui.detailView in this case, since they are both undefined.
if ((!ui.detailView || (from != ui.detailView)) && hasId) { // Show Event Detail if not already doing so or performing a tap-to-create:
ui.detailPopup.lazy && ui.detailPopup.validateComponents();
view = ui.detailView; // cache detail view,
this.viewSelected(from, view, from); // trigger menu update,
view.setShowing(true); // trigger ContactsManager lazy loading if needed,
view.setEvent(eventGUIOrEvent); // update the view with the event's content,
ui.detailPopup.openAtCenter(); // then show Detail View.
//ui.detailPopup.resize();
} else { // Otherwise:
ui.pane.validateView("editView");
ui.editView.setEvent(eventGUIOrEvent); // Update Edit View with the event's content.
ui.pane.selectView(ui.editView); // then show Edit View.
}
},
fetchCalendarView: function fetchCalendarView() {
return this.$.calendarView.fetchCurrentView();
},
handleLaunchParams: function handleLaunchParams(params) {
DEBUG && this.log("\tParams: ", params, "\t");
switch (true) {
case !params || (typeof params != "object"): // Ensure that params exist and that they're within an object.
return;
case ("newEvent" in params): // Supports "New Calendar Event" Spec on webOS Developer Network:
case ("quickLaunchText" in params): // Supports Just Type "New Calendar Event" Quick Action:
var createEvent = {
event : params.newEvent || {subject: params.quickLaunchText},
keepTime: !!params.newEvent,
then : this.createLaunchEventThen
};
enyo.application.share({createEvent: createEvent});
return;
case ("showEventDetail" in params):
enyo.application.databaseManager.getEvent(
params.showEventDetail, // This launch param is expected to be an event id.
this.handleUniversalSearch,
this.handleUniversalSearch
);
return;
case ("showDetailFromReminder" in params):
var eventId = params.showDetailFromReminder.eventId,
start = parseInt(params.showDetailFromReminder.startTime, 10),
end = parseInt(params.showDetailFromReminder.endTime, 10);
if (eventId === undefined || start === undefined || end === undefined) {
return;
}
//This needs to be bound with the new arguments every time.
var handleShowReminderDetail = enyo.bind(this, this.handleShowReminderDetail, start, end);
enyo.application.databaseManager.getEvent(
eventId,
handleShowReminderDetail,
handleShowReminderDetail
);
return;
default:
return;
}
},
handleShowReminderDetail: function handleShowReminderDetail(startTime, endTime, response) {
var event = response.returnValue && response.results && response.results.length && response.results[0];
if (event) {
event.currentLocalStart = startTime;
event.currentLocalEnd = endTime;
this.displayEvent(null, event);
enyo.application.shareCurrentDate({date: startTime});
return;
}
this.error("\tCalendar Detail From Reminder Failed: ", response, "\t");
},
handleUniversalSearch: function handleUniversalSearch(response) {
var event = response.returnValue && response.results && response.results.length && response.results[0];
if (event) {
this.displayEvent(null, event);
enyo.application.shareCurrentDate({date: event.dtstart});
return;
}
this.error("\tCalendar Universal Search Failed: ", response, "\t");
},
jumpToDate: function jumpToDate(from, date) {
this.showDate(date);
},
resetMenu: function resetMenu(from) {
this.log(" ENYO PERF: SINGLE CLICK OCCURED time: " + Date.now());
this.viewSelected(from, this.$.pane.getView(), from);
this.log(" ENYO PERF: TRANSITION DONE time: " + Date.now());
},
showDate: function showDate(date) {
enyo.application.shareCurrentDate({date: date});
},
showDeleteConfirm: function showDeleteConfirm(from, eventOrEventGUI) {
DEBUG && this.log("########## Showing the delete confirmation popup.");
var ui = this.$;
ui.deleteDialog.lazy && ui.deleteDialog.validateComponents();
ui.deleteConfirm.setEvent(eventOrEventGUI);
ui.deleteDialog.openAtCenter();
},
showHelp: function showHelp() {
enyo.application.share({launch: {appId: "com.palm.app.help"}});
},
showJumpTo: function showJumpTo() {
var ui = this.$;
ui.jumpToDialog.lazy && ui.jumpToDialog.validateComponents();
ui.jumpToDialog.openAtCenter();
},
showPreferences: function showPreferences() {
this.$.pane.selectViewByName("prefsView");
},
syncNow: function syncNow() {
enyo.application.calendarsManager.syncAllCalendars();
},
viewSelected: function viewSelected(from, view, lastView) {
var ui = this.$,
viewName = view && view.name;
ui.appMenu.setViews({current: view, last: lastView});
ui.pane.broadcastMessage("viewSwitched", [viewName]);
}
});
+226
View File
@@ -0,0 +1,226 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: calendar.CalendarView controls the "calendar" views.
TODO: FIX: enyo.Control.resizeHandler() is called on every carousel scroll!
TODO: FIX: enyo.Control.resizeHandler() should only propagate resize events to children if parent is showing.
TODO: FIX: broadcastMessage() still only exists on enyo.Control and not enyo.Component as of 2011.05.05.
TODO: FIX: Handle screen rotation (i.e. adjust layout as needed for Portrait vs. Landscape mode).
**/
enyo.kind({
name : "calendar.CalendarView",
kind : enyo.VFlexBox,
classname : "calendar",
events : {
onCreateNewEvent: "",
onShowJumpTo : ""
},
published : {
showView : null, // Object : For watching all show view requests.
currentDate: null // Date : For watching currentDate changes.
},
statics : {
DAY_VIEW : 0,
WEEK_VIEW : 1,
MONTH_VIEW: 2
},
components: [
{kind: "calendar.CalendarList"},
{name: "main", className: "view", kind: enyo.Pane, flex: 1, onSelectView: "viewSelected", transitionKind: "calendar.SimpleTransition", components: [
// Using a custom transition until the discovered enyo issue in enyo.transitions.Simple is resolved (DFISH-28771)
{name: "dayCarousel", kind: "calendar.day.DayCarousel", flex: 1, lazy: true},
{name: "weekCarousel", kind: "calendar.week.WeekCarousel", flex: 1, lazy: true},
{name: "monthCarousel", kind: "calendar.month.MonthCarousel", flex: 1, lazy: true}
]},
{className: "view-controls", kind: enyo.HFlexBox, align: "center", pack: "center", components: [
{name: "btnNew", kind: enyo.Button, className: "enyo-button-light", caption: $L("New event"), i_con: "../images/menu-icon-createNew.png", onclick: "doCreateNewEvent"},
{kind: enyo.Spacer},
{name: "viewSwitcher", kind: enyo.RadioGroup, className: "Rbutton", onChange: "switchViewHandler", onclick: "switchViewClicked", value: -1, components: [
{name: "daySwitch", kind: enyo.RadioButton, lab_el: $L("Day"), icon: "../images/menu-icon-day.png" },
// NOTE: lab_el is intentionally misspelled to keep but not use the display text per Calendar's Visual Design.
{name: "weekSwitch", kind: enyo.RadioButton, lab_el: $L("Week"), icon: "../images/menu-icon-week.png" },
// NOTE: lab_el is intentionally misspelled to keep but not use the display text per Calendar's Visual Design.
{name: "monthSwitch", kind: enyo.RadioButton, lab_el: $L("Month"), icon: "../images/menu-icon-month.png" } // NOTE: lab_el is intentionally misspelled to keep but not use the display text per Calendar's Visual Design.
]},
{kind: enyo.Spacer},
{name: "btnJump", kind: enyo.IconButton, className: "enyo-button-light", caption: $L("Jump to..."), i_con: "../images/menu-icon-jumpTo.png", onclick: "doShowJumpTo"}
]},
{className: "footerPageEffect"}
],
create: function create() {
this.inherited(arguments);
this.timeMachine = new Date();
var enyoApp = enyo.application,
ui = this.$;
// NOTE: autoDate is a private property.
this.autoDate = true;
enyoApp.watch({ showView: this, currentDate: this });
},
destroy: function destroy() {
enyo.application.ignore({ showView: this, currentDate: this });
this.inherited(arguments);
},
// BEGIN :-------: Framework Handlers :-----------------------------------------------------------------------------------------------------------------------//
resizeHandler: function resizeHandler(from, domEvent) {
this.inherited(arguments);
var view = this.$.main.getView();
view && view.showing && view.resized();
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
currentDateChanged: function currentDateChanged(oldDate) {
var enyoApp = enyo.application,
date = enyoApp.currentDate,
ui = this.$,
view,
setViewDate;
setViewDate = function setViewDate() { // Build the setViewDate closure to set the new date on the current view.
view = ui.main.getView();
view && view.setCurrentDate(date);
};
if (typeof this.gotCurrentDateThen == "function") { // If we're switching views, we defer the date setting until the switch is done.
this.gotCurrentDateThen();
this.gotViewSelectedThen = setViewDate;
this.gotCurrentDateThen = undefined;
} else {
setViewDate();
}
},
showViewChanged: function showViewChanged(lastShowView) {
var showView = this.showView,
enyoApp = enyo.application;
enyoApp.free({showView: true}); // Free the showView from datahub just in case it is being kept.
if (!showView) {
return;
}
var view = showView.view,
agenda = true;
this.autoDate = (showView.autoDate === false) ? false : true;
// NOTE: I'm re-using the "view" variable here because this really is changing the abstract "view" to a more concrete and applicable "view".
switch (view) {
case "DayAgendaView":
agenda = false;
case "DayView":
enyoApp.share({agendaMode: !agenda}, {keep: true});
view = calendar.CalendarView.DAY_VIEW;
break;
case "WeekAgendaView":
agenda = false;
case "WeekView":
enyoApp.share({agendaMode: !agenda}, {keep: true});
view = calendar.CalendarView.WEEK_VIEW;
break;
case "MonthView":
view = calendar.CalendarView.MONTH_VIEW;
break;
default:
this.warn("\tUnable to show unrecognized view:\n\n\t", this.showView, "\t");
return;
}
this.switchView(view);
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
fetchCurrentView: function fetchCurrentView() {
var currentView = this.$.main.getView();
return currentView && currentView.fetchCurrentView();
},
viewIdNameMap: ["dayCarousel", "weekCarousel", "monthCarousel"],
switchView: function switchView(i) {
this.$.viewSwitcher.setValue(i);
this.switchViewHandler(null, i);
},
switchViewHandler: function switchViewHandler(from, i) { // This is called when switching between views.
var ui = this.$,
name = this.viewIdNameMap [i], // Look up the name
view = ui.main.getView(), // Get the current view
viewDate,
oldName = view && view.name; // If there is a current view, get its name.
if (name != oldName) {
this.gotCurrentDateThen = function selectView() { // Build a closure to run after we've received a shared currentDate.
ui.main.validateView(name); // Validate that the view is created; if it isn't yet, it will be created synchronously.
ui.main.selectViewByName(name);
}
}
if (this.autoDate) { // If autoDate is set, we share currentDate. Otherwise, we expect it from somewhere else.
if (name != oldName) { // Get the current view's date if we are moving to a new view.
viewDate = view && view.getViewDate();
}
(from === ui.viewSwitcher || viewDate) && enyo.application.shareCurrentDate({date: viewDate});
}
// NOTE: lastClickedViewName is a private property.
this.lastClickedViewName = name; // Set the view switching flag.
this.log(" ENYO PERF: SINGLE CLICK OCCURED time: " + Date.now());
this.autoDate = true; // Reset the autoDate flag.
},
switchViewClicked: function switchViewClicked(from, domEvent) { // This is automatically called after switchViewHandler.
var nowShowing = this.$.main.getViewName(); // Which view is currently showing
// NOTE: lastClickedViewName is a private property.
if (nowShowing == this.lastClickedViewName) { // Is that the last-clicked view, meaning we're already showing it?
enyo.application.shareCurrentDate(); // Then show today within the current view.
}
return true; // Stop the click event from being handled by any ancestor component.
},
viewSwitchedHandler: function viewSwitchedHandler(viewName) {
(viewName == "calendarView") && this.broadcastMessage("viewSwitched", [this.$.main.getViewName()]);
},
viewSelected: function viewSelected(from, view, lastview) {
if (typeof this.gotViewSelectedThen == "function") { // Run the deferred date setting if it exists.
this.gotViewSelectedThen();
this.gotViewSelectedThen = undefined;
}
}
});
+37
View File
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<!-- LICENSE@@@
Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@@LICENSE -->
<html>
<head>
<script type="text/javascript">
// console.profile && console.profile ("calendar");
var timing = {start: -Date.now()};
</script>
<title>Calendar</title>
<link rel="icon" type="image/png" href="images/icon.png">
<link rel="shortcut icon" type="image/png" href="images/icon.png">
<script type="text/javascript" src="../../../enyo/0.10/framework/enyo.js" launch="nobridge&nodebug"></script>
</head>
<body>
<script type="text/javascript" src="../libs/hacks.js"></script>
<script type="text/javascript" src="calendar.js"></script>
</body>
</html>
+65
View File
@@ -0,0 +1,65 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: This is the Calendar App's GUI starting point and control script for calendar.html.
TODO: PLAN: Move FirstUse to AppView as a pane; should be called FirstLaunch to avoid confusion with actual FirstUse process & app.
TODO: PLAN: Only run tests if "test" launch or URL param is present.
**/
(function initializeCalendarView(window, undefined) {
var DEBUG = !!this.DEBUG, // Inherit any globally defined DEBUG state.
enyoApp = enyo.application,
firstLaunchView;
DEBUG && console.log("\tAPP WINDOW VISIBLE\t" + (timing.start + Date.now()) + "\t\tPERF\t");
var firstLaunchWatcher = {
firstLaunch: {
name : "firstLaunchWatcher",
setFirstLaunch: function setFirstLaunch(firstLaunch) {
showView(firstLaunch); // If we are going to show the main view, do so first before destroying First Launch (perf).
if (!firstLaunch && firstLaunchView) {
!firstLaunchView.destroyed && firstLaunchView.destroy(); // Destroy first Launch.
firstLaunchView = undefined;
}
}
}
};
function showView(isFirstLaunch) {
var view;
if (isFirstLaunch) { // If this is the Calendar application's first launch:
view = enyoApp.view = firstLaunchView = new calendar.FirstLaunchView(); // Create the First Launch view.
} else { // Otherwise:
enyoApp.ignore(firstLaunchWatcher); // Ignore First Launch changes.
view = enyoApp.view = new calendar.AppView(); // Create the main view.
}
view.renderInto(window.document.body); // Display the created view.
}
window.addEventListener("unload", function cleanupCalendarViewInitialization() {
enyoApp.ignore(firstLaunchWatcher);
}, false);
enyoApp.watch(firstLaunchWatcher, {wait: true}); // Watch to see which view to load into the main window.
})(this);
+368
View File
@@ -0,0 +1,368 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
* A list item in the agenda view. This may represent an event, or a free-time item.
*/
enyo.kind({
name : "calendar.EventListItem",
kind : enyo.RowItem,
className : "enyo-item event-item",
published : {
event : null, // the data to display in this list item
format : null, // the time formatter to use
isFreeTime: false // is this a free-time item or an event?
},
components: [
{kind: enyo.HFlexBox, name: "box", components: [
{name: "colorSwatch"},
{name: "time", className: "label"},
{kind: enyo.VFlexBox, components: [
{name: "subject", className: "label"},
{name: "location", className: "label"}
]}
]}
],
create: function create() {
this.inherited(arguments);
this.timeMachine = new Date();
},
destroy: function destroy() {
this.inherited(arguments);
},
eventChanged: function eventChanged(oldEvent) {
if (!this.event) {
return;
}
this.isFreeTime ? this.renderFreeTime(this.event) : this.renderEvent(this.event);
},
renderEvent: function renderEvent(event) {
var formattedTime,
ui = this.$;
if (event.allDay) {
formattedTime = $L("All Day");
} else {
this.timeMachine.setTime(event.currentLocalStart || event.dtstart);
formattedTime = this.format.format(this.timeMachine);
}
ui.time.setContent(formattedTime);
ui.subject.setContent(event.subject);
ui.location.setContent(event.location);
this.setItemColor(event.color);
},
renderFreeTime: function renderFreeTime(freeTime) {
var hours = Math.floor(freeTime.duration / 100),
minutes = Math.floor(Math.ceil(freeTime.duration) % 100 * .6),
duration = Utilities.formatPeriod({hours: hours, minutes: minutes}),
template = new enyo.g11n.Template($L("#{duration} free")),
freeTimeLabel = template.evaluate({duration: duration}),
ui = this.$;
ui.box.addClass("free-time-item");
ui.subject.setContent(freeTimeLabel);
},
setItemColor: function setItemColor(color) {
var className = "theme-" + color.toLowerCase() + " legend";
this.$.colorSwatch.setClassName(className);
}
});
/**
* The agenda view.
* This shows a list of events, with options to divide the events onto separate days, and to show the free times between events.
*/
enyo.kind({
name : "calendar.AgendaView",
kind : enyo.VFlexBox,
className : "calendar-agenda-view",
published : {
days : null, // Object : Day-formatted Calendar Events.
is24Hr : undefined, // Boolean : For accepting 24hr clock mode changes.
showFreeTime : false, // Boolean : whether or not to show free time between events
divideIntoDays: false // Boolean : To show the events in an undivided list, or divided by date
},
components: [
{name: "formatterCache", kind: "calendar.FormatterCache", onFormatsChanged: "formatTimeLabel", formats: {
time : {time: "short"},
monthName: {date: "MMMM"},
dayOfWeek: {date: "EEE"}}
},
{name: "agendaScroller", kind: enyo.Scroller, autoHorizontal: false, horizontal: false, flex: 1, components: [
{name: "dateList", kind: enyo.VirtualRepeater, onSetupRow: "makeDateListItem", components: [
{name: "divider", kind: enyo.Divider, caption: ""},
{kind: enyo.HFlexBox, components: [
{name: "dateBox", kind: enyo.VFlexBox, components: [
{name: "dateLabel", className: "date-label"},
{name: "dayOfWeekLabel", className: "label"}
]},
{name: "emptyLabel", content: $L("Nothing planned! Free day! Oh, the possibilities!"), showing: false, className: "empty-day-label"},
{name: "eventList", flex: 1, kind: enyo.VirtualRepeater, onSetupRow: "makeEventListItem", className: "event-list", components: [
{kind: "calendar.EventListItem", name: "item", onclick: "eventClicked"}
]}
]}
]}
]}
],
create: function create() {
this.inherited(arguments);
this.timeMachine = new Date();
},
destroy: function destroy() {
this.inherited(arguments);
},
// BEGIN: Published Properties Change Handlers ---------------------------------------------------------------------------------------------------------------//
daysChanged: function daysChanged() {
this.createDatesArray(this.days);
this.createEventsArray(this.days);
this.$.dateList.render();
},
is24HrChanged: function is24HrChanged() {
this.$.formatterCache.formatsChanged(); // Clear the cached formatters so that they can be rebuilt.
},
// BEGIN: Event Handlers ---------------------------------------------------------------------------------------------------------------//
eventClicked: function eventClicked(inSender) {
var eventIndex = this.$.eventList.fetchRowIndex(),
dateIndex = this.$.dateList.fetchRowIndex(),
eventOrFreeTime = this.eventsArray[dateIndex][eventIndex];
if (eventOrFreeTime.isFreeTime) {
var freeTime = eventOrFreeTime,
hour = Math.floor(freeTime.start_decimal / 100),
minutes = Math.floor(freeTime.start_decimal % 100 * .6),
defaultEventDuration = enyo.application.prefsManager.prefs.defaultEventDuration,
freeDurationInMinutes = Math.ceil(freeTime.duration * .6),
dtstart,
dtend;
this.timeMachine.setTime(this.datesArray[dateIndex]);
this.timeMachine.setHours(hour);
this.timeMachine.setMinutes(minutes);
dtstart = +this.timeMachine;
//If the free time block is less than the user's default event duration, use the free time, otherwise use the default.
minutes = Math.min(freeDurationInMinutes, defaultEventDuration);
this.timeMachine.addMinutes(minutes);
dtend = +this.timeMachine;
var createEvent = {
event : {dtstart: dtstart, dtend: dtend},
keepTime: true,
then : enyo.bind(this, this.createEventThen)
};
enyo.application.share({createEvent: createEvent}); // Request event creation.
}
else {
var event = JSON.parse(JSON.stringify(eventOrFreeTime));
enyo.application.share({showEvent: event});
}
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
createEventThen: function createEventThen(event) {
if (!event) {
this.error("Failed to create event GUI using event [", event, "]");
return;
}
enyo.application.share({showEvent: event}); // Request showing the event.
},
formatTimeLabel : function formatTimeLabel() {
this.$.eventList.render();
},
/*
* Take the days object formatted:
{ timestampAsString1: {events: [], allDayEvents: [], ...},
timestampAsString2: {events: [], allDayEvents: [], ...},
...
}
and produce an array: [timestamp1, timestamp2, timestamp3, ...]
We need this so we can easily tie a date to an index and use it with the VirtualRepeater.
*/
createDatesArray: function makeDatesArray(days) {
var dates = [];
var sameMonth = true;
for (var day in days) {
if (days.hasOwnProperty(day)) {
dates.push(Number(day));
}
}
this.datesArray = dates;
},
sortByStartDecimal: function sortByStartDecimal(a, b) {
if (a.start_decimal < b.start_decimal) {
return -1;
}
if (a.start_decimal > b.start_decimal) {
return 1;
}
return 0;
},
markFreeTimes : function markFreeTimes(freeTimes) {
var length = freeTimes.length;
for (var i = 0; i < length; i++) {
freeTimes[i].isFreeTime = true;
}
},
/*
* The agenda view shows a chronological list of all day events, followed by timed events,
* possibly interspersed with free time items. Since we're using a VirtualRepeater, we need
* an ordered array of all these things together, so we can access it via index number.
* This function takes the days object formatted:
* { date1: {events: [], allDayEvents: [], ...},
* date2: {events: [], allDayEvents: [], ...},
* ...
* }
* and produces an array: [ [date1_allDayEvents + date1_events (+ date1_freetimes_optional)], [date2_allDayEvents + date2_events (+ date2_freetimes_optional) ], ...]
*/
createEventsArray: function makeEventsArray(days) {
var allEvents = [],
dayEvents,
day,
temp;
for (var date in days) {
day = days[date];
dayEvents = [];
if (this.showFreeTime) {
//mark each free time as such, so we can tell it apart from an event
this.markFreeTimes(day.freeTimes);
//interleave the events and free times
temp = [];
temp = day.events.concat(day.freeTimes);
temp.sort(this.sortByStartDecimal);
//stick this day's events and free times together into one big array
dayEvents = day.allDayEvents.concat(temp);
}
else {
dayEvents = day.allDayEvents.concat(day.events);
}
allEvents.push(dayEvents);
}
this.eventsArray = allEvents;
},
/* Create the outer date list item:
* date1 <---------------------
* -- event1
* -- event2
* date2
* -- event1
*/
makeDateListItem : function makeDateListItem(inSender, inIndex) {
var dates = this.datesArray,
date = dates && (inIndex < dates.length) && dates[inIndex],
ui = this.$,
tm = this.timeMachine,
formatter;
if (!date) {
return;
}
this.eventsList = this.eventsArray[inIndex];
ui.emptyLabel.setShowing(this.eventsList && this.eventsList.length == 0);
if (this.divideIntoDays) {
tm.setTime(date);
formatter = ui.formatterCache.getFormatter("dayOfWeek");
var dow = formatter.format(tm);
ui.dateLabel.setContent(tm.getDate());
ui.dayOfWeekLabel.setContent(dow);
//Check if we changed months between any of the date list items. If so,
//Set the month name as the caption on the divider.
if (inIndex > 0) {
var month,
lastMonth;
tm.setTime(dates[inIndex - 1]);
lastMonth = tm.getMonth();
tm.setTime(date);
month = tm.getMonth();
if (month != lastMonth) {
formatter = ui.formatterCache.getFormatter("monthName");
var monthName = formatter.format(tm);
ui.divider.setCaption(monthName);
}
}
} else {
//Don't want to be divided by days? Hide the divider and date indicator.
ui.divider.setShowing(false);
ui.dateBox.setShowing(false);
}
return true;
},
/* Create the inner list item that may represent an event or a free-time item
* date1
* -- event1 <---------------------
* -- freeTime2
* -- event 3
*
*/
makeEventListItem: function makeEventListItem(inSender, inIndex) {
var events = this.eventsList,
eventOrFreeTime = events && (inIndex < events.length) && events [inIndex],
ui = this.$,
formatter = ui.formatterCache.getFormatter("time");
if (!eventOrFreeTime) {
return;
}
ui.item.setFormat(formatter);
ui.item.setIsFreeTime(eventOrFreeTime.isFreeTime);
ui.item.setEvent(eventOrFreeTime);
return true;
}
});
@@ -0,0 +1,61 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: calendar.day.AllDayEvent is the Calendar app's GUI representation of all-day calendar events.
**/
enyo.kind({
name : "calendar.day.AllDayEvent",
className : "allday-event",
kind : "calendar.EventView",
components: [
{name: "text", className: "text ellipsis", layoutKind: enyo.HLayout}
],
create: function create() {
this.inherited(arguments);
},
destroy: function destroy() {
this.inherited(arguments);
},
clickHandler: function allDayEventClicked(from, domEvent) {
enyo.application.share({showEvent: this});
return true;
},
mousedownHandler: function (from, domEvent) {
this.addClass("held");
},
mouseupHandler: function (from, domEvent) {
this.removeClass("held");
},
dragstartHandler: function (inSender, inEvent) {
this.removeClass("held");
},
eventChanged: function allDayEventChanged(oldEvent) {
this.event && this.$.text.setContent(this.event.subject || $L("No Subject"));
this.inherited(arguments);
}
});
@@ -0,0 +1,136 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: calendar.day.DayCarousel allows interacting with Calendar's Day View as
either a horizontal or vertical carousel.
TODO: FIX: enyo.DomNode.showingChanged() should be called on destroy() as it is on create()!
TODO: FIX: enyo.Carousel.fetchView ("center") returns left view after 1st scroll!
TODO: PLAN: Change "events" watch type to "cache" since we're watching cache changes.
TODO: PLAN: Create base component for Day, Week, and month Carousels to inherit from.
**/
enyo.kind({
name : "calendar.day.DayCarousel",
kind : enyo.VFlexBox,
published : {
currentDate: null, // Date : For watching when the current date changes.
events : null // Object : For watching Calendar Events (aka cache updates).
},
components: [
{name: "dayCarousel", kind: calendar.VirtualCarouselAdaptor, flex: 1, onSetupView: "setupView", viewControl: {kind: calendar.day.DayViewFrame}}
],
create: function create() {
this.inherited(arguments);
enyo.application.watch({ events: this });
},
destroy: function destroy() {
enyo.application.ignore({ events: this }); // NOTE: Ignore currentDate here b/c DomNode.showingChanged() is only called on create() not on destroy()
this.inherited(arguments);
},
currentDateChanged: function currentDateChanged(oldDate) {
// NOTE: this.generated is a protected enyo property
if (!(this.generated && this.showing)) { // Avoid GUI updates if not rendered or showing.
return;
}
var currentDate = enyo.application.currentDate;
DEBUG && this.log("\tCurrentDay: [", this.currentDay, "]\tCurrentDate: [", currentDate, "]\t");
if (!this.currentDay || (+this.currentDay != +currentDate)) { // If the current day isn't already being displayed:
!this.currentDay && (this.currentDay = new Date()); // Create the current day if it doesn't exist.
currentDate && (this.currentDay.setTime(+currentDate)); // Update the current day to the actual current date if it exists.
this.currentDay.clearTime(); // Reset the current day's time to midnight.
DEBUG && this.log("\n\n============ DAY:", String(this.currentDay), "============\n\n");
this.viewsReady = false; // VirtualCarousel doesn't allow you to pass through any additional parameters to setupView so we have to do this.
this.$.dayCarousel.renderViews(0);
this.viewsReady = true;
}
this.eventsChanged(); // Fetch a full range of events.
},
eventsChanged: function eventsChanged(oldEvents) {
if (!this.showing || !this.currentDay) { // Avoid updating the GUI if it's not visible or currentDay doesn't exist.
return;
}
var date = new Date(this.currentDay).clearTime(),
expand = 1;
enyo.application.cacheManager.getDays({ date: date, expand: expand }); // Center-out querying requerys carousel's left & right views' events.
},
showingChanged: function showingChanged(wasShowing) {
this.inherited(arguments);
var showing = this.showing;
// NOTE: this.generated is a protected enyo property
if (!this.generated) { // Avoid GUI updates if not rendered or if already showing.
return;
}
this.broadcastMessage("isActive", [showing]); // Activate carousel views so they watch/ignore events as needed.
},
// BEGIN :-------: Custom Handlers :--------------------------------------------------------------------------------------------------------------------------//
viewSwitchedHandler: function viewSwitchedHandler(viewName) {
this.broadcastMessage("becameCurrentPane", [(viewName == "dayCarousel")]);
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
fetchCurrentView: function fetchCurrentView() {
var view = this.$.dayCarousel.fetchCurrentView();
return view && view.fetchCurrentView();
},
getViewDate: function getViewDate() {
return new Date(this.currentDay || enyo.application.currentDate);
},
setupView: function setupView(inSender, inView, inViewIndex) {
var viewDate = (new Date(this.currentDay)).addDays(inViewIndex);
if (this.viewsReady) {
// Update currentDay to the center view.
var currentDayOffset = inViewIndex > 0 ? 1 : -1;
// this.log("setupView(): currentDayOffset: " + currentDayOffset);
this.currentDay.addDays(currentDayOffset);
DEBUG && this.log("\n\n============ DAY:", String(this.currentDay), "============\n\n");
// Immediately update the app's current date to the current day's date.
enyo.application.currentDate.setTime(+this.currentDay);
enyo.application.cacheManager.getDays({date: viewDate, expand: 0}); // We may need to do this after setting the date on the view if we switch to synchronous Days shares.
}
inView.setDate(viewDate);
//this.log("Current View index",inViewIndex, "Carousel view index",this.$.dayCarousel.viewIndex,"Center index",this.$.dayCarousel.centerIndex,"SnapScroll index",this.$.dayCarousel.index);
return true;
}
});
@@ -0,0 +1,347 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
NOTE: The DayEventGroup is a very customized Enyo control
- It is mandatory to pass in an array of events that have gone through layoutmanager.positionEvents
- Once an array of positioned events is passed to it, DayEventGroup generate custom HTML into itself that will render as defined by layoutManager
- DayEventGroup is one big clickHandler, when tapped, it will determine if an empty hour was clicked or one of its events, and share the data accordingly
**/
enyo.kind({
name : "calendar.day.DayEventGroup",
className : "eventGroup",
kind : "Control",
defaultKind : "calendar.day.DayEvent",
timeMachine : new Date(),
hourHeight : 59,
minWidthToShowText : 30,
minHeightToShowLocation: 38,
minHeightToShowNote : 58,
published : {
events: null, // Object : For setting this group's events.
date : null,
edge : "none"
},
edges : {
"default": {width: 12, borderWidth: 2, spacing: 2, className: " edge"}, // edge's width and total border width (left+right) and spacing (left+right)
none : {width: 0, borderWidth: 0, spacing: 0, className: ""}
},
G11N : {
defaults: {
subject: $L("No Subject")
}
},
components : [
{kind: "ApplicationEvents", onWindowRotated: "windowRotatedHandler"}
],
create: function create() {
this.inherited(arguments);
this.performResize = enyo.bind(this, this.performResize);
this.changeEventColor = enyo.bind(this, this.changeEventColor);
this.resetEventColor = enyo.bind(this, this.resetEventColor);
this.eventsChanged();
},
destroy: function destroy() {
this.watched && window.removeEventListener('resize', this.performResize, true) && (this.watched = false);
this.inherited(arguments);
},
rendered: function () {
this.getDimensions();
this.inherited(arguments);
},
// BEGIN :-------: Framework Handlers :-----------------------------------------------------------------------------------------------------------------------//
clickHandler: function (inSender, domEvent) {
if (inSender.id == domEvent.target.id) {
this.createTimedEvent(domEvent);
return true;
} else {
var domSubstr = domEvent.target.id.split(inSender.id)[1];
var numEvents = this.events.length;
var event;
for (var i = 0; i < numEvents; i++) {
event = this.events[i];
if (domSubstr.indexOf(event._id) >= 0) {
DEBUG && this.log("You clicked on: " + event.subject);
var eventToShow = JSON.parse(JSON.stringify(event));
enyo.application.share({showEvent: eventToShow});
return true;
}
}
this.log(domEvent.target.id);
this.log(inSender.id);
return false;
}
},
mousedownHandler: function (inSender, inEvent) {
this.timerOn = false;
if (inSender.id !== inEvent.target.id) { //an event was clicked
this.mouseDownTimeOut = setTimeout(this.changeEventColor, 150, inSender, inEvent);
this.timerOn = true;
}
},
mouseupHandler: function (inSender, inEvent) {
if (this.timerOn) {
this.changeEventColor(inSender, inEvent);
this.mouseUpTimeOut = setTimeout(this.resetEventColor, 250, inSender, inEvent);
} else {
this.resetEventColor(inSender, inEvent);
}
},
dragstartHandler: function (inSender, inEvent) {
if (this.timerOn) {
clearTimeout(this.mouseDownTimeOut);
this.timerOn = false;
} else {
this.resetEventColor(inSender, inEvent);
clearTimeout(this.mouseDownTimeOut);
}
},
windowRotatedHandler: function windowRotatedHandler(from, event) {
if (!this.isVisible()) {
this.rotatedWhileHidden = true;
}
},
// BEGIN :-------: Custom Handlers :--------------------------------------------------------------------------------------------------------------------------//
childNeedsResizeHandler: function childNeedsResizeHandler(resizeNeeded) {
this.becameCurrentPaneHandler(resizeNeeded);
},
becameCurrentPaneHandler: function becameCurrentPaneHandler(isCurrentPane) {
if (isCurrentPane && this.rotatedWhileHidden) {
this.rotatedWhileHidden = false;
this.isCurrentPane = true;
this.performResize();
}
else {
this.isCurrentPane = false;
}
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
eventsChanged: function eventsChanged(inOldEvents) {
if (!this.events) {
return;
}
//if(this.events == inOldEvents) {
// return;
//}
this.calcEventPositions();
this.render();
},
edgeChanged: function edgeChanged(oldEdge) {
var edge = this.edge;
// Sanitize the new edge settings
if (!edge || !this.edges[edge]) {
edge = "none";
}
// If there is a edge and was a old edge, drop out if it hasn't changed.
if (edge && edge === oldEdge) {
return;
}
this.eventsChanged();
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
changeEventColor: function changeEventColor(inSender, inEvent) {
this.timerOn = false;
var domSubstr = inEvent.target.id.split(inSender.id)[1];
var numEvents = this.events.length;
var innerElements = this.node.children;
var event;
for (var i = 0; i < numEvents; i++) {
event = this.events[i];
if (domSubstr.indexOf(event._id) >= 0) { //clicked event
this.clickedElement = i;
innerElements[i].className += ' held';
break;
}
}
},
resetEventColor: function resetEventColor(inSender, inEvent) {
this.timerOn = false;
clearTimeout(this.mouseDownTimeOut);
if (inSender.id !== inEvent.target.id) {
var innerElements = this.node.children;
for (var i = 0; i < innerElements.length; i++) {
if (i == this.clickedElement) {
var edge = this.edge || "none";
edge = edge && this.edges[edge] || this.edges.none;
innerElements[i].className = 'event theme-' + this.events[i].color + edge.className;
break;
}
}
}
},
isVisible: function isVisible() {
var obj = this;
if (!obj.parent) {
return false;
}
while (obj.parent) {
if (obj.parent.showing == false) {
return false;
}
obj = obj.parent;
}
return true;
},
performResize: function performResize() {
if (this.isCurrentPane || this.isVisible()) {
this.calcWidth = undefined;
this.calcHeight = undefined;
this.eventsChanged(/*this.events*/);
}
},
getDimensions: function () {
/* Calculate the height and width of the current container, using cached values if available (prevents DOM layouts) */
var width, height;
if (this.calcWidth || this.calcHeight) {
// console.log("Cached size");
return {width: this.calcWidth, height: this.calcHeight};
} else {
var node = this.hasNode();
this.calcWidth = width = node.offsetWidth;
this.calcHeight = height = node.offsetHeight;
if (!this.watched) {
var self = this;
// console.log("Adding watcher");
window.addEventListener('resize', this.performResize, true);
this.watched = true;
}
return {width: this.calcWidth, height: this.calcHeight};
}
},
calcEventPositions: function () {
/* Go through all events and figure out their top, left, height, and width with respect to the current container */
var width = this.getDimensions().width;
var hourHeight = this.hourHeight;
for (var i = 0; this.events && i < this.events.length; i++) {
var event = this.events[i],
end = event.renderEndTime || event.dtend,
start = event.renderStartTime || event.dtstart,
minutes = ((end - start) / 60000),
height = (minutes < 30 ? 30 : minutes * hourHeight / 60) - 1,
top = this.timeMachine.setTime(start) && this.timeMachine.getMinutes(),
thisHour = Math.floor(event.start_decimal / 100);
top = top + thisHour * hourHeight;
event.top = top;
event.height = height;
event.width = width / event.overlap_count;
event.left = event.overlap_index * width / event.overlap_count;
}
},
createTimedEvent: function createTimedEvent(domEvent) {
this.timeMachine.setTime(this.date || Date.now())
var date = this.timeMachine;
var hour = Math.floor(domEvent.offsetY / 59), // Store the current hour.
minute = 0; //Math.ceil (date.getMinutes() / 15) * 15 // Calculate the closest 15 minute interval after the current time.
date.clearTime(); // Set the event's time to midnight.
date.set({hour: hour, minute: minute}); // Set the event's hour and minute.
var createEvent = {
event: {dtstart: +date},
then : enyo.bind(this, this.createEventThen, hour, true)
};
enyo.application.share({createEvent: createEvent}); // Request event creation.
return true;
},
createEventThen: function createEventThen(hour, show, event) {
if (!event) {
this.error("\tFailed to create event GUI using event [", event, "] and hour [", hour, "].\t");
return;
}
show && event && enyo.application.share({showEvent: event}); // Request showing the event.
},
getInnerHtml: function () {
/* This control exists to encapsulate all would-be children, as such we don't actually create real enyo children, instead we generate the visual components ourselves, as done by the getInnerHtml routine */
var events = this.events;
if (!events) {
return '';
}
var event,
id,
htmlString = '',
idPrefix = this.id,
numEvents = events && events.length,
edge = this.edges[this.edge] || this.edges.none,
edgeWidth = edge.width + edge.borderWidth + edge.spacing,
widthDiff = edgeWidth + 2, // 2 accounts for the event's border
minWidthToShowText = this.minWidthToShowText + widthDiff,
minHeightToShowLocation = this.minHeightToShowLocation,
minHeightToShowNote = this.minHeightToShowNote;
for (var i = 0; i < numEvents; i++) {
event = events[i];
id = idPrefix + '_' + event._id;
htmlString += '<div id="' + id + '" class="event theme-' + event.color + edge.className + '" style="'
+ 'top:' + (event.top) + 'px;'
+ 'left:' + (event.left + edgeWidth) + 'px;'
+ 'width:' + (event.width - widthDiff) + 'px;'
+ 'height:' + (event.height) + 'px;">'
;
if (event.width > minWidthToShowText) {
htmlString += '<div id="' + id + '_subject" class="ellipsis subject">' + enyo.string.escapeHtml(event.subject || this.G11N.defaults.subject) + '</div>';
/* Don't display location or note if we're too small */
if (event.height > minHeightToShowLocation) {
htmlString += '<div id="' + id + '_location" class="ellipsis location">' + enyo.string.escapeHtml(event.location || '') + '</div>';
/* Don't display note if we're too small */
if (event.height > minHeightToShowNote) {
htmlString += '<div id="' + id + '_note" class="ellipsis note">' + enyo.string.escapeHtml(event.note || '') + '</div>';
}
}
}
htmlString += '</div> ';
}
return htmlString;
}
});
+135
View File
@@ -0,0 +1,135 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name : "calendar.day.DayHours",
className : "hourLabels",
kind : enyo.Control,
defaultKind: "calendar.day.DayHoursBlock",
published : {
is24Hr: false // Boolean : For accepting 24hr clock mode changes.
},
G11N : {
DateTimeHash: (new enyo.g11n.Fmts()).dateTimeHash,
Noon : $L("Noon")
},
create: function create() {
this.inherited(arguments);
this.hours = [];
for (var i = 0; i < 24; ++i) {
this.hours.push(this.createComponent());
}
if (this.is24Hr === undefined) {
//coming from weekview
this.setIs24Hr(!enyo.application.fmts.isAmPm()); // If 24Hr isn't set yet, grab the default setting.
} else {
//coming from dayview
this.is24HrChanged();
}
},
destroy: function destroy() {
this.inherited(arguments);
},
// BEGIN :-------: Custom Handlers :--------------------------------------------------------------------------------------------------------------------------//
is24HrHandler: function is24HrHandler(is24Hr) {
this.setIs24Hr(is24Hr);
},
// BEGIN :-------: Property Change Handlers :-----------------------------------------------------------------------------------------------------------------//
is24HrChanged: function is24HrChanged(was24Hr) {
var is24Hr = this.is24Hr = !!this.is24Hr; // Ensure is24Hr is a boolean value.
if (was24Hr !== undefined && is24Hr == was24Hr) { // 24Hr mode was previously defined and still has the same value:
return; // So do nothing.
}
var hourLabel,
hours = this.hours,
numHours = hours && hours.length,
g11n = this.G11N,
noon = g11n.Noon,
am = g11n.DateTimeHash.am,
pm = g11n.DateTimeHash.pm;
for (var hour = 0, last = numHours; hour < last; ++hour) {
hourLabel = hours [hour];
if (hourLabel) {
hourLabel.setHourLabel(hour == 12 ? noon : Utilities.formatHour(hour, is24Hr));
hourLabel.setAMPM(is24Hr || hour == 12 ? "" : hour < 12 ? am : pm);
}
}
}
});
enyo.kind({
name : "calendar.day.DayHoursBlock",
className : "hourLabelBlock active", // Added the "active" class by default.
kind : enyo.Control,
published : {
AMPM : "",
hour : -1,
hourLabel : "",
isActiveHour : false,
isCurrentHour: false
},
components: [
{className: "label", layoutKind: enyo.HLayout, components: [
{name: "hourLabel", className: "number"},
{name: "AMPM", className: "ampm"}
]},
{className: "halfMarker"},
{name: "current", className: "current", showing: false}
],
create: function create() {
this.inherited(arguments);
},
// BEGIN :-------: Property Change Handlers :-----------------------------------------------------------------------------------------------------------------//
AMPMChanged: function AMPMChanged(oldAMPM) {
if (this.AMPM == oldAMPM) {
return;
}
this.$.AMPM.setContent(this.AMPM);
},
hourLabelChanged: function hourLabelChanged(oldHourLabel) {
if (this.hourLabel == oldHourLabel) {
return;
}
this.$.hourLabel.setContent(this.hourLabel);
},
isActiveHourChanged: function isActiveHourChanged(wasActiveHour) {
// if (this.isActiveHour == wasActiveHour) { return; }
// this [true/*this.isActiveHour*/ ? "addClass" : "removeClass"] ("active"); // Per HI's new design, make all hours active (i.e. no inactive "greyed out" hours)
},
isCurrentHourChanged: function isCurrentHourChanged(wasCurrentHour) {
if (this.isCurrentHour == wasCurrentHour) {
return;
}
this.isCurrentHour ? this.$.current.show() : this.$.current.hide();
// this.$.current [this.isCurrentHour ? "addClass" : "removeClass"] ("current");
}
});
+244
View File
@@ -0,0 +1,244 @@
/* @@@LICENSE
*
* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* LICENSE@@@ */
.calendar .day {
background : none;
border : 1px solid #dbdbdb;
overflow : hidden;
}
.calendar .day .header {
background : #fff url(images/allday-header-border.png) repeat-x bottom;
border : none;
/* border-bottom : 1px dotted #ccc;*/
color : #333;
font-size : 48px;
font-weight : 100;
overflow : hidden;
padding : 6px 22px 18px;
white-space : pre;
height : 82px;
}
.calendar .day .header .date-highlight{
font-weight : bold;
text-align : right;
}
.calendar /*.month*/ .header .date-normal{
font-family : PreludeWGL-Light;
}
/*.position {
margin-top: -5px;
}*/
.calendar .day .header .today {
font-size : 16px;
font-weight : 700;
margin-right : 10px;
margin-top : 20px;
}
.calendar .day .allday-header {
background-color : #fff;
/* background : url(images/allday-header-border-shadow.png) repeat-x bottom;*/
background : url(images/allday-header-border.png) repeat-x bottom;
border-right : none;
border-left : none;
min-height : 35px;
max-height : 35px;
padding-bottom : 2px;
overflow : hidden;
padding-left : 22px;
}
.calendar .day .allday-header .label{
color : #666666;
font-size : 14px;
line-height : 36px;
margin-right : 10px;
}
.calendar .day .allday-header .allday-event {
margin : 8px 3px 8px 0px;
padding : 0px 8px;
-webkit-border-radius : 16px;
}
.calendar .day .allday-header .allday-event .text{
color : #333;
font-weight : bold;
font-size : 12px;
opacity : 0.8;
padding : 3px;
text-align : center;
min-width : 50px;
max-width : 150px;
}
.calendar .hour {
border-top : 1px solid #b9b9b9;
height : 59px;
padding : 0 10px;
}
/*
.calendar .day .hour:first-child{
margin-top : 29px;
}
*/
.calendar .day .hour:last-child{
margin-bottom : 39px;
}
.calendar /*.day*/ .hour .active {
background-color : #fff;
}
.calendar .day-container {
width : 100%;
height : 1440px;
overflow : hidden;
padding-top : 29px;
}
.calendar .hourLabelBlock {
position : relative;
color : #333;
height : 59px;
width : 100%;
background : url(images/day-hour-markers.png) no-repeat;
font-size : 11px;
}
.calendar /*.day*/ .hourLabelBlock .current {
background-image : url(images/day-hour-now-indicator.png);
background-repeat : no-repeat;
background-position : left -1px;
position : relative;/*fixed;*/
top : 0px;
left : 0px;
height : 59px;
width : 5px;
}
.calendar /*.day*/ .hourLabelBlock .label { /* Hour's label. */
border : none;
position : absolute;
top : -7px;
left : 22px;
color : #333;
font-size : 11px;
padding-right : 7px;
text-align : left;
width : 36px; /* TODO: Figure out the minimum width for all locales since 12pm is text (i.e. Noon)*/
}
.calendar /*.day*/ .hourLabelBlock .label .number{/* Hour's number label. */
font-weight : bold;
margin-right : 2px;
}
.calendar .hourLabelBlock .halfMarker {
background : url(images/day-hour-30min-divider.png) repeat-x;
display : inline-block;
position : absolute;
top : 28px;
left : 27px;
width : 965px;
height : 5px;
z-index : -1;
}
.calendar .hourLabels {
display : block;
height : 1440px;
width : 65px;
}
.calendar /*.day*/ .hour .half {
width : 36px;
margin : 1px 0px 0px -36px;
}
.calendar /*.day*/ .hourLabels .ampm{
font-family : PreludeWGL-Light;
font-size : 85%;
}
.calendar .day .event { /* Event's body */
font-size : 13px;
z-index : 1;
}
.calendar .day .event.edge:after { /* Event's leading edge */
content : "";
top : -1px;
left : -16px;
width : 12px;
height : 100%;
}
.calendar .day .event,
.calendar .day .event.edge:after { /* Event's body and leading edge. */
margin : 0px;
position : absolute;
background-image : url(../../images/glossy-top-highlight.png);
background-repeat : repeat-x;
border-radius : 4px;
border-style : solid;
border-width : 1px;
vertical-align : top;
}
.calendar .day .event .subject ,
.calendar .day .event .location ,
.calendar .day .event .note {
line-height : 16px;
margin-left : 7px;
margin-right : 5px;
min-height : 16px;
overflow : hidden;
text-overflow : ellipsis;
white-space : nowrap;
}
.calendar .day .event .subject {
margin-top : 5px;
color : #333;
font-weight : bold;
}
.calendar .day .event .location {
color : #666666;
font-size : 12px;
}
.calendar .day .event .note {
color : #666666;
font-size : 12px;
margin-bottom : 1px;
padding-top : 1px;
}
.calendar .day .eventGroup {
background : -webkit-gradient( linear, 0 0, 0 100%, color-stop( .02, transparent ), color-stop( .0, #b9b9b9 ), to( rgba( 0, 0, 0, 0.0 ) ) );
-webkit-background-size : 1px 59px;
}
.calendar .day .event-item .label{
margin-left : 20px;
}
.calendar .day .event-item .legend {
background-image : url(../../images/glossy-top-highlight.png);
background-repeat : repeat-x;
height : 26px;
width : 26px;
padding : 0;
-webkit-border-radius : 4px;
margin-top : 4px;
margin-left : 15px;
}
.calendar .day .event-item .free-time-item {
background-color : #AAA
}
+345
View File
@@ -0,0 +1,345 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/**
TODO: FIX: enyo.Scroller::destroyComponents destroys .scroll component which then causes errors on .render()!
- Workaround it by wrapping the .destroyComponents target in a Scroller.
TODO: PLAN: Integrate LayoutManager for proper event layout (i.e. adjacency grouping & earliest to left).
TODO: PLAN: Scroll day after loading events; if not today scroll to 1 hr. before the earliest event.
*/
enyo.kind({
name : "calendar.day.DayView",
className : "day",
kind : enyo.VFlexBox,
published : {
calendars : null,
clock : null, // Date : For observing clock changes.
date : null, // Date : This day's date.
days : null, // Object : Day-formatted Calendar Events.
inWeekView: false, // Boolean : Whether this view is being used within weekView.
is24Hr : undefined, // Boolean : For accepting 24hr clock mode changes.
isToday : false
},
G11N : {
Events: $L("Events:")
},
components: [
{name: "allDayContainer", className: "allday-header", kind: enyo.HFlexBox, showing: false, components: [
{name: "allDayLabel", className: "label"},
{kind: enyo.Scroller, name: "allDayScroller", flex: 1, components: [
{name: "allDayHeader", defaultKind: "calendar.day.AllDayEvent", onclick: "createAllDayEvent"}
]}
]}
],
constructor: function DayView() {
this.timeMachine = new Date(); // For calculating date/times without creating new instances.
this.date = new Date(); // Creating a date for reuse (instead of using setDate() outside of the view.
this.inherited(arguments);
this.watches = {
clock: this // Date : For watching the system clock's time changes.
};
},
create: function create() {
this.inherited(arguments);
this.is24Hr === undefined && this.setIs24Hr(!enyo.application.fmts.isAmPm()); // If 24Hr isn't set yet, grab the default setting.
this.updateCurrentHour = enyo.bind(this, this.updateCurrentHour);
this.createDay();
var ui = this.$;
if (this.inWeekView) {
ui.allDayLabel.destroy();
ui.allDayHeader.setLayoutKind(enyo.VLayout);
ui.allDayScroller.setAutoVertical(true);
ui.allDayScroller.setAutoHorizontal(true);
ui.allDayContainer.applyStyle("height", "100%");
}
else {
ui.allDayLabel.setContent(this.G11N.Events); // Show the all-day "Events:" label.
ui.allDayHeader.setLayoutKind(enyo.HLayout);
ui.allDayScroller.setVertical(false);
this.broadcastMessage("isActive", [true]); // Already would've been activated by WeekView.
}
},
destroy: function destroy() {
this.broadcastMessage("isActive", [false]);
this.inherited(arguments);
},
// BEGIN :-------: Custom Handlers :--------------------------------------------------------------------------------------------------------------------------//
childrenNeedResizeHandler: function childrenNeedResizeHandler(resizeNeeded) {
this.broadcastMessage("childNeedsResize", [resizeNeeded]);
},
becameCurrentPaneHandler: function becameCurrentPaneHandler(isCurrentPane) {
this.eventGroup && this.eventGroup.broadcastMessage("becameCurrentPane", [isCurrentPane]);
},
isActiveHandler: function isActiveHandler(isActive) { // TODO: FIX: This is being double-called on DayCarousel.destroy()
var handle = isActive ? "watch" : "ignore";
isActive && this.showingChanged();
this.inWeekViewChanged(this.inWeekView); // We aren't changing whether we are in week view or not but inWeekViewChanged checks to see if this has changed, so pass in the current variable.
enyo.application [handle](this.watches);
this.$.allDayHeader.broadcastMessage("isActive", [isActive]); // Notify all-day events of active state.
},
is24HrHandler: function is24HrHandler(is24Hr) {
this.setIs24Hr(is24Hr);
if (!this.inWeekView) {
this.$.hourLabels.broadcastMessage("is24Hr", [is24Hr]); // Pass the message on to the hour labels.
}
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
clockChanged: function clockChanged(oldClock) {
this.updateCurrentHour({scroll: false}); // Don't scroll when the hour changes; user may want to stay on the specific date and/or time. TODO: Auto-scroll preference?
},
dateChanged: function dateChanged(oldDate) {
var date = this.date;
if (!date) {
return;
}
this.days = undefined;
this.eventGroup.setDate(new Date(date));
this.clearEventDisplay();
if (!this.inWeekView) {
this.updateCurrentHour({scroll: true});
}
},
daysChanged: function daysChanged(oldDays) {
var day = this.days && this.days[+this.date];
if (!this.showing || !day) {
DEBUG && this.warn("\tNo event updates available for: ", this.date, "\t");
return;
}
DEBUG && this.log("\tRequest rendering events for day: ", this.date, "...:\n\n\t");//, days, "\n\n\t");
this.updateHours({allDayEvents: day.allDayEvents, events: day.events});
},
inWeekViewChanged: function inWeekViewChanged(wasInWeekView) {
this.showing && this.$.allDayContainer && this.$.allDayContainer.setShowing(!!this.inWeekView); // Always show all-day header if in Week View.
},
showingChanged: function showingChanged(wasShowing) {
this.inherited(arguments);
if (this.showing) {
this.updateCurrentHour({scroll: true});
this.daysChanged();
}
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
clearEventDisplay: function clearEventDisplay() {
this.updateHours({allDayEvents: [], events: []});
},
createDay: function createDay() {
var inWeekView = this.inWeekView,
hourContainer = inWeekView ? {kind: enyo.Control} : {kind: enyo.Scroller, horizontal: false, vertical: true},
hoursContainer,
is24Hr = this.is24Hr;
hourContainer.className = "hours";
hourContainer.name = "hours";
hourContainer.flex = 1;
hourContainer = this.createComponent(hourContainer);
this.inWeekView && (hoursContainer = hourContainer);
if (!inWeekView) {
var dayContainer = hourContainer.createComponent({name: "dayContainer", kind: enyo.HFlexBox, className: "day-container"}),
hourLabels = dayContainer.createComponent({name: "hourLabels", kind: "calendar.day.DayHours", owner: this, is24Hr: is24Hr}); // Build hour labels with the retained 24hr setting.
hoursContainer = dayContainer.createComponent({name: "hoursContainer", kind: enyo.Control, style: "height: 1440px; position: relative;", flex: 1});
}
this.eventGroup = hoursContainer.createComponent({
kind : "calendar.day.DayEventGroup",
flex : 1,
style: "position: relative; height: 1440px;",
owner: this,
edge : inWeekView ? "none" : "default"
});
},
createAllDayEvent: function createAllDayEvent(from, domEvent) {
if (!this.createAllDayEvent.then) {
this.createAllDayEvent.then = enyo.bind(this, this.createEventThen, null, true);
}
var createEvent = {
event: {allDay: true, dtstart: +this.date},
then : this.createAllDayEvent.then
};
enyo.application.share({createEvent: createEvent}); // Request event creation.
return true;
},
createEventThen: function createEventThen(hour, show, event) {
if (!event) {
this.error("\tFailed to create event GUI using event [", event, "] and hour [", hour, "].\t");
return;
}
var eventGUI;
if (event.allDay) {
eventGUI = this.$.allDayHeader.createComponent({event: event}); // create an all-day event GUI
}
else {
eventGUI = event;
}
show && eventGUI && enyo.application.share({showEvent: eventGUI}); // Request showing the event.
},
updateCurrentHour: function updateCurrentHour(options) {
/* Update the now indicator for the currently displayed day or hide it
if today is not the currently viewed day.
options?: {scroll?:Boolean}
*/
if (!this.showing || this.inWeekView || !this.$.hourLabels) {
return;
}
var dayDate = new Date(this.date || Date.now()), // Copy date to avoid external side-effects .
now = new Date(),
currentHour = now.getHours(), // Store the actual current hour.
isToday = this.isToday,
ui = this.$,
hourLabels = ui.hourLabels && ui.hourLabels.hours;
isFinite(this.currentHour) && hourLabels[this.currentHour].setIsCurrentHour(false); // Clear the now indicator if this isn't today or the current hour is wrong.
isToday && hourLabels[currentHour].setIsCurrentHour(true); // If this day is today, update the now (current hour) indicator.
this.currentHour = currentHour;
if (options && options.scroll) {
(currentHour > 0) && (--currentHour); // Scroll to the hour before the current hour.
currentHour = Math.min(currentHour, 17); // Can't scroll past 4pm anyway
var top = 59 * currentHour;
isFinite(top) && ui.hours.setScrollTop(top);
}
},
groupSort: function groupSort(a, b) {
if (a.group_id < b.group_id) {
return -1;
}
if (a.group_id > b.group_id) {
return 1;
}
if (a.group_id == b.group_id) {
if (a.overlap_index < b.overlap_index) {
return -1;
}
if (a.overlap_index > b.overlap_index) {
return 1;
}
if (a.overlap_index == b.overlap_index) {
if (a.start_decimal < b.start_decimal) {
return -1;
}
if (a.start_decimal > b.start_decimal) {
return 1;
}
if (a.start_decimal == b.start_decimal) {
if (a.end_decimal < b.end_decimal) {
return 1;
}
if (a.end_decimal > b.end_decimal) {
return -1;
}
}
}
}
return 0;
},
updateHours: function updateHours(events) {
/* Changes the events displayed in the day's hours:
events : Object : A collection of events mapped by their ids.
*/
if (!events) {
this.error("\tUnable to render the day using the invalid events available:\n\n\t", events, "\n\n\t");
return;
}
var control,
event,
allDayHeader = this.$.allDayHeader,
allDayControls = allDayHeader.getControls(),
allDayEvents = events.allDayEvents,
controlIndex = 0,
hasRenderContent = !!allDayHeader.renderContent,
numAllDay = allDayEvents.length,
numControls = allDayControls.length,
hidSomething = false;
// If we already have allDayEvent controls, let's reuse them.
for (; controlIndex < numControls; ++controlIndex) {
control = allDayControls[controlIndex];
event = allDayEvents[controlIndex];
// If we have a control and there is an event to go with it, set the event. Otherwise, hide the control.
if (event) {
DEBUG && this.log("\tGrouping all-day event (Reusing existing control):\n\n\t", event, "\n\n\t");
control.setEvent(event);
control.show();
} else {
DEBUG && this.log("\tHiding all-day event control.\n\n\t");
control.setEvent(null);
control.hide();
hidSomething = true;
}
}
hidSomething && this.$.allDayScroller.setScrollLeft(0); //reset the scroll position all the way to the left, so we didn't leave the user on a blank area of the scroller
// If we ran out of available controls, build some for the rest of the allDayEvents.
for (; controlIndex < numAllDay; ++controlIndex) {
event = allDayEvents[controlIndex];
DEBUG && this.log("\tGrouping all-day event (Creating new control):\n\n\t", event, "\n\n\t");
allDayHeader.createComponent({event: event});
}
(numAllDay > 0) && (hasRenderContent ? allDayHeader.renderContent() : allDayHeader.render()); // renderContent does less work but the enyo team is deprecating it...
this.$.allDayContainer.setShowing((numAllDay > 0) || !!this.inWeekView);
var timedEvents = events.events;
timedEvents.sort(this.groupSort);
this.eventGroup.setEvents(timedEvents);
}
});
@@ -0,0 +1,223 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name : "calendar.day.DayViewFrame",
className : "day",
kind : enyo.VFlexBox,
published : {
addEvent : null, // Object : For watching "add event" requests.
agendaMode: false,// Boolean: For watching agendaMode changes
calendars : null, // Object : For watching calendar changes
date : null, // Date : This day's date.
days : null // Object : For watching day-formatted Calendar Events.
},
G11N : {
DateFormat: {
"short": new enyo.g11n.DateFmt({date: "medium", weekday: true}),
full : new enyo.g11n.DateFmt({date: "full"})
},
Today : $L("Today")
},
components: [
{name: "header", className: "header", kind: enyo.HFlexBox, components: [
{name: "dateHeader", kind: "calendar.DateHeader", flex: 1},
{name: "today", className: "today", showing: false},
{name: "agendaButton", kind: enyo.CustomButton, toggling: true, caption: $L("Agenda"), onclick: "toggleAgendaMode", width: "100px", className: "enyo-button today"}
]},
{name: "agendaOrDayViewPane", kind: "Pane", transitionKind: "calendar.SimpleTransition", flex: 1, components: [
{name: "dayView", kind: "calendar.day.DayView", flex: 1},
{name: "dayAgendaView", kind: "calendar.AgendaView", flex: 1, showFreeTime: true, divideIntoDays: false}
]}
],
constructor: function DayViewFrame() {
this.timeMachine = new Date(); // For calculating date/times without creating new instances.
this.date = new Date(); // Creating a date for reuse (instead of using setDate() outside of the view.
this.inherited(arguments);
this.alwaysWatches = { agendaMode: this };
this.watches = {
addEvent : this, // Object : For watching "add event" requests.
calendars: this, // Object : For watching calendar changes.
days : this // Array : For watching event updates formatted "by day".
};
},
create: function create() {
this.inherited(arguments);
this.createEventThen = enyo.bind(this, this.createEventThen);
this.layoutManager = enyo.application.layoutManager;
this.busyFreeMgr = enyo.application.busyFreeManager
this.$.dateHeader.setFormats(this.G11N.DateFormat);
this.$.today.setContent(this.G11N.Today); // Update the "Today" indicator.
this.broadcastMessage("isActive", [true]); // Already would've been activated by WeekView.
enyo.application.watch(this.alwaysWatches);
},
destroy: function destroy() {
this.broadcastMessage("isActive", [false]);
enyo.application.ignore(this.watches);
enyo.application.ignore(this.alwaysWatches);
this.inherited(arguments);
},
// BEGIN :-------: Custom Handlers :--------------------------------------------------------------------------------------------------------------------------//
isActiveHandler: function isActiveHandler(isActive) { // TODO: FIX: This is being double-called on DayCarousel.destroy()
var handle = isActive ? "watch" : "ignore";
isActive && this.showingChanged();
enyo.application [handle](this.watches);
this.$.dayView.broadcastMessage("isActive", [isActive]); // Notify all-day events of active state.
},
becameCurrentPaneHandler: function becameCurrentPaneHandler(isCurrentPane) {
this.$.dayView.broadcastMessage("becameCurrentPane", [isCurrentPane]);
},
// BEGIN :-------: Published Property Handlers :--------------------------------------------------------------------------------------------------------------//
addEventChanged: function addEventChanged(lastEventAdded) {
DEBUG && this.log("Event: ", this.addEvent);
var eventDate = this.timeMachine,
event = this.addEvent && this.addEvent.event,
show = !!(this.addEvent && this.addEvent.show),
start = event && parseInt(event.dtstart, 10);
this.addEvent = null; // Clear this day's add event request.
enyo.application.free({addEvent: true}); // Clear any kept add event data.
eventDate.setTime(isFinite(start) ? start : (start = Date.now()));
var hour = eventDate.getHours();
eventDate.clearTime();
start = +eventDate; // TODO: What about events ending on this day? Handled by EventManager? No...
if (+start == +this.date) { // If the event starts on this day:
this.createEventThen(hour, show, event); // create its GUI.
}
},
agendaModeChanged: function agendaModeChanged(oldAgendaMode) {
var agendaMode = !!this.agendaMode;
(agendaMode != !!oldAgendaMode) && this.$.agendaOrDayViewPane.selectViewByName(agendaMode ? "dayAgendaView" : "dayView");
this.$.agendaButton.setDepressed(this.agendaMode);
},
calendarsChanged: function calendarsChanged(oldCalendars) {
var day = this.day;
if (!day) {
return;
}
var allEvents = [];
Array.isArray(day.allDayEvents) && (allEvents = allEvents.concat(day.allDayEvents));
Array.isArray(day.hiddenAllDay) && (allEvents = allEvents.concat(day.hiddenAllDay));
Array.isArray(day.events) && (allEvents = allEvents.concat(day.events));
Array.isArray(day.hiddenEvents) && (allEvents = allEvents.concat(day.hiddenEvents));
var events = enyo.application.cacheManager.mapEventsByDate(enyo.application.cacheManager.filterEvents(allEvents, [this.date]));
this.setDays(events);
},
dateChanged: function dateChanged(oldDate) {
var date = this.date;
if (!date) {
return;
}
this.day = undefined;
this.$.dateHeader.setDate(new Date(date));
this.$.dayView.setDate(date);
},
daysChanged: function daysChanged(oldDays) {
var dateString = String(+this.date),
day = this.days && this.days[dateString] && (this.day = this.days[dateString]);
if (!this.showing || !day) {
DEBUG && this.warn("\tNo event updates available for: ", this.date, "\t");
return;
}
DEBUG && this.log("\tRequest rendering events for day: ", this.date, "...:\n\n\t");//, days, "\n\n\t");
this.layoutManager.positionEvents(day.events, {overlap: true});
day.busyTimes = this.busyFreeMgr.getBusyTimes(day.events,
undefined, //Events belonging to hidden calendars should already be excluded, so no need to pass in excludedCalendars
true); //Need to use the true_*_decimals on each event to get accurate busyTimes, and then accurate freeTimes.
day.freeTimes = this.busyFreeMgr.getFreeTimes(day.busyTimes, 0, 0); //We have no minEventHeight or minFreeSize, but we don't want defaults. Get all free time.
//since agendaview shows whatever you give it, we only give it one day's worth of data
//and it reduces the amount of work to do when assigning colors
var thisDay = {};
thisDay[dateString] = day;
Utilities.assignEventColors(thisDay, this.calendars);
this.$.dayAgendaView.setDays(thisDay);
this.$.dayView.setDays(thisDay);
},
// BEGIN :-------: Custom Methods :---------------------------------------------------------------------------------------------------------------------------//
createEventThen: function createEventThen(hour, show, event) {
if (!event) {
this.error("\tFailed to create event GUI using event [", event, "] and hour [", hour, "].\t");
return;
}
var eventGUI;
if (event.allDay) {
eventGUI = this.$.allDayHeader.createComponent({event: event}); // create an all-day event GUI
}
else {
eventGUI = event;
}
show && eventGUI && enyo.application.share({showEvent: eventGUI}); // Request showing the event.
},
fetchCurrentView: function fetchCurrentView() {
var view = this.$.agendaOrDayViewPane.getView(),
viewName = view && view.name;
return viewName && viewName.charAt(0).toUpperCase() + viewName.substring(1);
},
isToday: function isToday(date, today) {
!date && (date = this.date);
!today && (today = (this.timeMachine.setTime(Date.now()), this.timeMachine));
var isToday = !!(date && (+date.clearTime() == +today.clearTime()));
if (!this.currentIsToday || this.currentIsToday != isToday) {
var ui = this.$;
this.currentIsToday = isToday;
ui.today.setShowing(isToday);
ui.dateHeader.checkFormatFit();
}
ui.dayView.setIsToday(isToday);
return isToday;
},
toggleAgendaMode: function toggleAgendaMode(inSender) {
enyo.application.share({agendaMode: !this.agendaMode}, {keep: true});
}
});
@@ -0,0 +1,273 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
// TODO: Refactor common code in HJSFlex and VJSFlex into base, mixin, or delegate
enyo.kind({
name : "HJSFlex",
kind : "Control",
layoutKind: "HJSFlexLayout",
components: [
{kind: "ApplicationEvents", onWindowRotated: "windowRotatedHandler"}
],
create: function create() {
this.inherited(arguments);
this.performResize = enyo.bind(this, this.performResize);
},
destroy: function destroy() {
this.watched && window.removeEventListener('resize', this.performResize) && (this.watched = false);
this.inherited(arguments);
},
windowRotatedHandler: function windowRotatedHandler(from, event) {
if (!this.isVisible()) {
this.rotatedWhileHidden = true;
}
},
becameCurrentPaneHandler: function becameCurrentPaneHandler(isCurrentPane) {
if (isCurrentPane && this.rotatedWhileHidden) {
this.rotatedWhileHidden = false;
this.isCurrentPane = true;
this.performResize();
this.broadcastMessage("childrenNeedResize", [true]);
}
else {
this.isCurrentPane = false;
}
},
isVisible: function isVisible() {
var obj = this;
if (!obj.parent) {
return false;
}
while (obj.parent) {
if (obj.parent.showing == false) {
return false;
}
obj = obj.parent;
}
return true;
},
performResize: function performResize() {
if (this.isCurrentPane || this.isVisible()) {
this.calcWidth = undefined;
this.calcHeight = undefined;
this.rendered();
}
},
resized: function () {
// console.log("H-resized", this, arguments);
},
rendered: function () {
// console.log("H-rendered", this, arguments);
var width, height;
if (this.calcWidth || this.calcHeight) {
// console.log("Cached size");
width = this.calcWidth;
height = this.calcHeight;
}
else {
var node = this.hasNode();
width = node.offsetWidth;
height = node.offsetHeight;
if (!this.watched) {
// console.log("Adding watcher");
window.addEventListener('resize', this.performResize);
this.watched = true;
}
}
if (!(this.children && this.children.length)) {
return;
}
// Find out how much space we have that is flexible and how many shares to
// split it between.
var remaining = width, flex = 0;
var numChildren = this.children.length;
for (var i = 0; i < numChildren; i++) {
var child = this.children[i];
child.size && (remaining -= child.size);
child.flex && (flex += child.flex);
}
if (flex) {
var unit = remaining / flex;
var remainder = 0;
}
var offset = 0;
for (i = 0; i < numChildren; i++) {
var child = this.children[i];
var childNode = child.hasNode();
if (!childNode) {
return;
}
var calcWidth;
if (child.flex) {
var size = unit * child.flex;
// Share spare pixels to those that want them most
remainder += size % 1;
size = Math.floor(size);
if (remainder > 0.5) {
remainder -= 1;
size++;
}
calcWidth = size;
}
else {
calcWidth = child.size;
}
if (offset) {
childNode.style.left = offset + "px";
}
childNode.style.width = calcWidth + "px";
childNode.style.height = height + "px";
offset += calcWidth;
child.calcHeight = height;
child.calcWidth = calcWidth;
}
this.inherited(arguments);
}
});
enyo.kind({
name : "VJSFlex",
kind : "Control",
layoutKind: "VJSFlexLayout",
destroy : function () {
this.watched && window.removeEventListener('resize', this.resizedEvent, true) && (this.watched = false);
this.inherited(arguments);
},
resized : function () {
// console.log("V-resized", this, arguments);
},
rendered : function () {
// console.log("V-rendered", this, arguments);
if (this.calcWidth || this.calcHeight) {
// console.log("Cached size");
width = this.calcWidth;
height = this.calcHeight;
}
else {
var node = this.hasNode();
width = node.offsetWidth;
height = node.offsetHeight;
if (!this.watched) {
var self = this;
// console.log("Adding watcher");
this.resizedEvent = function () {
self.rendered();
};
window.addEventListener('resize', this.resizedEvent, true);
this.watched = true;
}
}
if (!(this.children && this.children.length)) {
return;
}
// Find out how much space we have that is flexible and how many shares to
// split it between.
var remaining = height, flex = 0;
var numChildren = this.children.length;
for (var i = 0; i < numChildren; i++) {
var child = this.children[i];
child.size && (remaining -= child.size);
child.flex && (flex += child.flex);
}
if (flex) {
var unit = remaining / flex;
var remainder = 0;
}
var offset = 0;
for (i = 0; i < numChildren; i++) {
var child = this.children[i];
var childNode = child.hasNode();
if (!childNode) {
return;
}
var calcHeight;
if (child.flex) {
var size = unit * child.flex;
// Share spare pixels to those that want them most
remainder += size % 1;
size = Math.floor(size);
if (remainder > 0.5) {
remainder -= 1;
size++;
}
calcHeight = size;
}
else {
calcHeight = child.size;
}
if (offset) {
childNode.style.top = offset + "px";
}
childNode.style.height = calcHeight + "px";
childNode.style.width = width + "px";
offset += calcHeight;
child.calcHeight = calcHeight;
child.calcWidth = width;
child.offsetTop = offset;
child.offsetLeft = 0;
}
this.inherited(arguments);
}
});
enyo.kind({
name: "VJSFlexLayout",
flow: function (inContainer) {
// console.log("V-flow", this, arguments);
var s = inContainer.domStyles;
s.position = "absolute";
inContainer.children.forEach(function (child) {
var s = child.domStyles;
s["-webkit-box-sizing"] = "border-box";
s.margin = 0;
s.position = "absolute";
if (child.size !== undefined) {
s.height = child.size + "px";
}
});
}
});
enyo.kind({
name: "HJSFlexLayout",
flow: function (inContainer) {
// console.log("H-flow", this, arguments);
var s = inContainer.domStyles;
s.position = "absolute";
inContainer.children.forEach(function (child) {
var s = child.domStyles;
s["-webkit-box-sizing"] = "border-box";
s.position = "absolute";
s.margin = 0;
if (child.size !== undefined) {
s.width = child.size + "px";
}
});
}
});
+32
View File
@@ -0,0 +1,32 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.depends(
"../shared/EventView.js",
"../shared/VirtualCarouselAdaptor.js",
"SimpleBoxLayout.js",
"DayView.css",
"AllDayEvent.js",
"DayHours.js",
"DayView.js",
"DayCarousel.js",
"DayEventGroup.js",
"AgendaView.js",
"DayViewFrame.js"
);
Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+60
View File
@@ -0,0 +1,60 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
var DEBUG = !!(enyo.args && enyo.args.debug); // Define global DEBUG state used by all modules. TODO: move to AppComponent.debug.
enyo.depends(
"$enyo-lib/accounts/",
"$enyo-lib/addressing/",
"$enyo-lib/contactsui/",
"../libs/date.js", // Okay because DateJS now avoids multiple instantiation thereby avoiding the Date.toString() stack overflow issue.
"shared/SimpleTransition.js", // We need to include the custom transition before AppView.js
"AppMenu.js",
"AppView.css",
"AppView.js",
"CalendarView.js",
"header/CalendarList.css",
"header/CalendarList.js",
"day/",
"month/",
"week/",
// "edit/",
"edit/ContactView.js",
"edit/DeleteConfirm.js",
"edit/RepeatChangeConfirm.js",
"edit/EditView.css",
"edit/EditView.js",
"edit/TimeSelectView.js",
"edit/AttendeesView.js",
"edit/RepeatView.js",
"edit/RepeatView.css",
"edit/DetailView.js",
"edit/DetailView.css",
"firstLaunch/FirstLaunchView.js",
// "prefs/",
"prefs/PrefSelector.js",
"prefs/PreferencesView.css",
"prefs/PreferencesView.js",
"reminders/MissedRemindersView.js",
"shared/CalendarEvent.js",
"shared/MeetingTimeFormatter.js",
"shared/FormatterCache.js",
"shared/JumpToView.js",
"shared/Utilities.js"
);
@@ -0,0 +1,176 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/*global Contacts, ContactsUI, enyo */
/**
NOTE: calendar.AttendeesView is the Calendar app's Meeting attendee list view.
**/
enyo.kind({
name : "calendar.edit.AttendeesView",
kind : enyo.VFlexBox,
className : "calendar-detail-view",
showing : false,
events : {
onCloseClicked : "",
onExit : "",
onShowContactDetails: ""
},
published : {
accountId : null,
attendees : [],
organizerIndex: null, // Made a published property in case we need to do more processing
subject : ""
},
G11N : {
attendeeCount: new enyo.g11n.Template($L("0#No participants|1#1 meeting participant|##{n} meeting participants")),
runningLate : $L("Running late. On my way...")
},
components: [
{name: "count", showing: true, className: "attendees-view-count"},
//enyo-item enyo-first
{name: "btnContact", kind: enyo.Button, caption: $L("Contact Attendees"), i_con: "edit/images/menu-icon-compose.png", onclick: "contactAttendees", className: "enyo-button-light"},
{kind: enyo.VFlexBox, className: "group detail-view-group", flex: 1, components: [
{name: "attendeeScroller", autoHorizontal: false, horizontal: false, kind: enyo.Scroller, flex: 1, components: [
{name: "list", kind: enyo.VirtualRepeater, onSetupRow: "getAttendee", components: [
{kind: enyo.RowItem, className: "contact-row", onclick: "attendeeClicked", components: [
{name: "contactImage", kind: enyo.Image, className: "contact-image"},
{className: "contact-image-border"},
{kind: enyo.Control, className: "contact-info", components: [
{name: "attendeeName", className: "enyo-text-ellipsis attendee-name"},
{name: "organizer", content: $L("Organizer"), className: "attendees-view-subject enyo-text-ellipsis"}
]}
]}
]}
]}
]},
{kind: enyo.HFlexBox, components: [
{kind: enyo.Button, caption: $L("Back"), onclick: "closeView", flex: 1, className: "enyo-button-light"},
{name: "btnCancel", kind: enyo.Button, caption: $L("Close"), onclick: "closeClicked", flex: 1, className: "spaceButton enyo-button-dark"}
]},
{kind: "ApplicationEvents", onWindowHidden: "closeView"
}
],
create: function create() {
this.inherited(arguments);
this.lookupAttendees = enyo.bind(this, this.lookupAttendees);
},
closeView: function closeView() {
this.doExit();
this.reset();
},
reset: function reset() {
this.$.attendeeScroller.setScrollTop(0); // Reset the scroll position.
},
contactAttendees: function contactAttendees(inSender) {
enyo.application.share({
launch: {
appId : "com.palm.app.email",
accountId: this.accountId,
body : this.G11N.runningLate,
subject : this.subject,
to : this.attendees
}
});
},
attendeeClicked: function attendeeClicked(source, domEvent, rowIndex) {
var attendee = this.attendees [rowIndex];
this.doShowContactDetails(("personId" in attendee) ? {personId: attendee.personId} : attendee);
},
closeClicked: function closeClicked() {
this.reset();
this.doCloseClicked();
},
getAttendee: function getAttendee(inSender, inIndex) {
var peeps = this.attendees,
person = peeps && (inIndex < peeps.length) && peeps [inIndex],
ui = this.$;
if (!person) {
return;
}
!person.name && (person.name = person.commonName || person.email || $L("Attendee"));
!person.listPhotoPath && (person.listPhotoPath = "edit/images/list-avatar-default.jpg");
ui.attendeeName.setContent(person.name);
ui.contactImage.setAttribute("src", person.listPhotoPath);
ui.organizer.setShowing(inIndex === this.organizerIndex);
return true;
},
attendeesChanged: function attendeesChanged() {
var count = this.attendees && this.attendees.length,
ui = this.$;
ui.count.setContent(this.G11N.attendeeCount.formatChoice(count, {n: count}));
//ui.btnContact.setShowing (count); // For 1 or more attendees show "Contact attendees" button.
ui.list.render();
setTimeout(this.lookupAttendees, 100);
},
lookupAttendees: function lookupAttendees() {
// TODO: Since the contacts person APIs are asynchronous, we probably need to change how this works.
// 1. We should render first with getListPhotoPath (synchronous, but possibly not up to date), then do the
// asynchronous getPhotoPath call. When the async call comes back, if the result is different, then we should re-render.
// 2. If you are in the attendees list, and you tap an attendee and add a contact with a new photo,
// we don't update our view, and we maybe should. I don't know if there's something we can listen for to detect that though.
var attendee,
attendees = this.attendees;
this.lookupCount = 0; // Track number of lookups so we can update the list at reasonable times.
try {
for (var i = 0, j = attendees.length; i < j; ++i) {
attendee = attendees [i];
if (attendee.email) {
enyo.application.contactsManager.findByEmail(attendee.email, enyo.bind(this, this.lookupAttendeeReady, i));
} else {
this.lookupAttendeeReady(i);
}
}
} catch (e) {
this.error("===:===: Contacts lookup failed: ", e);
}
},
lookupAttendeeReady: function lookupAttendeeReady(index, person) {
var attendee = this.attendees [index],
list = this.$.list,
total = this.attendees.length;
this.lookupCount++;
if (person) {
person.displayName
? (attendee.name = person.displayName) :
// Use the commonName, name, or email from the attendee as worst case
attendee.commonName
? (attendee.name = attendee.commonName) : (!attendee.name) && (attendee.name = attendee.email);
person.listPhotoPath && (attendee.listPhotoPath = person.listPhotoPath);
attendee.personId = person.personId;
}
((this.lookupCount >= total) || !(this.lookupCount % list.pageSize)) && list.render();
}
});
@@ -0,0 +1,58 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/*jslint white: true, onevar: true, undef: true, eqeqeq: true, plusplus: true, bitwise: true,
regexp: true, newcap: true, immed: true, nomen: false, maxerr: 500 */
/*global ContactsLib, document, enyo, console, $L, crb */
enyo.kind({
name : "calendar.edit.ContactView",
kind : enyo.VFlexBox,
events : {
onCloseClicked: "",
onExit : ""
},
published : {
},
components: [
{kind : "com.palm.library.contactsui.detailsInDialog",
name : "detailsInDialog",
flex : 1,
showButtonsHideBar: true,
onEdit : "doExit",
onAddToExisting : "doExit",
onAddToNew : "doExit"
},
{kind: enyo.HFlexBox, components: [
{kind: enyo.Button, name: "contactsDialogBack", flex: 1, caption: $L("Back"), onclick: "doExit", className: "enyo-button-light"},
{kind: enyo.Button, name: "contactsDialogCancel", flex: 1, caption: $L("Close"), onclick: "closeClicked", className: "spaceButton enyo-button-dark"}
]}
],
closeClicked: function closeClicked() {
this.doCloseClicked();
},
setPersonId : function (personId) {
this.$.detailsInDialog.setPersonId(personId);
},
setContact : function (rawContact) {
this.$.detailsInDialog.setContact(rawContact);
}
});
@@ -0,0 +1,199 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
enyo.kind({
name : "calendar.edit.DeleteConfirm",
kind : enyo.VFlexBox,
className : "calendar-delete-confirm",
//width : "375px",
events : {
onDeleted: "",
onExit : ""
},
published : {
event: null
},
components: [
{kind: enyo.VFlexBox, name: "repeatDeleteDialog", components: [
{content: $L("This is a repeating event"), className: "dialog-text"},
{kind: enyo.VFlexBox, components: [
{kind: enyo.Button, caption: $L("Delete The Whole Series"), onclick: "deleteSeries", className: "enyo-button-negative"},
{kind: enyo.Button, caption: $L("Delete This Event Only"), onclick: "deleteSingle", className: "enyo-button-negative"},
{kind: enyo.Button, caption: $L("Cancel"), onclick: "cancelClicked", className: "enyo-button-light"}
]}
]},
{kind: enyo.VFlexBox, name: "simpleDeleteDialog", components: [
{content: $L("Are you sure you want to delete this event?"), className: "dialog-text"},
{kind: enyo.HFlexBox, components: [
{kind: enyo.Button, caption: $L("Cancel"), onclick: "cancelClicked", flex: 1, className: "enyo-button-light"},
{kind: enyo.Button, caption: $L("Delete"), onclick: "deleteSeries", flex: 1, className: "enyo-button-negative"}
]}
]},
{kind: "ApplicationEvents", onWindowHidden: "cancelClicked"}
], //end components
create: function create() {
this.deletedEvent = enyo.bind(this, this.deletedEvent);
this.inherited(arguments);
this.setupOnClose();
DEBUG && this.log("########## Created.");
},
destroy: function destroy() {
this.inherited(arguments);
DEBUG && this.log("########## Destroyed.");
},
eventChanged: function eventChanged() {
var event = this.event;
if (!event) {
return false;
}
event.event && (this.eventGUI = event) && (this.event = event = event.event);
if ((!event.rrule || !event.rrule.freq) && !event.parentId) {
DEBUG && this.log("########## Showing a simple DeleteConfirm view.");
this.$.simpleDeleteDialog.setShowing(true);
this.$.repeatDeleteDialog.setShowing(false);
} else {
DEBUG && this.log("########## Showing a repeat DeleteConfirm view.");
this.$.simpleDeleteDialog.setShowing(false);
this.$.repeatDeleteDialog.setShowing(true);
}
},
deleteSeries: function deleteSeries() {
this.eventGUI && this.eventGUI.destroy(); // Remove the event from the GUI.
var event = this.event,
attendees = Utilities.getActiveAttendees(event),
hasAttendees = attendees && !!(attendees.length),
isEditable = Utilities.isEventEditable(event),
sendable = enyo.application.calendarsManager.isInvitationEnabledCalendar(event.calendarId),
shouldNotify = (hasAttendees && sendable && isEditable && event.status == "CONFIRMED");
if ("_id" in this.event) {
DEBUG && this.log("########## Delete everything.")
//delete parent and children too
enyo.application.databaseManager.deleteEvent(this.event._id, this.deletedEvent, this.deletedEvent, shouldNotify, this.event.parentId, true);
}
else {
DEBUG && this.log("########## No need to delete the event since there is no event ID.")
// If event._id == undefined (new event) no need to delete it, the Edit scene just won't save it
this.deletedEvent({returnValue: true});
}
this.exitView();
},
deleteSingle: function deleteSingle() {
this.eventGUI && this.eventGUI.destroy(); // Remove the event from the GUI.
var event = this.event,
attendees = Utilities.getActiveAttendees(event),
hasAttendees = attendees && !!(attendees.length),
isEditable = Utilities.isEventEditable(event),
sendable = enyo.application.calendarsManager.isInvitationEnabledCalendar(event.calendarId),
shouldNotify = (hasAttendees && sendable && isEditable && event.status == "CONFIRMED");
if (event.rrule && event.rrule.freq) {
DEBUG && this.log("########## A rrule & rrule frequency is defined.")
var date = event.currentLocalStart || event.dtstart;
Utilities.addException(event, new Date(date));
if (shouldNotify) { // Only create a child event to mark the deletion if we need to send a notification
var deletedChild = this.createDeletedChild(date);
enyo.application.databaseManager.updateParentAddChild(event, deletedChild, this.deletedEvent, this.deletedEvent, true);
}
else {
enyo.application.databaseManager.updateEvent(event, this.deletedEvent, this.deletedEvent);
}
}
else {
DEBUG && this.log("########## A rrule & rrule frequency isn't defined..")
enyo.application.databaseManager.deleteEvent(event._id, this.deletedEvent, this.deletedEvent, shouldNotify);
}
this.exitView();
},
deletedEvent: function deletedEvent(response) {
if (response.returnValue === true) {
DEBUG && this.log("########## Deleted event: ", response);
this.doDeleted(response);
} else {
//TODO: ACK, IT FAILED
DEBUG && this.log("########## Delete event FAILED: ", response);
}
},
cancelClicked: function cancelClicked() {
DEBUG && this.log("########## Clicked the cancel button in DeleteConfirm view.");
this.exitView();
},
exitView: function exitView() {
DEBUG && this.log("########## Exit DeleteConfirm view.");
if (enyo.isFunction(this.container.close)) {
this.container.close();
} else {
this.doExit();
}
},
setupOnClose: function setupOnClose() {
if (!enyo.isFunction(this.container.doClose)) {
return;
}
var view = this,
doClose = this.container.doClose;
this.container.doClose = function closeManager() { // If the view is contained within a popup or some other container that can be closed, we need to know about those close events
DEBUG && this.log("########## Hiding DeleteConfirm popup.");
view.doExit();
doClose.apply(this, arguments); //then run any defined "onClose" handler.
};
},
createDeletedChild: function createDeletedChild(exdate) {
// TODO: Maybe make a unified utility function for this and edit view
var event = this.event,
deletedChild = new CalendarEvent(event),
exdateString = Utilities.getUTCFormatDateString(new Date(exdate));
deletedChild.dtstart = event.currentLocalStart;
deletedChild.dtend = event.currentLocalStart + (event.dtend - event.dtstart);
deletedChild.parentId = event._id; // Set the child event's parent id
deletedChild.recurrenceId = exdateString; // and its recurrenceId then
deletedChild._del = true; // Mark it deleted
deletedChild.notify = true;
deletedChild.status = "CANCELLED";
delete deletedChild._id; // Then remove its id,
delete deletedChild.rrule; // remove its rrule,
delete deletedChild.exdates; // remove any exdates,
delete deletedChild.remoteId; // and remove its remoteId.
try {
deletedChild.whenDesc = MeetingTimeFormatter.describeEvent(deletedChild);
} catch (e) {
this.error("error generating when description: " + e);
// Clear event description since the old one may be stale
deletedChild.whenDesc = "";
}
return deletedChild;
}
});
@@ -0,0 +1,170 @@
/* @@@LICENSE
*
* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* LICENSE@@@ */
/* TODO: There's a lot of redundancy between DetailView.css and EditView.css that needs to be cleaned up. The CSS should be minimized. */
.calendar-detail-view {
/*font-family: 'Prelude Medium';*/
font-size: 18px;
height: 600px;
}
.calendar-detail-view .enyo-header-inner {
text-align: center;
}
.detail-view-header {
color: #333333;
font-weight: 200;
-webkit-border-image: none;
background-color: transparent;
}
.detail-view-group .enyo-scroller {
margin:-12px;
}
.detail-view-box {
-webkit-border-image: url(./images/bg_rowgroup.png) 10 10 repeat;
border-width: 10px;
margin-bottom: 10px;
}
/*
.detail-view-box .enyo-item {
border-bottom-color:#bebebe;
background:#eee;
}
.detail-view-box .enyo-item.enyo-first {
border-top:0;
}
.detail-view-box .enyo-item.enyo-last {
background:none;
}
*/
.detail-view-note,.detail-view-row,.detail-view-subject,.detail-view-location {
overflow:hidden;
text-overflow: ellipsis;
}
.detail-view-subject {
height: 65px;
padding: 8px;
border-top-left-radius: 8px 8px;
border-top-right-radius: 8px 8px;
}
.spaceButton {
margin-left: 20px;
}
/* Icons */
.detail-view-icon {
height: 32px;
width: 32px;
margin: 5px 10px 5px -2px;
}
.detail-view-location {
width: 60%;
}
.detail-view-icon-location { background-image: url(./images/location-icon.png); }
.detail-view-icon-time { background-image: url(./images/timedate-icon.png); }
.detail-view-icon-repeat { background-image: url(./images/repeat-icon.png); }
.detail-view-icon-reminder { background-image: url(./images/reminder-icon.png); }
.detail-view-icon-attendees { background-image: url(./images/participants-icon.png); }
.attendee-name {
width: 100%;
}
.subject-attendees-view {
font-size: 18px;
}
div:first-child > .contact-row {
border-top:none;
}
div:last-child > .contact-row {
border-bottom:none;
}
/*===========Yet not used need to review and detlete =========*/
.edit-view-label {
font-size : 15px;
color : #2D6C94;
margin-left : 8px;
}
.edit-view-icon {
height : 32px;
width : 32px;
background-repeat : no-repeat;
margin-left : 4px; /* 8px padding provided by .enyo-item */
margin-right : 12px;
}
.enyo-held > .edit-view-icon { background-position: left bottom; }
.edit-view-icon-location { background-image: url(./images/room-icon.png); }
.edit-view-icon-time { background-image: url(./images/timedate-icon.png); }
.edit-view-icon-repeat { background-image: url(./images/repeat-icon.png); }
.edit-view-icon-reminder { background-image: url(./images/reminder-icon.png); }
.edit-view-icon-attendees { background-image: url(./images/participants-icon.png); }
.edit-view-attendees-name { font-weight: bold; }
.attendees-view-count {
font-size : 16px;
text-indent : 10px;
margin-left : -10px;
margin-bottom : 8px;
}
.attendees-view-subject { font-size : 15px; }
.attendees-view-count,
.attendees-view-subject { color: gray; }
.contact-row {
height : 52px;
position : relative;
}
.contact-image {
height : 50px;
width : 50px;
left : 9px;
top : 10px;
margin : 0;
-webkit-border-radius : 7px;
position : absolute;
}
.contact-info {
margin-left : 58px;
}
.contact-image-border {
/*background : url(./images/list-view-avatar-frame.png) left top no-repeat;*/
height : 52px;
width : 52px;
position : absolute;
}
@@ -0,0 +1,468 @@
// @@@LICENSE
//
// Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// LICENSE@@@
/*global enyo */
/*
TODO: FIX: Update displayed times per 24hr. clock mode setting.
TODO: Find out if enyo provides open & close events for a popup's content.
*/
enyo.kind({
name : "calendar.edit.DetailView",
className: "calendar-detail-view",
kind : enyo.Pane,
events : {
onDelete: "",
onEdit : "",
onExit : "" // Used to notify external components (AppView.js) when exiting this view.
},
published: {
accountsAndCalendars: null, // Object : For watching calendars changing.
event : null, // Object : Event data model.
is24Hr : false // Boolean : For watching 24-hr clock mode changes.
},
G11N: {
noSubject: $L("No Subject")
},
components: [
{name: "attendeesView", kind: "calendar.edit.AttendeesView", lazy: true, onCloseClicked: "closeClicked", onExit: "closeView", onShowContactDetails: "showContactDetails"},
{name: "contactDetails", kind: "calendar.edit.ContactView", lazy: true, onCloseClicked: "closeClicked", onExit: "closeView"},
// NOTE: Detail view itself is below:
{name: "detailView", kind: enyo.VFlexBox, components: [
{kind: enyo.VFlexBox, className: "group detail-view-group", flex: 1, components: [
{name: "contentScroller", kind: enyo.Scroller, autoHorizontal: false, horizontal: false, flex: 1, components: [
{name: "subject", className: "enyo-first detail-view-subject", pack: "center", allowHtml: true},
{kind: enyo.RowItem, layoutKind: enyo.HFlexLayout, align: "center", className: "first detail-view-row", components: [
{className: "detail-view-icon detail-view-icon-time"},
{kind: enyo.VFlexBox, flex: 1, components: [
{name: "dateTimeFrom"},
{name: "dateTimeTo"}
]}
]},
{name: "locationRow", kind: enyo.RowItem, showing: false, layoutKind: enyo.HFlexLayout, align: "center", className: "detail-view-row", onclick: "launchMaps", components: [
{className: "detail-view-icon detail-view-icon-location"},
{name: "location", flex: 1, className: "detail-view-location ellipsis"},
{name: "btnDirections", kind: enyo.IconButton, c_ontent: $L("Directions"), icon: "edit/images/icon-direction.png", onclick: "launchMaps"}
]},
{name: "repeatRow", kind: enyo.RowItem, showing: false, layoutKind: enyo.HFlexLayout, align: "center", className: "detail-view-row", components: [
{className: "detail-view-icon detail-view-icon-repeat"},
{name: "repeat"}
]},
{name: "reminderRow", kind: enyo.RowItem, showing: false, layoutKind: enyo.HFlexLayout, align: "center", className: "detail-view-row", components: [
{className: "detail-view-icon detail-view-icon-reminder"},
{name: "reminder"}
]},
{name: "attendees", kind: enyo.RowItem, layoutKind: enyo.HFlexLayout, align: "center", onclick: "showAttendees", className: "detail-view-row", components: [
{className: "detail-view-icon detail-view-icon-attendees"},
{kind: enyo.VFlexBox, flex: 1, components: [
{name: "attendeesName", className: "detail-view-attendees-name ellipsis"},
{name: "attendeesCount", className: "ellipsis"}
]}
]},
{name: "noteContainer", kind: enyo.RowItem, className: "enyo-flat-shadow enyo-last", components: [
{name: "note", className: "detail-view-note", allowHtml: true}
]}
]}
]},
{kind: enyo.VFlexBox, components: [
{name: "btnEdit", kind: enyo.Button, caption: $L("Edit"), onclick: "editClicked", flex: 1, className: "enyo-button-dark"},
{name: "btnDelete", kind: enyo.Button, caption: $L("Delete"), onclick: "deleteClicked", flex: 1, className: "enyo-button-negative"},
//{kind: enyo.HFlexBox, components: [
{name: "btnCancel", kind: enyo.Button, caption: $L("Close"), onclick: "closeClicked", flex: 1, className: "enyo-button-light"}
//]}
]}
]},
{kind : "ApplicationEvents",
onWindowHidden: "closeClicked"
},
{name: "formatterCache", kind: "calendar.FormatterCache", onFormatsChanged: "formatDateTimeLabels", formats: {
longDate : {date: "medium", dateComponents: "mdy", weekday: "medium"},
shortDate: {date: "medium", dateComponents: "mdy"}
}}
],
create: function create() {
this.inherited(arguments);
enyo.application.watch({accountsAndCalendars: this, is24Hr: this}); // Watch for 24Hr and account/calendar changes.
this.setupOnClose();
this.setupOnOpen();
(typeof ContactsManager == "undefined") && enyo.loadScript("shared/ContactsManager.js"); // Lazy load the Contacts Manager->Contacts Library
this.lookupOrganizer = enyo.bind(this, this.lookupOrganizer);
this.lookupOrganizerReady = enyo.bind(this, this.lookupOrganizerReady);
DEBUG && this.log("########## Detail view created.");
},
destroy: function destroy() {
enyo.application.ignore({accountsAndCalendars: this, is24Hr: this}); // Ignore 24Hr and account/calendar changes.
this.inherited(arguments);
DEBUG && this.log("########## Detail view destroyed.");
},
closeClicked: function closeClicked() {
this.exitView();
return true;
},
closeView: function closeView(e) {
this.back();
},
deleteClicked: function deleteClicked() {
var event = this.eventGUI || this.event; // Save a reference to one of these, because they'll get reset to null/undefined in exitView
this.exitView();
this.doDelete(event);
return true;
},
editClicked: function editClicked() {
var event = this.eventGUI || this.event; // Save a reference to one of these, because they'll get reset to null/undefined in exitView
this.exitView();
this.doEdit(event);
return true;
},
exitView: function exitView() {
DEBUG && this.log("########## Exit DetailView view.");
if (enyo.isFunction(this.container.close)) {
this.container.close();
} else {
this.doExit();
this.reset(); // always reset the view (i.e. pane, scroll position, and event references)
}
},
reset: function reset() {
var ui = this.$;
this.event = this.eventGUI = null; // Release the event references since we're resetting the view state.
ui.contentScroller.setScrollTop(0); // Reset the scroll position.
this.selectView(ui.detailView); // Set the default view.
},
setupOnClose: function setupOnClose() {
if (!enyo.isFunction(this.container.doClose)) {
return;
}
var view = this,
doClose = this.container.doClose;
this.container.doClose = function closeManager() { // Override this popup's onClose handler to:
DEBUG && this.log("########## Hiding DetailView popup.");
view.doExit();
doClose.apply(this, arguments); // then run any defined "onClose" handler.
view.reset(); // always reset the view (i.e. pane and scroll position)
};
},
setupOnOpen: function setupOnOpen() {
if (!enyo.isFunction(this.container.doOpen)) {
return;
}
var view = this,
doOpen = this.container.doOpen;
this.container.doOpen = function openDetailView() { // Override this popup's onOpen handler.
doOpen.apply(this, arguments); // Run any existing "onOpen" handlers.
};
},
showAttendees: function showAttendees() {
var people = this.validateView("attendeesView");
if (this.attendeesFirstTime) {
var event = this.event,
cal = enyo.application.calendarsManager.getCal(event.calendarId); // TODO: FIX: Per webOS Calendar spec all events (including EAS) must have an accountID.
cal && people.setAccountId(cal.accountId);
people.setOrganizerIndex(event.organizerIndex);
people.setAttendees(Utilities.getActiveAttendees(event));
people.setSubject(event.subject || this.G11N.noSubject);
this.attendeesFirstTime = false;
}
this.selectView(people);
},
showContactDetails: function showContactDetails(inSender, contactInfo) {
if (!contactInfo) {
return;
}
var isKnownPerson = ("personId" in contactInfo);
if (!isKnownPerson) {
if (typeof ContactsLib == "undefined") {
this.error("===:===: Unable to display contact details without the Contacts Library :===:===");
return;
}
var attendee = contactInfo,
contact = ContactsLib.ContactFactory.createContactDisplay(),
contactName = contact.getName(),
parsedName = new enyo.g11n.Name(attendee.name);
parsedName.givenName && contactName.setGivenName(parsedName.givenName);
parsedName.familyName && contactName.setFamilyName(parsedName.familyName);
contact.getEmails().add(new ContactsLib.EmailAddress({ value: attendee.email }));
}
try {
var contactDetails = this.validateView("contactDetails");
(isKnownPerson) // If this is a known person (i.e. in the user's Contacts)
? contactDetails.setPersonId(contactInfo.personId) // display their full reverse-looked-up contact details
: contactDetails.setContact(contact) // otherwise create a simple contact display.
;
this.selectView(contactDetails);
} catch (e) {
this.error("===:===: Unable to display contact details: ", (e.stack || ''));
}
},
accountsAndCalendarsChanged: function accountsAndCalendarsChanged() {
var event = this.event;
if (!event) {
return;
}
var color = enyo.application.calendarsManager.getCalColor(this.event.calendarId) || "none"; // Since the accounts and/or calendars changed, re-grab the color. If there is no color, set a non-existant color.
// TODO: What happens if the calendar is removed while we are viewing the event?
if (color) {
this.updateColorTheme(color);
event.color = color;
}
},
eventChanged: function eventChanged() {
var event = this.event;
if (!event) {
return;
}
this.attendeesFirstTime = true; // Attendees View only needs to do processing the first time after the event changes
event.event // This event is likely an event's GUI because it contains an event object:
&& (this.eventGUI = event) // so locally cache the event's GUI so it can be immediately updated after editing
&& (this.event = event = event.event) // and locally cache the actual event.
;
var ui = this.$;
if ("color" in event) {
this.updateColorTheme(event.color);
} else if (this.accountsAndCalendars) {
this.accountsAndCalendarsChanged();
}
ui.subject.setContent(event.subject ? enyo.string.runTextIndexer(enyo.string.escapeHtml(event.subject)) : this.G11N.noSubject);
this.formatDateTimeLabels();
ui.location.setContent(event.location);
ui.locationRow.setShowing(!!(event.location && event.location.length));
var repeatLabel = this.findRepeatLabel(event);
ui.repeat.setContent(repeatLabel);
ui.repeatRow.setShowing(!!(repeatLabel.length));
var reminderLabel = this.findReminderLabel(event);
ui.reminder.setContent(reminderLabel);
ui.reminderRow.setShowing(!!(reminderLabel.length));
Utilities.findEventOrganizer(event);
this.formatAttendeeLabels(event);
ui.note.setContent(Utilities.getIndexedEventNote(event));
ui.noteContainer.setShowing(!!(event.note && event.note.length));
var isReadOnly = enyo.application.calendarsManager.isCalendarReadOnly(event.calendarId);
ui.btnDelete.setShowing(!isReadOnly);
ui.btnEdit.setShowing(!isReadOnly);
},
is24HrChanged: function is24HrChanged(oldIs24Hr) {
var is24Hr = this.is24Hr = !!this.is24Hr;
if (oldIs24Hr !== undefined && oldIs24Hr == is24Hr) {
return;
}
this.$.formatterCache.formatsChanged(); // Clear the cached formatters so that they can be rebuilt.
},
launchMaps: function launchMaps(inSender) {
var ui = this.$,
location = ui.location.getContent(),
directions = (inSender === ui.btnDirections);
if (!location) {
return true;
} // Quick escape since there is no location
enyo.application.share({
launch: {
appId : "com.palm.app.maps",
address : location,
getDirections: directions
}
});
return true;
},
updateColorTheme: function updateColorTheme(color) {
if (!color) {
return;
}
var header = this.$.subject;
header.removeClass(this.colorThemeClass);
this.colorThemeClass = "theme-" + color;
header.addClass(this.colorThemeClass);
},
repeatLabelMap: {
never : "",
daily : $L("Daily"),
weekly : $L("Weekly"),
weekday : $L("Weekdays"),
custom : $L("Custom"),
customDaily : $L("Custom Daily"),
customWeekly : $L("Custom Weekly"),
customMonthly: $L("Custom Monthly"),
customYearly : $L("Custom Yearly")
},
findRepeatLabel: function findRepeatLabel(event) {
var value = Utilities.findRepeatValue(event.rrule);
return this.repeatLabelMap[value];
},
findReminderLabel: function findReminderLabel(event) {
// Get the active alarm's value and then process the value return readable text.
return Utilities.getAlarmString(Utilities.findReminderValue(event.alarm));
},
attendeeLabelTemplate: new enyo.g11n.Template($L("1##{num} attendee|1>##{num} attendees")),
formatAttendeeLabels: function formatAttendeeLabels(event) {
var attendees = Utilities.getActiveAttendees(event),
num = attendees && attendees.length,
organizer = event.organizer,
ui = this.$;
if (!num || (num === 1 && organizer)) {
ui.attendees.setShowing(false);
return;
}
var str = this.attendeeLabelTemplate.formatChoice(num, {num: num});
ui.attendeesCount.setContent(str);
if (organizer) {
!organizer.name && (organizer.name = organizer.commonName || organizer.email || $L("Unknown Organizer")); // Initial value may be updated by lookup
ui.attendeesName.setContent(organizer.name);
setTimeout(this.lookupOrganizer, 100);
} else {
ui.attendeesName.setContent("");
}
ui.attendees.setShowing(!!num);
},
lookupOrganizer: function lookupOrganizer() {
//TODO: Since the contacts person APIs are asynchronous, we probably need to change how this works.
//1: If you are in the attendees list, and you tap an attendee and add a contact with a new photo,
//we don't update our view, and we maybe should. I don't know if there's something we can listen for to detect that though.
var organizer = this.event.organizer;
try {
if (organizer && organizer.email) {
//this.log("Performing an organizer lookup in Detail View.");
enyo.application.contactsManager.findByEmail(organizer.email, this.lookupOrganizerReady);
}
} catch (e) {
this.log("===:===: Organizer lookup failed: ", e);
}
},
lookupOrganizerReady: function lookupOrganizerReady(person) {
var organizer = this.event.organizer;
if (person && organizer) {
person.displayName
? (organizer.name = person.displayName) :
// Use the commonName, name, or email from the attendee as worst case
organizer.commonName
? (organizer.name = organizer.commonName) :
(!organizer.name) && (organizer.name = organizer.email);
//this.log("Name used: ",organizer.name);
this.$.attendeesName.setContent(organizer.name);
}
},
formatDateTimeLabels: function formatDateTimeLabels() {
var event = this.event;
if (!event) {
return;
}
var start = new Date(event.currentLocalStart || event.dtstart),
end = new Date(event.currentLocalEnd || event.dtend),
ui = this.$,
line1 = ui.dateTimeFrom,
line2 = ui.dateTimeTo,
line1Content,
line2Content;
//Format should be:
// 12 hr format: 24 hr format: AllDay events:
// Feb 5, 2011 11:00 PM to Feb 5, 2011 23:00 to Sat, Feb 5 2011 to
// Feb 6, 2011 1:00 AM Feb 6, 2011 1:00 Sun, Feb 6 2011
//or
// Sat, Feb 5 2011 Sat, Feb 5 2011 Sat, Feb 5 2011
// 9:00 PM to 11:00 PM 21:00 to 23:00
// NOTE: HACKY BIT: All day events may need to trim 1 second. When switching to currentLocalStart/End, this shoudn't be necessary
/*if(event.allDay && (event.dtstart !== event.dtend) &&
end.getHours() == 0 && end.getMinutes() == 0 && end.getSeconds() == 0 && end.getMilliseconds() == 0){
end = new Date(event.dtend - 1000);
}*/
var oneDate = (start.getFullYear() == end.getFullYear() && start.getMonth() == end.getMonth() && start.getDate() == end.getDate()),
dateFormatter = ui.formatterCache.getFormatter((event.allDay || oneDate) ? "longDate" : "shortDate");
if (oneDate && event.allDay) {
line1Content = dateFormatter.format(start);
line2Content = "";
}
else {
line1Content = dateFormatter.formatRange(start, end);
var length = this.is24Hr ? 18 : 21;
var lines = Utilities.wrapIt(line1Content, oneDate, length);
line1Content = lines[0];
line2Content = lines[1];
}
line1.setContent(line1Content);
line2.setContent(line2Content);
}
});
+230
View File
@@ -0,0 +1,230 @@
/* @@@LICENSE
*
* Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* LICENSE@@@ */
.calendar .edit {
font-size : 18px;
}
.calendar .edit .edit-header {
font-size : 20px;
text-align : center;
}
.calendar .edit .enyo-header-inner {
margin : 0px;
padding : 0px;
text-align : center;
}
.editIcon {
margin-right : 5px;
}
.calendar .edit .top-container {
background : #F1F1F1;
height : 100%;
}
.calendar .edit .content-container {
margin-left : 15%;
margin-right : 15%;
margin-top : 30px;
margin-bottom : 10px;
}
.calendar .edit .edit-view-label {
font-size : 18px;
color : #333333;
margin-left : 8px;
}
.subject-input, .location-input {
height: 58px;
}
.location-input {
margin: -8px;
}
.calendar .edit .note {
font-size : 16px;
min-height : 150px;
padding : 5px;
overflow : hidden;
text-overflow : ellipsis;
}
.calendar .edit .toolbar {
/*margin-bottom : 10px;*/
}
/* Common CSS customization in Edit View for Framework elements*/
.calendar .edit .group {
/* For all grouped sections*/
}
.calendar .edit .input {
/* For all Single line inputs CSS customization in Edit View*/
}
/* Event Description CSS*/
.subject-input .enyo-input-focus {
-webkit-border-image: none;
}
.location-input .enyo-input-focus {
-webkit-border-image: none;
}
.event-name, .event-location {
height: 55px;
}
.event-name-input {
overflow : hidden;
white-space : nowrap;
}
.repeat-alert-space {
margin-right: 12px;
}
.horizontal-space {
margin-bottom: 12px;
}
.alert-list {
width: 210px;
}
/*** List Selector customization ***/
.calendar .edit .list-selector {
text-transform : none;
margin : 5px 2px;
padding : 0px;
}
.calendar .edit .enyo-menucheckitem-caption {
padding : 0px 0px 0px 8px;
width : 180px;
text-align : left;
/* TODO: Later add ellispis class to right component*/
overflow : hidden;
text-overflow : ellipsis;
white-space : nowrap;
}
.calendar .edit .enyo-listselector-arrow {
margin-right : 5px;
}
.calendar .edit .list-selector-cal {
padding : 0px;
margin : 0px 14px;
}
.spacer {
margin-left: 14px;
}
.edit .legend {
background-image : url(../../images/glossy-top-highlight.png);
background-repeat : repeat-x;
height : 26px;
width : 26px;
padding : 0;
-webkit-border-radius : 4px;
}
.edit .color-space {
margin-left: 8px;
}
/* Yet not used need to clean up*/
.attendees-view-count {
font-size : 16px;
text-indent : 10px;
}
.attendees-view-subject { font-size : 15px; }
.attendees-view-count,
.attendees-view-subject { color: gray; }
.contact-image {
height : 50px;
width : 50px;
margin-left : 1px;
margin-right : 10px;
margin-top : 1px;
-webkit-border-radius : 7px;
}
.contact-image-border {
/*background : url(./images/list-view-avatar-frame.png) left top no-repeat;*/
height : 52px;
width : 52px;
position : absolute;
}
.edit-view-icon {
height : 32px;
width : 32px;
background-repeat : no-repeat;
margin-left : 4px; /* 8px padding provided by .enyo-item */
margin-right : 12px;
}
.enyo-page-header .edit-view-icon {
margin-left : 0;
margin-right : 4px;
}
.calendar .edit .note-input-focus {
-webkit-border-image: url(./images/input-focus.png) 14 14 14 14 repeat repeat;
}
.btn-del-edit {
margin-bottom: 40px;
max-width: 525px;
margin-left: auto;
margin-right: auto;
}
.btn-cancel, .btn-done {
min-width: 244px;
}
.btn-done{
margin-left: 12px;
}
.enyo-held > .edit-view-icon { background-position: left bottom; }
.edit-view-icon-time { background-image: url(edit/images/timedate-icon.png); }
.edit-view-icon-location { background-image: url(edit/images/room-icon.png); }
.edit-view-icon-repeat { background-image: url(edit/images/repeat-icon.png); }
.edit-view-icon-reminder { -webkit-border: url(edit/images/reminder-icon.png) 0 32 0 32; }
.edit-view-icon-attendees { background-image: url(edit/images/participants-icon.png); }
/* Calendar calendar.JumpToView */
/*.calendar-delete-confirm, .calendar-repeat-change-confirm {
width : 375px;
}*/
Loaded 100 of 824 files, more files were not shown because too many files have changed in this diff. Show more