Permalink
Browse files

Merge branch 'master' of git://github.com/andreasgal/gaia

  • Loading branch information...
2 parents 5eba103 + 6185893 commit 68884cea979cdea981f7784514e5b4d72bc0ef6b @matthewp committed May 9, 2012
Showing with 133,477 additions and 65,751 deletions.
  1. +5 −20 Makefile
  2. +8 −0 apps/browser/manifest.json
  3. +15 −2 apps/calculator/index.html
  4. +56 −22 apps/calculator/js/calculator.js
  5. +8 −0 apps/calculator/manifest.json
  6. +57 −6 apps/calculator/style/calculator.css
  7. +8 −0 apps/camera/manifest.json
  8. +12 −0 apps/clock/locale/clock.properties
  9. +8 −0 apps/clock/manifest.json
  10. +8 −0 apps/crystalskull/manifest.json
  11. +9 −1 apps/cubevid/manifest.json
  12. +34 −2 apps/dialer/locale/dialer.properties
  13. +10 −2 apps/dialer/manifest.json
  14. +6 −0 apps/gallery/locale/gallery.properties
  15. +10 −2 apps/gallery/manifest.json
  16. +17 −23 apps/gallery/test/GestureDetector_test.js
  17. +1 −1 apps/gallery/test/SyntheticGestures.js
  18. +38 −9 apps/homescreen/js/homescreen.js
  19. +8 −0 apps/homescreen/manifest.json
  20. +8 −0 apps/market/manifest.json
  21. +8 −0 apps/music/manifest.json
  22. +9 −3 apps/settings/index.html
  23. +16 −2 apps/settings/js/wifi.js
  24. +206 −29 apps/settings/locale/settings.properties
  25. +8 −0 apps/settings/manifest.json
  26. +13 −1 apps/sms/locale/sms.properties
  27. +8 −0 apps/sms/manifest.json
  28. +0 −3 apps/system/js/keyboard/imes/jspinyin/COPYING
  29. +30 −0 apps/system/js/keyboard/imes/jspinyin/README
  30. +13 −0 apps/system/js/keyboard/imes/jspinyin/data/Makefile
  31. +35 −0 apps/system/js/keyboard/imes/jspinyin/data/cook.js
  32. +23 −0 apps/system/js/keyboard/imes/jspinyin/data/cook.sh
  33. +65,106 −0 apps/system/js/keyboard/imes/jspinyin/db-tr.json
  34. +65,105 −65,107 apps/system/js/keyboard/imes/jspinyin/db.json
  35. +2,189 −252 apps/system/js/keyboard/imes/jspinyin/jspinyin.js
  36. +7 −0 apps/system/js/keyboard/imes/jspinyin/tests/Makefile
  37. +8 −0 apps/system/js/keyboard/imes/jspinyin/tests/test.sh
  38. +52 −0 apps/system/js/keyboard/imes/jspinyin/tests/testSyllableSplitter.js
  39. +3 −3 apps/system/js/keyboard/keyboard.js
  40. +200 −199 apps/system/js/keyboard/layout.js
  41. +43 −5 apps/system/locale/system.properties
  42. +10 −2 apps/system/manifest.json
  43. +24 −0 apps/tasks/locale/tasks.properties
  44. +8 −0 apps/tasks/manifest.json
  45. +2 −2 apps/test-agent/test/config.json
  46. +0 −35 apps/test-agent/test/device/drive_test.js
  47. +0 −15 apps/test-agent/test/lib_test.js
  48. +7 −1 apps/video/locale/video.properties
  49. +10 −2 apps/video/manifest.json
  50. +8 −0 build/preferences.js
