witten
/
luminotes
Archived
1
0
Fork 0
Commit Graph

26 Commits

Author SHA1 Message Date
Dan Helfman 613ee8a217 Completely revamped the way the main page and the notes on it are loaded by
the client. Previously, the main page would load as mostly blank, then the
client would immediately issue two async json calls to load the user and
notebook data, including startup notes. Now, the main page loads with the note
data actually as part of the page. If JavaScript is off, then you see all the
notes displayed, including startup notes and any designated note. If
JavaScript is on, then those "static" notes are instantly hidden and their
contents are loaded into iframes for editing/display.

The real upshot is that Luminotes in read-only mode is now more useful when
JavaScript is off, and actually displays notes and their contents. This is
very useful for search engine indexing.

Updated all Python unit tests. Still have to get to JavaScript unit tests,
what few their are.
2007-10-16 21:37:12 +00:00
Dan Helfman bbebad528e Renaming new_model to model, now that the old bsddb model is out of the way. 2007-10-11 19:49:00 +00:00
Dan Helfman 43c6f54e9f Merged revisions 401-446 via svnmerge from
svn+ssh://torsion.org/home/luminotes/repos/luminotes/branches/postgres

................
  r402 | witten | 2007-10-04 00:48:49 -0700 (Thu, 04 Oct 2007) | 3 lines

  Initialized merge tracking via "svnmerge" with revisions "1-401" from
  svn+ssh://torsion.org/home/luminotes/repos/luminotes/trunk
................
  r404 | witten | 2007-10-04 01:17:07 -0700 (Thu, 04 Oct 2007) | 2 lines

  Beginning a conversion from bsddb to postgres.
................
  r405 | witten | 2007-10-04 01:18:58 -0700 (Thu, 04 Oct 2007) | 9 lines

  Merged revisions 402-404 via svnmerge from
  svn+ssh://torsion.org/home/luminotes/repos/luminotes/trunk

  ........
    r403 | witten | 2007-10-04 01:14:45 -0700 (Thu, 04 Oct 2007) | 2 lines

    Yay, no more stupid deprecation warnings from simplejson about the sre module.
  ........
................
  r406 | witten | 2007-10-04 15:34:39 -0700 (Thu, 04 Oct 2007) | 4 lines

   * Switched back to Python 2.4 because many Python modules in Debian are not packaged to work with Python 2.5
   * Began removal of all references to Scheduler, @async, yield, and so on.
   * Converted Database.py to support PostgreSQL and updated its unit tests accordingly.
................
  r407 | witten | 2007-10-04 16:34:01 -0700 (Thu, 04 Oct 2007) | 2 lines

  All unit tests for the new model classes now pass.
................
  r409 | witten | 2007-10-05 00:53:56 -0700 (Fri, 05 Oct 2007) | 2 lines

  Reordering some columns and adding some indices.
................
  r410 | witten | 2007-10-05 16:08:37 -0700 (Fri, 05 Oct 2007) | 4 lines

  Now adding trash notebooks to user_notebook table. Also switching db
  conversion/verification tools back to require Python 2.5, since they still use
  the old Scheduler, which requires 2.5 generator features.
................
  r411 | witten | 2007-10-06 16:26:56 -0700 (Sat, 06 Oct 2007) | 2 lines

  Lots more unit tests passing. Most of the recent work was on controller.Users and related stuff.
................
  r412 | witten | 2007-10-07 01:52:12 -0700 (Sun, 07 Oct 2007) | 2 lines

  controller.Users unit tests now finally pass!
................
  r413 | witten | 2007-10-07 02:14:10 -0700 (Sun, 07 Oct 2007) | 3 lines

  Got controller.Root unit tests passing.
  Moved fake sql_* function shenanigans from Test_users.py to Test_controller.py, for use by other controller unit tests.
................
  r414 | witten | 2007-10-08 23:11:11 -0700 (Mon, 08 Oct 2007) | 2 lines

  All unit tests pass! Fuck yeah!
................
  r415 | witten | 2007-10-08 23:13:07 -0700 (Mon, 08 Oct 2007) | 2 lines

  Removing all references to Scheduler from luminotes.py
................
  r416 | witten | 2007-10-08 23:54:51 -0700 (Mon, 08 Oct 2007) | 3 lines

  Converted deleted_from to deleted_from_id in a few more places.
  Fixed bug in Users.contents().
