clear sensitive password inputs in the plugin

This commit is contained in:
Brett Slatkin 2010-12-01 22:36:10 -08:00
parent c323cb2ce5
commit 19ba4a3bdc
1 changed files with 10 additions and 2 deletions

View File

@ -195,6 +195,10 @@
function addCamlistoreServer() {
var camliServerDiv = $('#camliserver-config');
function clearInputs() {
camliServerDiv.find('input').val('');
}
camliServerDiv.dialog({
modal: true,
resizable: false,
@ -204,6 +208,8 @@
'Add': function() {
var urlInput = $('#camliserver-url');
var nameInput = $('#camliserver-name');
var usernameInput = $('#camliserver-username');
var passwordInput = $('#camliserver-password');
if (!BG.ALBUM_CONFIG[BG.CAMLISTORE]) {
BG.ALBUM_CONFIG[BG.CAMLISTORE] = {};
@ -214,16 +220,18 @@
var albumId = urlInput.val();
BG.ALBUM_CONFIG[BG.CAMLISTORE][albumId] = nameInput.val();
BG.ALBUM_OPTIONS[BG.CAMLISTORE][albumId] = {
'username': $('#camliserver-username').val(),
'password': $('#camliserver-password').val()
'username': usernameInput.val(),
'password': passwordInput.val()
};
BG.saveAlbumConfig();
populateAlbumList();
BG.setupMenus();
clearInputs();
$(this).dialog('close');
},
'Cancel': function() {
clearInputs();
$(this).dialog('close');
}
}