restyle recent pads table

pull/1/head
ansuz 9 years ago
parent fa0f0e4d28
commit 45312a6fbb

@ -45,11 +45,7 @@
table.scroll tbody, table.scroll tbody,
table.scroll thead { display: block; } table.scroll thead { display: block; }
table.scroll tbody { table.scroll tbody { }
max-height: 100px;
overflow-y: auto;
overflow-x: hidden;
}
tbody { border-top: 2px solid black; } tbody { border-top: 2px solid black; }
@ -179,7 +175,7 @@
// derive the name // derive the name
var name = padTypes[uri.path()]; var name = padTypes[uri.path()];
var title = pad[2] || ''; var title = pad[2] || uri.parts.hash.slice(0,8);
var date = new Date(pad[1]).toLocaleDateString(); var date = new Date(pad[1]).toLocaleDateString();
if (date === now.toLocaleDateString()) { if (date === now.toLocaleDateString()) {
@ -204,7 +200,6 @@
$table.remove(); $table.remove();
$tryit.text("Try it out!"); $tryit.text("Try it out!");
} }
setTableHeight();
}); });
}); });
}); });
@ -217,17 +212,6 @@
}); });
makeRecentPadsTable(); makeRecentPadsTable();
} }
var setTableHeight = function () {
if (recentPads.length < 5) {
$tbody.attr('style', 'height: ' + (28 * recentPads.length + 2) + 'px');
} else {
$tbody.attr('style', 'height: ' + (28 * 5) + 'px');
}
};
setTableHeight();
if (hasRecent) { if (hasRecent) {
$('table').attr('style', ''); $('table').attr('style', '');
$tryit.text('Your Recent pads (stored only in browser)'); $tryit.text('Your Recent pads (stored only in browser)');

Loading…
Cancel
Save