witten
/
luminotes
Archived
1
0
Fork 0
Commit Graph

239 Commits

Author SHA1 Message Date
Dan Helfman 3f2c51e338 Fixed mouse click handling brokenness introduced by 03b6a15e86e1. Also Beginning to phase out special-case hack for form submission. 2008-05-30 17:10:57 -07:00
Dan Helfman fe83423845 Removing special case / hack for share this notebook radio buttons, as it didn't appear to be necessary. 2008-05-30 15:49:45 -07:00
Dan Helfman 02a3544590 Search result now return notes from multiple notebooks.
- 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()
2008-05-19 15:16:25 -07:00
Dan Helfman f418027f54 Editor.normalize_html() now handles an empty/null html parameter. 2008-05-18 01:22:00 -07:00
Dan Helfman 99c32fa120 Improved the detection of whether an existing note has been altered.
* Using the browser's tweaked version of the initial HTML, instead of the HTML that we tell the browser to use.
 * Improved normalize_html() function to handle more cases.
 * Added start_dirty flag to Editor() constructor and made use of it for completely new notes.
2008-05-18 01:07:15 -07:00
Dan Helfman 1722d02317 Improved the detection of whether an existing note has been altered.
There is still at least one case (IE only) where this detection fails and a
note unaltered by the user gets resaved to the server. This is because IE
alters relative links within design mode documents.
2008-05-17 23:17:37 -07:00
Dan Helfman 501ec7b37b Fixes a problem where Editor.dirty() returned true spuriously in Firefox, even when nothing was changed.
The bug arose because Firefox shows br tags as "<br>" even when they are
initially "<br />". This meant that the initial and current html didn't match
up, so dirty() returned true even though nothing had changed.

In IE, there's a similar problem because IE likes to uppercase all tags. That
will be fixed in a subsequent commit.
2008-05-17 16:16:27 -07:00
Dan Helfman 2a542999c5 * In development mode, disable session filter for static files. This may
prevent some session deadlock errors.
 * Fixed some bugs with the new auto-resizing toolbar:
   * In IE 6/7, when you click on a formatting button such as italics, it
     doesn't visibly depress, because update_toolbar() is causing it to
     unpress until you start typing the italic text. Fixed by only calling
     update_toolbar() in focused_editor() if focused_editor is null.
   * When downing or upping a toolbar button, now calling
     resize_toolbar_button() unconditionally.
2008-05-13 04:02:31 +00:00
Dan Helfman 18982dc129 Implemented basic user account settings. Now you can change your email
address.
2008-05-08 03:05:35 +00:00
Dan Helfman 97c373561d * Added replace_contents() to model.Note to set the contents without updating the revision or anything else.
* 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
2008-05-03 04:29:23 +00:00
Dan Helfman 03f015f99a * Propsetting a bunch of svn:ignores.
* Added a bunch of thumbnail-related methods to controller.Files.
 * Modified Files.download() method to redirect to image preview if
   requested.
 * Implemented image preview to popup full image in a separate window.
 * Added empty stubs for relevant unit tests. Still to-do.
 * Added new dependency on python-imaging package (PIL).
 * Updated file info popup to include clickable thumbnail.
2008-04-01 21:54:43 +00:00
Dan Helfman 34bc8cb849 Don't resize if there's no document. 2008-03-12 00:40:02 +00:00
Dan Helfman c0cf5892be No longer popping up a link info box when clicking on a note link. 2008-03-11 00:48:37 +00:00
Dan Helfman 2b0a9af3e3 Client code now only calls save_note() on the server when necessary, and
takes startup flag into account.

Fixed unit test for database cache.
2008-03-07 23:14:39 +00:00
Dan Helfman 192d043e29 JavaScript code now tracking editor dirty state and not calling save_note() when editor is clean. 2008-03-05 02:56:58 +00:00
Dan Helfman ebf123d052 Now you can close an upload / file link pulldown and end a file link. 2008-02-19 20:25:35 +00:00
Dan Helfman 731dc52623 More work on file uploading. Unit tests need to be fixed. 2008-02-18 20:08:07 +00:00
Dan Helfman e56503903b Factored out file upload methods from Notebooks to new Files controller.
Changed file link insertion code to reuse existing link creation code.
2008-02-01 19:17:10 +00:00
Dan Helfman 0cf2b5bda7 Initial work on UI and controller for file uploading:
* new toolbar button for attaching a file
 * button opens new Upload_pulldown() for uploading a file
 * began controller.Notebooks.upload_file() to process the upload
2008-01-31 21:52:32 +00:00
Dan Helfman 6bdacd272e * Replaced a workaround for a Firefox DesignMode bug. The bug causes a jumping
text cursor. The previous workaround involved appending <span> tags and had
   other negative side-effects. The new workaround involves removing extra <br>
   tags.
2008-01-28 20:45:36 +00:00
Dan Helfman 329397a681 Converted "share this notebook" access choice radio buttons to use HTML <label> tag. 2008-01-26 00:37:38 +00:00
Dan Helfman 4fd44700e1 Now tracking conversions for subscriptions.
Notes in the trash can no longer be edited. They must be undeleted first.
2008-01-22 20:29:29 +00:00
Dan Helfman 179f7ea4d1 Fixed bug where revoke buttons would be created with the same invite_id due to
a closure using a variable within a for-loop.
2008-01-06 06:01:30 +00:00
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
Dan Helfman 7a26017a28 Update the toolbar state everytime the mouse is clicked in case the cursor has moved. 2007-08-10 19:32:12 +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 b58f5cb1a1 * tools/updatedb.py now takes an optional navigation note id parameter, so the titleless navigation note can be updated.
* both tools/initdb.py and tools/updatedb.py set link ids appropriately, rather than just leaving them all as "new"
 * both tools/initdb.py and tools/updatedb.py set certain links to use https if configured as such in config/Common.py
 * tools/initdb.py no longer creates a default "witten" user
 * Added target="_top" to links that should replace the top-level window, and updated client code to ignore links with targets.
 * Removed form_base_url from Editor.js, as https URL is now tacked on by initdb.py/updatedb.py instead.
2007-08-02 04:01:11 +00:00
Dan Helfman 251fcf1996 Added support for a form base URL, in case you want forms to be submitted to, for instance, an SSL server. 2007-08-01 21:13:24 +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 35459270be Now ignoring link clicks that are with the right or middle mouse buttons. 2007-07-27 00:32:42 +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 c05e143269 When scrolling the window, scroll to the top of the note controls instead of just the top of the iframe. 2007-07-23 23:49:57 +00:00
Dan Helfman bcd1dcbcd9 Increasingly brittle, but this fixes the following bug:
* hit bold, type some text, hit space, start a link. this will not actually start a link and will just insert a space
2007-07-23 22:57:48 +00:00
Dan Helfman a6fff8da31 Yet more selection shenanigans for starting a link in Firefox. Hopefully less buggy now. 2007-07-21 20:14:48 +00:00
Dan Helfman 0e968d0b60 Fix for negative indexing. 2007-07-19 02:50:58 +00:00
Dan Helfman 8df8036255 Ending a link in IE no longer moves the cursor to the end of the line. 2007-07-18 21:51:59 +00:00
Dan Helfman de9e3a55e3 Fixing Firefox link creation when in the middle of a line. 2007-07-18 21:29:47 +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