Inez Korczynski
f27be7c238
Better implementation of history panel
2011-12-13 00:56:29 +00:00
Trevor Parscal
f379eac294
Moved toolbar floating code to sandbox.js - using a wrapper instead of a spacer to avoid resize events causing scroll events which cause a nasty loop
2011-12-12 23:41:15 +00:00
Inez Korczynski
74d194d703
Extend content of example article: "Direct manipulation interface"
2011-12-12 23:04:37 +00:00
Inez Korczynski
5f3b4cedb9
Fix typo
2011-12-12 22:55:37 +00:00
Inez Korczynski
135adbf443
Make purgeHistory method work in SurfaceModel with new data structure
2011-12-12 22:51:32 +00:00
Inez Korczynski
e592a243b6
Pretty dirty, but working implementation of history panel for VisualEditor
2011-12-12 22:50:57 +00:00
Trevor Parscal
db8f9e675c
Fixed scroll jumping issue in Chrome (at least)
2011-12-12 22:33:49 +00:00
Gabriel Wicke
0ad08b9ae3
Add a README file pointing to the wiki documentation.
2011-12-12 22:30:11 +00:00
Trevor Parscal
7b3ae79451
Added help view with keyboard shortcut info
2011-12-12 22:09:15 +00:00
Gabriel Wicke
a8fa9433c4
Convert quote handling (italic/bold) to a core extension operating on the
...
token stream. This is the first token transformation exercising the
TokenTransformer class as its dispatcher. Template expansions, wiki link
formatting, tag sanitation and extensions should be able to use the same
dispatcher by registering for specific token types.
The parser performance is very slightly improved as the token stream is only
traversed once.
2011-12-12 20:53:14 +00:00
Trevor Parscal
3d7cd9c59c
Made es an explicit global object
2011-12-12 15:31:04 +00:00
Gabriel Wicke
752b0990b2
Refactor parserTests somewhat into a class-like structure, and wire up the
...
TokenTransformer.
2011-12-12 14:03:54 +00:00
Gabriel Wicke
d616f07a79
Don't re-build the wiki tokenizer for each test. This speeds up the full
...
parserTests.js run slightly from 7-8 minutes to about 14 seconds ;)
A few very minor tweaks to the grammar are also thrown into this commit.
2011-12-12 10:47:42 +00:00
Gabriel Wicke
89c5e0cafb
Follow-up to r105859: Add missing new.
2011-12-12 10:09:13 +00:00
Gabriel Wicke
9ebce5839a
Further development of the TokenTransformer framework.
2011-12-12 10:01:47 +00:00
Inez Korczynski
62a589e185
Fix bug: cursor is not visible when you click outside of surface and then click back in the surface at the same offset where cursor was before
2011-12-10 10:33:00 +00:00
Erik Moeller
0759c2879c
Followup r105634; use the label "Edit link" for link inspector
2011-12-10 08:09:42 +00:00
Erik Moeller
03c0532fc7
Swap order of indent/outdent in the toolbar consistent with common
...
word processor implementations.
2011-12-10 07:17:44 +00:00
Inez Korczynski
224fc98449
Temporary fix for insert method in TransactionProcessor
2011-12-10 02:19:21 +00:00
Inez Korczynski
37d3b7ceac
Add calls to 'breakpoint' method in ListButtonTool
2011-12-10 00:06:37 +00:00
Inez Korczynski
4e39b41727
Make ctrl+y execute redo
2011-12-10 00:02:47 +00:00
Inez Korczynski
364a1a94b9
Simple implementation of undo/redo functionality that works.
2011-12-09 23:52:41 +00:00
Trevor Parscal
36159e7597
Fixed inspector positioning (above/below)
2011-12-09 23:33:16 +00:00
Trevor Parscal
dabb992d50
Don't allow control+K to open the inspector unless there's a selection length of > 0
2011-12-09 23:23:43 +00:00
Trevor Parscal
080dfcbc4e
Moved return false to inside the condition for escape key
2011-12-09 23:15:27 +00:00
Trevor Parscal
eb0a82a8af
Added escape keyboard shortcut to close inspector
2011-12-09 23:13:46 +00:00
Trevor Parscal
87fab9b7c6
Made accept button disabled when no change has been made
2011-12-09 23:11:49 +00:00
Trevor Parscal
a698c5dada
Added accept button
...
Made close button not save
2011-12-09 23:04:55 +00:00
Trevor Parscal
3076bf7e95
Fixed clear button - has to clear the input or it will get re-applied
2011-12-09 22:00:29 +00:00
Trevor Parscal
a48d2a5787
* Added shortcut for links (ctrl/cmd + K)
...
* Added title attributes for tools
2011-12-09 21:16:42 +00:00
Trevor Parscal
cb7eb1f033
Fix focus/select bug in link inspector
2011-12-09 21:04:50 +00:00
Trevor Parscal
f09e6e7303
Update child leaf nodes on attribute change, not the parent
2011-12-09 21:00:56 +00:00
Trevor Parscal
ec2bf0b1ce
Update the preview panes when loading different documents
2011-12-09 20:56:49 +00:00
Trevor Parscal
77429444f7
Fixed typo - close not hide
2011-12-09 20:48:38 +00:00
Trevor Parscal
3edaaf390d
Moved refocusing on surface view input up to es.Inspector
2011-12-09 20:46:12 +00:00
Trevor Parscal
ef35fc2be2
Reset location input between opening the link inspector
2011-12-09 20:44:41 +00:00
Trevor Parscal
4b764f7524
Auto-focus on location input when opening the link inspector, auto focus on surface view input when closing
2011-12-09 20:41:40 +00:00
Trevor Parscal
49041942cc
Added support for loading multiple documents in the demo/sandbox
2011-12-09 20:40:26 +00:00
Inez Korczynski
31cd3281ca
Fix onMouseDown event handler for IE8 (still double and triple click does not work)
2011-12-09 20:29:37 +00:00
Trevor Parscal
c416185a0b
Made drop down format menu close when clicked
2011-12-09 19:07:06 +00:00
Trevor Parscal
c1ca3af44b
Moved $form to es.Inspector and added submit -> close handler
2011-12-09 19:01:05 +00:00
Inez Korczynski
4a31a6b265
Fix bug in enumarete method of ListView
2011-12-09 02:07:23 +00:00
Trevor Parscal
2e0a0e0243
Fixed logic for popping up inspector only with selection
2011-12-09 02:00:45 +00:00
Trevor Parscal
f26bec23c9
Removed done button
2011-12-09 01:56:19 +00:00
Trevor Parscal
4ea117d7a6
Added es.Inspector and es.LinkInspector - and a whole bunch of other changes (some are hacks) to get a link inspector working nicely
2011-12-09 01:28:44 +00:00
Inez Korczynski
81b4fc561d
Get rid of console.log
2011-12-08 23:52:35 +00:00
Inez Korczynski
22c461a55b
Implemented indent and outdent functionality.
2011-12-08 23:45:07 +00:00
Inez Korczynski
47e76f21d1
Fix bug in enumerate method in case of mixed list (number and bullet for example)
2011-12-08 23:43:54 +00:00
Inez Korczynski
bc4fc1249c
Fix bug in ListButtilTool - cursor position was adjusted when it shouldn't be
2011-12-08 22:16:05 +00:00
Inez Korczynski
f55bd4b77c
Emit cursor event after listing on unlisting leaf nodes
2011-12-08 22:03:27 +00:00
Gabriel Wicke
80d5067813
Add a TokenTransformer dispatcher class. This class provides subscriptions by
...
token type, and supports asynchronous token expansion (for example for async
template expansion). This code is not yet tested or used. The interface for
token insertion from transformation functions will be expanded as needed.
2011-12-08 14:37:31 +00:00
Gabriel Wicke
c2b69e2486
Clean up newline handling. Emit a NEWLINE token for each
...
non-{comment,pre,nowiki} newline.
2011-12-08 14:34:18 +00:00
Gabriel Wicke
abc2254110
A bit of comment clean-up and wrapping of tree building into try/catch block
...
to actually count failures.
2011-12-08 11:40:59 +00:00
Gabriel Wicke
92fdf99384
Further renaming, this time from pegParser to pegTokenizer.
2011-12-08 10:59:44 +00:00
Gabriel Wicke
76bc477038
Rename html5TokenEmitter to HTML5TreeBuilder, and the contained Tokenizer to
...
TreeBuilder.
2011-12-08 10:37:18 +00:00
Gabriel Wicke
19a1f0850f
Tidy up the grammar a bit.
2011-12-08 10:33:23 +00:00
Inez Korczynski
5a060d42ec
Update selection after unlisting list items
2011-12-08 06:40:36 +00:00
Inez Korczynski
7c7c230595
Get unlisting and listing to work
2011-12-08 04:18:15 +00:00
Inez Korczynski
ed44f13aa0
Revert r105509 and r105507 - taken approach is not gonna work
2011-12-08 03:14:10 +00:00
Inez Korczynski
8fece3a241
Temporary fix for transact method to accept array of transactions.
2011-12-08 01:17:08 +00:00
Inez Korczynski
7da531b59e
Pass array of transactions to transact method if all those transactions are part of one "interaction"
2011-12-08 01:09:52 +00:00
Trevor Parscal
fceda78696
Made preview panes look better
2011-12-08 00:34:05 +00:00
Trevor Parscal
70d5beec71
Changed which elements had user-select: none so that people can copy the wikitext generated by the editor
2011-12-07 23:37:21 +00:00
Trevor Parscal
f9fd3b1db2
Fixed wikitext serailizer - extra newlines should be after the list not the list item
2011-12-07 23:35:11 +00:00
Trevor Parscal
f42915ac0f
Added vertical margin in calculation of menu position
2011-12-07 23:25:13 +00:00
Inez Korczynski
44f8d155b1
When wraping any leaf node in list item make sure to convert it to paragraph first.
2011-12-07 23:16:29 +00:00
Trevor Parscal
8a5ff02cea
Fixed headings, lists and list items - listening to the model now, as we should have been
2011-12-07 23:13:57 +00:00
Inez Korczynski
f226380f36
Add 'term' and 'defintion' to regex (one that is responsible for deleting all listitem styles from an item) in ListItemView.setClasses method.
2011-12-07 23:12:33 +00:00
Inez Korczynski
91f9572e4b
Do not redraw selection if nodes were not added.
2011-12-07 23:05:21 +00:00
Trevor Parscal
22efd982aa
Added extra newline after wikitext list
2011-12-07 23:00:00 +00:00
Inez Korczynski
d06c7efe0b
Refactor class ListButtonTool. Method list now works.
2011-12-07 22:57:17 +00:00
Trevor Parscal
8ef6e4b24e
More adjustments to the style of the history panel
2011-12-07 22:52:20 +00:00
Trevor Parscal
04ecb6796a
Fixed the layout of the sandbox and demo
2011-12-07 22:50:55 +00:00
Trevor Parscal
4e985a111c
Added highlighting for the current index
2011-12-07 22:43:53 +00:00
Trevor Parscal
19c7e874d6
Shortened the names of operations
2011-12-07 22:37:41 +00:00
Neil Kandalgaonkar
c0a02cd6c3
undo almost working, still anomalies in selects (particularly first)
2011-12-07 22:28:07 +00:00
Trevor Parscal
fdeb042a91
Back, by popular demand, the great side-by-side preview!
2011-12-07 21:17:34 +00:00
Inez Korczynski
45d821b2ec
Small cleanup to IndentationButtonTool class
2011-12-07 20:06:04 +00:00
Trevor Parscal
8505b3b566
* Simplified context menu
...
* Added typeOnly option to getIndexOfAnnotation
* Fixed overly-strict checking for annotations in toolbar
2011-12-07 19:16:40 +00:00
Trevor Parscal
51e68abf08
JSHint fixes
2011-12-07 18:29:02 +00:00
Gabriel Wicke
3742d70abd
Add some documentation to syntax flags
2011-12-07 15:54:55 +00:00
Gabriel Wicke
545ca1809f
Convert template argument production to generic inline with syntactic stop.
...
Fix a bug in generic inline production. Nested multi-line templates are now
parsed okayish.
2011-12-07 15:39:39 +00:00
Gabriel Wicke
902db40a1f
Process template arguments into an object.
2011-12-07 14:46:07 +00:00
Gabriel Wicke
51a40e4dbc
Follow-up to r105423: Fix off-by-one bug.
2011-12-07 11:56:12 +00:00
Gabriel Wicke
49c286a67b
Fix a bug in doQuotes (bitten by surprising JS sort() behavior), and improve
...
tag-only-line handling. 180 parser tests now passing.
2011-12-07 11:51:24 +00:00
Trevor Parscal
0d78a63da0
Revert of all the modifications I made to es.TransactionProcessor - things were getting exponentially worse with each commit - I think I need some sleep
2011-12-07 02:22:06 +00:00
Trevor Parscal
893d337c48
Fixed issue with inserting data that starts with closing elements
2011-12-07 02:13:43 +00:00
Trevor Parscal
38bc605f66
Fixed scope issue when inserting at structural offsets
2011-12-07 01:38:10 +00:00
Inez Korczynski
b5d822ec1d
Minor fix: incorrect refactoring
2011-12-07 01:13:08 +00:00
Inez Korczynski
0ec2775621
Make ListView.enumerate method clear ListItemView.$icon when item is not 'number'.
2011-12-07 01:12:04 +00:00
Trevor Parscal
45634a8208
Added support for inserting tab and newline characters
2011-12-07 01:10:25 +00:00
Inez Korczynski
8424681948
Refactored code for "listing"
2011-12-07 01:02:36 +00:00
Trevor Parscal
f0c20d7a51
Fixed cut - now cut copy and paste work
2011-12-07 00:51:26 +00:00
Trevor Parscal
909b3674be
Update node when it's attributes are changed
2011-12-07 00:06:30 +00:00
Trevor Parscal
b1f54c5ae5
Refactored annotation of content - now there's an annotate method in surface view
2011-12-06 23:48:47 +00:00
Trevor Parscal
ee1caca875
Only act on selection change if it changed
2011-12-06 22:45:38 +00:00
Trevor Parscal
68a0026f56
Disabled console logging
2011-12-06 22:14:48 +00:00
Trevor Parscal
c863ab63e3
Adjusted the demo document a bit - disabled tables for now
2011-12-06 22:13:52 +00:00
Trevor Parscal
e61e66856c
Fixed issue in transaction processor's insert method - no need for a special case for structural offsets anymore
2011-12-06 22:04:18 +00:00
Gabriel Wicke
418a5067c6
Parse attributes in tables using generic attribute production. Some table
...
tests still do not pass as the MW table output reorders attributes ;)
2011-12-06 22:03:21 +00:00
Trevor Parscal
7ed901d74c
Bypass processing if there's no annotations
2011-12-06 21:28:21 +00:00
Gabriel Wicke
3d06707152
Slightly speed up inline tag productions using guards and grouping; Fix list
...
processing function.
2011-12-06 18:35:05 +00:00
Gabriel Wicke
ea8f226fd5
Remove ext and references special cases, now subsumed by generic XML tag
...
productions. Document issue around special tokenizer mode for other extension
tags.
2011-12-06 16:44:27 +00:00
Gabriel Wicke
e7de089d5b
Decode urls and html entities, 163 tests now passing.
2011-12-06 13:17:14 +00:00
Gabriel Wicke
a72a9e55a3
Don't match internal links with url as target. 161 passing.
2011-12-06 12:26:57 +00:00
Gabriel Wicke
2b5cc67bf5
Further tweaks to headings. 157 tests now passing.
2011-12-06 11:59:41 +00:00
Gabriel Wicke
f4d123886e
Convert heading rules to single rule that figures out the level. This saves a
...
lot of backtracking and inline break complexity.
2011-12-06 11:06:05 +00:00
Neil Kandalgaonkar
dbe4890ed6
Simplified transaction model, introduced isPartial for some deletes
2011-12-06 01:52:38 +00:00
Neil Kandalgaonkar
e3fc95f41a
Revert r104884 "no longer track selections in states. Also makes the 'combine' parameter obsolete"
...
This reverts git-svn commit e4e3468605c97bd5e611fdf8fc80c04e034e4eb4.
This reverts svn commit r104884
2011-12-06 01:52:34 +00:00
Inez Korczynski
8b1c0ff4ee
Fix for turning single elements in tables cells into listItems
2011-12-06 00:49:00 +00:00
Inez Korczynski
959963cf6e
Prototype of code that wraps nodes as listItems (inside a list)
2011-12-06 00:42:15 +00:00
Trevor Parscal
1b89cbb79d
Moved the menu of a drop down tool to be inside the drop down tool itself
2011-12-06 00:10:30 +00:00
Trevor Parscal
2810f79605
inArray returns an index, -1 is failure not 0 or a falsey value
2011-12-05 22:55:39 +00:00
Inez Korczynski
a22eadee54
Fix toolbar for IE8 and IE9. Fix mouse button detection for IE8 and IE9.
2011-12-05 22:01:06 +00:00
Trevor Parscal
accc605e8a
Fixed annotation tool - data is used generically outside, shouldn't have changed that
2011-12-05 21:39:54 +00:00
Inez Korczynski
8ec3fb5b81
Bunch of fixes for IE8
2011-12-05 21:37:38 +00:00
Trevor Parscal
7cf6990af3
Added comments to code
2011-12-05 21:10:19 +00:00
Inez Korczynski
5be5d276a4
Removed empty lines
2011-12-05 20:46:53 +00:00
Trevor Parscal
fc3015b260
Moved es.Tool to base classes
2011-12-05 20:42:45 +00:00
Trevor Parscal
8d5c83d87b
Prevent inserting unless there was an effective input, such as text being typed - this is done by checking the length of the range of the selection - if it's non-zero then there wasn't any input (because selecting text in the editor fill the input and selects it)
2011-12-05 20:40:35 +00:00
Inez Korczynski
0938f24c5b
Use getContentText method to get text of selection
2011-12-05 20:32:05 +00:00
Inez Korczynski
09c0557929
Fix for getContentText method. Do not treat content offsets with annotations as elements.
2011-12-05 20:10:50 +00:00
Trevor Parscal
2d7d4866bc
Fixed misnamed method, and off by one issue when getting content data from a document
2011-12-05 20:08:49 +00:00
Gabriel Wicke
33e19f7275
Recognize block-level elements independent of case; Ignore toc and section
...
edit links in tests. 148 parser tests passing.
2011-12-05 20:03:24 +00:00
Trevor Parscal
07af0cab63
* Moved getContent and getText from leaf nodes to document model nodes
...
* Renamed getContent to getContentData
* Renamed getText to getContentText
* Added getElementData
2011-12-05 19:41:04 +00:00
Trevor Parscal
4bcc31846b
Fixed font size in overlays when embedding in mediawiki
2011-12-05 18:42:58 +00:00
Trevor Parscal
02c88fcddf
Prevent cancel link from changing url
2011-12-05 18:38:12 +00:00
Trevor Parscal
f9bb9cf586
100char line breaks
2011-12-05 18:31:39 +00:00
Gabriel Wicke
9ed9cb31bd
Fix template argument handling somewhat.
2011-12-05 17:58:11 +00:00
Gabriel Wicke
1760210d13
Fixes to tables, headings and misc smaller stuff. Tracked down an issue caused
...
by improperly caching of production results, which interfered with the
flag-dependent inline_break production.
2011-12-04 19:23:24 +00:00
Inez Korczynski
ba5abf6bbd
Set: svn:eol-style => native
2011-12-04 02:59:53 +00:00
Inez Korczynski
f361648059
Added indentation tool (indent, outdent)
2011-12-04 02:54:33 +00:00
Inez Korczynski
78451cb00a
Added partial support for copying functionality
2011-12-03 01:30:44 +00:00
Inez Korczynski
e683199853
Avoid using global variables
2011-12-03 00:53:37 +00:00
Inez Korczynski
1f3604a959
Optimization for toolbarView. Count data for all toolbars (currently two) once, and do it not more often than 50ms.
2011-12-02 23:01:21 +00:00
Trevor Parscal
babf3eb9fb
Made heading labels less verbose
2011-12-02 22:21:58 +00:00
Trevor Parscal
667e145706
* Fixed empty drop down not being the right size
...
* Added previews for formatting menu
2011-12-02 22:20:26 +00:00
Trevor Parscal
f463a3a6bb
Added a history icon
2011-12-02 21:54:27 +00:00
Trevor Parscal
a555f307f0
Removed unused icon
2011-12-02 21:48:07 +00:00
Trevor Parscal
ea1d57146a
Updated icons
2011-12-02 21:46:48 +00:00
Trevor Parscal
12ead70876
Added visible breaks to to toolbar groups
2011-12-02 21:31:49 +00:00
Trevor Parscal
3d678ea3bd
Integrated menuView into format drop down tool
2011-12-02 21:25:19 +00:00
Inez Korczynski
01180e4f8f
Rename function and comment it
2011-12-02 20:41:43 +00:00
Inez Korczynski
a9a53a00a8
Initiali implementation of number and bullet buttons for lists.
2011-12-02 06:43:26 +00:00
Inez Korczynski
31585463ed
get rid of console.logs
2011-12-02 01:37:23 +00:00
Inez Korczynski
21d78b3c3e
getAnnotationsFromRange should return list of annotations even if there are elment offset in between of them
2011-12-02 01:36:12 +00:00
Inez Korczynski
0ef949eed3
Small refactoring of updateState in FormatDropdownTool
2011-12-02 01:22:51 +00:00
Trevor Parscal
8c93a66308
Fixed menu positioning
2011-12-02 00:35:48 +00:00
Trevor Parscal
172c4815b3
Fixed example panel visibility bug
2011-12-02 00:32:20 +00:00
Trevor Parscal
8a58fb5189
Added es.MenuView
2011-12-02 00:30:50 +00:00