................
  r417 | witten | 2007-10-09 00:11:59 -0700 (Tue, 09 Oct 2007) | 3 lines

  Typo fix in Note sql method.
  Adding autocommit flag to Database.next_id() method.
................
  r418 | witten | 2007-10-09 00:13:19 -0700 (Tue, 09 Oct 2007) | 2 lines

  Updating unit test for new auto commit flag.
................
  r419 | witten | 2007-10-09 00:14:09 -0700 (Tue, 09 Oct 2007) | 2 lines

  Removing debugging print.
................
  r420 | witten | 2007-10-09 00:20:55 -0700 (Tue, 09 Oct 2007) | 2 lines

  More sql fixes. I really need some funtional tests that hit the database and exercise the SQL.
................
  r421 | witten | 2007-10-09 00:51:34 -0700 (Tue, 09 Oct 2007) | 3 lines

  Fixed controller.Database handling of tuple as an Object_type.
  Made SQL for user storage calculation better at handling null values and also more succinct.
................
  r422 | witten | 2007-10-09 13:32:16 -0700 (Tue, 09 Oct 2007) | 2 lines

  Converting Wiki.js to trash_id notebook member instead of trash object.
................
  r423 | witten | 2007-10-09 13:42:10 -0700 (Tue, 09 Oct 2007) | 2 lines

  No longer displaying "download as html" on the front page, as people see "download" and think they're downloading the software.
................
  r424 | witten | 2007-10-09 14:24:40 -0700 (Tue, 09 Oct 2007) | 2 lines

  Notebooks.contents() now returns notebooks with correct read-write status.
................
  r425 | witten | 2007-10-09 14:32:25 -0700 (Tue, 09 Oct 2007) | 2 lines

  Fixed reporting of validation errors to the user. Now says "The blah is missing." instead of just "is missing"
................
  r426 | witten | 2007-10-09 17:05:22 -0700 (Tue, 09 Oct 2007) | 2 lines

  No longer redirecting to trash notebook upon login.
................
  r427 | witten | 2007-10-09 17:20:33 -0700 (Tue, 09 Oct 2007) | 2 lines

  Made controller.Database use a connection pool.
................
  r429 | witten | 2007-10-09 20:13:30 -0700 (Tue, 09 Oct 2007) | 2 lines

  Converted initdb.py and updatedb.py to Postgres from bsddb.
................
  r430 | witten | 2007-10-09 20:37:14 -0700 (Tue, 09 Oct 2007) | 2 lines

  Changing error message to remove underscores from variable names.
................
  r431 | witten | 2007-10-10 13:23:30 -0700 (Wed, 10 Oct 2007) | 2 lines

  Removing unused note_title parameter from Wiki.create_editor().
................
  r432 | witten | 2007-10-10 13:25:16 -0700 (Wed, 10 Oct 2007) | 2 lines

  Revision regular expression now supports timezone notation.
