Browse Source

Stop showing broken image icon on the new post page

pull/41/head
Prateek Saxena 9 years ago
parent
commit
ef77497442
  1. 5
      views/new-post.php

5
views/new-post.php

@ -133,12 +133,15 @@
<script> <script>
function previewPhoto(event) { function previewPhoto(event) {
document.getElementById('photo_preview').src = URL.createObjectURL(event.target.files[0]);
$("#photo_preview")
.show()
.attr("src", URL.createObjectURL(event.target.files[0]) );
} }
$(function(){ $(function(){
var userHasSetCategory = false; var userHasSetCategory = false;
$("#photo_preview").hide();
$("#note_content").on('change keyup', function(e){ $("#note_content").on('change keyup', function(e){
var text = $("#note_content").val(); var text = $("#note_content").val();

Loading…
Cancel
Save