move the (x) image away from the link selecting the project (opposite tasks should never be so close as to allow the user to click on one by mistake while implying the other)

git-svn-id: http://google-refine.googlecode.com/svn/trunk@601 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-05-05 01:45:37 +00:00
parent c32899aea6
commit 8aa1f1d9a0

View File

@ -99,38 +99,16 @@ function renderProjects(data) {
} else {
var table = $(
'<table><tr>' +
'<th></th>' +
'<th>Name</th>' +
'<th align="right">Last Modified</th>' +
'<th></th>' +
'</tr></table>'
).appendTo(container)[0];
var renderProject = function(project) {
var tr = table.insertRow(table.rows.length);
tr.className = "project";
$('<a></a>')
.addClass("delete-project")
.attr("title","Delete this project")
.attr("href","")
.html("<img src='/images/close.png' />")
.click(function() {
if (window.confirm("Are you sure you want to delete project \"" + project.name + "\"?")) {
$.ajax({
type: "POST",
url: "/command/delete-project",
data: { "project" : project.id },
dataType: "json",
success: function (data) {
if (data && typeof data.code != 'undefined' && data.code == "ok") {
fetchProjects();
}
}
});
}
return false;
}).appendTo(tr.insertCell(tr.cells.length));
$('<a></a>')
.text(project.name)
.attr("href", "/project.html?project=" + project.id)
@ -141,6 +119,28 @@ function renderProjects(data) {
.addClass("last-modified")
.appendTo(tr.insertCell(tr.cells.length));
$('<a></a>')
.addClass("delete-project")
.attr("title","Delete this project")
.attr("href","")
.html("<img src='/images/close.png' />")
.click(function() {
if (window.confirm("Are you sure you want to delete project \"" + project.name + "\"?")) {
$.ajax({
type: "POST",
url: "/command/delete-project",
data: { "project" : project.id },
dataType: "json",
success: function (data) {
if (data && typeof data.code != 'undefined' && data.code == "ok") {
fetchProjects();
}
}
});
}
return false;
}).appendTo(tr.insertCell(tr.cells.length));
};
for (var i = 0; i < projects.length; i++) {