................
  r433 | witten | 2007-10-10 14:43:47 -0700 (Wed, 10 Oct 2007) | 2 lines

  Finished implementing ranked ordering for startup notes. (However, there's no way to change the rank from the client yet.)
................
  r434 | witten | 2007-10-10 16:25:19 -0700 (Wed, 10 Oct 2007) | 4 lines

  More strict access checking. Fixed oversight in Postgres DB conversion where,
  in certain controller.Notebook methods, access was only checked at the
  notebook level, not at the note level as well.
................
  r435 | witten | 2007-10-10 17:45:18 -0700 (Wed, 10 Oct 2007) | 3 lines

  Now loading revisions on demand from client when the "changes" button is clicked. Also caching
  loading revisions so subsequent clicks don't have to reload.
................
  r436 | witten | 2007-10-10 21:31:20 -0700 (Wed, 10 Oct 2007) | 2 lines

  Tweaking some of the error handling in Expose and Root so that unhandled errors give a generic error message to the client.
................
  r437 | witten | 2007-10-10 21:33:49 -0700 (Wed, 10 Oct 2007) | 2 lines

  The release script no longer runs initdb.py, because the default database is no longer a single file included in the tarball.
................
  r438 | witten | 2007-10-10 21:40:11 -0700 (Wed, 10 Oct 2007) | 2 lines

  Updated install instructuctions to include use of initdb.py.
................
  r439 | witten | 2007-10-10 21:56:42 -0700 (Wed, 10 Oct 2007) | 3 lines

  Made initdb.py only nuke (drop tables/views) when given a command-line flag.
  Also made install directions more correct.
................
  r440 | witten | 2007-10-10 21:58:48 -0700 (Wed, 10 Oct 2007) | 2 lines

  IE 6 doesn't like commas.
................
  r441 | witten | 2007-10-10 22:08:50 -0700 (Wed, 10 Oct 2007) | 4 lines

  load your notebook. without clicking on "changes", edit a note that has previous revisions. click on "changes". it'll only show
  the most recent revision. fixed by not appending to changes as a result of a save unless the client-side revisions list cache has
  something in it
................
  r442 | witten | 2007-10-10 23:30:41 -0700 (Wed, 10 Oct 2007) | 2 lines

  Forgot to actually save off the new revision as editor.revision.
................
  r443 | witten | 2007-10-11 01:35:54 -0700 (Thu, 11 Oct 2007) | 13 lines

  More intelligent datetime handling:
    * convertdb.py assumes old bsddb database timestamps are Pacific, and then
      converts them to UTC before inserting them into the new PostgreSQL
      database.
    * No longer using naked timezoneless datetime objects in model/controller
      code, except in unit tests that need compatability with pysqlite. Now
      using UTC everwhere.
    * Asking PostgreSQL to give us all timestamps back in UTC.
    * New dependency on python-tz (pytz) package, noted in INSTALL doc.
    * Client now responsible for converting UTC timestamps to local time for
      display.
................
  r444 | witten | 2007-10-11 01:46:09 -0700 (Thu, 11 Oct 2007) | 2 lines

  Tweak to prevent potential race in IE.
................
  r445 | witten | 2007-10-11 01:49:58 -0700 (Thu, 11 Oct 2007) | 2 lines

  Got JavaScript "unit" tests passing again.
................
  r446 | witten | 2007-10-11 01:53:58 -0700 (Thu, 11 Oct 2007) | 2 lines

  Noting that js tests require the Luminotes server on localhost.
................
2007-10-11 09:03:43 +00:00
Dan Helfman ca60ffd1b3 Whoops, forgot to remove titles_only search flag from unit tests. 2007-09-28 22:59:44 +00:00
Dan Helfman f6da052e88 Self-service password reset functionality, plus full unit tests.
GOD DAMN that was annoying to implement.
2007-09-26 23:49:27 +00:00
Dan Helfman ae329d771a Returning storage usage to the client whenever usage changes. 2007-09-20 22:16:52 +00:00
Dan Helfman 4d736d4821 Lots of work on user storage quotas:
* 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.
2007-09-20 20:36:19 +00:00
Dan Helfman 197d65877f * Changed client "recent notes" link to "all notes".
* When you try to load a note called "all notes", load a magic (dynamically-generated) note that
   lists all notes in reverse revision time order.
 * Changed controller.Notebooks.recent_notes() to all_notes().
 * Prevent "all notes" link from showing up when you're in the trash.
 * Prevent link pulldown from showing up for links within read-only notes.
 * Wrote a crappy deletenote tool.
2007-09-04 21:37:48 +00:00
Dan Helfman 658e42aeba Made some changes intended to speed up page loading slightly.
* Blank iframe contents now come from static HTML rather than dynamic CherryPy.
 * Reindented @strongly_expire decorator.
 * Removed one stage of Editor's multi-stage construction.
2007-09-01 23:46:15 +00:00
Dan Helfman 70b3e415f1 * Added new controller.Notebooks.delete_all_notes() method.
* Put UI link in trash to delete all notes.
2007-09-01 21:06:37 +00:00
Dan Helfman 191ced02f1 Unit test for new parent_id parameter. 2007-08-29 01:11:13 +00:00
Dan Helfman fd175aa85d No longer sending quite as much data in response to /users/current requests.
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.
2007-08-27 22:37:22 +00:00
Dan Helfman 4887defa83 controller.Notebooks.save_note() now looks for the note to be saved in that
notebook's trash. If found, it first undeletes the note before saving it. This
is necessary if, for instance, you have the same note open in window A and
window B, and then you delete the note in window A and subsequently modify it
and save it in window B.
2007-08-24 20:35:06 +00:00
Dan Helfman 20313728d2 Several changes to handle the case where a note is changed out from under you, due to being saved
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.
2007-08-23 23:56:42 +00:00
Dan Helfman 7973d87a7d * Turned "search:" label into a search button that, when clicked, displays a
pulldown with "titles only" and "everything" radio buttons, defaulting to
   "titles only".
 * Wiki javascript code for submitting a search now sends a new titles_only
   parameter according to what the user has selected in the search pulldown.
 * controller.Notebooks.search() now takes a new titles_only boolean argument,
   which does exactly what you would expect.
2007-08-17 22:26:02 +00:00
Dan Helfman 69caeaf655 Code mostly related to manipulating wiki links, plus a new link pulldown:
* Implemented a new controller.Notebooks.lookup_note_id() method to get only a note's id given its title.
 * Added some new link resolution code to Editor and Wiki, to fill in a link's id according to its destination note.
 * Factored out some of the link finding code into a common Editor.find_link_at_cursor() method.
 * Factored out query parsing into a common parse_query() function, which operates on a link node.
 * Added new Link_pulldown class-thingy to represent the little pulldown you see when the cursor's on a link.
 * Refactored Pulldown's positioning code to support offset positioning (needed for elements within an iframe).
2007-08-14 04:13:49 +00:00
Dan Helfman f2eac9cb1f Implemented a basic trash, including undo upon note deletion and undeletion from the trash:
* 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()
2007-08-07 01:48:43 +00:00
Dan Helfman 4e28620348 * Added a trash Notebook to model.Notebook.
* 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).
2007-08-03 21:12:17 +00:00
Dan Helfman 9e0b611790 When the user is logged in and hitting the root page ("/") without https, do a redirect to https. 2007-08-02 23:25:57 +00:00
Dan Helfman ccfcd3ccfe * Added convenience method to model.Notebook called is_startup_note(), and made use of it.
* is_startup_note() checks whether the object id of the given note is in the list of startup notes,
   not whether the actual object is.
 * This fixed a bug in which the same note could be saved to the list of startup notes multiple
   times, thereby causing funny display problems when the same note was loaded twice.
