witten
/
luminotes
Archived
1
0
Fork 0
Commit Graph

66 Commits

Author SHA1 Message Date
Dan Helfman 5520fe5892 * make a User_revision object containing a revision timestamp, user_id, username
* 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
2008-01-04 04:45:43 +00:00
Dan Helfman a501d5fcce UI for invite revocation. 2007-12-13 22:29:57 +00:00
Dan Helfman 36c5ff5b08 Display of current invites now updates when you add new invites.
This means that controller.Users.send_invites() now returns a list of current invites.
Added a "new!" to the share link.
2007-12-13 20:26:32 +00:00
Dan Helfman 52c111895a Non-paying users can now invite people to their notebook, but only as viewers.
Paying users can invite them as viewers, collaborators, or owners.
2007-12-11 02:58:31 +00:00
Dan Helfman 5554b1df17 * Started a static upgrade HTML file with rate plans.
* Fixed Invite.sql_update() to have SQL params in proper order.
 * Fixed bug where email addresses containing "-" were considered invalid.
 * Made UI for inviting other people to your notebook.
 * Tweaked the rate plans and added a new one.
2007-12-11 01:15:03 +00:00
Dan Helfman ac3759dcee Ignoring ctrl key being released in IE 6 and 7. 2007-11-30 04:00:31 +00:00
Dan Helfman 2832cebb48 Fixed note state detection of bold/italic in IE 6 and 7. 2007-11-30 01:45:07 +00:00
Dan Helfman 83b3fb5baa Refactored Wiki.toggle_button to work mostly correctly, as the previous revision broke it. 2007-11-30 01:43:06 +00:00
Dan Helfman d9b36fa613 * Fixed note focusing in Safari.
* Fixed note state detection (bold, italic, etc.) in Safari.
2007-11-30 01:00:03 +00:00
Dan Helfman 08950c2ab7 Resizing onload as well since some browsers (e.g. Safari) don't fire onresize on iframes. 2007-11-29 20:32:41 +00:00
Dan Helfman 0152b49475 Refactored the way note summaries are created in the link pulldown window. 2007-11-27 21:28:25 +00:00
Dan Helfman 0238c27111 If the editor being highlighted is already completely on-screen (within the viewport), then there's no need to scroll. 2007-11-09 08:24:40 +00:00
Dan Helfman 9d7c38c396 Revamped positioning of new editors and messages so that they show up
immediately after the editor you're working on instead of at the bottom of the
page. Also, if you undo a note's deletion, it'll show up right back where it
was amonst the notes.
2007-11-09 06:49:26 +00:00
Dan Helfman 89f97dd7a4 Focusing username field on signup and login notes upon loading. 2007-11-07 20:44:30 +00:00
Dan Helfman c05d48de1a Removing "changes" button from notes in the trash because using it causes access errors and JavaScript errors. 2007-11-05 21:36:39 +00:00
Dan Helfman 99c08bc3d1 Finally, when you start a link, the cursor no longer disappears!
Unfortunately, doing this required a total selection hack, and litters the note HTML with empty spans.
2007-10-27 07:54:52 +00:00
Dan Helfman f965eb1978 Read-only editors should not issue title change events. This fix also happens
to prevent links for read-only old revision notes from showing up in the "all
notes" note.
2007-10-26 20:50:58 +00:00
Dan Helfman 84283f524e If you click on a link for a note that's in the trash, you just get a message telling you so, with a button to undelete the note. 2007-10-22 23:17:56 +00:00
Dan Helfman 9ef2eb9954 Update "all notes" note dynamically as notes as created, deleted, undeleted, renamed, etc. 2007-10-22 20:52:04 +00:00
Dan Helfman d44f3b9224 Some tweaks for Opera, even though it's not supported. 2007-10-19 20:55:13 +00:00
Dan Helfman f2e7ed17ca Bug fix for displayed link pulldown destination getting replaced when it
contained an external URL and you changed the title of the link.
2007-10-17 21:22:21 +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 6404e95183 Sigh. I hate the web. 2007-09-27 06:44:29 +00:00
Dan Helfman 1ded442791 In IE, now resizing on iframe init with onresize instead of a somewhat arbitrary setTimeout() delay.
This prevents the resize from breaking and only showing part of the iframe contents.
2007-09-27 05:45:43 +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 49a692f378 Intentionally *not* showing a link pulldown when you start a link and begin
typing. Only showing the pulldown when you end the link (or when you navigate
away and then come back).
2007-09-11 00:10:44 +00:00
Dan Helfman 7634393431 Reverting previous change since it has the unwanted side-effect of making link pulldowns stay open too long. 2007-09-08 00:21:33 +00:00
Dan Helfman 57c456d839 If you started a link and began typing, the link pulldown appeared when you type a space, even if the link isn't done. 2007-09-08 00:12:42 +00:00
Dan Helfman ecf44bdf6e Made code dealing with "all notes" in link pulldown work better (or at all). 2007-09-07 23:03:12 +00:00
Dan Helfman 3955bcb8b9 Wrote a very basic stub editor for testing the Wiki class.
Made test for Editor() constructor slightly more useful.
2007-09-07 21:05:39 +00:00
Dan Helfman b6204179c9 No hide button while in the trash. 2007-09-05 18:57:50 +00:00
Dan Helfman ad7c6aca7f Removing unused insert_after_iframe_id parameter. 2007-09-05 18:53:42 +00:00
Dan Helfman f21610eaf7 * In the trash, now showing "the trash is empty" when you delete/hide/undelete enough notes to make it empty.
* Wiki.create_editor() returns the editors it just created.
 * Wiki.open_editors initialized with startup notes.
