Commit b6877db9 authored by c24b's avatar c24b

M [TPL] editForm delete + pressK

parent ce2f2841
......@@ -209,16 +209,18 @@ function deleteOne(url){
},
success: function(xhr) {
console.log("SUCCESS!");
msg = "Sucessfully deleted"
addPageStatus("success", "#editForm", msg);
//msg = "Sucessfully deleted"
//addPageStatus("success", "#editForm", msg);
window.location.reload()
},
error: function(xhr) {
console.log("FAIL!");
console.log(xhr.status);
var status = xhr.status;
var info = xhr["detail"];
var msg = "ERROR deleting project"+ url
console.log(msg)
window.location.reload()
//console.log(xhr.status);
//var status = xhr.status;
//var info = xhr["detail"];
//var msg = "ERROR deleting project"+ url
//console.log(msg)
//addPageStatus("info", msg);
//window.location.reload();
},
......@@ -289,7 +291,7 @@ $(document).on("click","#delete", function(){
selected.forEach(function(url) {
deleteOne(url);
});
window.location.reload();
//window.location.reload();
});
//EDIT MULTI
......@@ -318,7 +320,7 @@ $(document).on("click","#recalculate", function(){
$(document).on("click", ".delete", function() {
var url = $( this ).data("url");
deleteOne(url);
window.location.reload();
//window.location.reload();
});
//UNIQUE EDITION
......@@ -328,6 +330,13 @@ $(document).on("click",".edit", function(){
console.log(id)
//newform.collapse("show");
$('#editForm-'+id).collapse('toggle')
$(document).bind('keypress', function(e) {
if(e.keyCode==13){
$('#edit-submit-'+id).trigger('click');
}
});
$("#edit-submit-"+id).on('click', function(){
//alert(url)
......@@ -340,6 +349,7 @@ $(document).on("click",".edit", function(){
//alert("cancel")
$('input#name-'+id).val("");
resetStatusForm("#editForm-"+id);
});
$("button").on("click", ".edit", function(){
......
......@@ -169,6 +169,12 @@
<script type="text/javascript" src="{% static "lib/gargantext/garganrest_projects.js" %}"></script>
<script type="text/javascript">
getProjects();
$(document).bind('keypress', function(e) {
if(e.keyCode==13){
$('#createProject').trigger('click');
}
});
$(document).on("click","#createProject", function(e){
//alert("clicked");
//
......
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