Add work
This commit is contained in:
parent
ecefa41792
commit
516d965ad3
@ -81,6 +81,7 @@ function toggleSaveButton(show) {
|
|||||||
function makePost() {
|
function makePost() {
|
||||||
var content = document.getElementById("onionr-post-creator-content").value;
|
var content = document.getElementById("onionr-post-creator-content").value;
|
||||||
|
|
||||||
|
if(content.trim() !== '') {
|
||||||
var post = new Post();
|
var post = new Post();
|
||||||
|
|
||||||
post.setUser(getCurrentUser());
|
post.setUser(getCurrentUser());
|
||||||
@ -92,6 +93,9 @@ function makePost() {
|
|||||||
document.getElementById('onionr-timeline-posts').innerHTML = post.getHTML() + document.getElementById('onionr-timeline-posts').innerHTML;
|
document.getElementById('onionr-timeline-posts').innerHTML = post.getHTML() + document.getElementById('onionr-timeline-posts').innerHTML;
|
||||||
|
|
||||||
document.getElementById("onionr-post-creator-content").value = "";
|
document.getElementById("onionr-post-creator-content").value = "";
|
||||||
|
} else {
|
||||||
|
console.log('Not making empty post.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('body').on('click', '[data-editable]', function() {
|
$('body').on('click', '[data-editable]', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user