diff --git a/js/search.js b/js/search.js index 1b0dda3..c83e6ca 100644 --- a/js/search.js +++ b/js/search.js @@ -4,21 +4,20 @@ var passwords_visible = false; function pwitem_update() { $('#error').html(''); - $('#passwordinfo').html('Fetching...'); + $('#passwordinfo').hide(); + $('#info').html('Fetching...'); $.post('getpw.php', { id: $(this).attr('id').replace(/^pw_/, '') }, function(pwxml) { pwinfo = $('result', pwxml); if (pwinfo.length > 0) { - $('#passwordinfo').html( - '' - ); + $('#passwordinfo > ul > li:eq(0) > span').html($('short', pwinfo).text()); + $('#passwordinfo > ul > li:eq(1) > span').html($('long', pwinfo).text()); + $('#passwordinfo > ul > li:eq(2) > span').html($('username', pwinfo).text()); + $('#passwordinfo > ul > li:eq(3) > span').html($('password', pwinfo).text()); + $('#passwordinfo > ul > li:eq(4) > span').html($('additional', pwinfo).text()); + $('#info').html(''); + $('#passwordinfo').show(); } }); }; @@ -78,7 +77,7 @@ $(document).ready(function() { $('#error').html(''); $('#info').html(''); $('#results').html(''); - $('#passwordinfo').html(''); + $('#passwordinfo').hide(); $('#query').val(''); if (groups_visible) { @@ -131,7 +130,7 @@ $(document).ready(function() { $('#showpasswordgroups').click(function(e) { $('#passwordgroups').show(); $('#passwords').hide(); - $('#passwordinfo').html(''); + $('#passwordinfo').hide(); }); }); diff --git a/style/pws.css b/style/pws.css index 5a2ae96..fa3a097 100644 --- a/style/pws.css +++ b/style/pws.css @@ -70,3 +70,7 @@ span.button { display: none; } +#passwordinfo { + display: none; +} + diff --git a/templates/search.tpl b/templates/search.tpl index f2e169c..35f8575 100644 --- a/templates/search.tpl +++ b/templates/search.tpl @@ -73,5 +73,16 @@ Back to password groups -
+
+ +
{include file="foot.tpl"}