Permalink
Browse files

Merge pull request #7205 from dscravag/nightly2

Nightly 2012-12-27
  • Loading branch information...
2 parents 9ce1358 + a698a8b commit 73270c32928f070e49b265ea75ff4062ddb82d67 @dscravag dscravag committed Dec 27, 2012
Showing with 996 additions and 860 deletions.
  1. +30 −14 apps/camera/style/camera.css
  2. BIN apps/camera/style/images/grid.png
  3. BIN apps/camera/style/images/ui/gradient.png
  4. BIN apps/camera/style/images/ui/pattern.png
  5. +9 −16 apps/clock/js/onring.js
  6. +6 −2 apps/communications/dialer/js/dialer.js
  7. +2 −4 apps/communications/dialer/js/handled_call.js
  8. +38 −51 apps/communications/dialer/js/oncall.js
  9. +43 −152 apps/communications/dialer/js/swiper.js
  10. +4 −2 apps/communications/dialer/locales/dialer.en-US.properties
  11. +48 −139 apps/communications/dialer/oncall.html
  12. BIN apps/communications/dialer/style/images/ActionIcon_40x40_recents.png
  13. BIN apps/communications/dialer/style/images/handle.png
  14. BIN apps/communications/dialer/style/images/hangup_icon.png
  15. BIN apps/communications/dialer/style/images/hangup_icon_pressed.png
  16. BIN apps/communications/dialer/style/images/mask.png
  17. BIN apps/communications/dialer/style/images/pickup_icon.png
  18. BIN apps/communications/dialer/style/images/pickup_icon_pressed.png
  19. +102 −10 apps/communications/dialer/style/oncall.css
  20. +128 −96 apps/communications/dialer/style/swiper.css
  21. +0 −4 apps/communications/dialer/test/unit/handled_call_test.js
  22. +0 −1 apps/communications/ftu/css/style.css
  23. +1 −1 apps/communications/ftu/js/tutorial.js
  24. +1 −0 apps/communications/ftu/locales/ftu.en-US.properties
  25. +1 −1 apps/costcontrol/index.html
  26. +36 −0 apps/costcontrol/js/message_handler.js
  27. +20 −0 apps/costcontrol/js/widget.js
  28. +5 −2 apps/costcontrol/manifest.webapp
  29. +2 −2 apps/costcontrol/widget.html
  30. +18 −3 apps/email/js/ext/gaia-email-opt.js
  31. +35 −20 apps/gallery/style/gallery.css
  32. BIN apps/gallery/style/images/iconaction_camera_gridview_30x30.png
  33. BIN apps/gallery/style/images/ui/gradient.png
  34. BIN apps/gallery/style/images/ui/pattern.png
  35. +0 −1 apps/homescreen/everything.me/config/config.js
  36. +0 −22 apps/homescreen/everything.me/js/api/DoATAPI.js
  37. +0 −174 apps/homescreen/everything.me/js/helpers/Tests.js
  38. +0 −12 apps/homescreen/everything.me/js/helpers/Utils.js
  39. +3 −0 apps/homescreen/js/pagbar.js
  40. +0 −1 apps/homescreen/style/grid.css
  41. +57 −18 apps/music/js/music.js
  42. BIN apps/music/style/images/IconAction_Camera_GridView_30x30.png
  43. BIN apps/music/style/images/scroll_bar_bg.png
  44. BIN apps/music/style/images/scrubber.png
  45. BIN apps/music/style/images/scrubber_pressed.png
  46. BIN apps/music/style/images/timeline.png
  47. BIN apps/music/style/images/timeline_filled.png
  48. BIN apps/music/style/images/ui/gradient.png
  49. BIN apps/music/style/images/ui/pattern.png
  50. +104 −47 apps/music/style/music.css
  51. +6 −6 apps/settings/index.html
  52. +6 −5 apps/settings/js/carrier.js
  53. +29 −3 apps/settings/js/settings.js
  54. +1 −1 apps/settings/style/lists.css
  55. +0 −1 apps/system/style/lockscreen/lockscreen.css
  56. +1 −1 apps/video/index.html
  57. +3 −1 apps/video/js/video.js
  58. BIN apps/video/style/images/back_div_line.png
  59. BIN apps/video/style/images/btn_pause_off.png
  60. BIN apps/video/style/images/btn_pause_press.png
  61. BIN apps/video/style/images/btn_play_off.png
  62. BIN apps/video/style/images/btn_play_press.png
  63. BIN apps/video/style/images/button_bg_normal.png
  64. BIN apps/video/style/images/button_bg_pressed.png
  65. BIN apps/video/style/images/pause.png
  66. BIN apps/video/style/images/play.png
  67. BIN apps/video/style/images/portrait/button_bg_normal.png
  68. BIN apps/video/style/images/portrait/button_bg_pressed.png
  69. BIN apps/video/style/images/portrait/scroll_bar_bg.png
  70. BIN apps/video/style/images/scroll_bar_bg.png
  71. BIN apps/video/style/images/scrubber.png
  72. BIN apps/video/style/images/scrubber_pressed.png
  73. BIN apps/video/style/images/timeline.png
  74. BIN apps/video/style/images/timeline_filled.png
  75. +84 −42 apps/video/style/video.css
  76. +7 −0 shared/js/l10n_date.js
  77. +166 −5 shared/js/simple_phone_matcher.js
  78. BIN shared/resources/branding/official/Browser.png
  79. BIN shared/resources/branding/official/about_logo.png
  80. BIN shared/resources/media/ringtones/{ringer_loude_windchimes.opus → ringer_loud_windchimes.opus}
