|
@@ -1,5 +1,5 @@
|
|
|
<!doctype html>
|
|
|
-<html lang="en">
|
|
|
+<html lang="en" note-uid="{{$note->uid}}" >
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport"
|
|
@@ -56,6 +56,14 @@
|
|
|
.page-number:before {
|
|
|
content: counter(pages);
|
|
|
}
|
|
|
+
|
|
|
+ @media print
|
|
|
+ {
|
|
|
+ .no-print, .no-print *
|
|
|
+ {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -222,9 +230,39 @@
|
|
|
</table>
|
|
|
@endif
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="no00-print" style="padding-top: 1rem; text-align: center"><a id="save_btn" href="#">Save</a></div>
|
|
|
<div style="padding-top: 2rem; text-align: center">********</div>
|
|
|
-
|
|
|
</div>
|
|
|
+<script>
|
|
|
+ $(document).ready(function(){
|
|
|
+ let saveBtn = document.querySelector('#save_btn');
|
|
|
+ let content = document.querySelector('html');
|
|
|
+ let contentHTML = content.outerHTML;
|
|
|
+ let noteUid = content.getAttribute('note-uid');
|
|
|
+ setInterval(function(){
|
|
|
+ try {
|
|
|
+ submitToBackend(noteUid, contentHTML);
|
|
|
+ }catch(e){
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
+ }, 10000);
|
|
|
+ saveBtn.addEventListener('click', () => {
|
|
|
+
|
|
|
+ submitToBackend(noteUid, contentHTML)
|
|
|
+ //send this to java
|
|
|
+ //create note_print record with versioned history
|
|
|
+ //on note show a list of note prints to admins
|
|
|
+ //allow opening a note print on its own tab with note print id means update existing
|
|
|
+ //auto save as you edit to local storage. flush local storage when you hit save
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ function submitToBackend(noteUid, content){
|
|
|
+ console.log("saving...")
|
|
|
+ console.log(noteUid);
|
|
|
+ console.log(content);
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
</body>
|
|
|
</html>
|