Commit e9df1d89 authored by c24b's avatar c24b

M

parent c0a3d455
...@@ -194,7 +194,7 @@ function getCorpora(){ ...@@ -194,7 +194,7 @@ function getCorpora(){
function getRessources(){ function getRessources(){
var pathname = window.location.pathname; var pathname = window.location.pathname;
url_ = "/api"+pathname+"/resources" url_ = "/api"+pathname+"/resources"
alert(url_) //alert(url_)
} }
//// POST TO API //// POST TO API
...@@ -361,7 +361,7 @@ $(document).on("click",".edit", function(){ ...@@ -361,7 +361,7 @@ $(document).on("click",".edit", function(){
//UNIQUE RECALC //UNIQUE RECALC
$(document).on("click",".refresh", function(){ $(document).on("click",".refresh", function(){
alert(refresh) //alert(refresh)
//console.log( $(this)) //console.log( $(this))
var id = $(this).data("id") var id = $(this).data("id")
//var url = $( this ).data("url") //var url = $( this ).data("url")
...@@ -376,7 +376,7 @@ function createProject() { ...@@ -376,7 +376,7 @@ function createProject() {
//onclick inside element because probleme of scope with modal //onclick inside element because probleme of scope with modal
//we recover the element by hand for the moment //we recover the element by hand for the moment
var project_name = $(".popover #inputName").val(); var project_name = $(".popover #inputName").val();
alert(project_name); //alert(project_name);
console.log("Create project #"+project_name); console.log("Create project #"+project_name);
console.log("POST /api/projects"); console.log("POST /api/projects");
$.ajax({ $.ajax({
...@@ -393,7 +393,7 @@ function createProject() { ...@@ -393,7 +393,7 @@ function createProject() {
location.reload(); location.reload();
}, },
error: function(data) { error: function(data) {
alert(data) //alert(data)
console.log(data) console.log(data)
status = data.status; status = data.status;
info = data.responseJSON["detail"]; info = data.responseJSON["detail"];
...@@ -404,8 +404,8 @@ function createProject() { ...@@ -404,8 +404,8 @@ function createProject() {
}; };
function createCorpus(url, method, form){ function createCorpus(url, method, form){
alert(method) //alert(method)
alert(url) //alert(url)
console.log(form) console.log(form)
console.log("POST corpus") console.log("POST corpus")
$.ajax({ $.ajax({
...@@ -438,7 +438,7 @@ function createCorpus(url, method, form){ ...@@ -438,7 +438,7 @@ function createCorpus(url, method, form){
status = data.status; status = data.status;
info = data.responseJSON["detail"]; info = data.responseJSON["detail"];
msg = "<strong>ERROR ["+status+"]:</strong>"+ "<p>"+info+"</p>" msg = "<strong>ERROR ["+status+"]:</strong>"+ "<p>"+info+"</p>"
alert(msg) //alert(msg)
addFormStatus("error","form#formCorpus", msg); addFormStatus("error","form#formCorpus", msg);
//$(".collapse").collapse("hide"); //$(".collapse").collapse("hide");
//_content = '<h2><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span>Error while creating the corpus.</h2>' //_content = '<h2><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span>Error while creating the corpus.</h2>'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment