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,9 +99,9 @@ function renderProjects(data) {
} else { } else {
var table = $( var table = $(
'<table><tr>' + '<table><tr>' +
'<th></th>' +
'<th>Name</th>' + '<th>Name</th>' +
'<th align="right">Last Modified</th>' + '<th align="right">Last Modified</th>' +
'<th></th>' +
'</tr></table>' '</tr></table>'
).appendTo(container)[0]; ).appendTo(container)[0];
@ -109,28 +109,6 @@ function renderProjects(data) {
var tr = table.insertRow(table.rows.length); var tr = table.insertRow(table.rows.length);
tr.className = "project"; 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>') $('<a></a>')
.text(project.name) .text(project.name)
.attr("href", "/project.html?project=" + project.id) .attr("href", "/project.html?project=" + project.id)
@ -141,6 +119,28 @@ function renderProjects(data) {
.addClass("last-modified") .addClass("last-modified")
.appendTo(tr.insertCell(tr.cells.length)); .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++) { for (var i = 0; i < projects.length; i++) {