2007-08-01 02:23:54 +00:00
Dan Helfman f23fcdde21 * Can now click on revision timestamps to open up the contents of previous note revisions with a small timestamp at the top.
* Revisions can be opened either in the current page or in a new window/tab.
 * Added ability for a read-write notebook to contain read-only notes. This supports showing read-only revisions.
 * Fixed updatedb.py to properly load the anonymous user.
 * Updated initdb.py and updatedb.py to deadl with new-style /notebooks/notebookid?note_id=noteid wiki links.
 * Made Persistent copy the revisions_list on each revision update so different revisions don't share lists.
 * Prevented Note from updating its revision twice upon construction. Now it's only updated once.
 * Work-around for nasty urlparse() caching bug related to unicode strings that cherrypy barfs on.
 * Added optional revision flag to various controller.Notebooks methods to allow opening of a notebook with a particular note revision displayed.
2007-07-31 22:53:57 +00:00
Dan Helfman 2c20d60f9e * Rewrote all wiki note links to be of the form: /notebooks/notebookid?note_id=noteid
* Refactored some of validator decorator to use clearer variable names internally.
 * Validator decorator now supports treating arguments with default values as optional.
 * controller.Notebooks.default() takes an optional note_id argument.
 * controller.Notebooks.contents() takes an optional note_id argument.
 * Wiki.js now makes use of these new controller APIs.
 * Editor.js now takes a notebook_id argument to its constructor so it can properly make links.
2007-07-28 04:22:44 +00:00
Dan Helfman f05d3db661 * Added a "changes" tab with a list of revision timestamps for each note. Note yet clickable.
* 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.
2007-07-26 01:18:41 +00:00
Dan Helfman 24a7205d3a Html_nuker now converts some character/entity refs to their ascii equivalents,
which allows searching for things that contain non-alphanumeric characters
encoded as char/entity refs.
2007-07-19 19:03:40 +00:00
Dan Helfman 0976fdf8c6 Renaming all entries to notes to fit better with the name "Luminotes". 2007-07-17 01:21:31 +00:00
Dan Helfman 02cfca5322 Renaming repository to new name: luminotes 2007-07-16 20:22:38 +00:00