|
|
@ -6,6 +6,7 @@ define([
|
|
|
|
], function (DecorateToolbar, Cryptpad, LilUri) {
|
|
|
|
], function (DecorateToolbar, Cryptpad, LilUri) {
|
|
|
|
var $ = window.$;
|
|
|
|
var $ = window.$;
|
|
|
|
DecorateToolbar.main($('#bottom-bar'));
|
|
|
|
DecorateToolbar.main($('#bottom-bar'));
|
|
|
|
|
|
|
|
Cryptpad.styleAlerts();
|
|
|
|
|
|
|
|
|
|
|
|
var $table = $('table.scroll');
|
|
|
|
var $table = $('table.scroll');
|
|
|
|
var $tbody = $table.find('tbody');
|
|
|
|
var $tbody = $table.find('tbody');
|
|
|
@ -62,18 +63,16 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var id = 'pad-'+index;
|
|
|
|
var id = 'pad-'+index;
|
|
|
|
|
|
|
|
|
|
|
|
$tbody.append('<tr id="'+id+'">' +
|
|
|
|
var $row = $('<tr>', {
|
|
|
|
'<td>' + name + '</td>' +
|
|
|
|
id: id
|
|
|
|
//'<td>' + title + '</td>' +
|
|
|
|
});
|
|
|
|
'<td><a href="' + pad.href + '" title="'+ pad.title + '">' + shortTitle + '</a></td>' +
|
|
|
|
|
|
|
|
'<td>' + created + '</td>' + // created
|
|
|
|
var $remove = $('<td>', {
|
|
|
|
'<td>' + date + '</td>' +
|
|
|
|
'class': 'remove',
|
|
|
|
'<td class="remove" title="forget \''+shortTitle+'\'">✖</td>'+
|
|
|
|
title: "forget '"+shortTitle + "'"
|
|
|
|
'</tr>');
|
|
|
|
}).text('✖').click(function () {
|
|
|
|
|
|
|
|
Cryptpad.confirm("Are you sure you'd like to forget this pad (" + shortTitle + ")?", function (yes) {
|
|
|
|
var $row = $('#'+id);
|
|
|
|
if (!yes) { return; }
|
|
|
|
$row.find('.remove').click(function () {
|
|
|
|
|
|
|
|
if (!window.confirm("Are you sure you'd like to forget this pad (" + shortTitle + ")?")) { return; }
|
|
|
|
|
|
|
|
forgetPad(pad.href);
|
|
|
|
forgetPad(pad.href);
|
|
|
|
$row.fadeOut(750, function () {
|
|
|
|
$row.fadeOut(750, function () {
|
|
|
|
$row.remove();
|
|
|
|
$row.remove();
|
|
|
@ -84,6 +83,18 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row
|
|
|
|
|
|
|
|
.append($('<td>').text(name))
|
|
|
|
|
|
|
|
.append($('<td>').append($('<a>', {
|
|
|
|
|
|
|
|
href: pad.href,
|
|
|
|
|
|
|
|
title: pad.title,
|
|
|
|
|
|
|
|
}).text(shortTitle)))
|
|
|
|
|
|
|
|
.append($('<td>').text(created))
|
|
|
|
|
|
|
|
.append($('<td>').text(date))
|
|
|
|
|
|
|
|
.append($remove);
|
|
|
|
|
|
|
|
$tbody.append($row);
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (recentPads.length) {
|
|
|
|
if (recentPads.length) {
|
|
|
|