|
@ -28,11 +28,13 @@ |
|
|
<label for="note_photo"><code>photo</code></label> |
|
|
<label for="note_photo"><code>photo</code></label> |
|
|
<input type="file" name="note_photo" id="note_photo" accept="image/*"> |
|
|
<input type="file" name="note_photo" id="note_photo" accept="image/*"> |
|
|
<br> |
|
|
<br> |
|
|
<div id="photo_preview_container"> |
|
|
|
|
|
|
|
|
<div id="photo_preview_container" class="hidden"> |
|
|
<img src="" id="photo_preview" style="max-width: 300px; max-height: 300px;"> |
|
|
<img src="" id="photo_preview" style="max-width: 300px; max-height: 300px;"> |
|
|
|
|
|
<div> |
|
|
<button type="button" class="btn btn-danger btn-sm" id="remove_photo"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Remove image</button> |
|
|
<button type="button" class="btn btn-danger btn-sm" id="remove_photo"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Remove image</button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
<div class="form-group"> |
|
|
<label for="note_syndicate-to"><code>syndicate-to</code> <a href="javascript:reload_syndications()">(refresh)</a></label> |
|
|
<label for="note_syndicate-to"><code>syndicate-to</code> <a href="javascript:reload_syndications()">(refresh)</a></label> |
|
@ -139,15 +141,15 @@ $(function(){ |
|
|
|
|
|
|
|
|
var userHasSetCategory = false; |
|
|
var userHasSetCategory = false; |
|
|
|
|
|
|
|
|
$("#photo_preview_container").hide(); |
|
|
|
|
|
|
|
|
$("#photo_preview_container").addClass("hidden"); |
|
|
$("#note_photo").on("change", function(e){ |
|
|
$("#note_photo").on("change", function(e){ |
|
|
$("#photo_preview_container").show(); |
|
|
|
|
|
|
|
|
$("#photo_preview_container").removeClass("hidden"); |
|
|
$("#photo_preview").attr("src", URL.createObjectURL(e.target.files[0]) ); |
|
|
$("#photo_preview").attr("src", URL.createObjectURL(e.target.files[0]) ); |
|
|
}); |
|
|
}); |
|
|
$("#remove_photo").on("click", function(){ |
|
|
$("#remove_photo").on("click", function(){ |
|
|
$("#note_photo").val(""); |
|
|
$("#note_photo").val(""); |
|
|
$("#photo_preview").attr("src", "" ); |
|
|
$("#photo_preview").attr("src", "" ); |
|
|
$("#photo_preview_container").hide(); |
|
|
|
|
|
|
|
|
$("#photo_preview_container").addClass("hidden"); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
$("#note_content").on('change keyup', function(e){ |
|
|
$("#note_content").on('change keyup', function(e){ |
|
|