Added 'browse workspace directory' link to index.vt.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1582 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-10-16 19:12:26 +00:00
parent 3b57c84175
commit d99abaa52b
4 changed files with 19 additions and 13 deletions

View File

@ -18,6 +18,7 @@
<div id="project-open">
<h1>Open a Project</h1>
<div id="projects-container"></div>
<div class="content-block-footer"><a href="javascript:openWorkspaceDir()">Browse Workspace Directory</a></div>
</div>
<div id="project-create">
<form id="file-upload-form" method="post" enctype="multipart/form-data" action="/command/core/create-project-from-upload" accept-charset="UTF-8">

View File

@ -196,6 +196,19 @@ function showHide(toHide, toShow) {
$("#" + toShow).show();
}
function openWorkspaceDir() {
$.ajax({
type: "POST",
url: "/command/core/open-workspace-dir",
dataType: "json",
success: function (data) {
if (data.code != "ok" && "message" in data) {
alert(data.message);
}
}
});
}
function onLoad() {
fetchProjects();

View File

@ -54,16 +54,3 @@ ExtensionBar.prototype._createMenuButton = function(label, submenu) {
};
ExtensionBar.handlers = {};
ExtensionBar.handlers.openWorkspaceDir = function() {
$.ajax({
type: "POST",
url: "/command/core/open-workspace-dir",
dataType: "json",
success: function (data) {
if (data.code != "ok" && "message" in data) {
alert(data.message);
}
}
});
};

View File

@ -57,6 +57,11 @@
left: 350px;
width: 430px;
}
.content-block-footer {
padding: @padding_tighter;
text-align: center;
}
#project-links {
top: 110px;