Fixed event wiring bug in index.html that prevented the project name validation from getting run, and prevented limit= and skip= params from getting sent to the server.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@278 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
c3ebb5a9f4
commit
4855f70d88
@ -1,11 +1,10 @@
|
|||||||
function onLoad() {
|
function onLoad() {
|
||||||
$("#upload-file-button").click(onClickUploadFileButton);
|
|
||||||
|
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
"/command/get-all-project-metadata",
|
"/command/get-all-project-metadata",
|
||||||
null,
|
null,
|
||||||
function(data) {
|
function(data) {
|
||||||
renderProjects(data);
|
renderProjects(data);
|
||||||
|
$("#upload-file-button").click(onClickUploadFileButton);
|
||||||
},
|
},
|
||||||
"json"
|
"json"
|
||||||
);
|
);
|
||||||
@ -13,7 +12,8 @@ function onLoad() {
|
|||||||
$(onLoad);
|
$(onLoad);
|
||||||
|
|
||||||
function onClickUploadFileButton(evt) {
|
function onClickUploadFileButton(evt) {
|
||||||
if ($("#project-name-input")[0].value.trim().length == 0) {
|
var projectName = $("#project-name-input")[0].value;
|
||||||
|
if ($.trim(projectName).length == 0) {
|
||||||
window.alert("You must specify a project name.");
|
window.alert("You must specify a project name.");
|
||||||
|
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
@ -86,8 +86,6 @@ function renderProjects(data) {
|
|||||||
for (var i = 0; i < projects.length; i++) {
|
for (var i = 0; i < projects.length; i++) {
|
||||||
renderProject(projects[i]);
|
renderProject(projects[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(table).appendTo(container);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user