The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
Browse Source

Removed some unnecessary HTML code

Displaying it with JavaScript instead
master
Gergely Polonkai (W00d5t0ck) 9 years ago
parent
commit
4bb7dfadbc
  1. 23
      js/search.js
  2. 4
      style/pws.css
  3. 13
      templates/search.tpl

23
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(
'<ul>' +
'<li>Short description: ' + $('short', pwinfo).text() + '</li>' +
'<li>Long description: ' + $('long', pwinfo).text() + '</li>' +
'<li>Username: ' + $('username', pwinfo).text() + '</li>' +
'<li>Password: ' + $('password', pwinfo).text() + '</li>' +
'<li>Additional information: ' + $('additional', pwinfo).text() + '</li>' +
'</ul>'
);
$('#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();
});
});

4
style/pws.css

@ -70,3 +70,7 @@ span.button {
display: none;
}
#passwordinfo {
display: none;
}

13
templates/search.tpl

@ -73,5 +73,16 @@
</div>
<span id="showpasswordgroups" class="button">Back to password groups</span>
</div>
<div id="passwordinfo"></div>
<div id="passwordinfo">
<ul>
<li><strong>Short description</strong>: <span></span></li>
<li><strong>Long description</strong>: <span></span></li>
<li><strong>Username</strong>: <span></span></li>
<li><strong>Password</strong>: <span></span></li>
<li>
<strong>Additional information</strong>:<br />
<span></span>
</li>
</ul>
</div>
{include file="foot.tpl"}

Loading…
Cancel
Save