Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #7356 from dscravag/nightly2

Nightly 2013-01-08
  • Loading branch information...
commit 7c348f42b661f73f7223cdb12cef14946c66ab22 2 parents e24d066 + 0a31d94
@dscravag dscravag authored
Showing with 549 additions and 2,124 deletions.
  1. +3 −1 Makefile
  2. +37 −3 apps/calendar/js/ext/caldav.js
  3. +0 −12 apps/calendar/js/presets.js
  4. +4 −0 apps/calendar/js/store/ical_component.js
  5. +5 −0 apps/calendar/js/views/time_parent.js
  6. +9 −0 apps/calendar/test/unit/views/time_parent_test.js
  7. +4 −2 apps/communications/contacts/index.html
  8. +11 −5 apps/communications/contacts/js/contacts.js
  9. +2 −0  apps/communications/contacts/js/contacts_list.js
  10. +1 −0  apps/communications/contacts/locales/contacts.en-US.properties
  11. +4 −0 apps/communications/contacts/style/contacts.css
  12. BIN  apps/communications/contacts/style/images/edit-contact.png
  13. +2 −2 apps/communications/ftu/css/style.css
  14. +1 −1  apps/communications/ftu/js/navigation.js
  15. +1 −0  apps/communications/ftu/js/tutorial.js
  16. +6 −7 apps/communications/ftu/js/ui.js
  17. +29 −6 apps/communications/ftu/js/wifi.js
  18. +12 −12 apps/costcontrol/js/config_manager.js
  19. +1 −1  apps/email/index.html
  20. +66 −24 apps/email/js/ext/gaia-email-opt.js
  21. +2 −0  apps/gallery/js/gallery.js
  22. +1 −1  apps/gallery/style/gallery.css
  23. BIN  apps/gallery/style/images/iconaction_camera_editphoto_30x30.png
  24. BIN  apps/gallery/style/images/iconaction_share_30x30.png
  25. +4 −1 apps/settings/index.html
  26. +1 −1  apps/settings/js/apps.js
  27. +51 −18 apps/settings/js/bluetooth.js
  28. +38 −23 apps/settings/js/onpair.js
  29. +1 −0  apps/settings/locales/settings.en-US.properties
  30. BIN  apps/settings/style/images/wallpaper_edit.png
  31. BIN  apps/settings/style/images/wallpaper_edit_pressed.png
  32. +2 −2 apps/sms/index.html
  33. +16 −53 apps/sms/js/sms.js
  34. +4 −0 apps/system/index.html
  35. +2 −1  apps/system/js/activities.js
  36. +1 −1  apps/system/js/battery_manager.js
  37. +42 −37 apps/system/js/cost_control.js
  38. +14 −10 apps/system/js/list_menu.js
  39. +1 −1  apps/system/js/permission_manager.js
  40. +21 −2 apps/system/js/quick_settings.js
  41. BIN  apps/system/resources/sounds/unlock.ogg
  42. +2 −5 apps/system/style/list_menu/list_menu.css
  43. +1 −1  apps/system/style/notifications/notifications.css
  44. BIN  apps/system/style/quick_settings/images/bluetooth-off.png
  45. +0 −181 apps/system/style/quick_settings/images/bluetooth-off.svg
  46. BIN  apps/system/style/quick_settings/images/bluetooth-on.png
  47. +0 −182 apps/system/style/quick_settings/images/bluetooth-on.svg
  48. BIN  apps/system/style/quick_settings/images/data-2g-off.png
  49. BIN  apps/system/style/quick_settings/images/data-2g-on.png
  50. BIN  apps/system/style/quick_settings/images/data-3g-off.png
  51. BIN  apps/system/style/quick_settings/images/data-3g-on.png
  52. BIN  apps/system/style/quick_settings/images/data-4g-off.png
  53. BIN  apps/system/style/quick_settings/images/data-4g-on.png
  54. BIN  apps/system/style/quick_settings/images/data-e-off.png
  55. BIN  apps/system/style/quick_settings/images/data-e-on.png
  56. BIN  apps/system/style/quick_settings/images/data-h+-off.png
  57. BIN  apps/system/style/quick_settings/images/data-h+-on.png
  58. BIN  apps/system/style/quick_settings/images/data-h-off.png
  59. BIN  apps/system/style/quick_settings/images/data-h-on.png
  60. BIN  apps/system/style/quick_settings/images/data-o-off.png
  61. BIN  apps/system/style/quick_settings/images/data-o-on.png
  62. BIN  apps/system/style/quick_settings/images/data-off.png
  63. +0 −84 apps/system/style/quick_settings/images/data-off.svg
  64. +0 −73 apps/system/style/quick_settings/images/data-on.svg
  65. BIN  apps/system/style/quick_settings/images/power-save-off.png
  66. +0 −552 apps/system/style/quick_settings/images/power-save-off.svg
  67. BIN  apps/system/style/quick_settings/images/power-save-on.png
  68. +0 −248 apps/system/style/quick_settings/images/power-save-on.svg
  69. BIN  apps/system/style/quick_settings/images/settings-off.png
  70. BIN  apps/system/style/quick_settings/images/settings-on.png
  71. +0 −351 apps/system/style/quick_settings/images/settings.svg
  72. BIN  apps/system/style/quick_settings/images/wifi-off.png
  73. +0 −61 apps/system/style/quick_settings/images/wifi-off.svg
  74. BIN  apps/system/style/quick_settings/images/wifi-on.png
  75. +0 −73 apps/system/style/quick_settings/images/wifi-on.svg
  76. +67 −20 apps/system/style/quick_settings/quick_settings.css
  77. BIN  apps/system/style/sound_manager/images/speaker_loud_icon.png
  78. BIN  apps/system/style/sound_manager/images/speaker_mute_icon.png
  79. BIN  apps/system/style/sound_manager/images/speaker_regular_icon.png
  80. BIN  apps/system/style/sound_manager/images/vibration_disabled_icon.png
  81. BIN  apps/system/style/sound_manager/images/vibration_enabled_icon.png
  82. +13 −10 apps/system/style/update_manager/update_manager.css
  83. +4 −4 build/payment-prefs.js
  84. +47 −46 build/ua-override-prefs.js
  85. +1 −1  external-apps/maps/metadata.json
  86. +7 −1 shared/js/tz_select.js
  87. +4 −4 shared/locales/permissions/permissions.en-US.properties
  88. +4 −0 shared/style/headers.css
  89. 0  apps/gallery/style/images/iconaction_edit_30x30.png → shared/style/headers/images/icons/compose.png
  90. BIN  shared/style/headers/images/icons/edit.png
