You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Olivier Louvignes (Created) (JIRA)" <ji...@apache.org> on 2012/03/22 23:50:22 UTC
[jira] [Created] (CB-374) Be able to create new custom labels for
our contacts fields.
Be able to create new custom labels for our contacts fields.
------------------------------------------------------------
Key: CB-374
URL: https://issues.apache.org/jira/browse/CB-374
Project: Apache Callback
Issue Type: Improvement
Components: CordovaJS
Reporter: Olivier Louvignes
Assignee: Filip Maj
It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filip Maj resolved CB-374.
--------------------------
Resolution: Won't Fix
As per Simon's point, unfortunately we can't do it :(
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser updated CB-374:
--------------------------
Fix Version/s: (was: 1.6.0)
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CB-374) Be able to create new custom
labels for our contacts fields.
Posted by "Olivier Louvignes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287280#comment-13287280 ]
Olivier Louvignes edited comment on CB-374 at 6/1/12 9:09 AM:
--------------------------------------------------------------
I haven't found how to successfully save a new Contact category, would you please tell me if the code below is the correct way to do it? Thanks!
I'm trying to save a phoneNumber with a custom "perso" label.
function onDeviceReady()
{
// do your thing!
//navigator.notification.alert("Cordova is working");
function onSuccess(contact) {
alert("Save Success");
};
function onError(contactError) {
alert("Error = " + contactError.code);
};
// create a new contact object
var contact = navigator.contacts.create();
contact.displayName = "Plumber";
contact.nickname = "Plumber"; //specify both to support all devices
// populate some fields
var name = new ContactName();
name.givenName = "Jane";
name.familyName = "Doe";
contact.name = name;
// store contact phone numbers in ContactField[]
var phoneNumbers = [];
phoneNumbers[0] = new ContactField('work', '212-555-1234', false);
phoneNumbers[1] = new ContactField('mobile', '917-555-5432', false);
phoneNumbers[2] = new ContactField('perso', '203-555-7890', false);
contact.phoneNumbers = phoneNumbers;
var categories = [];
categories[0] = new ContactField('perso', 'perso', false);
contact.categories = categories;
// save to device
contact.save(onSuccess,onError);
}
was (Author: mgcrea):
I haven't found how to successfully save a new Contact category, would you please tell me if the code below is the correct way to do it? Thanks!
function onDeviceReady()
{
// do your thing!
//navigator.notification.alert("Cordova is working");
function onSuccess(contact) {
alert("Save Success");
};
function onError(contactError) {
alert("Error = " + contactError.code);
};
// create a new contact object
var contact = navigator.contacts.create();
contact.displayName = "Plumber";
contact.nickname = "Plumber"; //specify both to support all devices
// populate some fields
var name = new ContactName();
name.givenName = "Jane";
name.familyName = "Doe";
contact.name = name;
// store contact phone numbers in ContactField[]
var phoneNumbers = [];
phoneNumbers[0] = new ContactField('work', '212-555-1234', false);
phoneNumbers[1] = new ContactField('mobile', '917-555-5432', false);
phoneNumbers[2] = new ContactField('perso', '203-555-7890', false);
contact.phoneNumbers = phoneNumbers;
var categories = [];
categories[0] = new ContactField('perso', 'perso', false);
contact.categories = categories;
// save to device
contact.save(onSuccess,onError);
}
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
> Fix For: 1.6.0
>
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Stefan Janson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416024#comment-13416024 ]
Stefan Janson commented on CB-374:
----------------------------------
Why can't it be done?
I have seen apps for ios with custom labels.
Would really need this functionality
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289449#comment-13289449 ]
Simon MacDonald commented on CB-374:
------------------------------------
Guys, sorry I did not see this discourse sooner but categories is not supported on Android. It is documented as a quick at:
http://docs.phonegap.com/en/1.7.0/cordova_contacts_contacts.md.html#Contact
You'll also notice that categories is not supported in iOS and only partially supported in BB.
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
> Fix For: 1.6.0
>
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Olivier Louvignes (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239057#comment-13239057 ]
Olivier Louvignes commented on CB-374:
--------------------------------------
Awesome, totally missed that 'categories' key out, always got "other" when defining a custom type. Thanks!
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Callback
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
> Fix For: 1.6.0
>
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Olivier Louvignes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Louvignes reopened CB-374:
----------------------------------
Did not make it work... Docs should be updated to reflect the correct way to use this functionality (considering it does work).
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
> Fix For: 1.6.0
>
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Olivier Louvignes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287280#comment-13287280 ]
Olivier Louvignes commented on CB-374:
--------------------------------------
I haven't found how to successfully save a new Contact category, would you please tell me if the code below is the correct way to do it? Thanks!
function onDeviceReady()
{
// do your thing!
//navigator.notification.alert("Cordova is working");
function onSuccess(contact) {
alert("Save Success");
};
function onError(contactError) {
alert("Error = " + contactError.code);
};
// create a new contact object
var contact = navigator.contacts.create();
contact.displayName = "Plumber";
contact.nickname = "Plumber"; //specify both to support all devices
// populate some fields
var name = new ContactName();
name.givenName = "Jane";
name.familyName = "Doe";
contact.name = name;
// store contact phone numbers in ContactField[]
var phoneNumbers = [];
phoneNumbers[0] = new ContactField('work', '212-555-1234', false);
phoneNumbers[1] = new ContactField('mobile', '917-555-5432', false);
phoneNumbers[2] = new ContactField('perso', '203-555-7890', false);
contact.phoneNumbers = phoneNumbers;
var categories = [];
categories[0] = new ContactField('perso', 'perso', false);
contact.categories = categories;
// save to device
contact.save(onSuccess,onError);
}
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
> Fix For: 1.6.0
>
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-374) Be able to create new custom labels for
our contacts fields.
Posted by "Filip Maj (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filip Maj resolved CB-374.
--------------------------
Resolution: Not A Problem
Fix Version/s: 1.6.0
Hi Olivier,
This feature already exists. Please see the W3C Contacts API [1], which Cordova/PhoneGap implements. Specifically, there is a "categories" property for each Contact object [2]. According to that spec, the categories property should be an array of Strings, however Cordova's current implementation implements as an Array of ContactField objects [3] (a slightly more verbose structure). You can see that in the code [4].
Hope that helps,
Fil
[1] http://www.w3.org/TR/contacts-api/#contact-interface
[2] http://www.w3.org/TR/contacts-api/#widl-Contact-categories
[3] http://www.w3.org/TR/contacts-api/#idl-def-ContactField
[4] https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=blob;f=lib/common/plugin/Contact.js;h=261bb1224f1a11396de314e2d16b911e3e14bd49;hb=HEAD#l76
> Be able to create new custom labels for our contacts fields.
> ------------------------------------------------------------
>
> Key: CB-374
> URL: https://issues.apache.org/jira/browse/CB-374
> Project: Apache Callback
> Issue Type: Improvement
> Components: CordovaJS
> Reporter: Olivier Louvignes
> Assignee: Filip Maj
> Labels: contacts
> Fix For: 1.6.0
>
>
> It would be awesome to being able to create & set custom labels when updating a contact (like "pro", "perso", etc.)
> Unless i'm wrong, it is not possible today. Any chance of seing this soon?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira