Permalink
Browse files

Merge pull request #7100 from dscravag/nightly2

Nightly 2012-12-20
  • Loading branch information...
2 parents d38689a + 7304395 commit 7856aefc6e7408e4c097c5a0ec3894dfa7ed9d09 @dscravag dscravag committed Dec 20, 2012
Showing with 683 additions and 461 deletions.
  1. +3 −0 apps/browser/index.html
  2. +2 −2 apps/browser/manifest.webapp
  3. +1 −1 apps/browser/style/about.css
  4. +1 −1 apps/browser/style/browser.css
  5. BIN apps/browser/style/icons/Browser.png
  6. BIN apps/browser/style/images/start-background.png
  7. +33 −25 apps/communications/contacts/fb_import.html
  8. +28 −20 apps/communications/contacts/index.html
  9. +2 −2 apps/communications/contacts/js/contacts.js
  10. +23 −23 apps/communications/contacts/js/fb/fb_contact_utils.js
  11. +1 −1 apps/communications/contacts/js/fb/fb_import.js
  12. +2 −2 apps/communications/contacts/js/fb/fb_import_init.js
  13. +7 −2 apps/communications/contacts/js/fb/friends_list.js
  14. +133 −55 apps/communications/contacts/js/search.js
  15. +43 −93 apps/communications/contacts/style/search.css
  16. +6 −1 apps/communications/contacts/test/unit/contacts_list_test.js
  17. +1 −1 apps/communications/dialer/index.html
  18. +10 −1 apps/communications/dialer/js/keypad.js
  19. +20 −9 apps/communications/dialer/js/oncall.js
  20. BIN apps/communications/dialer/style/images/voicemail_.png
  21. +15 −2 apps/communications/dialer/style/keypad.css
  22. +2 −0 apps/communications/facebook/js/fb_sync.js
  23. +1 −1 apps/communications/facebook/js/sync_worker.js
  24. BIN apps/communications/ftu/css/images/firefox64.png
  25. BIN apps/communications/ftu/css/images/tutorial/1.png
  26. BIN apps/communications/ftu/css/images/tutorial/10.png
  27. BIN apps/communications/ftu/css/images/tutorial/2.png
  28. BIN apps/communications/ftu/css/images/tutorial/3.png
  29. BIN apps/communications/ftu/css/images/tutorial/4.png
  30. BIN apps/communications/ftu/css/images/tutorial/5.png
  31. BIN apps/communications/ftu/css/images/tutorial/6.png
  32. BIN apps/communications/ftu/css/images/tutorial/7.png
  33. BIN apps/communications/ftu/css/images/tutorial/8.png
  34. BIN apps/communications/ftu/css/images/tutorial/9.png
  35. +26 −13 apps/communications/ftu/css/style.css
  36. +24 −53 apps/communications/ftu/index.html
  37. +15 −36 apps/communications/ftu/js/tutorial.js
  38. +4 −0 apps/communications/ftu/js/ui.js
  39. +6 −10 apps/communications/ftu/locales/ftu.en-US.properties
  40. +1 −1 apps/communications/manifest.webapp
  41. +1 −1 apps/gallery/js/open.js
  42. +1 −1 apps/gallery/open.html
  43. +1 −1 apps/keyboard/js/keyboard.js
  44. BIN apps/settings/style/images/icons_sprite.png
  45. +2 −1 apps/sms/index.html
  46. +66 −2 apps/sms/js/sms.js
  47. +10 −1 apps/sms/style/sms.css
  48. +8 −8 apps/system/js/attention_screen.js
  49. +34 −28 apps/system/js/lockscreen.js
  50. +2 −3 apps/system/js/modal_dialog.js
  51. +7 −2 apps/system/js/notifications.js
  52. +9 −0 apps/system/js/sleep_menu.js
  53. +12 −2 apps/system/js/statusbar.js
  54. +30 −5 apps/system/js/window_manager.js
  55. BIN apps/system/style/lockscreen/images/arrow-left.png
  56. BIN apps/system/style/lockscreen/images/arrow-right.png
  57. BIN apps/system/style/lockscreen/images/handle-arrow-left.png
  58. BIN apps/system/style/lockscreen/images/handle-arrow-right.png
  59. BIN apps/system/style/lockscreen/images/handle-grow.png
  60. +4 −0 apps/system/style/lockscreen/lockscreen.css
  61. BIN apps/system/style/notifications/images/grey-noise-bg.png
  62. +48 −45 apps/system/style/notifications/notifications.css
  63. BIN apps/system/style/notifications/ringtones/notifier_exclamation.ogg
  64. +7 −3 apps/system/style/quick_settings/quick_settings.css
  65. BIN apps/system/style/statusbar/images/icons.png
  66. +4 −0 apps/system/style/statusbar/statusbar.css
  67. +1 −1 apps/system/style/system/system.css
  68. BIN apps/system/style/update_manager/images/downloads.png
  69. BIN apps/system/style/update_manager/images/iconindicator_download_24x24.png
  70. +1 −1 apps/system/style/update_manager/update_manager.css
  71. BIN apps/video/style/images/delete.png
  72. +24 −0 build/settings.py
  73. +1 −1 build/webapp-zip.js
  74. BIN {apps/browser/style/icons/60 → shared/resources/branding/official}/Browser.png
  75. BIN apps/browser/style/images/start-page-logo.png → shared/resources/branding/official/about_logo.png
  76. BIN {apps/communications/ftu/css/images → shared/resources/branding/official}/logosmall.png
  77. BIN {apps/communications/ftu/css/images → shared/resources/branding/official}/powered.png
  78. BIN {apps/communications/ftu/css/images → shared/resources/branding/official}/privacy_sprite.png
  79. BIN {apps/system/style/system/images → shared/resources/branding/official}/splash_screen_generic.png
  80. BIN shared/resources/branding/unofficial/Browser.png
  81. BIN shared/resources/branding/unofficial/about_logo.png
  82. BIN shared/resources/branding/unofficial/logosmall.png
  83. BIN shared/resources/branding/unofficial/powered.png
  84. BIN shared/resources/branding/unofficial/privacy_sprite.png
  85. BIN shared/resources/branding/unofficial/splash_screen_generic.png
View
@@ -16,6 +16,9 @@
<link rel="stylesheet" type="text/css" href="shared/style/buttons.css">
<script type="application/javascript" src="shared/js/l10n.js"></script>
<script type="application/javascript" defer src="shared/js/gesture_detector.js"></script>
+
+ <!-- Resources -->
+ <link rel="resource" type="image/png" href="shared/resources/branding/"/>
</head>
<body class="page-screen" role="application">
@@ -32,8 +32,8 @@
},
"default_locale": "en-US",
"icons": {
- "120": "/style/icons/Browser.png",
- "60": "/style/icons/60/Browser.png"
+ "120": "/shared/resources/branding/Browser.png",
+ "60": "/shared/resources/branding/Browser.png"
},
"activities": {
"view": {
@@ -5,7 +5,7 @@ html, body {
html {
height: 100%;
- background-image: url('images/start-page-logo.png'), -moz-linear-gradient(#f8f8fa, #cadce6);
+ background-image: url('/shared/resources/branding/about_logo.png'), -moz-linear-gradient(#f8f8fa, #cadce6);
background-repeat: no-repeat, no-repeat;
background-position: top right;
}
@@ -431,7 +431,7 @@ input::-moz-focus-inner {
padding: 0;
height: 100%;
width: 100%;
- background-image: url('images/start-page-logo.png'), -moz-linear-gradient(#f8f8fa, #cadce6);
+ background-image: url('/shared/resources/branding/about_logo.png'), -moz-linear-gradient(#f8f8fa, #cadce6);
background-repeat: no-repeat, no-repeat;
background-position: top right;
overflow: hidden;
Deleted file not rendered
Deleted file not rendered
@@ -41,6 +41,7 @@
<link rel="stylesheet" href="style/shared/core/css/root.css">
<!-- Building Blocks -->
+ <link href="/shared/style_unstable/progress_activity.css" rel="stylesheet">
<link href="/shared/style/status.css" rel="stylesheet">
<link href="/shared/style/headers.css" rel="stylesheet">
<link href="/shared/style/input_areas.css" rel="stylesheet">
@@ -85,8 +86,8 @@ <h1 data-l10n-id="fbFriends">Facebook Friends</h1>
<section id='mainContent' data-state="selection">
<form id="search-container" role="search" class="search">
<p>
- <label for="search-contact">
- <input type="search" name="search" class="textfield" placeholder="Search" data-l10n-id="search-contact" />
+ <label for="search" id="search-start">
+ <input type="search" name="search" class="textfield" placeholder="Search" data-l10n-id="search-contact">
</label>
</p>
</form>
@@ -101,34 +102,35 @@ <h1 data-l10n-id="fbFriends">Facebook Friends</h1>
<ol id="contacts-list-#group#">
<li data-template data-uuid="#uid#" data-search="#search#" aria-disabled="false" class="block-item">
<label>
- <input type="checkbox" name="#uid#">
+ <input type="checkbox" name="#uid#"></input>
<span></span>
</label>
<aside class="pack-end">
- <img data-src="https://graph.facebook.com/#uid#/picture?type=square">
+ <img data-src="https://graph.facebook.com/#uid#/picture?type=square"></img>
</aside>
<p><strong>#givenName#</strong> #familyName#</p>
<p>#email1#</p>
</li>
</ol>
- </section> <!-- group template content -->
+ </section> <!-- group template content -->
+ </section> <!-- groupsList -->
+
+ <form role="dialog" data-type="confirm" class="no-overlay">
+ <menu id="select-all-wrapper">
+ <button id="deselect-all" class="edit-button" data-l10n-id="deselectAll">
+ Deselect all
+ </button>
+ <button id="select-all" class="edit-button" data-l10n-id="selectAll">
+ Select all
+ </button>
+ </menu>
+ </form>
</section> <!-- mainContent -->
- <form role="dialog" data-type="confirm" class="no-overlay">
- <menu id="select-all-wrapper">
- <button id="deselect-all" class="edit-button" data-l10n-id="deselectAll">
- Deselect all
- </button>
- <button id="select-all" class="edit-button" data-l10n-id="selectAll">
- Select all
- </button>
- </menu>
- </form>
+ <section id='fixed-container' class='fixed-title-fb'></section>
</section> <!-- main -->
- <section id='fixed-container' class='fixed-title-fb'></section>
-
- <section id="search-view" class="view">
+ <section id="search-view" class="view" role="region">
<form id="searchview-container" role="search" class="search">
<button id='done-search' type="submit" data-l10n-id="done-search">Done</button>
<p>
@@ -139,17 +141,23 @@ <h1 data-l10n-id="fbFriends">Facebook Friends</h1>
</label>
</p>
</form>
- <section id="groups-list-search" data-type="list">
- <p id="no-result" class="hide" data-l10n-id="noResults">No contacts found</p>
- <ol id="search-list">
+ <section id="groups-list-search">
+ <ol id="search-list" data-type="list">
</ol>
</section>
+
+ <section>
+ <p id="no-result" class="hide" data-l10n-id="noResults">No contacts found</p>
+ <p id="search-progress" class="hidden" role="status">
+ <progress class="small"></progress>
+ </p>
+ </section>
</section> <!-- search-view section -->
- </section> <!-- role="region" -->
+ <section id="statusMsg" role="status">
+ <p></p>
+ </section>
- <section id="statusMsg" role="status">
- <p></p>
- </section>
+ </section> <!-- role region -->
</body>
</html>
@@ -127,8 +127,8 @@ <h1 data-l10n-id="contacts">Contacts</h1>
<div id="groups-container" class="view-body-inner">
<form id="search-container" class="search" role="search">
<p>
- <label for="search-contact">
- <input type="search" name="search" class="textfield" placeholder="Search" data-l10n-id="search-contact" />
+ <label for="search" id="search-start">
+ <input type="search" name="search" class="textfield" placeholder="Search" data-l10n-id="search-contact">
</label>
</p>
</form>
@@ -138,26 +138,34 @@ <h1 data-l10n-id="contacts">Contacts</h1>
</div>
</article>
<div id='fixed-container' class='fixed-title'></div>
-
- <section id="search-view" class="view">
- <form id="searchview-container" class="search" role="search">
- <button id='cancel-search' data-l10n-id="cancel" type="submit">Cancel</button>
- <p>
- <label for="search-contact">
- <input data-cancelable required type="search" name="search" class="textfield" placeholder="Search"
- id="search-contact" data-l10n-id="search-contact" />
- <button type="reset" class="hide">Clear</button>
- </label>
- </p>
- </form>
- <section id="groups-list-search">
- <p id="no-result" class="hide" data-l10n-id="noResults">No contacts found</p>
- <ol id="search-list" data-type="list">
- </ol>
- </section>
- </section> <!-- Search list -->
</section>
+ <section id="search-view" class="view">
+ <form id="searchview-container" class="search" role="search">
+ <button id='cancel-search' data-l10n-id="cancel" type="submit">Cancel</button>
+ <p>
+ <label for="search-contact">
+ <input data-cancelable required type="search" name="search" class="textfield" placeholder="Search"
+ id="search-contact" data-l10n-id="search-contact">
+ <button type="reset" class="hide">Clear</button>
+ </label>
+ </p>
+ </form>
+
+ <section id="groups-list-search">
+ <ol id="search-list" data-type="list">
+ </ol>
+ </section>
+
+ <section>
+ <p id="no-result" class="hide" data-l10n-id="noResults">No contacts found</p>
+ <p id="search-progress" class="hidden" role="status">
+ <progress class="small"></progress>
+ </p>
+ </section>
+
+ </section> <!-- Search view -->
+
<!-- Contact Details Section -->
<section id='view-contact-details' role="region" class="view view-right view-contact-profile">
<header id='details-view-header'>
@@ -596,9 +596,9 @@ var Contacts = (function() {
'#settings-done': doneTag,
'#settings-close': contacts.Settings.close,
'#cancel-search': contacts.Search.exitSearchMode, // Search related
- '#search-contact': [
+ '#search-start': [
{
- event: 'focus',
+ event: 'click',
handler: contacts.Search.enterSearchMode
}
],
@@ -87,6 +87,20 @@ fb.setFriendPictureUrl = function(devContact, url) {
// Adapts data to the mozContact format names
fb.friend2mozContact = function(f) {
+
+ function normalizeFbPhoneNumber(phone) {
+ var out = phone.number;
+ if (phone.country_code && out.indexOf('+') !== 0) {
+ out = '+' + phone.country_code + out;
+ }
+ return out;
+ }
+
+ // Check whether this has been already normalized to mozContact
+ if (Array.isArray(f.familyName)) {
+ return f;
+ }
+
// givenName is put as name but it should be f.first_name
f.familyName = [f.last_name ? f.last_name.trim() : (f.last_name || '')];
var middleName = f.middle_name ? f.middle_name.trim() : (f.middle_name || '');
@@ -111,31 +125,17 @@ fb.friend2mozContact = function(f) {
f.email1 = '';
}
- var nextidx = 0;
- if (f.cell) {
-
- f.tel = [{
- type: [privateType],
- value: f.cell
- }];
-
- nextidx = 1;
- }
-
- if (f.other_phone) {
- if (!f.tel) {
- f.tel = [];
- }
-
- f.tel[nextidx] = {
- type: [privateType],
- value: f.other_phone
- };
-
+ if (Array.isArray(f.phones) && f.phones.length > 0) {
+ f.tel = [];
+ f.phones.forEach(function(aphone) {
+ f.tel.push({
+ type: [privateType],
+ value: normalizeFbPhoneNumber(aphone)
+ });
+ });
}
- delete f.other_phone;
- delete f.cell;
+ delete f.phones;
f.uid = f.uid.toString();
@@ -49,7 +49,7 @@ if (typeof fb.importer === 'undefined') {
var FRIENDS_QUERY = [
'SELECT uid, name, first_name, last_name, pic_big, current_location, ' ,
'middle_name, birthday_date, email, profile_update_time, ' ,
- ' work, education, cell, other_phone, hometown_location' ,
+ ' work, education, phones, hometown_location' ,
' FROM user' ,
' WHERE uid ',
'IN (SELECT uid1 FROM friend WHERE uid2=me())' ,
@@ -36,9 +36,9 @@
'#import-action': fb.importer.ui.importAll,
'#done-search': contacts.Search.exitSearchMode,
'#groups-list': fb.importer.ui.selection,
- '#search-contact': [
+ '#search-start': [
{
- event: 'focus',
+ event: 'click',
handler: contacts.Search.enterSearchMode
}
]
@@ -27,6 +27,8 @@ fbFriends.List = (function() {
agroups.forEach(function(group) {
// New element appended
var ele = utils.templates.append(groupsList, {group: group}, fragment);
+ // This is the <ol> and <header> is children[0]
+ var list = ele.children[1];
// Array of friends
var friends = groups[group];
@@ -48,13 +50,16 @@ fbFriends.List = (function() {
friend.search = utils.text.normalize(searchInfo.join(' '));
// New friend appended
- utils.templates.append(ele, friend);
- // We check wether this friend was in the AB or not before
+ utils.templates.append(list, friend);
});
+
+ // Template is deleted from the list
+ list.removeChild(list.firstElementChild);
});
groupsList.innerHTML = ''; // Deleting template
groupsList.appendChild(fragment);
+
FixedHeader.init('#mainContent', '#fixed-container',
'.fb-import-list header');
if (typeof cb === 'function') {
Oops, something went wrong.

0 comments on commit 7856aef

Please sign in to comment.