-
This field will automatically expand as you write.
- <%= f.text_area :notes_text,
- class: 'w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring focus:ring-blue-500 focus:ring-opacity-50',
- placeholder: "Write as little or as much as you'd like!",
- style: 'min-height: 400px; padding: 10px;'
- %>
-
- To save your notes, please click "Save Changes" below.
- Closing this dialog will preserve your unsaved changes until you refresh the page, but to keep your notes you must save them!
-
+
+
+
+
+
+
+
+
+
+
+
+ |
+ info
+ |
+
+
+ Document notes are for your reference only and won't be visible to readers. Use this space for research notes, planning, or any other information you want to keep with your document.
+
+ |
+
+
+
+ <%= f.text_area :notes_text,
+ class: 'w-full rounded-md border-gray-300 shadow-sm focus:border-teal-500 focus:ring focus:ring-teal-500 focus:ring-opacity-30',
+ placeholder: "Write as little or as much as you'd like!",
+ style: 'min-height: 300px; padding: 12px;'
+ %>
+
+
+
+
+
+
+ |
+ visibility
+ |
+
+
+ A brief summary of your document's content. This will be displayed in document listings and previews to give readers an idea of what your document is about.
+
+ |
+
+
+
+ <%= f.text_area :synopsis,
+ class: 'w-full rounded-md border-gray-300 shadow-sm focus:border-teal-500 focus:ring focus:ring-teal-500 focus:ring-opacity-30',
+ placeholder: "Summarize your document in a few sentences...",
+ style: 'min-height: 300px; padding: 12px;'
+ %>
+
-
-
-
+
+
+ save
+ All changes will be saved
+
+
+
+
+
<% end %>
@@ -657,9 +733,12 @@
// Update save indicator to saving state
$('.js-autosave-status').text('Saving...');
$('.js-autosave-icon').addClass('text-gray-400').removeClass('text-gray-900 text-red-500');
- $('#save-indicator').removeClass('bg-red-500').addClass('bg-white');
+ $('#save-indicator').removeClass('bg-red-500').addClass('bg-white pulse-animation');
$('.js-autosave-status').removeClass('text-white').addClass('text-gray-600');
+ // Update mini save indicator
+ $('#mini-save-indicator i').addClass('pulse-animation');
+
// Clear both timers
clearTimeout(short_timer);
clearTimeout(long_timer);
@@ -697,9 +776,12 @@
// Update indicator to saved state
$('.js-autosave-status').text('Saved');
$('.js-autosave-icon').addClass('text-gray-900').removeClass('text-gray-400 text-red-500 text-white');
- $('#save-indicator').removeClass('bg-red-500').addClass('bg-white');
+ $('#save-indicator').removeClass('bg-red-500 pulse-animation').addClass('bg-white');
$('.js-autosave-status').removeClass('text-white').addClass('text-gray-600');
+ // Update mini save indicator
+ $('#mini-save-indicator i').removeClass('pulse-animation');
+
// Make the indicator more visible for a moment
$('#save-indicator').addClass('bg-green-50');
clearTimeout(autosave_hide_timeout);
@@ -751,6 +833,7 @@
const content = $('#editor').html();
const wordCount = countWords(content);
$('#word-count').text(wordCount);
+ $('#mini-word-count').text(wordCount); // Update mini word count too
};
// Initial word count
@@ -785,31 +868,103 @@
e.preventDefault();
}
});
+
+ // Keyboard shortcuts
+ $(document).on('keydown', function(e) {
+ // Save (Ctrl+S)
+ if (e.ctrlKey && e.key === 's') {
+ e.preventDefault();
+ performSave();
+ }
+ });
});
+
+
+
\ No newline at end of file