Gabriel Wicke
0fe062fbe1
JSHint cleanups and parser function argument handling improvements
...
Parser functions which only accept positional arguments now return both the
key and value of arguments. Complete attributes (key and value) for templates
and the like from parser functions are not yet supported though.
Change-Id: I3f81bb35acd27186222ce6d5217e820042527c01
2012-04-03 18:10:48 +02:00
Trevor Parscal
519d225d2f
Cleanup of white space, missing semi-colons, line breaks, etc.
...
Change-Id: Ifa96a9f70fa8d149a4c403521aaa88a3e0546ef0
2012-04-02 15:28:26 -07:00
Rob Moen
d8de26d7e9
On selection, update selection in the model. Fixes selection.clone() error.
...
Change-Id: Ibd5cf0398002e5fbb2c50549e4a7043ba8fd00a7
2012-04-02 14:19:53 -07:00
Rob Moen
c1300ba949
Fixed surfaceView undefined error
...
Change-Id: Iba3ae54b4e508afbfa132e0f0b2b0b237e685395
2012-04-02 13:49:45 -07:00
GWicke
b7db83e09a
Merge "Magic links and behavior switch tokenization by Ori Livneh"
2012-04-02 16:43:13 +00:00
Gabriel Wicke
f662690d02
Shorten data-mw-rt to data-mw and clean up whitelist
...
Instead of a proliferation of data-mw-* attributes, it should be easier to
stash all private / non-semantic round-trip information in a JSON object
stored in data-mw.
Change-Id: Id200a6a8789fa152f29ea530e5a24b6ee7b4b285
2012-04-02 18:12:49 +02:00
Gabriel Wicke
5248fd31e8
Magic links and behavior switch tokenization by Ori Livneh
...
Commit first patch by Ori, lets 288 parser tests pass. Yay!
Change-Id: Iac8c3d1ad1984900350b20f7e725c40618a1e8ba
2012-04-02 17:31:34 +02:00
Trevor Parscal
19f3d5c107
Added ve.Surface, a wrapper around an editor instance
...
* This high level surface object is responsible for creating & managing editor instances
* Revised Sandbox demo to invoke in this way.
Change-Id: I4043779af9a2ab964deaf26079a992e82ebeef27
2012-03-29 15:55:33 -07:00
Trevor Parscal
c44ef066b9
Replaced es with ce for Sandbox and main demo
...
* Configured VisualEditorSandbox to use es
* Reconfigured the ce demo to share the sandbox module
* Removed es demo
* Renamed ce demo to ve (es is broken anyways)
Patchset 2: squashed in https://gerrit.wikimedia.org/r/3953
Change-Id: If8d13bf7011616d222be78899b23186859d5ed70
2012-03-29 15:43:59 -07:00
Catrope
7a726b0278
Add tree synchronization for replace
...
To handle replace operations that are not themselves consistent (these
are common, for instance when replacing an opening element in one place,
then replacing the closing element somewhere else), we process
subsequent replace operations inside the first one until things are
balanced again, then issue a single rebuild for the whole thing.
Change-Id: Ide4613f046fabfeeef383138c39e350b1b710033
2012-03-26 02:51:30 -07:00
Catrope
826437950c
adding clearState function for tools and using clearState if no selection exists
...
Originally committed in SVN as r114418 by Christian, missed the git
conversion
Change-Id: I56e91c170670519fa2b482a4b7f30cdcbc8ff163
2012-03-22 14:22:15 -07:00
Roan Kattouw
3b193a1e57
Fully revert r114142, was previously reverted in Collection only
2012-03-21 20:45:24 +00:00
Sam Reed
1bab092ead
Fix many more occured typos
2012-03-19 14:54:43 +00:00
Rob Moen
e5df79229d
make clear button tool work with annotate method in ce surface
2012-03-16 22:20:16 +00:00
Inez Korczynski
299c77db84
Make LinkInspector works (using annotate method in SurfaceView)
2012-03-16 22:16:15 +00:00
Inez Korczynski
b2f4b48a9a
Use on and off insteaf of bind and unbind.
2012-03-16 22:01:09 +00:00
Rob Moen
277e239796
CE surface has no hidden input, removed input focus
2012-03-16 22:00:42 +00:00
Inez Korczynski
6ef8ac182a
No more endless looping! And fix getSelectionRect to return document relative coordiantes instead of viewport relative.
2012-03-16 21:52:17 +00:00
Rob Moen
cde7a3bf7e
adapt LinkInspector to use surfaceObserver for selection
2012-03-16 20:18:26 +00:00
Rob Moen
93376d68eb
add surfaceObserver on select methods to ui toolbar and surfaceView for responding to select event. tools now updating to selected node annotations. revise getSelectionRect to return actual start & end pos. context icon properly showing on range selection
2012-03-15 22:06:40 +00:00
Gabriel Wicke
5ef2074251
Enable support for block-level wiki constructs in template arguments. This
...
gets a bit closer to supporting table fragments passed through template
arguments. Next, we'll need a way to indicate start-of-line position to
enable sol block-levels in template parameters.
Example:
{|
{{#if: true|{{!}}Table cell|}}
|}
2012-03-15 11:43:49 +00:00
Roan Kattouw
05333b1f3d
Put the invert state / method (commit or rollback) in the TransactionProcessor object and no longer pass it as a parameter to each operation. This makes it easier for operations to execute other operations.
2012-03-14 21:02:36 +00:00
Roan Kattouw
bf5ea06db5
Factor out process() into nextOperation() and executeOperation()
2012-03-14 21:02:34 +00:00
Roan Kattouw
2c43a34f74
Rewrite the rebuild action to take two ranges rather than a node and some data.
2012-03-14 21:02:31 +00:00
Roan Kattouw
37a59016e8
Break out pushAction() into separate functions for each action. This will allow me to change the rebuild action to take totally different parameters.
2012-03-14 21:02:29 +00:00
Roan Kattouw
bd9a86dd55
Remove the offset adjustment feature from DocumentSynchronizer. It gets in the way when I try to use this class in TransactionProcessor.
2012-03-14 21:02:27 +00:00
Roan Kattouw
1e17285afb
Move computation of missing offset from pushAction() to synchronize(), and only compute offsets for actions that require them. This also fixes an issue where offsets computed by pushAction() would be adjusted incorrectly by pushAction().
2012-03-14 21:02:26 +00:00
Roan Kattouw
7dd2b8b725
Make DocumentSynchronizer clear the queue after it's done with it
2012-03-14 21:02:24 +00:00
Gabriel Wicke
7e22020398
Convert syntactical break flags for templates from counters to the stack
...
variant to fix the precedence for {{!}} (break on these inside table content,
but not in template options within tables).
2012-03-14 16:30:59 +00:00
Gabriel Wicke
77a61dd687
Improve support for {{!}}, and don't produce a pre for indented tables.
2012-03-14 10:58:11 +00:00
Gabriel Wicke
835914b2de
Support {{=}}.
2012-03-14 09:07:01 +00:00
Inez Korczynski
f87709d6bb
Use <h[1-6]> tags for rendering headings (instead of divs)
2012-03-14 00:51:04 +00:00
Rob Moen
d77c0b91dc
fix dropdown tool to use selection from ce surfaceView
2012-03-14 00:29:41 +00:00
Inez Korczynski
294d474c54
Replace CursorObserver and ContentObserver with SurfaceObserver
2012-03-14 00:04:24 +00:00
christian
d174809b54
replacing showCursorAt calls with correct showCursor method
2012-03-13 18:12:57 +00:00
Gabriel Wicke
2195c31abf
Move link types to data-mw-rt, and support some more template tokenization
...
edge cases. For example, the PHP parser treats | foo | = bar | as | foo = bar |,
believe it or not ;)
2012-03-13 12:32:31 +00:00
christian
010c97acc8
removing min height attribute to fix IE bug
2012-03-12 23:31:08 +00:00
christian
ba437744b3
preventing native contenteditable resizing tools
2012-03-12 23:06:47 +00:00
Rob Moen
350a53fd93
rework context icon positioning for CE surface using new getSelectionRect method
2012-03-12 22:14:43 +00:00
Rob Moen
22a351e855
small fix: getSelectionRange was breaking the surface layer, changed to saved state member
2012-03-12 22:04:29 +00:00
Rob Moen
65170e13df
port over select event listener, and updateSelection methods for setting and removing context icon, add getSelectionRect method for context icon position
2012-03-12 21:50:22 +00:00
christian
56b9068d03
switch to getSelectionRange and fixing IME native menu
2012-03-12 20:39:08 +00:00
Gabriel Wicke
4cd8b302ac
Improved template tokenization. The parser can now template-expand
...
[[:en:Barack Obama]] without exceeding 1.7GB of memory (which is the node
limit).
2012-03-12 17:31:45 +00:00
Gabriel Wicke
3c5fe2523c
Tolerate more newlines and spaces in templates, and support templates and
...
comments in urls.
2012-03-12 14:31:06 +00:00
Gabriel Wicke
ae4ab7a39c
Refactor syntactic stops into an object and add a stack variant for option
...
values.
2012-03-12 13:08:43 +00:00
Alexandre Emsenhuber
99a31bacbc
svn:eol-style native
2012-03-11 18:38:27 +00:00
Roan Kattouw
29f416937e
Fix some usages of splice.apply in the data model to use
...
ve.batchedSplice(). Added FIXME comments for occurrences outside of DM
2012-03-10 00:31:28 +00:00
Inez Korczynski
9a8f7059fc
Make ContentObserver pass information about content when emiting change event.
2012-03-09 23:15:23 +00:00
Trevor Parscal
02592b3ec0
More cleanup
2012-03-09 22:55:49 +00:00
Trevor Parscal
60c9c484aa
More cleanup (jshint complaints)
2012-03-09 22:51:00 +00:00