Permalink
Browse files

Merge branch 'master' of git://github.com/mozilla-b2g/gaia into lastU…

…pdated
  • Loading branch information...
2 parents 692d765 + 3c4d9e4 commit 59d7365eff13f4735d4eb516f25029b2ef0d84a2 @marshall marshall committed Nov 29, 2012
Showing with 8,732 additions and 164,633 deletions.
  1. +42 −1 Makefile
  2. +4 −1 apps/bluetooth/js/transfer.js
  3. +5 −5 apps/bluetooth/transfer.html
  4. +6 −5 apps/browser/about.html
  5. +7 −4 apps/browser/index.html
  6. +52 −22 apps/browser/js/browser.js
  7. +5 −5 apps/browser/locales/browser.en-US.properties
  8. +8 −6 apps/browser/style/browser.css
  9. BIN apps/browser/style/images/drawer-header-background.png
  10. BIN apps/browser/style/images/progress.gif
  11. BIN apps/browser/style/images/tabs-badge-background.png
  12. +320 −267 apps/calendar/js/overlap.js
  13. +5 −1 apps/calendar/js/views/modify_account.js
  14. +234 −220 apps/calendar/test/unit/overlap_test.js
  15. +2 −2 apps/camera/js/camera.js
  16. +29 −2 apps/clock/js/alarm.js
  17. +10 −1 apps/clock/locales/clock.en-US.properties
  18. +2 −1 apps/communications/contacts/config.json
  19. +20 −23 apps/communications/contacts/fb_import.html
  20. +9 −8 apps/communications/contacts/fb_link.html
  21. +44 −21 apps/communications/contacts/index.html
  22. +20 −8 apps/communications/contacts/js/confirm_dialog.js
  23. +32 −5 apps/communications/contacts/js/contacts.js
  24. +10 −1 apps/communications/contacts/js/contacts_details.js
  25. +1 −3 apps/communications/contacts/js/contacts_form.js
  26. +124 −73 apps/communications/contacts/js/contacts_list.js
  27. +137 −99 apps/communications/contacts/js/contacts_settings.js
  28. +5 −3 apps/communications/contacts/js/fb/fb_contact_utils.js
  29. +239 −128 apps/communications/contacts/js/fb/fb_import.js
  30. +4 −1 apps/communications/contacts/js/fb/fb_import_init.js
  31. +1 −0 apps/communications/contacts/js/fb/fb_init.js
  32. +5 −1 apps/communications/contacts/js/fb/fb_link.js
  33. +20 −1 apps/communications/contacts/js/fb/fb_oauth.js
  34. +33 −21 apps/communications/contacts/js/fb/fb_utils.js
  35. +1 −2 apps/communications/contacts/js/fb/friends_list.js
  36. +22 −9 apps/communications/contacts/js/fb_extensions.js
  37. +2 −2 apps/communications/contacts/js/search.js
  38. +3 −1 apps/communications/contacts/locales/contacts.en-US.properties
  39. +30 −19 apps/communications/contacts/locales/fb/facebook.en-US.properties
  40. +0 −116 apps/communications/contacts/style/app.css
  41. +53 −134 apps/communications/contacts/style/contacts.css
  42. +44 −20 apps/communications/contacts/style/fb/facebook.css
  43. +21 −0 apps/communications/contacts/style/fb_extensions.css
  44. +7 −10 apps/communications/contacts/style/fixed_header.css
  45. BIN apps/communications/contacts/style/images/error_icon.png
  46. BIN ...cations/contacts/style/{shared/widgets/lists/images/icons/check-delete.png → images/fb-check.png}
  47. BIN apps/communications/contacts/style/images/import_SIM.png
  48. BIN apps/communications/contacts/style/images/sync_icon.png
  49. +4 −2 apps/communications/contacts/style/search.css
  50. +1 −1 apps/communications/contacts/test/integration/app.js
  51. +6 −1 apps/communications/contacts/test/integration/launch_test.js
  52. +27 −9 apps/communications/contacts/test/unit/contacts_list_test.js
  53. +24 −23 apps/communications/dialer/index.html
  54. +127 −54 apps/communications/dialer/js/dialer.js
  55. +4 −4 apps/communications/dialer/js/handled_call.js
  56. +15 −5 apps/communications/dialer/js/keypad.js
  57. +83 −42 apps/communications/dialer/js/oncall.js
  58. +0 −32 apps/communications/dialer/js/proximity.js
  59. +27 −11 apps/communications/dialer/js/recents.js
  60. +24 −20 apps/communications/dialer/js/swiper.js
  61. +5 −0 apps/communications/dialer/js/ussd.js
  62. +1 −0 apps/communications/dialer/js/ussd_ui.js
  63. +4 −0 apps/communications/dialer/locales/dialer.en-US.properties
  64. +36 −39 apps/communications/dialer/oncall.html
  65. +0 −1 apps/communications/dialer/style/commslog.css
  66. +2 −5 apps/communications/dialer/style/dialer.css
  67. BIN apps/communications/dialer/style/images/DialerIcon_35x35_calling.png
  68. BIN apps/communications/dialer/style/images/DialerIcon_35x35_calling_out.png
  69. BIN apps/communications/dialer/style/images/DialerIcon_35x35_incoming.png
  70. BIN apps/communications/dialer/style/images/DialerIcon_35x35_outgoing.png
  71. BIN apps/communications/dialer/style/images/incoming_icon.png
  72. BIN apps/communications/dialer/style/images/outgoing_icon.png
  73. +9 −9 apps/communications/dialer/style/keypad.css
  74. +28 −40 apps/communications/dialer/style/oncall.css
  75. +3 −3 apps/communications/dialer/style/swiper.css
  76. +8 −5 apps/communications/dialer/test/unit/handled_call_test.js
  77. +5 −0 apps/communications/dialer/test/unit/mock_call_screen.js
  78. +6 −0 apps/communications/dialer/test/unit/mock_keypad.js
  79. +1 −1 apps/communications/dialer/test/unit/mock_recent.js
  80. +6 −6 apps/communications/dialer/test/unit/recents_db_test.js
  81. +1 −1 apps/communications/facebook/curtain.html
  82. +26 −8 apps/communications/facebook/js/curtain.js
  83. +3 −1 apps/communications/facebook/js/fb_sync.js
  84. +228 −212 apps/communications/ftu/css/style.css
  85. +344 −380 apps/communications/ftu/index.html
  86. +1 −1 apps/communications/ftu/js/app.js
  87. 0 apps/communications/ftu/js/{dataMobile.js → data_mobile.js}
  88. +2 −2 apps/communications/ftu/js/facebook.js
  89. +57 −2 apps/communications/ftu/js/language.js
  90. +5 −4 apps/communications/ftu/js/navigation.js
  91. +1 −1 apps/communications/ftu/js/time.js
  92. +3 −2 apps/communications/ftu/js/tutorial.js
  93. +8 −1 apps/communications/ftu/js/ui.js
  94. +10 −10 apps/communications/ftu/locales/ftu.en-US.properties
  95. +0 −115 apps/communications/ftu/locales/ftu.es.properties
  96. +2 −0 apps/communications/manifest.webapp
  97. +3 −3 apps/costcontrol/index.html
  98. +8 −6 apps/costcontrol/js/app.js
  99. +73 −67 apps/costcontrol/js/service/cost_control_service.js
  100. +18 −15 apps/costcontrol/js/widget.js
  101. +5 −5 apps/costcontrol/locales/costcontrol.en-US.properties
  102. +66 −0 apps/email/README.md
  103. +26 −0 apps/email/autoconfig/hotmail.co.jp
  104. +26 −0 apps/email/autoconfig/hotmail.co.uk
  105. +26 −0 apps/email/autoconfig/hotmail.com
  106. +26 −0 apps/email/autoconfig/hotmail.com.br
  107. +26 −0 apps/email/autoconfig/hotmail.de
  108. +26 −0 apps/email/autoconfig/hotmail.es
  109. +26 −0 apps/email/autoconfig/hotmail.fr
  110. +26 −0 apps/email/autoconfig/hotmail.it
  111. +26 −0 apps/email/autoconfig/live.co.jp
  112. +26 −0 apps/email/autoconfig/live.co.uk
  113. +26 −0 apps/email/autoconfig/live.com
  114. +26 −0 apps/email/autoconfig/live.de
  115. +26 −0 apps/email/autoconfig/live.fr
  116. +26 −0 apps/email/autoconfig/live.it
  117. +26 −0 apps/email/autoconfig/live.jp
  118. +26 −0 apps/email/autoconfig/msn.com
  119. +20 −6 apps/email/index.html
  120. +1,232 −607 apps/email/js/ext/gaia-email-opt.js
  121. +66 −3 apps/email/js/folder-cards.js
  122. +145 −62 apps/email/js/iframe-shims.js
  123. +254 −140 apps/email/js/mail-common.js
  124. +106 −41 apps/email/js/message-cards.js
  125. +7 −1 apps/email/js/setup-cards.js
  126. +29 −2 apps/email/locales/email.en-US.properties
  127. +21 −0 apps/email/style/folder-cards.css
  128. +63 −27 apps/email/style/mail.css
  129. +1 −0 apps/email/style/message-cards.css
  130. +2 −0 apps/gallery/index.html
  131. +214 −40 apps/gallery/js/Frame.js
  132. +298 −0 apps/gallery/js/JPEGMetadataParser.js
  133. +81 −373 apps/gallery/js/MetadataParser.js
  134. +100 −173 apps/gallery/js/gallery.js
  135. +13 −0 apps/gallery/style/gallery.css
  136. BIN apps/homescreen/everything.me/images/shared/close.png
  137. +166 −154 apps/homescreen/everything.me/js/Brain.js
  138. +1 −0 apps/homescreen/everything.me/js/Core.js
  139. +11 −4 apps/homescreen/everything.me/js/etmmanager.js
  140. +35 −22 apps/homescreen/everything.me/js/everything.me.js
  141. +36 −36 apps/homescreen/everything.me/js/external/iscroll.js
  142. +1 −1 apps/homescreen/everything.me/js/helpers/Storage.js
  143. +53 −49 apps/homescreen/everything.me/js/helpers/Utils.js
  144. +3 −2 apps/homescreen/everything.me/modules/Location/Location.js
  145. +8 −8 apps/homescreen/everything.me/modules/Shortcuts/Shortcuts.css
  146. +1 −1 apps/homescreen/everything.me/modules/Shortcuts/Shortcuts.js
  147. +4 −1 apps/homescreen/index.html
  148. +1 −1 apps/homescreen/js/dock.js
  149. +20 −4 apps/homescreen/js/dragdrop.js
  150. +22 −8 apps/homescreen/js/grid.js
  151. +8 −6 apps/homescreen/js/landing.js
  152. +12 −7 apps/homescreen/js/page.js
  153. +1 −3 apps/homescreen/js/wallpaper.js
  154. +3 −0 apps/homescreen/locales/homescreen.en-US.properties
  155. BIN apps/homescreen/resources/images/delete.png
  156. +3 −3 apps/homescreen/style/dock.css
  157. +5 −3 apps/homescreen/style/dragdrop.css
  158. +4 −8 apps/homescreen/style/grid.css
  159. +12 −6 apps/homescreen/style/landing.css
  160. +4 −4 apps/keyboard/index.html
  161. +0 −159,529 apps/keyboard/js/imes/jskanji/dict.json
  162. +3 −2 apps/keyboard/js/imes/latin/dictionaries/Makefile
  163. BIN apps/keyboard/js/imes/latin/dictionaries/es.dict
  164. +2 −1 apps/keyboard/js/imes/latin/latin.js
  165. +21 −10 apps/keyboard/style/keyboard.css
  166. +1 −1 apps/music/index.html
  167. +79 −64 apps/settings/index.html
  168. +1 −0 apps/settings/js/bluetooth.js
  169. +2 −37 apps/settings/js/carrier.js
  170. +39 −56 apps/settings/js/icc.js
  171. +27 −0 apps/settings/js/icc_menu.js
  172. +5 −1 apps/settings/js/phone_lock.js
  173. +163 −54 apps/settings/js/settings.js
  174. +1 −9 apps/settings/js/simcard_dialog.js
  175. +18 −0 apps/settings/js/utils.js
  176. +38 −17 apps/settings/locales/settings.en-US.properties
  177. +1 −2 apps/settings/manifest.webapp
  178. +6 −2 apps/settings/style/icons.css
  179. +5 −1 apps/settings/style/onpair.css
  180. +15 −2 apps/settings/style/settings.css
  181. +16 −0 apps/settings/style/updates.css
  182. +13 −0 apps/settings/test/unit/mock_l10n.js
  183. +64 −0 apps/settings/test/unit/mock_navigator_settings.js
  184. +214 −0 apps/settings/test/unit/settings_test.js
  185. +0 −15 apps/sms/background.html
  186. +10 −5 apps/sms/index.html
  187. +0 −80 apps/sms/js/background.js
  188. +1 −0 apps/sms/js/contacts.js
  189. +7 −1 apps/sms/js/phoneNumberUtils.js
  190. +85 −17 apps/sms/js/sms.js
  191. +1 −1 apps/sms/locales/sms.en-US.properties
  192. +5 −2 apps/sms/manifest.webapp
  193. +0 −20 apps/sms/style/ringtones/README
  194. BIN apps/sms/style/ringtones/classic.ogg
  195. BIN apps/sms/style/ringtones/low_bit.ogg
  196. BIN apps/sms/style/ringtones/old_school.ogg
  197. +36 −0 apps/system/error.html
  198. +12 −23 apps/system/index.html
  199. +24 −10 apps/system/js/activities.js
  200. +16 −2 apps/system/js/app_install_manager.js
  201. +0 −10 apps/system/js/background_service.js
  202. +54 −96 apps/system/js/bluetooth.js
  203. +17 −9 apps/system/js/bluetooth_transfer.js
  204. +0 −9 apps/system/js/cards_view.js
  205. +2 −2 apps/system/js/crash_reporter.js
  206. +52 −0 apps/system/js/error.js
  207. +46 −0 apps/system/js/icc_cache.js
  208. +9 −29 apps/system/js/keyboard_manager.js
  209. +31 −28 apps/system/js/lockscreen.js
  210. +31 −29 apps/system/js/modal_dialog.js
  211. +32 −0 apps/system/js/notifications.js
  212. +51 −2 apps/system/js/screen_manager.js
  213. +41 −8 apps/system/js/sim_lock.js
  214. +33 −32 apps/system/js/simcard_dialog.js
  215. +44 −17 apps/system/js/system_dialog.js
  216. +10 −0 apps/system/js/trusted_ui.js
  217. +2 −0 apps/system/js/updatable.js
  218. +64 −7 apps/system/js/update_manager.js
  219. +38 −29 apps/system/js/value_selector/value_selector.js
  220. +53 −23 apps/system/js/window_manager.js
  221. +1 −1 apps/system/js/wrapper.js
  222. +20 −9 apps/system/locales/system.en-US.properties
  223. +3 −1 apps/system/manifest.webapp
  224. +29 −20 apps/system/style/lockscreen/lockscreen.css
  225. BIN apps/{sms/style/ringtones/sms.wav → system/style/notifications/ringtones/notification.wav}
  226. +1 −1 apps/system/style/popup_manager/popup_manager.css
  227. +3 −13 apps/system/style/system/keyboard.css
  228. +2 −9 apps/system/style/system/system.css
  229. +1 −1 apps/system/style/trusted_ui/trusted_ui.css
  230. +46 −6 apps/system/style/update_manager/update_manager.css
  231. +5 −0 apps/system/style/value_selector/value_selector.css
  232. BIN apps/system/style/wrapper/images/progress.gif
  233. +2 −2 apps/system/style/wrapper/wrapper.css
  234. +21 −20 apps/system/style/zindex.css
  235. +19 −3 apps/system/test/unit/app_install_manager_test.js
  236. +7 −1 apps/system/test/unit/mock_app.js
  237. +34 −0 apps/system/test/unit/mock_modal_dialog.js
  238. +7 −0 apps/system/test/unit/updatable_test.js
  239. +134 −19 apps/system/test/unit/update_manager_test.js
  240. +247 −0 build/multilocale.py
  241. +3 −2 build/settings.py
  242. +1 −0 build/ua-override-prefs.js
  243. +6 −0 build/webapp-zip.js
  244. 0 {apps/music → shared}/js/blobview.js
  245. +1 −1 shared/js/l10n.js
  246. +3 −0 shared/js/l10n_date.js
  247. +6 −1 shared/js/notification_helper.js
  248. +8 −0 shared/locales/branding.ini
  249. +4 −0 shared/locales/branding/official/branding.en-US.properties
  250. +4 −0 shared/locales/branding/unofficial/branding.en-US.properties
  251. +18 −0 shared/locales/date/date.en-US.properties
  252. +14 −0 shared/resources/apn/apns_conf.xml
  253. +46 −0 shared/resources/languages-all.json
  254. +8 −0 shared/resources/languages-dev.json
  255. +2 −2 shared/style/edit_mode/index.html
  256. +10 −4 shared/style/headers.css
  257. +10 −8 shared/style/input_areas.css
  258. +1 −0 shared/style/switches.css
  259. +5 −4 shared/style_unstable/lists.css
  260. +33 −2 test_apps/uitest/tests/select.html
  261. +4 −0 tools/extensions/httpd/content/httpd.js
  262. +2 −2 tools/extensions/httpd/install.rdf