@@ -1,4 +1,6 @@
html, body {
+ font-family: "MozTT", sans-serif;
+ font-size: 10px;
height: 100%;
width: 100%;
padding: 0;
@@ -118,7 +120,6 @@ html, body {
#video-timer {
display: none;
color: white;
- font-family: sans-serif;
}
/* Specific to when we are capturing video */
@@ -208,26 +209,41 @@ html, body {
* the overlay text shows up more clearly
*/
#overlay-content {
- margin-top: 30%;
- margin-left: 10%;
- margin-right: 10%;
- padding: 10%;
- border: solid black 4px;
- border-radius: 10px;
- background-color: rgba(0, 0, 0, 0.6);
- font-family: "MozTT", sans-serif;
+ background:
+ url(images/ui/pattern.png) repeat left top,
+ url(images/ui/gradient.png) no-repeat left top;
+ background-size: auto auto, 100% 100%;
+ /* We can't use shortand with background size because is not implemented yet:
+ https://bugzilla.mozilla.org/show_bug.cgi?id=570326; */
+ overflow: hidden;
+ position: absolute;
+ z-index: 100;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ font-family: "MozTT", Sans-serif;
+ font-size: 0;
+ /* Using font-size: 0; we avoid the unwanted visual space (about 3px)
+ created by white-spaces and break lines in the code betewen inline-block elements */
color: #fff;
- -moz-user-select: none;
+ padding: 110px 25px 0px 25px;
}
#overlay-title {
- text-align: center;
- font-weight: bold;
- font-size: 26px;
+ font-weight: normal;
+ text-transform:capitalize;
+ font-size: 1.9rem;
+ color: #fff;
+ margin: 0 5px -10px 5px;
}
#overlay-text {
- font-size: 18px;
+ padding: 10px 5px 0 5px;
+ border-top: 1px solid #686868;
+ font-weight: 300;
+ font-size: 2.5rem;
+ color: #ebebeb;
}
.hidden {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -35,23 +35,12 @@ var RingView = {
init: function rv_init() {
document.addEventListener('mozvisibilitychange', this);
+ // If mozHidden is true in init state,
+ // it means that the incoming call happens before the alarm.
+ // We should just put a "silent" alarm screen
+ // underneath the oncall screen
if (!document.mozHidden) {
this.startAlarmNotification();
- } else {
- // The setTimeout() is used to workaround
- // https://bugzilla.mozilla.org/show_bug.cgi?id=810431
- // The workaround is used in screen off mode.
- // mozHidden will be true in init() state.
- var self = this;
- window.setTimeout(function rv_checkMozHidden() {
- // If mozHidden is true in init state,
- // it means that the incoming call happens before the alarm.
- // We should just put a "silent" alarm screen
- // underneath the oncall screen
- if (!document.mozHidden) {
- self.startAlarmNotification();
- }
- }, 0);
}
this.setAlarmTime();
@@ -190,5 +179,9 @@ var RingView = {
};
-RingView.init();
+window.addEventListener('localized', function showBody() {
+ window.removeEventListener('localized', showBody);
+ RingView.init();
+});
+
@@ -110,8 +110,8 @@ var CallHandler = (function callHandler() {
/* === Bluetooth Support === */
function btCommandHandler(message) {
- var command = message['bluetooth-dialer-command'];
-
+ var command = message['command'];
+ var partialCommand = command.substring(0, 3);
if (command === 'BLDN') {
RecentsDBManager.init(function() {
RecentsDBManager.getLast(function(lastRecent) {
@@ -121,6 +121,10 @@ var CallHandler = (function callHandler() {
});
});
return;
+ } else if (partialCommand === 'ATD') {
+ var phoneNumber = command.substring(3);
+ CallHandler.call(phoneNumber);
+ return;
}
// Other commands needs to be handled from the call screen
@@ -57,7 +57,7 @@ HandledCall.prototype.handleEvent = function hc_handle(evt) {
break;
case 'resumed':
if (this.photo) {
- CallScreen.setCallerContactImage(this.photo, true);
+ CallScreen.setCallerContactImage(this.photo, true, false);
}
CallScreen.syncSpeakerEnabled();
break;
@@ -121,7 +121,7 @@ HandledCall.prototype.updateCallNumber = function hc_updateCallNumber() {
KeypadManager.updateAdditionalContactInfo(additionalInfo);
if (contact.photo && contact.photo.length > 0) {
self.photo = contact.photo[0];
- CallScreen.setCallerContactImage(self.photo, true);
+ CallScreen.setCallerContactImage(self.photo, true, false);
}
return;
}
@@ -149,8 +149,6 @@ HandledCall.prototype.remove = function hc_remove() {
clearInterval(this._ticker);
this._ticker = null;
-
- this.node.hidden = true;
};
HandledCall.prototype.connected = function hc_connected() {
@@ -30,8 +30,7 @@ var CallScreen = {
incomingAnswer: document.getElementById('incoming-answer'),
incomingEnd: document.getElementById('incoming-end'),
incomingIgnore: document.getElementById('incoming-ignore'),
-
- swiperWrapper: document.getElementById('swiper-wrapper'),
+ lockedContactPhoto: document.getElementById('locked-contact-photo'),
init: function cs_init() {
this.muteButton.addEventListener('mouseup', this.toggleMute.bind(this));
@@ -54,12 +53,19 @@ var CallScreen = {
OnCallHandler.toggleCalls);
},
- setCallerContactImage: function cs_setCallerContactImage(image_url, force) {
+ setCallerContactImage: function cs_setContactImage(image_url, force, mask) {
var photoURL;
var isString = (typeof image_url == 'string');
+ var isLocked = (this.screen.dataset.layout === 'incoming-locked');
+ var target = isLocked ? this.lockedContactPhoto : this.mainContainer;
photoURL = isString ? image_url : URL.createObjectURL(image_url);
- if (!this.mainContainer.style.backgroundImage || force) {
- this.mainContainer.style.backgroundImage = 'url(' + photoURL + ')';
+ if (!target.style.backgroundImage || force) {
+ target.style.backgroundImage = 'url(' + photoURL + ')';
+ if (mask) {
+ target.classList.add('masked');
+ } else {
+ target.classList.remove('masked');
+ }
}
},
@@ -96,36 +102,9 @@ var CallScreen = {
},
render: function cs_render(layout_type) {
- switch (layout_type) {
- case 'dialing':
- this.answerButton.classList.add('hide');
- this.rejectButton.classList.remove('hide');
- this.rejectButton.classList.add('full-space');
- this.callToolbar.classList.remove('transparent');
- this.keypadButton.setAttribute('disabled', 'disabled');
- this.swiperWrapper.classList.add('hide');
- break;
- case 'incoming':
- this.answerButton.classList.remove('hide');
- this.rejectButton.classList.remove('hide');
- this.callToolbar.classList.remove('transparent');
- this.keypadButton.setAttribute('disabled', 'disabled');
- this.swiperWrapper.classList.add('hide');
- break;
- case 'incoming-locked':
- this.answerButton.classList.add('hide');
- this.rejectButton.classList.add('hide');
- this.callToolbar.classList.add('transparent');
- this.keypadButton.setAttribute('disabled', 'disabled');
- this.swiperWrapper.classList.remove('hide');
- break;
- case 'connected':
- this.answerButton.classList.add('hide');
- this.rejectButton.classList.remove('hide');
- this.rejectButton.classList.add('full-space');
- this.callToolbar.classList.remove('transparent');
- this.swiperWrapper.classList.add('hide');
- break;
+ this.screen.dataset.layout = layout_type;
+ if (layout_type !== 'connected') {
+ this.keypadButton.setAttribute('disabled', 'disabled');
}
},
@@ -260,18 +239,18 @@ var OnCallHandler = (function onCallHandler() {
});
// Letting the layout know how many calls we're handling
- CallScreen.calls.dataset.count = handledCalls.length;
-
- if (CallScreen.calls.dataset.count === 0) {
+ if (handledCalls.length === 0) {
exitCallScreen(false);
+ } else {
+ CallScreen.calls.dataset.count = handledCalls.length;
}
-
}
function addCall(call) {
// Once we already have 1 call, we only care about incomings
- if (handledCalls.length && (call.state != 'incoming'))
+ if (handledCalls.length && (call.state != 'incoming')) {
return;
+ }
// No more room
if (handledCalls.length >= CALLS_LIMIT) {
@@ -419,8 +398,9 @@ var OnCallHandler = (function onCallHandler() {
}
function exitCallScreen(animate) {
- if (closing)
+ if (closing) {
return;
+ }
if (cpuLock) {
cpuLock.unlock();
@@ -429,6 +409,10 @@ var OnCallHandler = (function onCallHandler() {
closing = true;
+ if (Swiper) {
+ Swiper.setElasticEnabled(false);
+ }
+
if (animate && !animating) {
toggleScreen();
} else {
@@ -514,10 +498,17 @@ var OnCallHandler = (function onCallHandler() {
/* === User Actions === */
function answer() {
// We should always have only 1 call here
- if (!handledCalls.length)
+ if (!handledCalls.length) {
return;
+ }
handledCalls[0].call.answer();
+
+ if (CallScreen.screen.dataset.layout === 'incoming-locked') {
+ CallScreen.mainContainer.style.backgroundImage =
+ CallScreen.lockedContactPhoto.style.backgroundImage;
+ }
+
CallScreen.render('connected');
}
@@ -544,8 +535,9 @@ var OnCallHandler = (function onCallHandler() {
}
function toggleCalls() {
- if (handledCalls.length < 2)
+ if (handledCalls.length < 2) {
return;
+ }
telephony.active.hold();
}
@@ -624,18 +616,13 @@ window.addEventListener('load', function callSetup(evt) {
OnCallHandler.setup();
CallScreen.init();
CallScreen.syncSpeakerEnabled();
-
KeypadManager.init(true);
- var isLocked = (window.location.hash === '#locked');
- // After investigating in #815629, it seems that
- // lock screen animation over the Wallpaper image is not
- // performing well, so we are not painting it when is locked
- // Being tracked in #817988
- if (navigator.mozSettings && !isLocked) {
+ if (navigator.mozSettings) {
var req = navigator.mozSettings.createLock().get('wallpaper.image');
req.onsuccess = function cs_wi_onsuccess() {
- CallScreen.setCallerContactImage(req.result['wallpaper.image']);
+ CallScreen.setCallerContactImage(
+ req.result['wallpaper.image'], false, true);
};
}
});
Oops, something went wrong.

0 comments on commit 73270c3

Please sign in to comment.