View
4 Makefile
@@ -503,7 +503,9 @@ lint:
# let us remove the update-offline-manifests target dependancy of the
# default target.
stamp-commit-hash:
- @(if [ -d ./.git ]; then \
+ @(if [ -e gaia_commit_override.txt ]; then \
+ cp gaia_commit_override.txt apps/settings/resources/gaia_commit.txt; \
+ elif [ -d ./.git ]; then \
git log -1 --format="%H%n%at" HEAD > apps/settings/resources/gaia_commit.txt; \
else \
echo 'Unknown Git commit; build date shown here.' > apps/settings/resources/gaia_commit.txt; \
View
40 apps/calendar/js/ext/caldav.js
@@ -1425,6 +1425,10 @@ function write (chunk) {
return this._parse.write(chunk);
},
+ close: function() {
+ this._parse.close();
+ },
+
get closed() {
return this._parse.closed;
},
@@ -2096,10 +2100,35 @@ function write (chunk) {
}
}
+
+ var hasProgressEvents = false;
+
+ // check for progress event support.
+ if ('onprogress' in xhr) {
+ hasProgressEvents = true;
+ var last = 0;
+ xhr.onprogress = function onProgress(event) {
+ var chunk = xhr.responseText.substr(last, event.loaded);
+ last = event.loaded;
+ if (this.ondata) {
+ this.ondata(chunk);
+ }
+ }.bind(this);
+ }
+
xhr.onreadystatechange = function onReadyStateChange() {
var data;
if (xhr.readyState === 4) {
data = xhr.responseText;
+
+ // emulate progress events for node...
+ // this really lame we should probably just
+ // use a real http request for node but this
+ // will let us do some testing via node for now.
+ if (!hasProgressEvents && this.ondata) {
+ this.ondata(data);
+ }
+
this.waiting = false;
callback(null, xhr);
}
@@ -2666,12 +2695,16 @@ function write (chunk) {
var req = this.xhr;
req.data = this._createPayload();
+ req.ondata = function xhrOnData(chunk) {
+ self.sax.write(chunk);
+ };
+
// in the future we may stream data somehow
req.send(function xhrResult() {
var xhr = req.xhr;
if (xhr.status > 199 && xhr.status < 300) {
// success
- self.sax.write(xhr.responseText).close();
+ self.sax.close();
self._processResult(req, callback);
} else {
// fail
@@ -2988,7 +3021,8 @@ function write (chunk) {
content += this.filter.toString();
}
- return this.template.render(content);
+ var out = this.template.render(content);
+ return out;
}
};
@@ -3076,7 +3110,6 @@ function write (chunk) {
if (!principal) {
principal = findProperty('principal-URL', data, true);
}
-
if ('unauthenticated' in principal) {
callback(new Errors.UnauthenticatedError());
} else if (principal.href){
@@ -3438,3 +3471,4 @@ function write (chunk) {
[Caldav, Caldav] :
[module, require('./caldav')]
));
+
View
12 apps/calendar/js/presets.js
@@ -38,19 +38,7 @@
options: {
providerType: 'Local'
}
- },
-
- 'mozilla': {
- providerType: 'Caldav',
- group: 'testing',
- options: {
- domain: 'https://mail.mozilla.com',
- providerType: 'Caldav',
- entrypoint: '',
- user: '@mozilla.com'
- }
}
-
};
Calendar.Presets = Presets;
View
4 apps/calendar/js/store/ical_component.js
@@ -9,6 +9,10 @@ Calendar.ns('Store').IcalComponent = (function() {
_store: 'icalComponents',
+ /** disable caching */
+ _addToCache: function() {},
+ _removeFromCache: function() {},
+
_createModel: function(object) {
return object;
},
View
5 apps/calendar/js/views/time_parent.js
@@ -209,6 +209,11 @@ Calendar.ns('Views').TimeParent = (function() {
for (; i < len; i++) {
child = this.frames.items[i - offset][1];
if (span.contains(child.timespan)) {
+ // Bug 827249 - remove current frame when its purged.
+ if (this.currentFrame === child) {
+ this.currentFrame = null;
+ }
+
child.destroy();
this.frames.items.splice(i - offset, 1);
offset += 1;
View
9 apps/calendar/test/unit/views/time_parent_test.js
@@ -329,6 +329,10 @@ suite('views/time_parent', function() {
subject.frames.set(items[key].id, items[key]);
}
+ // set current frame to a frame
+ // that will be deleted...
+ subject.currentFrame = items.contains;
+
subject.purgeFrames(purgeSpan);
});
@@ -342,6 +346,11 @@ suite('views/time_parent', function() {
assert.ok(!frames.get(items.same.id), 'removed same');
assert.ok(!frames.get(items.contains.id), 'removed contains');
+ assert.ok(
+ !subject.currentFrame,
+ 'removes current frame when it is deleted'
+ );
+
assert.isTrue(items.same.destroyed);
assert.isTrue(items.contains.destroyed);
});
View
6 apps/communications/contacts/index.html
@@ -89,8 +89,10 @@
<!-- Contacts List Section -->
<section id='view-contacts-list' role="region" data-state="active" class="view view-noscroll view-contacts-list">
<header>
+ <a href="#" id="cancel_activity" class="hide">
+ <span class="icon icon-close" data-l10n-id="exit">Exit</span>
+ </a>
<menu type="toolbar">
- <button role="menuitem" id="cancel_activty" class="hide"><span class="icon icon-close"data-l10n-id="exit">Exit</span></button>
<button role="menuitem" id="add-contact-button"><span class="icon icon-add" data-l10n-id="add">add</span></button>
<button role="menuitem" id="settings-button"><span class="icon icon-settings" data-l10n-id="settings">settings</span></button>
</menu>
@@ -171,7 +173,7 @@ <h1 data-l10n-id="contacts">Contacts</h1>
<header id='details-view-header'>
<button id="details-back" class="negative"><span class="icon icon-back" data-l10n-id="back">back</span></button>
<menu type="toolbar">
- <button role="menuitem" id="edit-contact-button"><span class="icon icon-edit"
+ <button role="menuitem" id="edit-contact-button"><span class="icon icon-edit-contact"
data-l10n-id="edit" data-l10n-id="edit">edit</span></button>
</menu>
<h1 id='contact-name-title'></h1>
View
16 apps/communications/contacts/js/contacts.js
@@ -21,7 +21,10 @@ var Contacts = (function() {
saveButton,
editContactButton,
settings,
- settingsButton;
+ settingsButton,
+ cancelButton,
+ addButton,
+ appTitleElement;
var readyToPaint = false;
var firstContacts = null;
@@ -145,6 +148,9 @@ var Contacts = (function() {
customTag = document.getElementById('custom-tag');
settings = document.getElementById('view-settings');
settingsButton = document.getElementById('settings-button');
+ cancelButton = document.getElementById('cancel_activity');
+ addButton = document.getElementById('add-contact-button');
+ appTitleElement = cancelButton.parentNode.querySelector('h1');
TAG_OPTIONS = {
'phone-type' : [
@@ -188,16 +194,16 @@ var Contacts = (function() {
};
var checkCancelableActivity = function cancelableActivity() {
- var cancelButton = document.getElementById('cancel_activty');
- var addButton = document.getElementById('add-contact-button');
if (ActivityHandler.currentlyHandling) {
cancelButton.classList.remove('hide');
addButton.classList.add('hide');
settingsButton.classList.add('hide');
+ appTitleElement.textContent = _('selectContact');
} else {
cancelButton.classList.add('hide');
addButton.classList.remove('hide');
settingsButton.classList.remove('hide');
+ appTitleElement.textContent = _('contacts');
}
};
@@ -586,7 +592,7 @@ var Contacts = (function() {
var initEventListeners = function initEventListener() {
// Definition of elements and handlers
utils.listeners.add({
- '#cancel_activty': handleCancel, // Activity (any) cancellation
+ '#cancel_activity': handleCancel, // Activity (any) cancellation
'#cancel-edit': handleCancel, // Cancel edition
'#save-button': contacts.Form.saveContact,
'#add-contact-button': showAddContact,
@@ -673,7 +679,7 @@ var Contacts = (function() {
})();
window.addEventListener('localized', function initContacts(evt) {
-
+ window.removeEventListener('localized', initContacts);
fb.init(function contacts_init() {
Contacts.onLocalized();
View
2  apps/communications/contacts/js/contacts_list.js
@@ -383,6 +383,8 @@ contacts.List = (function() {
var container = document.getElementById(group);
var newContact = renderContact(c);
container.appendChild(newContact);
+
+ imgLoader.reload();
}
var getContactsByGroup = function gCtByGroup(errorCb, contacts) {
View
1  apps/communications/contacts/locales/contacts.en-US.properties
@@ -11,6 +11,7 @@ update = Update
contacts = Contacts
addContact = Add contact
deleteContact = Delete contact
+selectContact = Select contact
editContact = Edit contact
deleteConfirmMsg = Delete contact?
remove = Remove
View
4 apps/communications/contacts/style/contacts.css
@@ -17,6 +17,10 @@ section[role="region"] > header:first-child sup {
top: 0;
}
+section[role="region"] > header:first-child .icon.icon-edit-contact {
+ background: url(images/edit-contact.png) no-repeat center center;
+}
+
.contact-header img {
width: 100%;
height: 7.6rem;
View
BIN  apps/communications/contacts/style/images/edit-contact.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 apps/communications/ftu/css/style.css
@@ -322,7 +322,7 @@ html, body {
#finish-screen h1, #tutorialFinish h1 {
margin: 0;
color: white;
- font-size: 4.1rem;
+ font-size: 3rem;
padding: 4rem 0 0 0;
font-weight: 200;
line-height: 4rem;
@@ -331,7 +331,7 @@ html, body {
#finish-screen h2, #tutorialFinish h2 {
margin: 0;
color: white;
- font-size: 1.8rem;
+ font-size: 1.9rem;
padding: .5rem 0 2rem 0;
font-weight: 200;
line-height: 2rem;
View
2  apps/communications/ftu/js/navigation.js
@@ -198,7 +198,7 @@ var Navigation = {
simOption.classList.add('disabled');
}
// If we have 3G or Wifi activate FB import
- if (WifiManager.isConnected || DataMobile.isDataAvailable) {
+ if (WifiManager.api.connection.status === 'connected' || DataMobile.isDataAvailable) {
fbOption.classList.remove('disabled');
} else {
fbOption.classList.add('disabled');
View
1  apps/communications/ftu/js/tutorial.js
@@ -54,6 +54,7 @@ var Tutorial = {
this.tutorialFinish.addEventListener('click', function ftuEnd() {
self.tutorialFinish.removeEventListener('click', ftuEnd);
+ WifiManager.finish();
window.close();
});
window.addEventListener('hashchange', this);
View
13 apps/communications/ftu/js/ui.js
@@ -82,6 +82,7 @@ var UIManager = {
});
this.skipTutorialButton.addEventListener('click', function() {
+ WifiManager.finish();
window.close();
});
this.letsGoButton.addEventListener('click', function() {
@@ -232,13 +233,11 @@ var UIManager = {
document.getElementById('tz-continent-label').textContent =
timezone.id.replace(/\/.*$/, '');
document.getElementById('tz-city-label').textContent = timezone.city;
- // it can take a few milliseconds before the TZ change is reflected on time
- setTimeout(function updateTime() {
- var f = new navigator.mozL10n.DateTimeFormat();
- var now = new Date();
- var timeLabel = document.getElementById('time-configuration-label');
- timeLabel.innerHTML = f.localeFormat(now, _('shortTimeFormat'));
- });
+
+ var f = new navigator.mozL10n.DateTimeFormat();
+ var now = new Date();
+ var timeLabel = document.getElementById('time-configuration-label');
+ timeLabel.innerHTML = f.localeFormat(now, _('shortTimeFormat'));
},
chooseNetwork: function ui_cn(event) {
View
35 apps/communications/ftu/js/wifi.js
@@ -6,9 +6,19 @@ var WifiManager = {
if ('mozWifiManager' in window.navigator) {
this.api = window.navigator.mozWifiManager;
this.changeStatus();
+ // Ensure that wifi is on.
+ var lock = window.navigator.mozSettings.createLock();
+ this.enable(lock);
+ this.enableDebugging(lock);
+
this.gCurrentNetwork = this.api.connection.network;
+ if (this.gCurrentNetwork !== null) {
+ this.api.forget(this.gCurrentNetwork);
+ this.gCurrentNetwork = null;
+ }
}
},
+
isConnectedTo: function wn_isConnectedTo(network) {
/**
* XXX the API should expose a 'connected' property on 'network',
@@ -24,6 +34,7 @@ var WifiManager = {
currentNetwork.capabilities.join('+');
return (key == curkey);
},
+
scan: function wn_scan(callback) {
if ('mozWifiManager' in window.navigator) {
var req = WifiManager.api.getNetworks();
@@ -70,9 +81,24 @@ var WifiManager = {
callback(fakeNetworks);
}
},
- enable: function wn_enable(firstTime) {
- var settings = window.navigator.mozSettings;
- settings.createLock().set({'wifi.enabled': true});
+ enable: function wn_enable(lock) {
+ lock.set({'wifi.enabled': true});
+ },
+ enableDebugging: function wn_enableDebugging(lock) {
+ // For bug 819947: turn on wifi debugging output to help track down a bug
+ // in wifi. We turn on wifi output only while the FTU app is active.
+ this._prevDebuggingValue = false;
+ var req = lock.get('wifi.debugging.enabled');
+ req.onsuccess = function wn_getDebuggingSuccess() {
+ this._prevDebuggingValue = req.result['wifi.debugging.enabled'];
+ };
+ lock.set({ 'wifi.debugging.enabled': true });
+ },
+ finish: function wn_finish() {
+ if (!this._prevDebuggingValue) {
+ var resetLock = window.navigator.mozSettings.createLock();
+ resetLock.set({'wifi.debugging.enabled': false});
+ }
},
getNetwork: function wm_gn(ssid) {
var network;
@@ -128,12 +154,9 @@ var WifiManager = {
WifiManager.api.onstatuschange = function(event) {
UIManager.updateNetworkStatus(self.ssid, event.status);
if (event.status == 'connected') {
- self.isConnected = true;
if (self.networks && self.networks.length) {
UIManager.renderNetworks(self.networks);
}
- } else {
- self.isConnected = false;
}
};
View
24 apps/costcontrol/js/config_manager.js
@@ -99,20 +99,20 @@ var ConfigManager = (function() {
function requestSettings(callback) {
asyncStorage.getItem(currentICCID, function _wrapGetItem(localSettings) {
// No entry: set defaults
- settings = JSON.parse(localSettings, settingsReviver);
- if (settings !== null) {
- if (callback)
- callback(settings);
- return;
+ try {
+ settings = JSON.parse(localSettings, settingsReviver);
+ } catch(e) {
+ // If we can't parse the settings, use the default ones
}
- settings = deepCopy(DEFAULT_SETTINGS);
- asyncStorage.setItem(currentICCID, JSON.stringify(settings),
- function _onceSettingsSet() {
- if (callback)
- callback(settings);
- }
- );
+ if (settings === null) {
+ settings = deepCopy(DEFAULT_SETTINGS);
+ asyncStorage.setItem(currentICCID, JSON.stringify(settings));
+ }
+
+ if (callback) {
+ callback(settings);
+ }
});
}
View
2  apps/email/index.html
@@ -122,7 +122,7 @@ <h1 class="fld-folders-header-account-label"></h1>
</a>
<menu type="toolbar">
<a href="#" class="msg-compose-btn">
- <span class="icon icon-add">add</span>
+ <span class="icon icon-compose">compose</span>
</a>
</menu>
<h1 class="msg-list-header-folder-label header-label"></h1>
View
90 apps/email/js/ext/gaia-email-opt.js
@@ -26699,6 +26699,19 @@ FolderStorage.prototype = {
this._curSyncSlice.onHeaderAdded(header, true, false);
},
+ hasMessageWithServerId: function(srvid) {
+ if (!this._serverIdHeaderBlockMapping)
+ throw new Error('Server ID mapping not supported for this storage!');
+
+ var blockId = this._serverIdHeaderBlockMapping[srvid];
+ if (srvid === undefined) {
+ this._LOG.serverIdMappingMissing(srvid);
+ return false;
+ }
+
+ return !!blockId;
+ },
+
deleteMessageHeaderAndBody: function(header, callback) {
if (this._pendingLoads.length) {
this._deferredCalls.push(this.deleteMessageHeaderAndBody.bind(
@@ -32707,7 +32720,6 @@ function FakeAccount(universe, accountDef, folderInfo, receiveProtoConn, _LOG) {
this.meta = folderInfo.$meta;
this.mutations = folderInfo.$mutations;
- this.deferredMutations = folderInfo.$deferredMutations;
}
exports.FakeAccount = FakeAccount;
FakeAccount.prototype = {
@@ -33588,29 +33600,53 @@ ActiveSyncFolderConn.prototype = {
return;
}
+ let addedMessages = 0;
for (let [,message] in Iterator(added)) {
+ // If we already have this message, it's probably because we moved it as
+ // part of a local op, so let's assume that the data we already have is
+ // ok. XXX: We might want to verify this, to be safe.
+ if (storage.hasMessageWithServerId(message.header.srvid))
+ continue;
+
storage.addMessageHeader(message.header);
storage.addMessageBody(message.header, message.body);
+ addedMessages++;
}
+ let changedMessages = 0;
for (let [,message] in Iterator(changed)) {
+ // If we don't know about this message, just bail out.
+ if (!storage.hasMessageWithServerId(message.header.srvid))
+ continue;
+
storage.updateMessageHeaderByServerId(message.header.srvid, true,
function(oldHeader) {
message.header.mergeInto(oldHeader);
return true;
});
+ changedMessages++;
// XXX: update bodies
}
+ let deletedMessages = 0;
for (let [,messageGuid] in Iterator(deleted)) {
+ // If we don't know about this message, it's probably because we already
+ // deleted it.
+ if (!storage.hasMessageWithServerId(messageGuid))
+ continue;
+
storage.deleteMessageByServerId(messageGuid);
+ deletedMessages++;
}
- messagesSeen += added.length + changed.length + deleted.length;
+ messagesSeen += addedMessages + changedMessages + deletedMessages;
if (!moreAvailable) {
- folderConn._LOG.syncDateRange_end(added.length, changed.length,
- deleted.length, startTS, endTS);
+ // Note: For the second argument here, we report the number of messages
+ // we saw that *changed*. This differs from IMAP, which reports the
+ // number of messages it *saw*.
+ folderConn._LOG.syncDateRange_end(addedMessages, changedMessages,
+ deletedMessages, startTS, endTS);
storage.markSyncRange(startTS, endTS, 'XXX', accuracyStamp);
doneCallback(null, null, messagesSeen);
}
@@ -33688,7 +33724,7 @@ ActiveSyncFolderConn.prototype = {
e.run(aResponse);
}
catch (ex) {
- console.error('Error parsing Sync reponse:', ex, '\n', ex.stack);
+ console.error('Error parsing Sync response:', ex, '\n', ex.stack);
callWhenDone('unknown');
return;
}
@@ -34051,17 +34087,21 @@ ActiveSyncJobDriver.prototype = {
if (--modsToGo === 0)
callWhenDone();
}
+
+ // Filter out any offline headers, since the server naturally can't do
+ // anything for them. If this means we have no headers at all, just bail
+ // out.
+ serverIds = serverIds.filter(function(srvid) { return !!srvid; });
+ if (!serverIds.length) {
+ callWhenDone();
+ return;
+ }
+
folderConn.performMutation(
function withWriter(w) {
for (let i = 0; i < serverIds.length; i++) {
- let srvid = serverIds[i];
- // If the header is somehow an offline header, it will be null and
- // there is nothing we can really do for it.
- if (!srvid)
- continue;
-
w.stag(as.Change)
- .tag(as.ServerId, srvid)
+ .tag(as.ServerId, serverIds[i])
.stag(as.ApplicationData);
if (markRead !== undefined)
@@ -34124,8 +34164,6 @@ ActiveSyncJobDriver.prototype = {
let aggrErr = null, account = this.account,
targetFolderStorage = this.account.getFolderStorageForFolderId(
op.targetFolder);
- const as = $ascp.AirSync.Tags;
- const em = $ascp.Email.Tags;
const mo = $ascp.Move.Tags;
this._partitionAndAccessFoldersSequentially(
@@ -34134,17 +34172,21 @@ ActiveSyncJobDriver.prototype = {
let w = new $wbxml.Writer('1.3', 1, 'UTF-8');
w.stag(mo.MoveItems);
+ // Filter out any offline headers, since the server naturally can't do
+ // anything for them. If this means we have no headers at all, just bail
+ // out.
+ serverIds = serverIds.filter(function(srvid) { return !!srvid; });
+ if (!serverIds.length) {
+ callWhenDone();
+ return;
+ }
+
for (let i = 0; i < serverIds.length; i++) {
- let srvid = serverIds[i];
- // If the header is somehow an offline header, it will be null and
- // there is nothing we can really do for it.
- if (!srvid)
- continue;
w.stag(mo.Move)
- .tag(mo.SrcMsgId, srvid)
- .tag(mo.SrcFldId, storage.folderMeta.serverId)
- .tag(mo.DstFldId, targetFolderStorage.folderMeta.serverId)
- .etag(mo.Move);
+ .tag(mo.SrcMsgId, serverIds[i])
+ .tag(mo.SrcFldId, storage.folderMeta.serverId)
+ .tag(mo.DstFldId, targetFolderStorage.folderMeta.serverId)
+ .etag(mo.Move);
}
w.etag(mo.MoveItems);
@@ -37237,7 +37279,7 @@ MailUniverse.prototype = {
* and transferred across to the non-deferred queue at account-load time.
*/
_deferOp: function(account, op) {
- account.deferredMutations.push(op.longtermId);
+ this._opsByAccount[account.id].deferred.push(op.longtermId);
if (this._deferredOpTimeout !== null)
this._deferredOpTimeout = window.setTimeout(
this._boundQueueDeferredOps, $syncbase.DEFERRED_OP_DELAY_MS);
View
2  apps/gallery/js/gallery.js
@@ -114,6 +114,8 @@ var visibilityMonitor;
// The localized event is the main entry point for the app.
// We don't do anything until we receive it.
window.addEventListener('localized', function showBody() {
+ window.removeEventListener('localized', showBody);
+
// Set the 'lang' and 'dir' attributes to <html> when the page is translated
document.documentElement.lang = navigator.mozL10n.language.code;
document.documentElement.dir = navigator.mozL10n.language.direction;
View
2  apps/gallery/style/gallery.css
@@ -448,7 +448,7 @@ footer {
width: 20%;
height: 100%;
left: 40%;
- background-image: url('images/iconaction_edit_30x30.png');
+ background-image: url('images/iconaction_camera_editphoto_30x30.png');
}
#fullscreen-share-button {
View
BIN  apps/gallery/style/images/iconaction_camera_editphoto_30x30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/gallery/style/images/iconaction_share_30x30.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 apps/settings/index.html
@@ -38,8 +38,11 @@
<link rel="resource" type="application/l10n" href="locales/locales.ini"/>
<script type="application/javascript" src="shared/js/l10n.js"></script>
<script type="application/javascript" src="shared/js/l10n_date.js"></script>
+
+ <!-- shared helper library -->
<script type="application/javascript" defer src="shared/js/mouse_event_shim.js"></script>
<script type="application/javascript" defer src="shared/js/manifest_helper.js"></script>
+ <script type="application/javascript" defer src="shared/js/async_storage.js"></script>
<!-- Specific code -->
<script type="application/javascript" defer src="js/utils.js"></script>
@@ -1244,7 +1247,7 @@ <h1 data-l10n-id="language"> Language </h1>
</ul>
<dl>
- <dt> Sample Format </dt>
+ <dt data-l10n-id="sample-format"> Sample Format </dt>
<dd id="region-date">Friday, September 28 2012</dd>
<dd id="region-time">06:54 PM</dd>
</dl>
View
2  apps/settings/js/apps.js
@@ -229,7 +229,7 @@ var ApplicationsList = {
var item = document.createElement('li');
var content = document.createElement('span');
- content.textContent = _('perm-' + perm);
+ content.textContent = _('perm-' + perm.replace(':', '-'));
var select = document.createElement('select');
select.dataset.perm = perm;
View
69 apps/settings/js/bluetooth.js
@@ -349,11 +349,22 @@ onLocalized(function bluetoothSettings() {
}
);
- getPairedDevice();
+ // get paired device and restore connection
+ // if we have one device connected before.
+ getPairedDevice(restoreConnection);
startDiscovery();
}
- function getPairedDevice() {
+ function restoreConnection() {
+ window.asyncStorage.getItem('device.connected', function(value) {
+ if(!value || !pairList.index[value])
+ return;
+ var device = pairList.index[value][0];
+ setDeviceConnect(device);
+ });
+ }
+
+ function getPairedDevice(callback) {
if (!bluetooth.enabled || !defaultAdapter)
return;
var req = defaultAdapter.getPairedDevices();
@@ -399,6 +410,10 @@ onLocalized(function bluetoothSettings() {
});
gBluetoothInfoBlock.textContent = text;
pairList.show(true);
+ // the callback function now is for restoring the connected device
+ // when the bluetooth is turned on.
+ if (callback)
+ callback();
};
}
@@ -520,9 +535,14 @@ onLocalized(function bluetoothSettings() {
function showDeviceConnected(deviceAddress, connected) {
if (connected) {
connectedAddress = deviceAddress;
+ // record connected device so if Bluetooth is turned off and then on
+ // we can restore the connection
+ window.asyncStorage.setItem('device.connected', connectedAddress);
} else {
- if (connectedAddress === deviceAddress)
+ if (connectedAddress === deviceAddress) {
connectedAddress = null;
+ window.asyncStorage.removeItem('device.connected');
+ }
}
var item = pairList.index[deviceAddress][1];
item.querySelector('small').textContent = (connected) ?
@@ -530,23 +550,36 @@ onLocalized(function bluetoothSettings() {
}
function onRequestPairing(evt, method) {
- var device = {
- address: evt.address,
- name: evt.name || _('unnamed-device'),
- icon: evt.icon || 'bluetooth-default'
+ var showPairView = function bt_showPairView() {
+ var device = {
+ address: evt.address,
+ name: evt.name || _('unnamed-device'),
+ icon: evt.icon || 'bluetooth-default'
+ };
+
+ if (device.address !== pairingAddress) {
+ pairingAddress = device.address;
+ pairingMode = 'passive';
+ }
+ var passkey = evt.passkey || null;
+ var protocol = window.location.protocol;
+ var host = window.location.host;
+ childWindow = window.open(protocol + '//' + host + '/onpair.html',
+ 'pair_screen', 'attention');
+ childWindow.onload = function childWindowLoaded() {
+ childWindow.PairView.init(pairingMode, method, device, passkey);
+ };
};
- if (device.address !== pairingAddress) {
- pairingAddress = device.address;
- pairingMode = 'passive';
- }
- var passkey = evt.passkey || null;
- var protocol = window.location.protocol;
- var host = window.location.host;
- childWindow = window.open(protocol + '//' + host + '/onpair.html',
- 'pair_screen', 'attention');
- childWindow.onload = function childWindowLoaded() {
- childWindow.PairView.init(pairingMode, method, device, passkey);
+ var req = navigator.mozSettings.createLock().get('lockscreen.locked');
+ req.onsuccess = function bt_onGetLocksuccess() {
+ if (!req.result['lockscreen.locked']) {
+ showPairView();
+ }
+ };
+ req.onerror = function bt_onGetLockError() {
+ // fallback to default value 'unlocked'
+ showPairView();
};
}
View
61 apps/settings/js/onpair.js
@@ -39,6 +39,7 @@ var PairView = {
var _ = navigator.mozL10n.get;
this.pairButton.addEventListener('click', this);
this.closeButton.addEventListener('click', this);
+ window.addEventListener('resize', this);
this.nameLabel.textContent = this._device.name;
this.deviceInfo.className = this._device.icon;
@@ -86,37 +87,51 @@ var PairView = {
onLocalized(PairView.show.bind(PairView));
},
+ close: function() {
+ window.opener.gDeviceList.setConfirmation(this._device.address, false);
+ window.close();
+ },
+
handleEvent: function pv_handleEvent(evt) {
var _ = navigator.mozL10n.get;
- if (evt.type !== 'click' || !evt.target)
+ if (!evt.target)
return;
- evt.preventDefault();
- switch (evt.target.id) {
- case 'button-pair':
- this.pairDescription.textContent = _('device-status-waiting');
- this.pairButton.disabled = true;
- this.closeButton.disabled = true;
- switch (this._pairMethod) {
- case 'confirmation':
- window.opener.gDeviceList.
- setConfirmation(this._device.address, true);
- break;
- case 'pincode':
- var value = this.pinInput.value;
- window.opener.gDeviceList.setPinCode(this._device.address, value);
+ switch (evt.type) {
+ case 'click':
+ evt.preventDefault();
+ switch (evt.target.id) {
+ case 'button-pair':
+ this.pairDescription.textContent = _('device-status-waiting');
+ this.pairButton.disabled = true;
+ this.closeButton.disabled = true;
+ switch (this._pairMethod) {
+ case 'confirmation':
+ window.opener.gDeviceList.
+ setConfirmation(this._device.address, true);
+ break;
+ case 'pincode':
+ var value = this.pinInput.value;
+ window.opener.gDeviceList.setPinCode(this._device.address,
+ value);
+ break;
+ case 'passkey':
+ var value = this.passkeyInput.value;
+ window.opener.gDeviceList.setPasskey(this._device.address,
+ value);
+ break;
+ }
+ window.close();
break;
- case 'passkey':
- var value = this.passkeyInput.value;
- window.opener.gDeviceList.setPasskey(this._device.address, value);
+ case 'button-close':
+ this.close();
break;
}
- window.close();
break;
-
- case 'button-close':
- window.opener.gDeviceList.setConfirmation(this._device.address, false);
- window.close();
+ case 'resize':
+ this.close();
+ break;
+ default:
break;
}
}
View
1  apps/settings/locales/settings.en-US.properties
@@ -258,6 +258,7 @@ selectTimezone=Select time zone
languageAndRegion=Language & Region
language=Language
region=Region
+sample-format=Sample Format
# see http://www.cplusplus.com/reference/clibrary/ctime/strftime/
longDateFormat=%A, %B %d, %Y
View
BIN  apps/settings/style/images/wallpaper_edit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/settings/style/images/wallpaper_edit_pressed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 apps/sms/index.html
@@ -13,6 +13,7 @@
<link rel="stylesheet" type="text/css" href="shared/style/confirm.css">
<link rel="stylesheet" type="text/css" href="shared/style_unstable/progress_activity.css">
<link rel="stylesheet" type="text/css" href="shared/style_unstable/lists.css">
+ <link rel="stylesheet" type="text/css" href="/shared/style_unstable/tabs.css">
<!-- App styles -->
<link rel="stylesheet" type="text/css" href="style/root.css">
@@ -23,7 +24,6 @@
<link rel="resource" type="application/l10n" href="locales/locales.ini">
<link rel="resource" type="application/l10n" href="shared/locales/date.ini">
<!-- Shared code -->
- <script type="text/javascript" src="shared/js/settings_listener.js"></script>
<script type="text/javascript" src="shared/js/async_storage.js"></script>
<script type="text/javascript" src="shared/js/l10n.js"></script>
<script type="text/javascript" src="shared/js/l10n_date.js"></script>
@@ -54,7 +54,7 @@
<header class="view-header regular-header">
<menu type="toolbar">
<a href="#new" id="icon-add">
- <span class="icon icon-add"></span>
+ <span class="icon icon-compose"></span>
</a>
<a href="#edit" id="icon-edit-threads">
<span class="icon icon-edit"></span>
View
69 apps/sms/js/sms.js
@@ -85,9 +85,7 @@ var MessageManager = {
var contactButton = document.getElementById('icon-contact');
contactButton.parentNode.appendChild(contactButton);
document.getElementById('messages-container').innerHTML = '';
- messageInput.value = '';
- receiverInput.value = '';
- ThreadUI.sendButton.disabled = true;
+ ThreadUI.cleanFields();
MessageManager.currentNum = null;
threadMessages.classList.add('new');
MessageManager.slide(function() {
@@ -733,9 +731,6 @@ var ThreadUI = {
return this.sendForm = document.getElementById('new-sms-form');
},
- // Does the operator force 7-bit encoding
- is7BitEncoding: false,
-
init: function thui_init() {
this.sendButton.addEventListener('click', this.sendMessage.bind(this));
@@ -775,23 +770,18 @@ var ThreadUI = {
this.editForm.addEventListener('submit', this);
this.telForm.addEventListener('submit', this);
this.sendForm.addEventListener('submit', this);
-
- var self = this;
- SettingsListener.observe('ril.sms.strict7BitEncoding.enabled',
- function onSMSEncodingChange(value) {
- self.is7BitEncoding = !!value;
- });
},
enableSend: function thui_enableSend() {
+ if (this.input.value.length > 0) {
+ this.updateCounter();
+ }
if (window.location.hash == '#new' && this.contactInput.value.length == 0) {
this.sendButton.disabled = true;
- this.updateCounter();
return;
}
this.sendButton.disabled = !(this.input.value.length > 0);
- this.updateCounter();
},
scrollViewToBottom: function thui_scrollViewToBottom(animateFromPos) {
@@ -813,50 +803,22 @@ var ThreadUI = {
}).bind(this), 100);
},
- has7BitOnlyCharacters: function thui_has7BitOnluCharacter(value) {
- for (var i = 0; i < value.length; i++) {
- if (value.charCodeAt(i) >= 128) {
- return false;
- }
- }
-
- return true;
- },
-
updateCounter: function thui_updateCount(evt) {
var value = this.input.value;
-
- // In theory the maximum concatenated number of SMS is 255.
- var kMaxConcatenatedMessages = 255;
- var excessive = false;
-
- // A sms can hold 140 bytes of data or 134 bytes of data depending
- // if it is a single or concatenated sms. To be fun the numbers of
- // sms also depends on the character encoding of the message.
- if (this.is7BitEncoding || this.has7BitOnlyCharacters(value)) {
- var kMaxCharsIfSingle = 160; // (140 * 8) / 7 = 160.
- var kMaxCharsIfMultiple = 153; // ((140 - 6) / 7 ~= 153.
- } else {
- var kMaxCharsIfSingle = 70; // (140 * 8) / 16 = 70.
- var kMaxCharsIfMultiple = 67; // ((140 - 6) / 16 = 67.
- }
-
+ // We set maximum concatenated number of our SMS app to 10 based on:
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=813686#c0
+ var kMaxConcatenatedMessages = 10;
+
+ // Use backend api for precise sms segmetation information.
+ var smsInfo = navigator.mozSms.getSegmentInfoForText(value);
+ var segments = smsInfo.segments;
+ var availableChars = smsInfo.charsAvailableInLastSegment;
var counter = '';
- var length = value.length;
- if ((length / kMaxCharsIfSingle) > 1) {
- var charsLeft = kMaxCharsIfMultiple - (length % kMaxCharsIfMultiple);
- var smsCount = Math.ceil(length / kMaxCharsIfMultiple);
- counter = charsLeft + '/' + smsCount;
-
- // Make sure the current number of sms is not bigger than the maximum
- // theorical number of sms that can be concatenate.
- if (smsCount > kMaxConcatenatedMessages) {
- excessive = true;
- }
+ if (segments > 1) {
+ counter = availableChars + '/' + segments;
}
-
this.sendButton.dataset.counter = counter;
- this.sendButton.disabled = excessive;
+ this.sendButton.disabled = (segments > kMaxConcatenatedMessages);
},
updateInputHeight: function thui_updateInputHeight() {
@@ -1210,6 +1172,7 @@ var ThreadUI = {
cleanFields: function thui_cleanFields() {
this.sendButton.disabled = true;
+ this.sendButton.dataset.counter = '';
this.contactInput.value = '';
this.input.value = '';
this.updateInputHeight();
View
4 apps/system/index.html
@@ -309,9 +309,13 @@
<!-- quick settings -->
<div id="quick-settings">
<a href="#" id="quick-settings-wifi" data-enabled="false"></a>
+ <div class="separator"></div>
<a href="#" id="quick-settings-data" data-enabled="false"></a>
+ <div class="separator"></div>
<a href="#" id="quick-settings-bluetooth" data-enabled="false"></a>
+ <div class="separator"></div>
<a href="#" id="quick-settings-power-save" data-enabled="false"></a>
+ <div class="separator"></div>
<a href="#" id="quick-settings-full-app" data-enabled="false"></a>
</div>
View
3  apps/system/js/activities.js
@@ -71,8 +71,9 @@ var Activities = {
var items = [];
choices.forEach(function(choice, index) {
+ var app = Applications.getByManifestURL(choice.manifest);
items.push({
- label: choice.title,
+ label: new ManifestHelper(app.manifest).name,
icon: choice.icon,
value: index
});
View
2  apps/system/js/battery_manager.js
@@ -232,7 +232,7 @@ var PowerSaveHandler = (function PowerSaveHandler() {
return;
}
- if (battery.level > value && _powerSaveEnabled) {
+ if (value != 0 && battery.level > value && _powerSaveEnabled) {
setMozSettings({'powersave.enabled' : false});
return;
}
View
79 apps/system/js/cost_control.js
@@ -13,65 +13,70 @@
var widgetFrame;
function _ensureWidget() {
+ if (!Applications.ready)
+ return;
- if (Applications.ready) {
+ // Check widget is there
+ widgetFrame = widgetContainer.querySelector('iframe');
+ if (widgetFrame && !widgetFrame.dataset.killed)
+ return;
- // Check widget is there
- widgetFrame = widgetContainer.querySelector('iframe');
- if (widgetFrame && !widgetFrame.dataset.killed)
- return;
-
- // Create the widget
- if (!widgetFrame) {
- widgetFrame = document.createElement('iframe');
- widgetFrame.addEventListener('mozbrowsererror',
- function ccdriver_onError(e) {
- e.target.dataset.killed = true;
- }
- );
- }
+ // Create the widget
+ if (!widgetFrame) {
+ widgetFrame = document.createElement('iframe');
+ widgetFrame.addEventListener('mozbrowsererror',
+ function ccdriver_onError(e) {
+ e.target.dataset.killed = true;
+ }
+ );
+ }
- widgetFrame.dataset.frameType = 'widget';
- widgetFrame.dataset.frameOrigin = origin;
- delete widgetFrame.dataset.killed;
+ widgetFrame.dataset.frameType = 'widget';
+ widgetFrame.dataset.frameOrigin = origin;
+ delete widgetFrame.dataset.killed;
- widgetFrame.setAttribute('mozbrowser', true);
- widgetFrame.setAttribute('remote', 'true');
- widgetFrame.setAttribute('mozapp', origin + '/manifest.webapp');
+ widgetFrame.setAttribute('mozbrowser', true);
+ widgetFrame.setAttribute('remote', 'true');
+ widgetFrame.setAttribute('mozapp', origin + '/manifest.webapp');
- widgetFrame.src = origin + '/widget.html';
- widgetContainer.appendChild(widgetFrame);
+ widgetFrame.src = origin + '/widget.html';
+ widgetContainer.appendChild(widgetFrame);
- // TODO: Remove this when weird bug #809031 (Bugzilla) is solved
- // See cost_control.css as well to remove the last rule
- var offsetY = document.getElementById('notification-bar').clientHeight;
- offsetY +=
- document.getElementById('notifications-container').clientHeight;
- widgetFrame.style.transform = 'translate(0, ' + offsetY + 'px)';
- }
+ // TODO: Remove this when weird bug #809031 (Bugzilla) is solved
+ // See cost_control.css as well to remove the last rule
+ var offsetY = document.getElementById('notification-bar').clientHeight;
+ offsetY +=
+ document.getElementById('notifications-container').clientHeight;
+ widgetFrame.style.transform = 'translate(0, ' + offsetY + 'px)';
}
function _showWidget() {
- if (widgetFrame)
- widgetFrame.setVisible(true);
+ _ensureWidget();
+ widgetFrame.setVisible(true);
}
function _hideWidget() {
- if (widgetFrame)
+ if (widgetFrame) {
widgetFrame.setVisible(false);
+ }
}
// Listen to utilitytray show
- window.addEventListener('utilitytrayshow', _ensureWidget);
window.addEventListener('utilitytrayshow', _showWidget);
window.addEventListener('utilitytrayhide', _hideWidget);
window.addEventListener('applicationready', function _onReady() {
asyncStorage.getItem('ftu.enabled', function _onValue(enabled) {
- if (enabled !== false)
- window.addEventListener('ftudone', _ensureWidget);
- else
+ if (enabled !== false) {
+ window.addEventListener('ftudone', function ftudone(e) {
+ window.removeEventListener('ftudone', ftudone);
+ _ensureWidget();
+ widgetFrame.setVisible(false);
+ });
+ } else {
_ensureWidget();
+ widgetFrame.setVisible(false);
+ }
});
});
}());
View
24 apps/system/js/list_menu.js
@@ -124,12 +124,15 @@ var ListMenu = {
return;
var self = this;
- this.container.addEventListener('transitionend',
- function onTransitionEnd() {
- self.element.classList.remove('visible');
- self.container.removeEventListener('transitionend', onTransitionEnd);
- });
- this.container.classList.add('slidedown');
+ var container = this.container;
+ container.addEventListener('transitionend', function list_hide() {
+ container.removeEventListener('transitionend', list_hide);
+ self.element.classList.remove('visible');
+ });
+
+ setTimeout(function() {
+ container.classList.add('slidedown');
+ });
},
handleEvent: function lm_handleEvent(evt) {
@@ -162,10 +165,11 @@ var ListMenu = {
break;
case 'home':
- if (this.visible) {
- this.hide();
- this.oncancel();
- }
+ if (!this.visible)
+ return;
+
+ this.hide();
+ this.oncancel();
break;
}
}
View
2  apps/system/js/permission_manager.js
@@ -47,7 +47,7 @@ var PermissionManager = (function() {
var str = '';
var _ = navigator.mozL10n.get;
- var permissionName = _('perm-' + detail.permission);
+ var permissionName = _('perm-' + detail.permission.replace(':', '-'));
if (detail.isApp) {
// App
View
23 apps/system/js/quick_settings.js
@@ -9,7 +9,8 @@ var QuickSettings = {
init: function qs_init() {
var settings = window.navigator.mozSettings;
- if (!settings)
+ var conn = window.navigator.mozMobileConnection;
+ if (!settings || !conn)
return;
this.getAllElements();
@@ -29,6 +30,24 @@ var QuickSettings = {
}
});
+ /*
+ * Monitor data network icon
+ */
+ conn.addEventListener('datachange', function qs_onDataChange() {
+ var label = {
+ 'lte': '4G', // 4G LTE
+ 'ehrpd': '4G', // 4G CDMA
+ 'hspa+': 'H+', // 3.5G HSPA+
+ 'hsdpa': 'H', 'hsupa': 'H', 'hspa': 'H', // 3.5G HSDPA
+ 'evdo0': '3G', 'evdoa': '3G', 'evdob': '3G', '1xrtt': '3G', // 3G CDMA
+ 'umts': '3G', // 3G
+ 'edge': 'E', // EDGE
+ 'is95a': '2G', 'is95b': '2G', // 2G CDMA
+ 'gprs': '2G'
+ };
+ self.data.dataset.network = label[conn.data.type];
+ });
+
/* monitor data setting
* TODO prevent quickly tapping on it
*/
@@ -206,7 +225,7 @@ var QuickSettings = {
return str.replace(/\-(.)/g, function replacer(str, p1) {
return p1.toUpperCase();
});
- }
+ };
elements.forEach(function createElementRef(name) {
this[toCamelCase(name)] =
View
BIN  apps/system/resources/sounds/unlock.ogg
Binary file not shown
View
7 apps/system/style/list_menu/list_menu.css
@@ -6,7 +6,8 @@
visibility: visible;
}
-#listmenu menu {
+#listmenu menu,
+#listmenu.visible menu.slidedown {
transition: transform 0.3s ease;
transform: translateY(100%);
}
@@ -15,10 +16,6 @@
transform: translateY(0);
}
-#listmenu menu.slidedown {
- transform: translateY(100%);
-}
-
#listmenu menu button.icon,
#listmenu menu a[role="button"].icon {
background-repeat: no-repeat;
View
2  apps/system/style/notifications/notifications.css
@@ -152,7 +152,7 @@ html, body {
right: 0;
top: 0;
color: #52B6CC;
- margin: 14px 14px 0 0;
+ margin: 12px 15px 0 0;
padding: 0;
display: inline;
line-height: 16px;
View
BIN  apps/system/style/quick_settings/images/bluetooth-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
181 apps/system/style/quick_settings/images/bluetooth-off.svg
@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="100"
- height="100"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.3.1 r9886"
- sodipodi:docname="bluetooth-off.svg">
- <defs
- id="defs4">
- <linearGradient
- id="linearGradient3811">
- <stop
- style="stop-color:#00ff00;stop-opacity:1;"
- offset="0"
- id="stop3813" />
- <stop
- style="stop-color:#00cc00;stop-opacity:1;"
- offset="1"
- id="stop3815" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3811"
- id="linearGradient3873"
- x1="59.788921"
- y1="972.73578"
- x2="59.788921"
- y2="1032.3706"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-114.5513,-1.4142136)" />
- <filter
- id="svg_15_blur"
- x="-50%"
- y="-50%"
- width="200%"
- height="200%">
- <feGaussianBlur
- id="feGaussianBlur3934"
- in="SourceGraphic"
- stdDeviation="3.2" />
- </filter>
- <radialGradient
- xlink:href="#linearGradient3215"
- id="radialGradient2236"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.777169, 0, 0, 0.777169, -135.831, -83.9825)"
- cx="308.52896"
- cy="465.10486"
- fx="308.52896"
- fy="465.10486"
- r="68.158737" />
- <radialGradient
- xlink:href="#linearGradient3234"
- id="radialGradient2234"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.667724, 0, 0, 0.777169, -125.022, -74.9294)"
- cx="310.87253"
- cy="387.57217"
- fx="310.87253"
- fy="387.57217"
- r="68.158737" />
- <linearGradient
- xlink:href="#linearGradient3203"
- id="linearGradient2232"
- x1="-0.105402"
- y1="1.083984"
- x2="0.947215"
- y2="0.263968" />
- <radialGradient
- xlink:href="#linearGradient3234"
- id="radialGradient2230"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.504145, 0.504145, -1.07245, 1.07245, 358.411, -579.127)"
- cx="348.69501"
- cy="505.44727"
- fx="348.69501"
- fy="505.44727"
- r="67.322754" />
- <radialGradient
- xlink:href="#linearGradient3215"
- id="radialGradient2228"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.994321, 0.964613, -1.05606, 1.08859, 96.4865, -737.326)"
- cx="344.65146"
- cy="398.35724"
- fx="344.65146"
- fy="398.35724"
- r="67.322754" />
- <linearGradient
- id="linearGradient3203">
- <stop
- offset="0"
- id="stop3205"
- stop-opacity="0.528302"
- stop-color="#f9f9f9" />
- <stop
- offset="1"
- id="stop3207"
- stop-opacity="0.446541"
- stop-color="#737373" />
- </linearGradient>
- <linearGradient
- id="linearGradient3215">
- <stop
- offset="0"
- id="stop3217"
- stop-opacity="0.685535"
- stop-color="#1a1a1a" />
- <stop
- offset="1"
- id="stop3219"
- stop-opacity="0"
- stop-color="#1a1a1a" />
- </linearGradient>
- <linearGradient
- id="linearGradient3234">
- <stop
- id="stop3236"
- offset="0"
- stop-opacity="0.654088"
- stop-color="#c7c7c7" />
- <stop
- id="stop3238"
- offset="1"
- stop-opacity="0"
- stop-color="#ffffff" />
- </linearGradient>
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="2.8284271"
- inkscape:cx="-39.45598"
- inkscape:cy="8.5149256"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1717"
- inkscape:window-height="996"
- inkscape:window-x="78"
- inkscape:window-y="129"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Ebene 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-952.36218)">
- <path
- style="fill:#a0a0a0;fill-opacity:1;stroke-width:2.66878510000000002;stroke-linejoin:round"
- d="m 49.909033,957.2955 c -1.735858,0 -3.165793,1.42992 -3.165793,3.16573 0,0.11528 0.0244,0.21589 0.03639,0.32755 l 0,35.55146 -16.265626,-16.22925 c -0.04181,-0.0617 -0.09814,-0.12448 -0.145554,-0.18188 l -0.145554,-0.182 c -0.105252,-0.1048 -0.20372,-0.17106 -0.327495,-0.25466 -0.0086,-0.0117 -0.02763,0 -0.03639,0 -0.366112,-0.24023 -0.802996,-0.40034 -1.273595,-0.40034 -1.284937,0 -2.328859,1.04392 -2.328859,2.32886 0,0.48184 0.14941,0.90232 0.400273,1.27365 l -0.03639,0.0361 0.327496,0.32745 c 0.105253,0.10479 0.203721,0.2075 0.327496,0.29111 l 19.249477,19.28592 -18.849204,18.8856 -0.07278,0.036 c -0.79479,0.3695 -1.346372,1.1766 -1.346372,2.1107 0,1.2837 1.045178,2.3288 2.328859,2.3288 0.500194,0 0.967171,-0.1677 1.346372,-0.4366 l 0.109165,0.1094 16.738676,-16.7386 0,35.6243 0.109165,0 c 0.135056,1.6112 1.483153,2.8746 3.129405,2.8746 1.084912,0 2.018749,-0.5467 2.583578,-1.3827 l 0.254719,0.2183 19.686134,-19.7225 0.07278,-0.036 c 0.679981,-0.4594 1.128041,-1.2646 1.128041,-2.147 0,-0.7408 -0.296987,-1.3889 -0.800545,-1.8558 l -19.868077,-19.868 19.540581,-19.57707 c 0.258259,-0.17443 0.475588,-0.40033 0.654992,-0.65499 0.29339,-0.41629 0.473049,-0.90743 0.473049,-1.45554 0,-0.65965 -0.244937,-1.25642 -0.654991,-1.7102 l 0.03645,-0.0361 -0.109107,-0.0734 -20.632233,-20.66862 -0.03639,0.0361 C 51.771319,957.773 50.905136,957.295 49.909152,957.295 z m 1.491926,6.7318 16.847837,16.8479 -16.847837,16.88424 0,-33.73214 z m 0,43.4843 16.847837,16.8113 -16.847837,16.8479 0,-33.6592 z"
- id="svg_9"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
View
BIN  apps/system/style/quick_settings/images/bluetooth-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
182 apps/system/style/quick_settings/images/bluetooth-on.svg
@@ -1,182 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="100"
- height="100"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.3.1 r9886"
- sodipodi:docname="bluetooth-on.svg">
- <defs
- id="defs4">
- <linearGradient
- id="linearGradient4038">
- <stop
- style="stop-color:#555555;stop-opacity:1;"
- offset="0"
- id="stop4040" />
- <stop
- style="stop-color:#555555;stop-opacity:0;"
- offset="1"
- id="stop4042" />
- </linearGradient>
- <linearGradient
- id="linearGradient3811">
- <stop
- style="stop-color:#05bce1;stop-opacity:1;"
- offset="0"
- id="stop3813" />
- <stop
- style="stop-color:#00cc00;stop-opacity:1;"
- offset="1"
- id="stop3815" />
- </linearGradient>
- <filter
- id="svg_15_blur"
- x="-50%"
- y="-50%"
- width="200%"
- height="200%">
- <feGaussianBlur
- id="feGaussianBlur3934"
- in="SourceGraphic"
- stdDeviation="3.2" />
- </filter>
- <radialGradient
- xlink:href="#linearGradient3215"
- id="radialGradient2236"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.777169, 0, 0, 0.777169, -135.831, -83.9825)"
- cx="308.52896"
- cy="465.10486"
- fx="308.52896"
- fy="465.10486"
- r="68.158737" />
- <radialGradient
- xlink:href="#linearGradient3234"
- id="radialGradient2234"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.667724, 0, 0, 0.777169, -125.022, -74.9294)"
- cx="310.87253"
- cy="387.57217"
- fx="310.87253"
- fy="387.57217"
- r="68.158737" />
- <linearGradient
- xlink:href="#linearGradient3203"
- id="linearGradient2232"
- x1="-0.105402"
- y1="1.083984"
- x2="0.947215"
- y2="0.263968" />
- <radialGradient
- xlink:href="#linearGradient3234"
- id="radialGradient2230"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.504145, 0.504145, -1.07245, 1.07245, 358.411, -579.127)"
- cx="348.69501"
- cy="505.44727"
- fx="348.69501"
- fy="505.44727"
- r="67.322754" />
- <radialGradient
- xlink:href="#linearGradient3215"
- id="radialGradient2228"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.994321, 0.964613, -1.05606, 1.08859, 96.4865, -737.326)"
- cx="344.65146"
- cy="398.35724"
- fx="344.65146"
- fy="398.35724"
- r="67.322754" />
- <linearGradient
- id="linearGradient3203">
- <stop
- offset="0"
- id="stop3205"
- stop-opacity="0.528302"
- stop-color="#f9f9f9" />
- <stop
- offset="1"
- id="stop3207"
- stop-opacity="0.446541"
- stop-color="#737373" />
- </linearGradient>
- <linearGradient
- id="linearGradient3215">
- <stop
- offset="0"
- id="stop3217"
- stop-opacity="0.685535"
- stop-color="#1a1a1a" />
- <stop
- offset="1"
- id="stop3219"
- stop-opacity="0"
- stop-color="#1a1a1a" />
- </linearGradient>
- <linearGradient
- id="linearGradient3234">
- <stop
- id="stop3236"
- offset="0"
- stop-opacity="0.654088"
- stop-color="#c7c7c7" />
- <stop
- id="stop3238"
- offset="1"
- stop-opacity="0"
- stop-color="#ffffff" />
- </linearGradient>
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="2.8284271"
- inkscape:cx="-39.45598"
- inkscape:cy="8.5149256"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1717"
- inkscape:window-height="996"
- inkscape:window-x="65"
- inkscape:window-y="24"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Ebene 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-952.36218)">
- <path
- style="fill:#05bce1;fill-opacity:1;stroke-width:2.66878510000000002;stroke-linejoin:round"
- d="m 49.909033,957.2955 c -1.735858,0 -3.165793,1.42992 -3.165793,3.16573 0,0.11528 0.0244,0.21589 0.03639,0.32755 l 0,35.55146 -16.265626,-16.22925 c -0.04181,-0.0617 -0.09814,-0.12448 -0.145554,-0.18188 l -0.145554,-0.182 c -0.105252,-0.1048 -0.20372,-0.17106 -0.327495,-0.25466 -0.0086,-0.0117 -0.02763,0 -0.03639,0 -0.366112,-0.24023 -0.802996,-0.40034 -1.273595,-0.40034 -1.284937,0 -2.328859,1.04392 -2.328859,2.32886 0,0.48184 0.14941,0.90232 0.400273,1.27365 l -0.03639,0.0361 0.327496,0.32745 c 0.105253,0.10479 0.203721,0.2075 0.327496,0.29111 l 19.249477,19.28592 -18.849204,18.8856 -0.07278,0.036 c -0.79479,0.3695 -1.346372,1.1766 -1.346372,2.1107 0,1.2837 1.045178,2.3288 2.328859,2.3288 0.500194,0 0.967171,-0.1677 1.346372,-0.4366 l 0.109165,0.1094 16.738676,-16.7386 0,35.6243 0.109165,0 c 0.135056,1.6112 1.483153,2.8746 3.129405,2.8746 1.084912,0 2.018749,-0.5467 2.583578,-1.3827 l 0.254719,0.2183 19.686134,-19.7225 0.07278,-0.036 c 0.679981,-0.4594 1.128041,-1.2646 1.128041,-2.147 0,-0.7408 -0.296987,-1.3889 -0.800545,-1.8558 l -19.868077,-19.868 19.540581,-19.57707 c 0.258259,-0.17443 0.475588,-0.40033 0.654992,-0.65499 0.29339,-0.41629 0.473049,-0.90743 0.473049,-1.45554 0,-0.65965 -0.244937,-1.25642 -0.654991,-1.7102 l 0.03645,-0.0361 -0.109107,-0.0734 -20.632233,-20.66862 -0.03639,0.0361 C 51.771319,957.773 50.905136,957.295 49.909152,957.295 z m 1.491926,6.7318 16.847837,16.8479 -16.847837,16.88424 0,-33.73214 z m 0,43.4843 16.847837,16.8113 -16.847837,16.8479 0,-33.6592 z"
- id="svg_9"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
View
BIN  apps/system/style/quick_settings/images/data-2g-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-2g-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-3g-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-3g-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-4g-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-4g-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-e-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-e-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-h+-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-h+-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-h-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-h-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-o-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-o-on.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  apps/system/style/quick_settings/images/data-off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
84 apps/system/style/quick_settings/images/data-off.svg
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="100"
- height="100"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.3.1 r9886"
- sodipodi:docname="data-off.svg">
- <defs
- id="defs4">
- <linearGradient
- id="linearGradient3811">
- <stop
- style="stop-color:#00ff00;stop-opacity:1;"
- offset="0"
- id="stop3813" />
- <stop
- style="stop-color:#00cc00;stop-opacity:1;"
- offset="1"
- id="stop3815" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3811"
- id="linearGradient3817"
- x1="49.997475"
- y1="10.098974"
- x2="49.997475"
- y2="89.738869"
- gradientUnits="userSpaceOnUse"
- gradientTransform=