View
@@ -33,26 +33,6 @@ REPORTER=Spec
# #
# 2. offline #
# An Application Cache database containing Gaia apps, so the phone can be #
-###############################################################################
-GAIA_DOMAIN?=gaiamobile.org
-
-ADB?=adb
-
-DEBUG?=0
-
-REPORTER=Spec
-
-
-###############################################################################
-# The above rules generate the profile/ folder and all its content. #
-# The profile folder content depends on different rules: #
-# 1. manifests #
-# A directory structure representing the applications installed using the #
-# Apps API. In Gaia all applications use this method. #
-# See https://developer.mozilla.org/en/Apps/Apps_JavaScript_API #
-# #
-# 2. offline #
-# An Application Cache database containing Gaia apps, so the phone can be #
# used offline and application can be updated easily. For details about it#
# see: https://developer.mozilla.org/en/Using_Application_Cache #
# #
@@ -76,6 +56,7 @@ endif
# what OS are we on?
SYS=$(shell uname -s)
+ARCH=$(shell uname -m)
ifeq ($(SYS),Darwin)
MD5SUM = md5 -r
@@ -170,7 +151,11 @@ else
# Linux only!
# downloads and installs locally xulrunner to run the xpchsell
# script that creates the offline cache
+ifeq ($(ARCH),x86_64)
+XULRUNNER_DOWNLOAD=http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/runtimes/xulrunner-11.0.en-US.linux-x86_64.tar.bz2
+else
XULRUNNER_DOWNLOAD=http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/11.0/runtimes/xulrunner-11.0.en-US.linux-i686.tar.bz2
+endif
XULRUNNER=./xulrunner/run-mozilla.sh
XPCSHELL=./xulrunner/xpcshell
@@ -38,10 +38,18 @@
"name": "Browser",
"description": "Browser Web di Gaia"
},
+ "pt-BR": {
+ "name": "Navegador",
+ "description": "Navegador da Web do Gaia"
+ },
"ru": {
"name": "\u0411\u0440\u0430\u0443\u0437\u0435\u0440",
"description": "\u0412\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440 Gaia"
},
+ "tr": {
+ "name": "Taray\u0131c\u0131",
+ "description": "Gaia Web Taray\u0131c\u0131s\u0131"
+ },
"zh-TW": {
"name": "\u7db2\u8def\u700f\u89bd\u5668",
"description": "Gaia \u7db2\u8def\u700f\u89bd\u5668"
View
@@ -10,7 +10,12 @@
<div id="calc-wrapper">
<div class="row">
- <input id="display" value="" disabled />
+ <div id="display"><b></b>
+ </div>
+ </div>
+
+ <div class="row">
+ <input type="button" value="TIP" id="tip" data-type="command" />
<input type="button" value="C" id="clear" data-type="command" />
</div>
@@ -42,6 +47,14 @@
<input type="button" value="=" data-type="command" />
</div>
</div>
-
+ <div id="tip-window">
+ <table>
+ <tr><th>Rate</th><th>Tip</th><th>Total</th></tr>
+ <tr><th>15%</th><td id="tip-15"></td><td id="total-15"></td></tr>
+ <tr><th>18%</th><td id="tip-18"></td><td id="total-18"></td></tr>
+ <tr><th>20%</th><td id="tip-20"></td><td id="total-20"></td></tr>
+ </table>
+ <input type="button" value="close" data-type="close">
+ </div>
</body>
</html>
@@ -4,7 +4,8 @@ var Calculator = {
BACKSPACE_TIMEOUT: 750,
- display: document.getElementById('display'),
+ display: document.querySelector('#display b'),
+ tip: document.querySelector('#tip-window'),
backSpaceTimeout: null,
errorTimeout: null,
@@ -17,10 +18,38 @@ var Calculator = {
updateDisplay: function calculator_updateDisplay() {
if (this.stack.length === 0) {
- this.display.value = '0';
+ this.display.innerHTML = '0';
return;
}
- this.display.value = this.stack.join('');
+ var outval = this.stack.join('');
+ this.display.innerHTML = outval;
+ var valWidth = this.display.offsetWidth;
+ var screenWidth = this.display.parentNode.offsetWidth;
+ var scaleFactor = Math.min(1, screenWidth / valWidth);
+ this.display.style.MozTransform = 'scale(' + scaleFactor + ')';
+ },
+
+ showTip: function calculator_showTip() {
+ var val = parseFloat(this.stack.join(''), 10);
+ if (!val) return;
+ function r2(n) {
+ var s = (Math.round(n * 100) / 100).toString();
+ if (s.indexOf('.') < 0) {
+ return s + '.00';
+ } else {
+ if (s.indexOf('.') == s.length - 2) {
+ s += '0';
+ }
+ return s;
+ }
+ }
+ document.getElementById('tip-15').innerHTML = r2(0.15 * val);
+ document.getElementById('tip-18').innerHTML = r2(0.18 * val);
+ document.getElementById('tip-20').innerHTML = r2(0.20 * val);
+ document.getElementById('total-15').innerHTML = r2(1.15 * val);
+ document.getElementById('total-18').innerHTML = r2(1.18 * val);
+ document.getElementById('total-20').innerHTML = r2(1.20 * val);
+ this.tip.classList.add('show');
},
isOperator: function calculator_isOperator(val) {
@@ -209,28 +238,33 @@ var Calculator = {
handleEvent: function calculator_handleEvent(evt) {
switch (evt.type) {
- case 'mousedown':
- var value = evt.target.value;
- switch (evt.target.dataset.type) {
- case 'value':
- this.appendValue(value);
- break;
- case 'operator':
- this.appendOperator(value);
- break;
- case 'command':
- if (value === '=') {
- this.calculate();
- } else if (value === 'C') {
- this.backSpace();
+ case 'mousedown':
+ var value = evt.target.value;
+ switch (evt.target.dataset.type) {
+ case 'value':
+ this.appendValue(value);
+ break;
+ case 'operator':
+ this.appendOperator(value);
+ break;
+ case 'command':
+ if (value === '=') {
+ this.calculate();
+ } else if (value === 'C') {
+ this.backSpace();
+ } else if (value === 'TIP') {
+ this.showTip();
+ }
+ break;
+ case 'close':
+ this.tip.classList.remove('show');
+ break;
}
break;
- }
- break;
- case 'mouseup':
- this.clearBackspaceTimeout();
- break;
+ case 'mouseup':
+ this.clearBackspaceTimeout();
+ break;
}
}
};
@@ -35,10 +35,18 @@
"name": "Calcolatrice",
"description": "Calcolatrice"
},
+ "pt-BR": {
+ "name": "Calculadora",
+ "description": "Calculadora"
+ },
"ru": {
"name": "\u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440",
"description": "\u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440"
},
+ "tr": {
+ "name": "Hesap Makinesi",
+ "description": "Hesap Makinesi"
+ },
"zh-TW": {
"name": "\u8a08\u7b97\u6a5f",
"description": "\u8a08\u7b97\u6a5f"
@@ -46,29 +46,80 @@ input {
display: -webkit-box;
-moz-box-flex: 1;
-webkit-box-flex: 1;
+ overflow: hidden;
}
+
input {
+ font-family: monospace;
-moz-box-flex: 1;
-webkit-box-flex: 1;
font-size: 300%;
- display: block;
width: 50px;
+ display: block;
margin: 5px 5px 0 0;
-moz-box-align: stretch;
-webkit-box-align: stretch;
}
#display {
- -moz-box-flex: 20;
- -webkit-box-flex: 20;
+ -moz-box-flex: 1;
+ position: relative;
border-radius: 5px;
padding: 0 9px;
- text-align:right;
- font-size: 600% ;
- background: none repeat scroll 0 0 rgba(0, 0, 0, 0.3);
+ margin: 5px 5px 0 0;
+ height: 150px;
+ background: rgba(0, 0, 0, 0.3);
border: 0;
+ overflow: hidden;
word-spacing:-15px;
}
+#display b {
+ position: absolute;
+ right: 0;
+ font-size: 600%;
+ line-height: 150px;
+ display: block;
+ -moz-transform-origin: right center;
+}
+
+#tip-window {
+ position: absolute;
+ top: -60%;
+ width: 90%;
+ left: 5%;
+ padding: 5%;
+ border-radius: 5%;
+ background: url("images/home-texture.png") #444;
+ border: 3px solid #333;
+ -moz-transition: .5s top;
+ box-shadow: 0 5px 5px rgba(0,0,0,.5);
+}
+#tip-window.show {
+ top: 20%;
+}
+#tip-window table {
+ -moz-box-sizing: border-box;
+ width: 100%;
+ font-size: 120%;
+ text-align: right;
+}
+#tip-window th, #tip-window td {
+ padding: 0 0 20px 0;
+}
+#tip-window th:first-child {
+ text-align: left;
+ font-weight: bold;
+}
+#tip-window td {
+ font-weight: normal;
+}
+#tip-window input {
+ display: block;
+ width: auto;
+ font-size: 150%;
+ padding: 10px;
+ margin: 5% auto 0 auto;
+}
#display.error {
background: none repeat scroll 0 0 rgba(255, 0, 0, 0.3);
@@ -35,10 +35,18 @@
"name": "Camera",
"description": "Camera di Gaia"
},
+ "pt-BR": {
+ "name": "C\u00e2mera",
+ "description": "C\u00e2mera do Gaia"
+ },
"ru": {
"name": "\u041a\u0430\u043c\u0435\u0440\u0430",
"description": "\u041a\u0430\u043c\u0435\u0440\u0430 Gaia"
},
+ "tr": {
+ "name": "Kamera",
+ "description": "Gaia Kamera"
+ },
"zh-TW": {
"name": "\u76f8\u6a5f",
"description": "Gaia \u76f8\u6a5f"
@@ -40,12 +40,24 @@ start=Avvia
stop=Ferma
cancel=Annulla
+[pt-BR]
+reset=Reset
+start=Start
+stop=Stop
+cancel=Cancel
+
[ru]
reset=Сбросить
start=Старт
stop=Стоп
cancel=Отменить
+[tr]
+reset=Sıfırla
+start=Başlat
+stop=Durdur
+cancel=İptal
+
[zh-TW]
reset=歸零
start=開始
View
@@ -35,10 +35,18 @@
"name": "Orologio",
"description": "Orologio di Gaia"
},
+ "pt-BR": {
+ "name": "Rel\u00f3gio",
+ "description": "Rel\u00f3gio do Gaia"
+ },
"ru": {
"name": "\u0427\u0430\u0441\u044b",
"description": "\u0427\u0430\u0441\u044b Gaia"
},
+ "tr": {
+ "name": "Saat",
+ "description": "Gaia Saat"
+ },
"zh-TW": {
"name": "\u6642\u9418",
"description": "Gaia \u6642\u9418"
@@ -35,10 +35,18 @@
"name": "CrystalSkull",
"description": "Demo di WebGL"
},
+ "pt-BR": {
+ "name": "CrystalSkull",
+ "description": "Demonstra\u00e7\u00e3o de WebGL"
+ },
"ru": {
"name": "CrystalSkull",
"description": "\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f WebGL"
},
+ "tr": {
+ "name": "CrystalSkull",
+ "description": "WebGL Tan\u0131t\u0131m\u0131"
+ },
"zh-TW": {
"name": "CrystalSkull",
"description": "WebGL \u793a\u7bc4"
Oops, something went wrong.

0 comments on commit 68884ce

Please sign in to comment.