witten
/
luminotes
Archived
1
0
Fork 0
Commit Graph

178 Commits

Author SHA1 Message Date
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 a6182dffeb Autoselect title field text in link pulldowns when clicked. 2007-08-16 20:17:14 +00:00
Dan Helfman 8f8f0a2262 In Link_pulldown's constructor, if the note has no destination note id set,
try loading the note from the server by title.
2007-08-16 20:11:01 +00:00
Dan Helfman a849935b1d Bugfix that prevented undo from working. 2007-08-16 19:55:11 +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 8e819b7c01 Work-around for bug in IE where positions of iframe contents are not only
relative to the iframe itself, but also relative to how far the user has
scrolled.
2007-08-15 20:35:02 +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 429dc44370 Fixed a bug where Link_pulldown.display_preview() didn't correctly support either a DOM node or a string for its contents argument.
Also no strip()ing the scraped contents text so removing the note title works better.
2007-08-14 20:56:13 +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 ec9cd1066c No longer moving any iframes when displaying search results that are already
open, as that causes the iframe contents to revert to as they were when the
iframe was loaded.
2007-08-11 21:49:33 +00:00
Dan Helfman ea64cc97a2 If you undelete a note via undo, now it's indicated in the options pulldown that it's a startup note. 2007-08-10 19:19:47 +00:00
Dan Helfman 3de7d59d64 No longer hiding any editors when you click a link in a note in the middle of the page. 2007-08-10 19:07:00 +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 0ac518e395 * controller.Users.current() now returns an http_url if one is configured in config/Common.py
* changed controller.Users and controller.Root constructor arguments to support this.
 * Updated INSTALL document accordingly.
 * Client now will prepend this new http_url variable to the logout link.
2007-08-02 18:52:20 +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 069532b58c Reverting to previous revision. Didn't mean to checkin these changes yet, as they're not complete. 2007-07-27 00:33:32 +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 ccc1cc2f2d Fix for bug introduced by revisions list that preventing opening of new editors by clicking links. 2007-07-26 23:02:24 +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 120c29954c More changes to search results displaying:
* Now, already open editors that happen to be in the search results are forcibly moved to be with the result of the search results.
2007-07-23 23:42:53 +00:00
Dan Helfman 94f75f23a7 Search results display changes:
* Search results are now appended to the open notes, instead of replacing them.
 * Already-open notes that also happen to be in the search results are closed so that they're not shown twice.
2007-07-23 23:19:15 +00:00
Dan Helfman 8e6b152483 Factored out options pulldown into a separate "sub-class" of Pulldown. 2007-07-20 22:41:20 +00:00
Dan Helfman 5dca7e972e Changing note link key to ctrl-L and unordered list to ctrl-U. 2007-07-18 20:28:42 +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 64bf5e34a1 Renamed placeholder title "Limited Medium" to "Luminotes". 2007-07-16 21:03:39 +00:00
Dan Helfman 02cfca5322 Renaming repository to new name: luminotes 2007-07-16 20:22:38 +00:00