- change model.Notebook.sql_search_notes() to be a static method
- take a first_notebook_id argument and a user_id argument
- join user_notebook on notebook_id and matches on user_notebook.user_id instead of notebook_id
- order by notebook_id = first_notebook desc, rank instead of just rank
- include search result for notebooks readable by anonymous user, but only if such a notebook is given as first_notebook_id
- update code that calls model.Notebook.sql_search_notes()
- update model.Note.to_dict() to include notebook_id
- modify Wiki.display_search_results()
- separate search results for the current notebook and results for all other notebooks
- indicate which notebook each result is from
- if there are results in other notebooks but no results in the current notebook, indicate that clearly
- when you click on a result note link in the current notebook, it should simply open a new note
- when you click on a result note link in another notebook, it should open in a new window
- test in IE
- update unit tests for:
- controller.Notebooks.search()
- model.Notebook.sql_search_notes()
- model.Note.to_dict()
* Added new optional previous_revision params to default(), contents() and load_note() in controller.Notebooks.
These use Html_differ() to generate and return diffs.
* Updated Wiki.js:
* provide previous_revision when a revision is opened in a new window/tab
* call load_note() when two revisions when a revision is clicked in Changes_pulldown
* update compare_versions() to display a diff instead of opening the two revisions separately
* update load_editor():
* update all invocations of load_editor(), including in Editor.js, to accept a new previous_revision argument
* modify load_editor() to use the previous_revision argument (when supplied) to load a diff
* change controller.Notebooks.load_note_revisions() to select and return User_revision objects
* change controller.Notebooks.save_note() to use User_revision objects for new_revision and previous_revision as well
* update client to deal with new load_note_revisions() return values (make sure all uses of revisions_list are updated)
* update client to deal with new new_revision/previous_revision
* update changes pulldown to show username along with each timestamp
* update model.Invite to load redeemed_username along with redeemed_user_id
* display the redeemed username next to each email address in the "share this notebook" note
* added new database table of invited email addresses
* altered user_notebook table to have a new owner boolean column, indicating whether the user has owner access to the notebook
* altered notebook and note tables/views to have an additional user_id field to indicate the user that created that revision
* updated model.Notebook and model.Note to support new user_id field
* Each model.User now has a current storage bytes and a rate plan.
* model.User.to_dict() updated accordingly.
* Minor Scheduler.add() change to bail of the given thread is None.
* controller.Users.current() returns current user's rate plan details.
* controller.Users.update_storage() now takes an optional callback.
* Various methods in controller.Notebooks responsible for calling controller.Users.update_storage().
* Added rate plan details to config/Common.py.
* Added quota utilization colors to style.css.
* Implemented quota utilization calculation and display in Wiki.js.
Still to-do: Return updated storage bytes where appropriate in controller.Notebook and update the
client accordingly.
Now the client has to explicitly request the inclusion of startup notes.
Also no longer including startup notes or revision lists with every single
serialized Notebook.
from a different window:
* Made controller.notebooks responsible for preventing unmodified notes from being saved, instead
of model.Notebook handling this task.
* Created a revision validator for passing revisions as arguments to exposed methods.
* controller.Notebooks.save_note() now requires a previous_revision parameter, used to determine
whether the note has been modified in the particular window it's being saved from.
* save_note() returns a new previous_revision value, so the client can determine whether a save
has occurred from another window.
* controller.Notebooks.undelete_note() fixed to quietly bail if the note to undelete isn't
actually deleted, which can happen if it was undeleted in another window.
* Editor() now responsible for making revisions list if it doesn't exist
* No longer giving an "undo" message when the user deletes an empty note.
* On the client side, detecting whether the previous_revision as reported by save_note() looks
correct, and if not, alerting the user about the conflict. Also displaying a "compare versions"
button that opens both the current version and the previous version.
* model.Note has a deleted_from member to indicate the notebook id it was deleted from (if any)
* controller.Notebooks sets the deleted_from member and makes all deleted notes startup notes in the trash
* new controller.Notebooks.undelete_note() method
* split up the idea of UI messages into errors and informational messages, with separate CSS
* updated Editor and Wiki UI code to deal with new deleted_from variable
* added "undelete" button when viewing a deleted note, and "delete" changes to "delete forever"
* added a "trash" link to the notebook links
* reorganized responsibilities for displaying notebook/user links among Wiki.populate() and Wiki.display_user()
* when deleting messages in a notebook with a trash, displaying "The note has been moved to the trash"...
with a working undo button!
* tweaked focusing logic in display_search_results(), which has been renamed to display_loaded_notes()
* Made sure the trash is not exposed by the read-only notebook view.
* Modified model.User.check_access() to consider read-write access to a
notebook to be sufficient for access to that notebook's trash.
* Modified controller.Users so new users are created with a notebook that
has a trash.
* Changed controller.Notebooks so deleted notes go to the trash (if any).
* Made controller.Notebooks.save_note() return the newly minted revision timestamp upon a successful save.
* Whenever we get back a revision timestamp from save_note(), we store in in the client's list of revisions for that note.
* Now raising Access_error in controller.Notebooks in various places where the notebook requested is unknown.
* Tweaked pulldown CSS a bit. Now will sport a handy-dandy scrollbar if the pulldown gets too tall, at least in real browsers.
* Fixed bug where clicking "show on startup" checkbox directly didn't visually toggle the checkbox.