Задача №10
This commit is contained in:
parent
def4f97784
commit
65d788512b
@ -17,12 +17,16 @@ function showPapers(papersElement) {
|
||||
});
|
||||
}
|
||||
|
||||
function addPaper(title, status, comment, locked) {
|
||||
function addPaper(title, status, comment, locked, deadline, file, dateCreate, dateUpdate) {
|
||||
var paperData = JSON.stringify({
|
||||
"title": title,
|
||||
"status": status,
|
||||
"comment": comment,
|
||||
"locked": locked
|
||||
"deadline":deadline,
|
||||
"locked": locked,
|
||||
"file":file,
|
||||
"dateCreate":dateUpdate,
|
||||
"dateUpdate":dateUpdate
|
||||
});
|
||||
postToRest(urlPapers, paperData, function (data) {
|
||||
alert(data);
|
||||
|
@ -149,7 +149,7 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<button id="sendMessageButton" class="btn btn-success text-uppercase"
|
||||
type="submit">
|
||||
type="submit" onclick="return addPaper()" >
|
||||
Сохранить
|
||||
</button>
|
||||
<button id="cancelButton" class="btn btn-default text-uppercase" type="button">
|
||||
@ -182,6 +182,8 @@
|
||||
getFromRest(urlPaperStatuses, function (response) {
|
||||
fillSelect($("#status"), response);
|
||||
});
|
||||
|
||||
addPaper("название", "DRAFT", "comment", false);
|
||||
});
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user