Last Comment Bug 736200 - Contacts API: Using cleaner IDs for the mozContact objects
: Contacts API: Using cleaner IDs for the mozContact objects
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: Gregor Wagner [:gwagner]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-15 11:55 PDT by Etienne Segonzac (:etienne)
Modified: 2012-03-16 06:23 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.08 KB, patch)
2012-03-15 13:02 PDT, Gregor Wagner [:gwagner]
fabrice: review+
Details | Diff | Review

Description Etienne Segonzac (:etienne) 2012-03-15 11:55:07 PDT
The ID generated for each mozContact currently looks like

{25c00f01-90e5-c545-b4d4-21E2ddbab9e0}

For various reason devs might want to these IDs to construct dom #id like
prefix_[contactID]

So if it doesn't have any bad side effect it would be great to stripe the "{", "}" and "-" from the mozContact IDs.

This way preventing the need for each mozContacts API user to 
stripe them himself. And facilitating the search by ID.
Comment 1 Gregor Wagner [:gwagner] 2012-03-15 13:02:07 PDT
Created attachment 606333 [details] [diff] [review]
patch
Comment 2 Gregor Wagner [:gwagner] 2012-03-15 13:14:32 PDT
Comment on attachment 606333 [details] [diff] [review]
patch

We could also change it in _getRandomId() if this is a general problem
Comment 4 Marco Bonardo [::mak] 2012-03-16 06:23:25 PDT
https://hg.mozilla.org/mozilla-central/rev/ac5f18c521e6

Note You need to log in before you can comment on or make changes to this bug.