Задача №10

This commit is contained in:
Elena 2018-11-09 15:43:25 +04:00
parent 0f9bbc13cc
commit 2db572f284
2 changed files with 9 additions and 7 deletions

View File

@ -17,16 +17,17 @@ function showPapers(papersElement) {
});
}
function addPaper(title, status, comment, locked, deadline, file, dateCreate, dateUpdate) {
function addPaper(title, status,dateCreate, dateUpdate,deadline, comment, locked, tmpFileName, authors) {
var paperData = JSON.stringify({
"title": title,
"status": status,
"comment": comment,
"date-publish":date-publish,
"date-update":date-update,
"deadline":deadline,
"comment": comment,
"locked": locked,
"file":file,
"dateCreate":dateUpdate,
"dateUpdate":dateUpdate
"tmpFileName":tmpFileName,
"authors":authors
});
postToRest(urlPapers, paperData, function (data) {
alert(data);

View File

@ -149,7 +149,8 @@
<div class="col-lg-12">
<div class="form-group">
<button id="sendMessageButton" class="btn btn-success text-uppercase"
type="submit" onclick="return addPaper()" >
type="button" onclick="return addPaper(name,status,date-publish,date-update,
deadline,comment,locked,loader,myInput)" >
Сохранить
</button>
<button id="cancelButton" class="btn btn-default text-uppercase" type="button">
@ -183,7 +184,7 @@
fillSelect($("#status"), response);
});
addPaper("название", "DRAFT", "comment", false);
addPaper(name,status,date-publish,date-update,deadline,comment,locked,loader,myInput);
});
/*]]>*/
</script>