1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

Feature settings. i18n of notification bar.

This commit is contained in:
Kyle Spearrin
2016-12-30 20:55:59 -05:00
parent 77aca102e6
commit 53cd3d7848
11 changed files with 158 additions and 46 deletions

View File

@@ -1,10 +1,15 @@
$(function () {
var content = document.getElementById('content'),
template_add = document.getElementById('template-add'),
template_alert = document.getElementById('template-alert');
closeButton = $('#close-button');
// i18n
$('#logo-link').attr('title', chrome.i18n.getMessage('appName'));
closeButton.attr('title', chrome.i18n.getMessage('close'));
$('#template-add .add-save').text(chrome.i18n.getMessage('notificationAddSave'));
$('#template-add .add-text').text(chrome.i18n.getMessage('notificationAddDesc'));
if (getQueryVariable('add')) {
setContent(template_add);
setContent(document.getElementById('template-add'));
var add = $('#template-add-clone'),
addButton = $('#template-add-clone .add-save');
@@ -17,11 +22,11 @@
});
}
else if (getQueryVariable('info')) {
setContent(template_alert);
setContent(document.getElementById('template-alert'));
$('#template-alert-clone').text(getQueryVariable('info'));
}
$('#close-button').click(function (e) {
closeButton.click(function (e) {
e.preventDefault();
chrome.runtime.sendMessage({
command: 'bgCloseNotificationBar'