Archived
1
0
Commit Graph

228 Commits

Author SHA1 Message Date
Dan Helfman
4817f286bf Make invisible iframe have zero height as well, so it doesn't add blank space at the bottom of the page. 2009-01-23 14:49:03 -08:00
Dan Helfman
bdfc5d3740 Removing FIXME comment that was recently fixed. 2009-01-23 14:38:29 -08:00
Dan Helfman
8cd63ee661 Only adding black focused border to iframes, not static divs. 2009-01-23 14:36:12 -08:00
Dan Helfman
403ce9d305 Fixed cursor positioning at the end of an iframe's text to work in more edge cases. 2009-01-23 14:25:24 -08:00
Dan Helfman
5e7cd17e82 Fix for range start/end not being propagated to iframe. 2009-01-23 12:12:38 -08:00
Dan Helfman
a90a2a842e Got highlight working again with the new shared iframes. 2009-01-22 22:36:24 -08:00
Dan Helfman
51a568c39c Several fixes for shared iframe releasing / focus interaction. 2009-01-22 22:33:32 -08:00
Dan Helfman
59f9134a8c Now blurring the focused editor when hiding/deleting any other editor.
This prevents a visual bug in which the iframe below a shutdown() editor didn't move to its new position.
2009-01-22 16:54:56 -08:00
Dan Helfman
5ce7de4f1d Opening existing notes from note links now works correctly. 2009-01-22 15:41:00 -08:00
Dan Helfman
623dbbdb3a Wiki.js no longer references Editor.iframe directly. 2009-01-22 15:30:17 -08:00
Dan Helfman
efc452dbfb Fix iframe blindUp() call so it doesn't break getSelection() within the iframe. 2009-01-22 14:53:46 -08:00
Dan Helfman
6438d34e97 Removing debugging print. 2009-01-22 14:27:01 -08:00
Dan Helfman
1658d43d4c Now when an editor is focused, the toolbar buttons update accordingly. 2009-01-22 14:23:07 -08:00
Dan Helfman
c97613490e Fixing some assumptions in Wiki.js that there are multiple iframes. 2009-01-22 13:30:00 -08:00
Dan Helfman
72c485a799 Not doing a blindUp() on an editor's iframe unless it actually has one. 2009-01-22 13:19:40 -08:00
Dan Helfman
56c7f8ea11 Fixing vertical height of new (empty) frames. 2009-01-22 13:16:25 -08:00
Dan Helfman
46d28d0ea0 Better window resizing behavior. 2009-01-22 13:05:18 -08:00
Dan Helfman
f5727d6383 An editor's iframe and div now blindUp in unision when the note is hidden/shutdown. 2009-01-22 12:15:32 -08:00
Dan Helfman
58827c4ebd More work on the reusable iframe. Now visually appears seamless. 2009-01-22 12:08:20 -08:00
Dan Helfman
9fa3cf2001 Resizing new iframe on load. 2009-01-21 13:43:45 -08:00
Dan Helfman
4e4a8ecd20 Removing duplicate focusing code. 2009-01-21 13:40:21 -08:00
Dan Helfman
10e2742ec5 Removing debugging print. 2009-01-21 13:36:14 -08:00
Dan Helfman
a05081166a Refactored Editor to use a reusable iframe for all notes. Also got cursor positioning working in Firefox.
Still needs more cleanup/bugfixing.
2009-01-21 13:33:11 -08:00
Dan Helfman
2e3501f5fc Adding fix for stupid IE 6 HTTPS warning message. 2009-01-19 22:47:43 -08:00
Dan Helfman
6df7b734e7 Fix for another IE 6 error. 2009-01-15 19:14:07 -08:00
Dan Helfman
d212797f7d Fix for IE6 error. 2009-01-15 19:06:05 -08:00
Dan Helfman
4a8e98372d Refactored some of the click position code. 2009-01-15 14:33:54 -08:00
Dan Helfman
404956deec In IE, you can now click on a static note div, and after it's converted into an iframe, the text cursor will be in the right position! 2009-01-15 01:36:32 -08:00
Dan Helfman
cb3d262630 Text cursor in IE is now correctly positioned at the end of the iframe contents when a new iframe is opened. 2009-01-14 16:37:02 -08:00
Dan Helfman
4871d96f84 Fixing the padding within iframes within various browsers. 2009-01-13 16:12:34 -08:00
Dan Helfman
76e35cbbb9 Changing the way editor resizing works in Webkit (Chrome/Safari) so that it actually works properly. 2009-01-13 14:14:03 -08:00
Dan Helfman
2516f30625 IE really doesn't like those extra commas. 2009-01-13 13:52:26 -08:00
Dan Helfman
5ada27ac74 Fixed reverting a note to an old revision. 2009-01-13 13:38:35 -08:00
Dan Helfman
f4511a8493 Fixed indentation. 2009-01-13 12:35:12 -08:00
Dan Helfman
ab3e04538c Fixed editor_by_id() function to work correctly when a revision is given and a static div editor is returned. 2009-01-13 12:20:36 -08:00
Dan Helfman
53bff5980d Removed some iframe CSS that wasn't actually used in iframes, such as CSS for forms, buttons, etc. 2009-01-12 17:06:44 -08:00
Dan Helfman
5eb1aff6a2 Prevent double-connection of note controls to click signal handlers. 2009-01-12 16:44:28 -08:00
Dan Helfman
9a0650e946 Fix for spurious exception. 2009-01-12 16:37:03 -08:00
Dan Helfman
4e31959dfd Fixing note highlighting when opening an old revision of a note. 2009-01-12 16:24:52 -08:00
Dan Helfman
a6540e6da3 Ignore mouse hover events for static div notes, thereby preventing link pulldown from opening. 2009-01-12 16:00:24 -08:00
Dan Helfman
59be7cc79d Fixed more focusing issues. 2009-01-12 14:49:45 -08:00
Dan Helfman
d6611c1029 Fix for several note focusing problems. Also converted more of Wiki.js not to rely on an editor having an iframe. 2009-01-12 14:19:32 -08:00
Dan Helfman
b25cc97308 Fix for broken focusing. 2009-01-09 17:15:07 -08:00
Dan Helfman
6e1908a66a Renamed finish_init() to connect_handlers() and made it work with create_div(). Made read-only editors stay divs, never iframes.
Added an OPERA constant to indicate when running in Opera.
2009-01-09 16:43:33 -08:00
Dan Helfman
36e1843f66 Setting a slight delay on the resize so that it works properly. 2009-01-09 14:35:47 -08:00
Dan Helfman
f36d6b9500 Creating a new iframe (where this is no static div) now works again. 2009-01-09 13:17:33 -08:00
Dan Helfman
4f5825c862 Editor.summarize() now supports static note divs. 2009-01-09 13:12:03 -08:00
Dan Helfman
28b2dbe469 Editor.shutdown() now supports static div notes, not just iframes. 2009-01-09 13:10:33 -08:00
Dan Helfman
9dfe196dc7 Editor.highlight() now supports static div notes, not just iframes. 2009-01-09 13:05:42 -08:00
Dan Helfman
7442f46de2 The transition from a static note div to a design-mode-enabled iframe now appears visually seamless. 2009-01-09 12:27:00 -08:00
Dan Helfman
d5b0351bb4 Rewrote Editor.empty() to rely on scrapeText() again. 2009-01-08 12:42:00 -08:00
Dan Helfman
c40a180a5d Now properly resizing a note if you cut/paste text in it with the mouse. Only works in FF3. 2009-01-07 17:14:22 -08:00
Dan Helfman
2d728b584d Fixing Editor.empty() and getting rid of now unnecessary iframe onreload (which had the unwanted side effect of scrolling the page to the top for every iframe). 2009-01-07 15:14:58 -08:00
Dan Helfman
f0da74b8ed Made use of a new normalize_title() function that's responsible for returning "untitled note" as appropriate. 2009-01-07 14:15:22 -08:00
Dan Helfman
dbc095030c Making new notes start off in title mode. Also making the cursor of a new iframe start at the end of the contents. 2009-01-07 13:51:02 -08:00
Dan Helfman
19a24d9d78 Fixed Editor.dirty() and Editor.mark_clean() to deal with divs in addition to iframes. 2009-01-07 12:57:51 -08:00
Dan Helfman
b0202e785b More padding at the top of each frame/div. 2009-01-07 12:43:16 -08:00
Dan Helfman
55362cd4b1 Now properly stripping off / adding "static_note_contents" span when switching between iframe/div. 2009-01-07 12:39:48 -08:00
Dan Helfman
b2eaa5a168 Don't blur an iframe as soon as the focus leaves, but rather when another editor is focused. This makes the toolbar work again. 2009-01-06 16:28:01 -08:00
Dan Helfman
087723ebdd Improved iframe initialization code. 2009-01-06 16:20:04 -08:00
Dan Helfman
e043cf1e0c Pulled in and merged most recent revision with iframes-on-demand changes. 2009-01-03 15:56:54 -08:00
Dan Helfman
c07794377d Work towards iframes-on-demand. 2009-01-03 15:52:12 -08:00
Dan Helfman
f68d571e68 Indication of current font now works in WebKit (Safari/Chrome). 2008-12-22 19:25:09 -08:00
Dan Helfman
f385ebaa9c In the font pulldown, now showing the current font with a check mark. 2008-12-15 18:10:38 -08:00
Dan Helfman
0b2b0ec69e Fixed a rare Chrome/Safari bug in which pressing backspace sometimes made the text cursor vanish. 2008-12-03 14:50:53 -08:00
Dan Helfman
cfdd666c5f Fixed a Chrome/Safari bug in which ending a link didn't always work.
Specifically, in a list of two elements in which each element was a link,
clicking right after the first element and then pressing ctrl-L to end the
link didn't work as expected. Now it does.
2008-12-03 13:10:18 -08:00
Dan Helfman
db1435c7c1 Began work to make only the currently focused note an iframe, while all other notes are static divs. 2008-12-02 11:42:57 -08:00
Dan Helfman
4c3d374062 Fixes for IE 6. 2008-11-18 16:16:52 -08:00
Dan Helfman
4775d6df98 Removed the "changes" tab from your own notes in the discussion forums, since it didn't work there anyway due to a redirect. 2008-11-14 22:52:54 -08:00
Dan Helfman
d5efdf2665 Fixed a bug in IE in which clicking a link sometimes caused the browser window to scroll down and then immediately back up. 2008-11-11 11:40:26 -08:00
Dan Helfman
d62b885e46 Bug fix for when you load a notebook and it has several notes, the page scrolls to part-way down the page after all the iframes load. 2008-10-30 14:57:27 -07:00
Dan Helfman
21a05befe0 More forum-specific stuff. 2008-10-27 16:23:27 -07:00
Dan Helfman
872d636ad4 Note resizing (growing and shrinking) now works as expected in Safari/Chrome. Shrinking didn't work before this fix. 2008-10-07 16:39:49 -07:00
Dan Helfman
5944d1f20d Fixed bug in Safari/Chrome in which hiding an empty note caused it to get saved and end up in the "recent updates". 2008-10-06 15:48:32 -07:00
Dan Helfman
b19f488d90 Now also removing WebKit-generated <font> tags that result from titling/untitling note text. 2008-10-06 15:35:38 -07:00
Dan Helfman
317a79456c Underline and strikethrough now work in Chrome/Safari. Accomplished this by rewriting WebKit-generated HTML in realtime. 2008-10-06 15:09:13 -07:00
Dan Helfman
e2996030ac WebKit-specific hack to make the horizontal line under the title show up correctly. 2008-10-03 00:11:40 -07:00
Dan Helfman
41dade9f28 Safari/Chrome notes now start out in title mode (again). 2008-10-02 23:59:39 -07:00
Dan Helfman
a0b189695c You can now create and end links from within Safari/Chrome.
This involve changing the non-IE portion of Editor.insert_link() to use a different sort of title placeholder hack.
Also, as part of this commit, Editor now determines browser type once instead of for every Editor created.
2008-10-02 23:08:56 -07:00
Dan Helfman
c37e35b042 Fixed a rare bug in which undeleting a note via "undo" sometimes does not show the undeleted note even if the undelete is successful. 2008-08-13 13:34:30 -07:00
Dan Helfman
5ef02e5c0c Fixed a bug in Firefox 3 in which disabling title text did not work. Fixed a bug in Firefox 2 and 3 so enter consistently inserts the same tag. 2008-08-11 20:37:20 -07:00
Dan Helfman
17b49b404c Increased speed of note hiding animations. 2008-07-30 20:38:20 -07:00
Dan Helfman
953bc5360d On second thought, making scrolling speed even faster (0.25 seconds in duration). 2008-07-29 14:52:23 -07:00
Dan Helfman
3a4030fee5 When scrolling to and then highlighting a note, do so serially instead of in parallel.
Also made speed of scrolling to a note or message slightly faster.
2008-07-29 14:48:54 -07:00
Dan Helfman
6ac620beb0 Fixed a bug in which clicking a note title suggestion from within the link info title field sometimes didn't update the link properly.
This was due to a race condition between the link info pulldown's
onblur/onchange handler and the suggestion onclick handler, both of which
tried to update the link, title, and summary at about the same time.
2008-07-07 15:38:16 -07:00
Dan Helfman
6163ee0f63 Added suggest-as-you-type feature to link pulldown's title field. 2008-06-29 20:32:13 -07:00
Dan Helfman
522f8b9330 Implemented support for embedded images within wiki notes. Also added hover support to open link pulldowns. 2008-06-13 15:55:19 -07:00
d22c8c0bb4 Fixed bug where form onsubmit event binding was only being done on the last form in a note. 2008-06-03 16:12:13 -07:00
cf10cf8c82 Refactored some of the client-side form-handling code to cut down on
special-case hacks.
2008-06-02 14:16:35 -07:00
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
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