Permalink
Browse files

Merge pull request #7306 from gordonbrander/ux-2013-01-04-cherry-picked

Ux 2013 01 04 cherry picked
  • Loading branch information...
2 parents d1f25c7 + 56d5641 commit 66221e02ffcb370373544685b55218ecc506a482 @vingtetun vingtetun committed Jan 7, 2013
Showing with 106 additions and 1,838 deletions.
  1. +4 −0 apps/system/index.html
  2. +21 −2 apps/system/js/quick_settings.js
  3. BIN apps/system/resources/sounds/unlock.ogg
  4. +1 −1 apps/system/style/notifications/notifications.css
  5. BIN apps/system/style/quick_settings/images/bluetooth-off.png
  6. +0 −181 apps/system/style/quick_settings/images/bluetooth-off.svg
  7. BIN apps/system/style/quick_settings/images/bluetooth-on.png
  8. +0 −182 apps/system/style/quick_settings/images/bluetooth-on.svg
  9. BIN apps/system/style/quick_settings/images/data-2g-off.png
  10. BIN apps/system/style/quick_settings/images/data-2g-on.png
  11. BIN apps/system/style/quick_settings/images/data-3g-off.png
  12. BIN apps/system/style/quick_settings/images/data-3g-on.png
  13. BIN apps/system/style/quick_settings/images/data-4g-off.png
  14. BIN apps/system/style/quick_settings/images/data-4g-on.png
  15. BIN apps/system/style/quick_settings/images/data-e-off.png
  16. BIN apps/system/style/quick_settings/images/data-e-on.png
  17. BIN apps/system/style/quick_settings/images/data-h+-off.png
  18. BIN apps/system/style/quick_settings/images/data-h+-on.png
  19. BIN apps/system/style/quick_settings/images/data-h-off.png
  20. BIN apps/system/style/quick_settings/images/data-h-on.png
  21. BIN apps/system/style/quick_settings/images/data-o-off.png
  22. BIN apps/system/style/quick_settings/images/data-o-on.png
  23. BIN apps/system/style/quick_settings/images/data-off.png
  24. +0 −84 apps/system/style/quick_settings/images/data-off.svg
  25. +0 −73 apps/system/style/quick_settings/images/data-on.svg
  26. BIN apps/system/style/quick_settings/images/power-save-off.png
  27. +0 −552 apps/system/style/quick_settings/images/power-save-off.svg
  28. BIN apps/system/style/quick_settings/images/power-save-on.png
  29. +0 −248 apps/system/style/quick_settings/images/power-save-on.svg
  30. BIN apps/system/style/quick_settings/images/settings-off.png
  31. BIN apps/system/style/quick_settings/images/settings-on.png
  32. +0 −351 apps/system/style/quick_settings/images/settings.svg
  33. BIN apps/system/style/quick_settings/images/wifi-off.png
  34. +0 −61 apps/system/style/quick_settings/images/wifi-off.svg
  35. BIN apps/system/style/quick_settings/images/wifi-on.png
  36. +0 −73 apps/system/style/quick_settings/images/wifi-on.svg
  37. +67 −20 apps/system/style/quick_settings/quick_settings.css
  38. BIN apps/system/style/sound_manager/images/speaker_loud_icon.png
  39. BIN apps/system/style/sound_manager/images/speaker_mute_icon.png
  40. BIN apps/system/style/sound_manager/images/speaker_regular_icon.png
  41. BIN apps/system/style/sound_manager/images/vibration_disabled_icon.png
  42. BIN apps/system/style/sound_manager/images/vibration_enabled_icon.png
  43. +13 −10 apps/system/style/update_manager/update_manager.css
@@ -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>
@@ -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)] =
Binary file not shown.
@@ -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;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -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>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit 66221e0

Please sign in to comment.