View
@@ -52,6 +52,7 @@ ADB_REMOUNT?=0
GAIA_ALL_APP_SRCDIRS=$(GAIA_APP_SRCDIRS)
GAIA_LOCALES_PATH?=locales
+LOCALES_FILE?=shared/resources/languages.json
ifeq ($(MAKECMDGOALS), demo)
GAIA_DOMAIN=thisdomaindoesnotexist.org
@@ -160,11 +161,47 @@ TEST_DIRS ?= $(CURDIR)/tests
# Generate profile/
-profile: applications-data preferences app-makefiles test-agent-config offline extensions install-xulrunner-sdk profile/settings.json
+profile: multilocale applications-data preferences app-makefiles test-agent-config offline extensions install-xulrunner-sdk profile/settings.json
@echo "Profile Ready: please run [b2g|firefox] -profile $(CURDIR)$(SEP)profile"
LANG=POSIX # Avoiding sort order differences between OSes
+.PHONY: multilocale
+multilocale:
+ifneq ($(LOCALE_BASEDIR),)
+ @echo "Enable locales specified in $(LOCALES_FILE)..."
+ @targets=""; \
+ for appdir in $(GAIA_APP_SRCDIRS); do \
+ targets="$$targets --target $$appdir"; \
+ done; \
+ python $(CURDIR)/build/multilocale.py \
+ --config $(CURDIR)/$(LOCALES_FILE) \
+ --source $(LOCALE_BASEDIR) \
+ $$targets;
+ @echo "Done"
+ifneq ($(LOCALES_FILE),shared/resources/languages.json)
+ cp $(LOCALES_FILE) shared/resources/languages.json
+endif
+endif
+
+.PHONY: multilocale-clean
+multilocale-clean:
+ @echo "Cleaning l10n bits..."
+ifeq ($(wildcard .hg),.hg)
+ @hg update --clean
+ @hg status -n | xargs rm -rf
+else
+ @git ls-files --other --exclude-standard $(GAIA_APP_SRCDIRS) | grep '\.properties' | xargs rm -f
+ @git ls-files --modified $(GAIA_APP_SRCDIRS) | grep '\.properties' | xargs git checkout --
+ifneq ($(DEBUG),1)
+ @# Leave these files modified in DEBUG profiles
+ @git ls-files --modified $(GAIA_APP_SRCDIRS) | grep 'manifest.webapp' | xargs git checkout --
+ @git ls-files --modified $(GAIA_APP_SRCDIRS) | grep '\.ini' | xargs git checkout --
+ @git checkout -- shared/resources/languages.json
+ @echo "Done"
+endif
+endif
+
app-makefiles:
for d in ${GAIA_APP_SRCDIRS}; \
do \
@@ -204,6 +241,9 @@ offline-cache: webapp-manifests install-xulrunner-sdk
# Create webapps
offline: webapp-manifests webapp-zip
+ifneq ($(LOCALE_BASEDIR),)
+ $(MAKE) multilocale-clean
+endif
# The install-xulrunner target arranges to get xulrunner downloaded and sets up
@@ -269,6 +309,7 @@ define run-js-command
const GAIA_APP_SRCDIRS = "$(GAIA_APP_SRCDIRS)"; \
const GAIA_LOCALES_PATH = "$(GAIA_LOCALES_PATH)"; \
const BUILD_APP_NAME = "$(BUILD_APP_NAME)"; \
+ const PRODUCTION = "$(PRODUCTION)"; \
const GAIA_ENGINE = "xpcshell"; \
'; \
$(XULRUNNERSDK) $(XPCSHELLSDK) -e "$$JS_CONSTS" -f build/utils.js "build/$(strip $1).js"
@@ -72,7 +72,10 @@ window.addEventListener('localized', function showPanel() {
bluetoothTurnOnButton.addEventListener('click', turnOnBluetooth);
}
- function turnOnBluetooth() {
+ function turnOnBluetooth(evt) {
+ if (evt)
+ evt.preventDefault();
+
dialogConfirmBluetooth.hidden = true;
bluetooth.onadapteradded = function bt_adapterAdded() {
initialDefaultAdapter(getPairedDevice);
@@ -33,8 +33,8 @@ <h3 data-l10n-id="confirmation">Confirmation</h3>
<p data-l10n-id="turn-bluetooth-on">Do you want to turn Bluetooth on?</p>
</div>
<menu data-items="2">
- <button type="reset" id="enable-bluetooth-button-cancel" data-l10n-id="cancel" onsubmit="return false;">Cancel</button>
- <button class="affirmative" type="submit" id="enable-bluetooth-button-turn-on" data-l10n-id="turn-on" onsubmit="return false;">Turn On</button>
+ <button type="reset" id="enable-bluetooth-button-cancel" data-l10n-id="cancel">Cancel</button>
+ <button class="affirmative" type="submit" id="enable-bluetooth-button-turn-on" data-l10n-id="turn-on">Turn On</button>
</menu>
</section>
<section role="dialog" id="alert-view" hidden>
@@ -50,16 +50,16 @@ <h3 data-l10n-id="error-transfer-title">Bluetooth file transfer failed</h3>
</section>
<!-- Overwrite Value Selector -->
<div id="value-selector" hidden>
- <form id="select-option-popup" role="dialog" onsubmit="return false;">
+ <form id="select-option-popup" role="dialog">
<section id="value-selector-container">
<h1 data-l10n-id="choose-option">Choose your option</h1>
<ol role="listbox">
<!-- Create Paired Devices Dyanmically -->
</ol>
</section>
<menu id="select-options-buttons">
- <button id="device-select-button-cancel" class="value-selector-cancel" data-type="cancel" data-l10n-id="cancel" onsubmit="return false;">Cancel</button>
- <button id="device-select-button-ok" class="value-option-confirm affirmative" data-type="ok" data-l10n-id="ok" onsubmit="return false;">Ok</button>
+ <button id="device-select-button-cancel" class="value-selector-cancel" data-type="cancel" data-l10n-id="cancel">Cancel</button>
+ <button id="device-select-button-ok" class="value-option-confirm affirmative" data-type="ok" data-l10n-id="ok">Ok</button>
</menu>
</form>
</div>
@@ -4,21 +4,22 @@
<meta charset="utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta name="viewport" content="width=device-width, user-scalable=no">
- <title data-l10n-id="about-firefox">About Firefox</title>
+ <title data-l10n-id="about-browser">About Browser</title>
<link rel="stylesheet" href="style/about.css" type="text/css">
<!-- Localization -->
+ <link rel="resource" type="application/l10n" href="shared/locales/branding.ini">
<link rel="resource" type="application/l10n" href="locales/locales.ini">
<!-- Shared code -->
<script type="application/javascript" src="shared/js/l10n.js"></script>
</head>
<body>
- <h1 data-l10n-id="firefox">Firefox</h1>
+ <h1 data-l10n-id="browser">Browser</h1>
<ul>
- <li><a data-l10n-id="support-about" href="http://support.mozilla.org/1/firefox-os/1.0/firefox-os/en-US">Support</a></li>
- <li><a data-l10n-id="faq-about" href="https://www.mozilla.org/en-US/firefox/mobile/faq/?os=firefox-os">FAQ</a></li>
+ <li><a data-l10n-id="support-about" href="">Support</a></li>
+ <li><a data-l10n-id="faq-about" href="">FAQ</a></li>
<li><a data-l10n-id="credits-about" href="http://www.mozilla.org/credits/">Credits</a></li>
</ul>
- <p data-l10n-id="trademark-about">Firefox and the Firefox logos are trademarks of the Mozilla Foundation</p>
+ <p data-l10n-id="trademark-about2">Browser and the Browser logos are trademarks of the Mozilla Foundation</p>
</body>
</html>
@@ -10,6 +10,7 @@
<link rel="stylesheet" href="shared/style/headers.css">
<link rel="stylesheet" href="style/authentication_dialog.css" type="text/css">
<!-- Localization -->
+ <link rel="resource" type="application/l10n" href="shared/locales/branding.ini">
<link rel="resource" type="application/l10n" href="locales/locales.ini">
<!-- Shared code -->
<link rel="stylesheet" type="text/css" href="shared/style/buttons.css">
@@ -36,7 +37,7 @@
<div id="frames">
<div id="startscreen" class="hidden">
- <h1 data-l10n-id="firefox">Firefox</h1>
+ <h1 data-l10n-id="browser">Browser</h1>
<h2 data-l10n-id="top-sites">Top Sites</h2>
<div id="start-screen-top-sites">
<ul id="top-site-thumbnails">
@@ -70,6 +71,8 @@ <h2 data-l10n-id="top-sites">Top Sites</h2>
</section>
<section id="history" role="tabpanel">
</section>
+ <section id="results">
+ </section>
</div>
<div id="crashscreen">
@@ -205,12 +208,12 @@ <h1 l10n-id="login-to-a-website">Login to a website</h1>
<section role="region" id="settings" class="skin-organic">
<header id="settings-header">
<button id="settings-done-button"><span class="icon icon-back"></span></button>
- <h1 data-l10n-id="firefox-settings">Firefox Settings</h1>
+ <h1 data-l10n-id="browser-settings">Browser Settings</h1>
</header>
<ul>
<li>
- <button id="about-firefox-button"
- data-l10n-id="about-firefox" class="icon icon-view">About Firefox</button>
+ <button id="about-browser-button"
+ data-l10n-id="about-browser" class="icon icon-view">About Browser</button>
</li>
</ul>
<header>
@@ -80,7 +80,7 @@ var Browser = {
this.newTabButton.addEventListener('click', this.handleNewTab.bind(this));
this.settingsDoneButton.addEventListener('click',
this.showPageScreen.bind(this));
- this.aboutFirefoxButton.addEventListener('click',
+ this.aboutBrowserButton.addEventListener('click',
this.showAboutPage.bind(this));
this.clearHistoryButton.addEventListener('click',
this.handleClearHistory.bind(this));
@@ -162,14 +162,14 @@ var Browser = {
'bookmarks-tab', 'history-tab', 'back-button', 'forward-button',
'bookmark-button', 'ssl-indicator', 'tabs-badge', 'throbber', 'frames',
'tabs-list', 'main-screen', 'settings-button', 'settings-done-button',
- 'about-firefox-button', 'clear-history-button', 'crashscreen',
+ 'about-browser-button', 'clear-history-button', 'crashscreen',
'close-tab', 'try-reloading', 'bookmark-menu', 'bookmark-menu-add',
'bookmark-menu-remove', 'bookmark-menu-cancel', 'bookmark-menu-edit',
'bookmark-entry-sheet', 'bookmark-entry-sheet-cancel',
'bookmark-entry-sheet-done', 'bookmark-title', 'bookmark-url',
'bookmark-previous-url', 'bookmark-menu-add-home', 'new-tab-button',
'awesomescreen-cancel-button', 'startscreen', 'top-site-thumbnails',
- 'no-top-sites', 'clear-private-data-button'];
+ 'no-top-sites', 'clear-private-data-button', 'results'];
// Loop and add element with camel style name to Modal Dialog attribute.
elementIDs.forEach(function createElementRef(name) {
@@ -254,6 +254,7 @@ var Browser = {
this.deleteTab(this.currentTab.id);
this.showTabScreen();
}
+ this.updateSecurityIcon();
},
handleNewTab: function browserHandleNewTab(e) {
@@ -568,7 +569,7 @@ var Browser = {
url = url.trim();
// If the address entered starts with a quote then search, if it
// contains a . or : then treat as a url, else search
- return /^"|\'/.test(url) || !(/\.|\:/.test(url));
+ return /^"|\'/.test(url) || !(/\.|\:/.test(url)); //"
},
getUrlFromInput: function browser_getUrlFromInput(url) {
@@ -766,8 +767,8 @@ var Browser = {
// Hide modal dialog
ModalDialog.hide();
AuthenticationDialog.hide();
-
this.urlInput.value = this.currentTab.url;
+ this.sslIndicator.value = '';
this.setUrlBar(this.currentTab.url);
this.showAwesomeScreen();
this.shouldFocus = true;
@@ -809,23 +810,60 @@ var Browser = {
this.bookmarksTab.classList.remove('selected');
this.history.classList.remove('selected');
this.historyTab.classList.remove('selected');
+ this.results.classList.remove('selected');
+ },
+
+ showAwesomescreenTabs: function browser_showAwesomescreenTabs() {
+ this.topSites.style.display = '';
+ this.bookmarks.style.display = '';
+ this.history.style.display = '';
+ this.tabHeaders.style.display = '';
+ },
+
+ hideAwesomescreenTabs: function browser_hideAwesomescreenTabs() {
+ this.topSites.style.display = 'none';
+ this.bookmarks.style.display = 'none';
+ this.history.style.display = 'none';
+ this.tabHeaders.style.display = 'none';
},
updateAwesomeScreen: function browser_updateAwesomeScreen(filter) {
if (!filter) {
- this.tabHeaders.style.display = 'block';
+ this.showAwesomescreenTabs();
+ this.results.classList.remove('selected');
filter = false;
} else {
- this.tabHeaders.style.display = 'none';
+ this.hideAwesomescreenTabs();
+ this.results.classList.add('selected');
+ }
+ Places.getTopSites(20, filter, this.showResults.bind(this));
+ },
+
+ showResults: function browser_showResults(visited, filter) {
+ this.results.innerHTML = '';
+ var list = document.createElement('ul');
+ list.setAttribute('role', 'listbox');
+ this.results.appendChild(list);
+ visited.forEach(function browser_processResult(data) {
+ this.drawAwesomescreenListItem(list, data, filter);
+ }, this);
+ if (visited.length < 2 && filter) {
+ var data = {
+ title: this.DEFAULT_SEARCH_PROVIDER_TITLE,
+ uri: 'http://' + this.DEFAULT_SEARCH_PROVIDER_URL +
+ '/search?q=' + filter,
+ iconUri: this.DEFAULT_SEARCH_PROVIDER_ICON,
+ description: _('search-for') + ' "' + filter + '"'
+ };
+ this.drawAwesomescreenListItem(list, data);
}
- Places.getTopSites(20, filter, this.showTopSites.bind(this));
},
showTopSitesTab: function browser_showTopSitesTab(filter) {
this.deselectAwesomescreenTabs();
this.topSitesTab.classList.add('selected');
this.topSites.classList.add('selected');
- this.updateAwesomeScreen();
+ Places.getTopSites(20, filter, this.showTopSites.bind(this));
},
showTopSites: function browser_showTopSites(topSites, filter) {
@@ -836,16 +874,6 @@ var Browser = {
topSites.forEach(function browser_processTopSite(data) {
this.drawAwesomescreenListItem(list, data, filter);
}, this);
- if (topSites.length < 2 && filter) {
- var data = {
- title: this.DEFAULT_SEARCH_PROVIDER_TITLE,
- uri: 'http://' + this.DEFAULT_SEARCH_PROVIDER_URL +
- '/search?q=' + filter,
- iconUri: this.DEFAULT_SEARCH_PROVIDER_ICON,
- description: _('search-for') + ' "' + filter + '"'
- };
- this.drawAwesomescreenListItem(list, data);
- }
},
showHistoryTab: function browser_showHistoryTab() {
@@ -1131,8 +1159,8 @@ var Browser = {
tab.dom.style.top = '-999px';
return;
}
- if (tab.dom.setActive) {
- tab.dom.setActive(visible);
+ if (tab.dom.setVisible) {
+ tab.dom.setVisible(visible);
}
if (tab.crashed) {
this.showCrashScreen();
@@ -1167,6 +1195,7 @@ var Browser = {
iframe.style.top = '-999px';
+ iframe.setAttribute('mozasyncpanzoom', 'true');
// FIXME: content shouldn't control this directly
iframe.setAttribute('remote', 'true');
@@ -1332,6 +1361,7 @@ var Browser = {
this.mainScreen.addEventListener('transitionend', pageShown, true);
this.switchScreen(this.AWESOME_SCREEN);
this.setUrlButtonMode(this.GO);
+ this.showAwesomescreenTabs();
this.showTopSitesTab();
},
@@ -1706,7 +1736,7 @@ var Utils = {
span.innerHTML = span.innerHTML.replace(/\s/g, '&nbsp;');
if (escapeQuotes)
- return span.innerHTML.replace(/"/g, '&quot;').replace(/'/g, '&#x27;');
+ return span.innerHTML.replace(/"/g, '&quot;').replace(/'/g, '&#x27;'); //"
return span.innerHTML;
}
};
@@ -36,14 +36,14 @@ month-10=November
month-11=December
# Start Page
-firefox=Firefox
-firefox-start=Firefox start
+browser={{browserBrandShortName}}
+browser-start={{browserBrandShortName}} start
top-sites=Top sites
start-browsing=Enter a search term or Web address to start browsing.
# Settings
-firefox-settings=Settings
-about-firefox=About Firefox
+browser-settings=Settings
+about-browser=About {{browserBrandShortName}}
privacy-and-security=Privacy & Security
clear-browsing-history=Clear browsing history
confirm-clear-browsing-history=Clear browsing history?
@@ -57,7 +57,7 @@ faq-about=FAQ
faq-about.href=https://www.mozilla.org/en-US/firefox/mobile/faq/?os=firefox-os
credits-about=Credits
credits-about.href=http://mozilla.org/credits/
-trademark-about=Firefox and the Firefox logos are trademarks of the Mozilla Foundation.
+trademark-about2={{browserBrandShortName}} and the {{browserBrandShortName}} logos are trademarks of the Mozilla Foundation.
# Bookmarks
bookmarks=Bookmarks
Oops, something went wrong.

0 comments on commit 59d7365

Please sign in to comment.