2007-09-05 18:49:28 +00:00
Dan Helfman fb511f61ac Reverting previous try/catch "fix" in favor of a simpler solution. 2007-09-04 22:31:32 +00:00
Dan Helfman 47c24a9c1b Not sure why this is necessary, but if querying for formatblock fails, just assume heading is ""; 2007-09-04 22:12:44 +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 2732e262f0 IE now properly shows link pulldown when you end a link. Also, in all
browsers, now silently refusing to close a pulldown upon request when it's
been open less than a quarter second.
2007-08-30 20:17:10 +00:00
Dan Helfman 86a2daf09d Removed unused from_iframe_id argument from several functions. 2007-08-24 20:50:07 +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 d1b8a2201b Hack to prevent Firefox from erasing spaces before links that happen to be at the end of list items.
I hate the web.
2007-08-22 21:09:15 +00:00
Dan Helfman f9b355277c When there's an error, remove all empty editors. This prevents a bug where
empty editor frames stay displayed but never load if there's a network
connectivity problem.
2007-08-21 21:25:59 +00:00
Dan Helfman e6b5054e50 Yet another rewrite of the Firefox link creation code, because the previous
version wouldn't work immediately after a title element. Ugh.

One caveat: When you start a link, the cursor disappears until you start
typing the link's title.
2007-08-21 19:28:07 +00:00
Dan Helfman f6418a1d50 Greatly simplified Firefox link creation code, thereby fixing an intermittent
bug where hitting ctrl-L to start a link after a space would occasionally not
work.
2007-08-20 23:14:16 +00:00
Dan Helfman faaa4b6fdd Got external links working!
* Altered Html_cleaner to allow link targets.
 * Modified Wiki.load_editor(), Wiki.resolve_link(), and Link_pulldown() to
   support external links with "_new" targets.
 * Modified Editor.mouse_clicked() to explicitly open a new window for external links clicked in
   read-write editors, because the browser won't open clicked link by itself unless they're in
   read-only iframes.
 * Removed a duplicate Editor.contents() function.
 * Increased Link_pulldown title field size to 30 characters.
2007-08-16 22:27:58 +00:00
Dan Helfman 3424e6ad12 Some refactoring of the new link resolving and launching code, because, well,
it was just plain broken:

 * Setting link hrefs is no longer done in quite so many places to prevent
   conflicts. Still could be more centralized though.
 * Editor is no longer responsible for tracking note titles. It now issues
   signals for title changes, and Wiki takes care of tracking titles for all
   open editors.
 * A few places in Editor weren't making use of the new link_title()
   convenience function. Now they are.
 * They way Wiki was associating link pulldowns with their links was
   completely broken, because Javascript Arrays can't use DOM objects as keys.
   At least not if you want them to work. Now just setting a "pulldown" member
   on each link node directly.
 * Moved some of the "if you click a link and the target editor is already
   open, just highlight it" logic out of Editor and into Wiki. (Both
   load_note() and resolve_link(), unfortunately.)
 * Made Link_pulldown.title_field_changed just rely on resolve_link() instead
   of doing all the link resolving itself.
2007-08-16 01:29:18 +00:00
Dan Helfman e87eee87c8 Protection for a lack of an href. 2007-08-15 20:46:37 +00:00
Dan Helfman 52fd0d154a * Implemented a link_title() convenience function to get the link title from a link, either from
it's query string "title=" arg or from the actual contained title.
 * Made use of this new function in various places where title-grabbing was being done manually.
 * Made Editor.mouse_clicked() highlight and bail if there's already an open editor with a matching
   title. (Previously, it only did this matching by id.)
 * Wiki.load_editor() now looks to an open Link_pulldown's title field for the note's title, if
   available.
 * Link_pulldown formats "title=" query string args with MochiKit's queryString() to escape spaces
   and such.
 * Updated NOTE_LINK_PATTERN in wiki download view (untested currently).
2007-08-15 00:18:30 +00:00
Dan Helfman cae5d2272d When loading and parsing a note for display in an editor, there's now an optional link argument so
that the link clicked to launch the editor can be updated with the new editor's assigned id.

Also, the link pulldown init code now also examines already open notes when displaying a link title
and contents before asking the server for that information.
2007-08-14 20:34:31 +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 d5345304cc Forgot to actually set the notebook_id within Editor. 2007-08-11 21:34:56 +00:00