Commit graph

4883 commits

Author SHA1 Message Date
jenkins-bot 10702d9fa0 Merge "Fix crash in MWExtensionNode creation mode" 2013-11-22 15:05:42 +00:00
jenkins-bot ecfa59ae4a Merge "Fix icon opacities" 2013-11-22 13:50:06 +00:00
Ed Sanders 6f984ea98a Fix icon opacities
* parameter.svg had no opacity set
* replace.svg had a document opacity of 80% in addition to the normal 75%
* re-rendered parameter.png (syntaxhighlight doesn't have png's yet)

Change-Id: I9c990fefaf4f5a7536b884b92523408146d7b2c7
2013-11-22 13:47:20 +00:00
Roan Kattouw 1b7fa1cf74 Make save dialog ready for async initialization
initialize() is currently called synchronously, but once the CSS
transplantation code is fixed and it goes back to being async, that'll
cause problems.

* Add this.setupDeferred and use it to defer setupCheckboxes() until
  after initialization
* Move code populating the edit summary from ViewPageTarget into
  MWSaveDialog and use .setValue() rather than manipulating the
  TextInputWidget's DOM. Defer this until after init as well
* Move clearing of the diff from ViewPageTarget into MWSaveDialog,
  and don't connect it to the transact event at startup, only when
  we've actually shown a diff
* Remove swapPanel( 'save' ) from ViewPageTarget, instead do this
  on setup in the dialog itself

Bonus:
* Document events
* Get rid of onFooButtonClick handlers in favor of array syntax

Change-Id: Idcdae5e013340f4519db4387bab507e714d47941
2013-11-22 13:17:53 +00:00
jenkins-bot edc1146eaa Merge "ce.MWTransclusionNode: Don't pass token to parsefragment API" 2013-11-22 13:14:42 +00:00
Roan Kattouw 1f8d01b72e Fix crash in MWExtensionNode creation mode
We can't get the directionality from the focused node if there isn't one.

This doesn't add any logic to determine the directionality in creation
mode, filed https://bugzilla.wikimedia.org/show_bug.cgi?id=57421 for that.

Change-Id: I3ff8d48f19c7beef5e24b55712a26d86efa5812a
2013-11-22 13:03:02 +00:00
jenkins-bot 4f573a3ea2 Merge "Recompute auto-numbered reference listKeys when merging internalLists" 2013-11-20 11:33:15 +00:00
jenkins-bot 9093eff614 Merge "Fix reference to insertItem() in MetaList, was renamed to insertMeta()" 2013-11-20 11:31:37 +00:00
Ed Sanders 24a95b102d Add fixUpInsertion to newFromDocumentReplace
In order to do this we have to separate out the removal
operation from NDFR, so it becomes newFromDocumentInsertion
(again, although actually, for the first time). As NFDI is
an insertion we can just run fixUpInsertion on the data
part of it.

In order for the removal operation to be a proper removal
we have to allow metadata removal (the default is to merge it).

Change-Id: I16d575b61b9796e7e889f2c27cfe02b4a40b7639
2013-11-20 11:24:06 +00:00
Roan Kattouw cde3304864 Recompute auto-numbered reference listKeys when merging internalLists
This fixes some of the problems with pasting references.

It's a bit overzealous in that references get renumbered even when
replacing, which is unnecessary but doesn't actually have any
noticeable effect.

Unfortunately, the internal list state depends so much on the converter
having run that we now need to add yet another hack, to set the counter
to the appropriate value.

Change-Id: I3c6514ce600af4f4c037f419554d34b5a5c86a63
2013-11-20 16:50:48 +05:30
Roan Kattouw fd4495e2df Pass the mw.user directly into {{GENDER:}}
Apparently we can do that ^^

Change-Id: I646bc7df29ad2ae605148089a53f1b5b238dca22
2013-11-20 10:51:32 +00:00
jenkins-bot 137ca9d2d6 Merge "Store inner whitespace of the body and compare it on conversion" 2013-11-20 10:45:04 +00:00
Roan Kattouw 59f5ec86ae Clean up uses of 'this' in mw.ViewPageTarget
* Use 'this' instead of 'viewPage' in setupSaveDialog()
* Unwrap unnecessary .each() in restoreEditSection()

Change-Id: I45d0c9714d59e195d0c4413ed3dbe9cbabe45e9d
2013-11-20 05:33:38 +00:00
Timo Tijhof de979ff293 Replace raw oojs-ui files with v0.1.0-pre (0267100ab3)
Change-Id: I792bc0335269976ff29433227b6fa562a1026aeb
2013-11-20 10:27:48 +05:30
Jeff Hall c027af9e12 [Browser test] Expanding test with additional text markup types
Change-Id: I3141993f1527dfdeea66ac2a52ee7c8be384f198
2013-11-19 13:42:07 -08:00
jenkins-bot 457cbfdbe8 Merge "Prevent link-annotating MWReferences" 2013-11-19 11:01:40 +00:00
Ed Sanders f9d7129465 Prevent link-annotating MWReferences
As it isn't sensible wikitext.

Bug: 56250
Change-Id: I7ec03f87ad69645c2877ee7a399950f3967a1362
2013-11-19 10:58:20 +00:00
Timo Tijhof 8f9d184758 doc: Fix existing violations detected by JSDuck 5
* Fix invalid @param name (mixup of type and param name).
* Fix incorrect reliance on inferred name for ve.Range.
  @class uses the below function to guess its name, however
  if @property is encountered, the @class block ends. Thus
  it was indexed as a nameless class.
* Separate @property definitions because combining them like
  that doesn't work (it silently ignored everything after the
  first "from" property).

Also:
* Add some missing @static to static methods in ve.Range.
* Remove a few redundant @method while at it.

Change-Id: I8357c30711a4830af0b68b18350352c457a607f3
2013-11-19 16:10:25 +05:30
jenkins-bot f0982adf3b Merge "doc: Get rid of 'static' property container in jsduck index" 2013-11-19 10:28:23 +00:00
Timo Tijhof 4854d644ee doc: Get rid of 'static' property container in jsduck index
Us grouping the inheritable static properties that way is an
implementation detail that is polluting the index and makes
it harder to refer to individual identifiers.

It also causes problems under JSDuck 5 because that version is
more strict about defining properties (Foo.static.bar) of which
the parent is not defined in the index (Foo.static), we'd have
to add a sea of `@static @property {Object} this.static` all
over the place. Might as well hide this implementation detail
and just consider them static properties (just like we already
do for "private" properties).

Change-Id: Ibf2ebf7752aabc2b75b6ac6fa00e2284a181a600
2013-11-19 10:21:39 +00:00
Jeff Hall 583936f82f [Browser test] Add Review Changes workflow per reviewer comment
Change-Id: I50d0defb3c4f51f317a497d0f805859e961b8f7f
2013-11-19 10:28:26 +01:00
Rob Moen b1694c6535 Add inputFilter function to InputWidget
Change-Id: I6abc5281c70f01c26cfa181c37ed3240bda3eb3e
2013-11-19 13:41:03 +05:30
Rob Moen f496085017 Account for sanitization changes properly in InputWidget
setValue() doesn't do anything if this.value === value, but with
sanitization it's possible for that to be true while the value in
the DOM is out of sync and needs to be changed.

The fix is to check for this.value changing and the DOM changing
separately.

Change-Id: I5f571445f5729f5477902c155a4ee9588b7194a8
2013-11-19 08:06:05 +00:00
Roan Kattouw ef5f3ec054 Combine all the saveError.* track events
Instead just use saveError, and indicate the type of error in the data.

Change-Id: Ibc33b108c1f8f3aa0841ab7f0886a35d99525195
2013-11-19 11:02:52 +05:30
jenkins-bot 93164ba3b7 Merge "Only replace meta-data from dialog if it has changed" 2013-11-18 08:45:30 +00:00
James D. Forrester 74332f7a21 Only replace meta-data from dialog if it has changed
Previously we had a defaultSortKeyChanged value that lied - it was
possible for the value to be changed A -> B -> A by the user mid-
edit. However, the meta dialog assumed that defaultSortKeyChanged
wasn't lying, so blindly changed the meta item to the new value,
causing an unnecessary meta change if the user had done a no-op.

Now the value is renamed to defaultSortKeyTouched, and we actually
detect for content changes, and only change the meta item if a
change is actually needed (be that a removal, a replacement, or an
insertion).

Change-Id: I13022090bd7561a460a1151013e2b7d2a029f4dd
2013-11-18 14:13:15 +05:30
jenkins-bot 8fc7c8d336 Merge "Document the fact that ve.dm.MetaItem#replaceWith takes a plain object" 2013-11-18 08:42:21 +00:00
Roan Kattouw a60bdb8003 Document the fact that ve.dm.MetaItem#replaceWith takes a plain object
Also encourage callers to pass plain objects unless they know what
they're doing; it's almost always wrong to pass in a MetaItem.

Change-Id: I8e8ef8ac7f77ec9f929d797e467b9c9d1140d721
2013-11-18 14:07:05 +05:30
jenkins-bot 31496bac82 Merge "Fix whitespace issue that eluded me in c4b349db4" 2013-11-18 08:36:24 +00:00
Roan Kattouw e5e47afbba Fix whitespace issue that eluded me in c4b349db4
Change-Id: I5159a70929ac52fdc78b873f10853fa4420b992b
2013-11-18 13:58:44 +05:30
jenkins-bot 1fdf5f829c Merge "Guard against undefined listener arrays in EventSequencer" 2013-11-18 08:22:39 +00:00
David Chan c4b349db47 Guard against undefined listener arrays in EventSequencer
Change-Id: Ida3ba2eaf92cdacaf1ca1294905226fda05c0884
2013-11-18 13:47:09 +05:30
jenkins-bot 3b0c87f5e3 Merge "Make generic localization utility for lang code keyed objects" 2013-11-13 22:37:02 +00:00
Trevor Parscal 2d7f93bdb6 Make generic localization utility for lang code keyed objects
Utilize in OO.ui.IconedElement and ve.dm.TemplateSpecModel

Change-Id: I0883a73cb478d4f7509f61aebed2b2957ddb9ce8
2013-11-13 14:26:51 -08:00
cmcmahon 2d6864e19f [browser test] Additional UTF-8 editing test string
Change-Id: Iaf894043462e114e0845fc3016396ab4f51fa21b
2013-11-13 18:46:44 +00:00
Roan Kattouw 51f0add829 Fix reference to insertItem() in MetaList, was renamed to insertMeta()
Change-Id: I9c14568e43987ef5354995a0ea76f93ca8bff921
2013-11-12 18:08:08 -08:00
jenkins-bot 1fe57b4844 Merge "Add OO.ui.ToggleWidget" 2013-11-13 00:58:19 +00:00
jenkins-bot 3af8c56180 Merge "Make inspector tools active when content is inspectable" 2013-11-13 00:57:24 +00:00
jenkins-bot f61227fc3c Merge "Make tools disable correctly" 2013-11-13 00:54:38 +00:00
Trevor Parscal 3dcba7679a Add OO.ui.ToggleWidget
Compact toggle widget with short labels for on/off states.

Change-Id: I582e81126d5f1564302409c1b262e28e4a9505ac
2013-11-12 16:54:35 -08:00
Trevor Parscal 9429f4c225 Make inspector tools active when content is inspectable
This was a regression that occurred when the toolbar was refactored
recently. The correct and previous behavior was if the cursor is in a
location where the context would show an inspector tool, that inspector
tool should be active in the toolbar.

Change-Id: I8ac2b1bd21b843db30e3e9f951702378007e139a
2013-11-13 00:54:28 +00:00
cmcmahon d2165ad8fb [browser test] identifier for Link close element changed
Change-Id: Ia923c775315af9f0cd7017e0b02e621b3d9112b4
2013-11-13 00:23:50 +00:00
Roan Kattouw ec1c57330c Rename remapInteralListIndexes() to correct typo
Change-Id: Iebd2cebfd1a323b40d35ffbe1b908b0b7cb6c826
2013-11-12 14:39:38 -08:00
Trevor Parscal a6dca1bfef Fix docs for ve.dm.Model.getAttributes
Prefix is optional

Change-Id: Idb436ba4755b79dfab07dc8e8266b1716a26b58b
2013-11-12 12:23:34 -08:00
Trevor Parscal 22287cd3d3 Make tools disable correctly
* Respect disabled state when handling clicks
* Style disabled tools in lists correctly

Change-Id: I14dffa3248ffa5d32403c6145381cfabdc2d7ff1
2013-11-12 12:13:56 -08:00
Trevor Parscal 65a2f41268 Cleanup after window refactor
Related to: I82c4fed8bcb3fb5630938c8bc4dd9b2d5f1a8c1d

Change-Id: I4cc280725315fee0c5dd042479d4373cc0cdd0b4
2013-11-12 12:02:28 -08:00
jenkins-bot a2d9925e3a Merge "Use mw.util.getUrl instead of mw.util.wikiGetlink (deprecated)" 2013-11-12 17:36:41 +00:00
Timo Tijhof 98bc6adf1f Use mw.util.getUrl instead of mw.util.wikiGetlink (deprecated)
Change-Id: I72afbbd909ce2394d54f78d465bd8ad245c1694f
2013-11-12 18:34:05 +01:00
jenkins-bot 0f9eb502a2 Merge "Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating" 2013-11-12 12:15:15 +00:00
Timo Tijhof 6feef815e2 ce.MWTransclusionNode: Don't pass token to parsefragment API
As of 46f40dc, we've split the VisualEditor API backend and the
part containing the parsefragment method no longer needs
an edit token.

This gets rid of the warning that started appearing after 46f40dc:

{
 "warnings":{"main":{"*":"Unrecognized parameter: 'token'"}},
 "visualeditor":{"result":"success","content":"<p>foo\n</p>"}
}

Change-Id: I36f79fa8ae48cdbec1b3506953418561ef2ff828
2013-11-11 20:33:26 +01:00
Roan Kattouw df3a61e874 Guard against detached nodes in ve.ce.GeneratedContentNode#doneGenerating
The generation promise can get resolved (e.g. AJAX request can complete)
after the node has been detached. In that case accessing this.model.doc
will fail, so check for this in doneGenerating().

Also attempt to abort the pending promise on teardown.

Bug: 56649
Change-Id: Ia55f1c2c8dc3a3619c0b50795e50fcae4bc6471f
2013-11-09 17:42:38 -08:00
Ed Sanders 26726ee31d Fix edit source switch in Firefox
Previously was failing for two reasons:
1. FF requires the form to be attached before submitting
2. options.watch failed because of FF's annoying Object.prototype.watch

Bug: 56767
Change-Id: I7b3d349f057f5b87f823ce788b4143f817af5303
2013-11-09 17:39:53 -08:00
jenkins-bot fdd4246237 Merge "Window refactor" 2013-11-09 03:08:54 +00:00
Moriel Schottlender a7c3e9689a Force LTR direction in MWSyntaxHighlightDialog
Syntax highlight editor shouldn't rely on GUI language directionality
but always allow for LTR text editing.

Bug: 56780
Change-Id: Iae7f9eee20ffb9a003830503865458918f5e1df3
2013-11-08 13:00:39 -08:00
Trevor Parscal 4192cbc4d5 Window refactor
Changes:

* Cleanup the window API to use more consistent and intuitive methods - we
  now use initialize/setup/teardown instead of
  initialize/onSetup/onOpen/onClose as methods which are overridden, and
  use open/close methods to control the window
* Change events around to have opening/open and closing/close events which
  act as before/after points during the opening/closing process
* Make WindowSet and Context respond to windows being opened, rather than
  opening them directly
* Fix a LinkInspector creation mode bug where the initial text doesn't get
  reset
* Move inspector, a VisualEditor concept, back to VE
* Cleanup naming of SurfaceDialog, SurfaceToolbar, etc. to use shorter
  names, they were given Surface* names when the generic ones were also in
  VE, but now the generic ones are in OO, so they can return to their
  original names

Change-Id: I82c4fed8bcb3fb5630938c8bc4dd9b2d5f1a8c1d
2013-11-08 12:33:25 -08:00
jenkins-bot d64801c86a Merge "MWExtensionInspector input direction based on content" 2013-11-08 19:29:58 +00:00
Moriel Schottlender 53f4b2f1ea MWExtensionInspector input direction based on content
In general, the direction of the MWExtensionInspector textarea
should be dependent on the directionality of the node it is editing.

The only exceptions are <hiero> and <math> that need to have their
textarea LTR always; these two inspectors' directionality definition
is overridden in their onOpen() method.

Bug: 56779
Change-Id: Iac5c1c3bf2c61b9fa36c9588c1734c91ca4305c4
2013-11-08 11:27:02 -08:00
jenkins-bot c0ee282b16 Merge "Add shortcut commands for underline & sub/superscript." 2013-11-08 19:02:50 +00:00
jenkins-bot efac869499 Merge "Add <ref> tags to wikitext detection regex" 2013-11-08 18:56:24 +00:00
cmcmahon f8d0cbded5 [browser test] one more variable string no longer hard coded
Change-Id: Ifa4917442707d0c83799ea7e018ae1c4aa7bb4c6
2013-11-08 09:19:30 -07:00
cmcmahon 53cb5a3ffd [browser test] edit string no longer hard coded
Change-Id: I8d9e9ae2cafa18a9a680abdca8c4224ef10a08b6
2013-11-08 07:35:38 -07:00
Ed Sanders 20063995b2 Add shortcut commands for underline & sub/superscript.
Underline is particularly important as CE will apply underline
formatting automatically when you press Ctrl+U but the
SurfaceObserver will not notice it, leading to inconsistency
between the view and the model.

For sub/superscript I've used the Google Docs key mappings as these
appear to have the fewest conflicts with existing browser shortcuts
and there isn't much consistency between desktop clients anyway
(Word and Open/LibreOffice use completely different shortcuts).

Bonus: reordered command lists to be consistent with UI layout.
Change-Id: I92998e42f9bcfb932d44e8f483811efd538e5981
2013-11-08 13:55:08 +00:00
Roan Kattouw 6f650d9a61 Add <ref> tags to wikitext detection regex
Bug: 56755
Change-Id: Ib7279401601147420441e77e4796b94fe91ac956
2013-11-07 17:47:33 -08:00
jenkins-bot d2da45ec36 Merge "Add a whole bunch of new ve.track() events for instrumenting loading and saving" 2013-11-07 23:57:57 +00:00
Roan Kattouw d6a00d689e Add a whole bunch of new ve.track() events for instrumenting loading and saving
Renamed events:
* performance.domLoad --> performance.system.domLoad
* performance.domSave --> performance.system.domSave

New events:
* performance.system.activation: total load time
* performance.system.domDiff: timing of paction=diff; like .domSave
* performance.system.domSerialize: timing of paction=serialize; like .domSave
* behavior.lastTransactionTillSaveDialogOpen: time from last transaction
  until user opened save dialog
* behavior.saveDialogOpenTillSave: time from save dialog opening to user
  clicking save
* behavior.saveDialogOpenTillReview: time from save dialog opening to user
  clicking review (skipped when a cached diff is shown)
* behavior.saveDialogClose: when user closes save dialog; duration is time
* performance.user.saveComplete: time from user clicking save to successful
  save completion; 'retries' indicates # of badtoken retries
* performance.user.saveError.*: time from user clicking save to failure;
  'retries' indicates # of badtoken retries
** performance.user.saveError.abusefilter
** performance.user.saveError.badtoken: token was bad and we prompted the user
** performance.user.saveError.captcha
** performance.user.saveError.editconflict
** performance.user.saveError.empty
** performance.user.saveError.spamblacklist
** performance.user.saveError.unknown
* performance.user.reviewComplete: time from user clicking review to diff showing
* performance.user.reviewError: time from user clicking review to diff failure
  since dialog was opened

Change-Id: I9815fa637d34c766c163e181d2f9527d3f32a7c3
2013-11-07 15:42:52 -08:00
jenkins-bot d3ea3835fd Merge "Fix image resize handles update on surface change" 2013-11-07 21:09:32 +00:00
jenkins-bot f93531a6e0 Merge "Restore selection when editor is refocused" 2013-11-07 20:38:53 +00:00
Roan Kattouw 500570b4ca Restore selection when editor is refocused
When the editor is focused, the selection goes back to the start of
the document. This was remedied in the .focus() method, but not in
response to native focus events, so when external code blurred then
refocused the editor, the selection would move to the top.

This broke section editing on wikis where ULS is installed: the
selection would be initialized at the start of the section, but then
ULS would load and blur the documentNode (by focusing the pasteTarget)
and then focus it again, so the selection would move to the top.

Instead of restoring the selection only in .focus(), restore it in
response to focus events on the documentNode. When this is done,
saving and restoring the scrollTop is no longer needed.

Bug: 56651
Change-Id: I14700174ee092f9b208215d31a7d1871078a89bf
2013-11-07 12:09:02 -08:00
cmcmahon ca2a7ce38f [browser test] input string no longer hard coded
Change-Id: I361b3ea025e405d1fc5a2e12c3c85d177147b90d
2013-11-06 17:08:42 -07:00
jenkins-bot edb769814c Merge "[browser test] add a test to edit with utf8 strings" 2013-11-06 17:21:05 +00:00
Ed Sanders 2e0d642a11 Make sure all links have target=_blank in the save dialog
Anything that uses getParsedMessage could contain a link.

Change-Id: I523edd935c4989e5929fca8891651c2287af973a
2013-11-05 21:23:02 +00:00
cmcmahon 3754bc77e4 [browser test] add a test to edit with utf8 strings
Change-Id: I88e475ee98bc8f696c1a1d0ad108c12a48fe7eee
2013-11-05 07:45:06 -07:00
Roan Kattouw 3ed7bb16a6 Send the old category and language types to Parsoid for back compat
Change-Id: If67d822e1a22bc24aa0c816952081dc614f6e686
2013-11-04 19:41:19 -08:00
Moriel Schottlender 97d3f5143f Fix image resize handles update on surface change
The resizing handles under ResizableNode are created in the location of the image
but if the page is edited and the image moves relative to the document, the handles
remained where the image was previously and not where its updated location is at.

This code fixes that bug by changing the CE event listening to the model's 'transact'
instead of 'history', and clears the cached offset when a 'transact' event happens.

Change-Id: Id0e4296dd89b24839ba68a534ca77d73c23b7434
2013-11-04 18:04:53 -08:00
jenkins-bot 64c4f47cc8 Merge "Work around crazy Chrome bug" 2013-11-04 19:12:01 +00:00
Trevor Parscal af8d034ca8 Work around crazy Chrome bug
When the ListToolGroup in the toolbar (the "More" section) is scrolled
down such that the top tool is partly obscured, and you hover over the
bottom half of the "More" button, the top tool displays a hover effect
and using the scroll wheel will scroll the list rather than the page.

This is because the list has a box-shadow that's 1em tall, and the
height of the "More" button is 2em. And in Chrome, pointer events
"work" even in the box-shadow area. Roan reported the Chrome bug at
https://code.google.com/p/chromium/issues/detail?id=314291

This change works around the bug by making the tools in the list
inline-block instead of block; for some reason the bug only affects
block elements.

Change-Id: I4ea3f41c91d0ff5d5cc150fe8acc3427f0ab5f3a
2013-11-04 09:47:16 -08:00
jenkins-bot e309271289 Merge "Fix appearance and messages on demo page" 2013-11-04 15:19:21 +00:00
Ed Sanders 3a98e84932 Fix appearance and messages on demo page
Some 've-ui-toolbar-bar' classes hadn't been converted to OO.ui so the
toolbar had no border. Also removed a useless rule in mw.ViewPageTarget.css.

SA platform didn't override OO.ui.msg to use the ve.msg so no messages
were getting through.

Change-Id: Ieb5bc3c98d1c435ec194b201b517a688cd9b02b9
2013-11-04 15:11:04 +00:00
jenkins-bot 154726deea Merge "Fix metadata issues in newFromDocumentReplace" 2013-11-04 14:55:37 +00:00
Roan Kattouw 64e5016423 Fix metadata issues in newFromDocumentReplace
* Our metadata insertions now need to be the same length as the data
  insertion, not one more, so:
** Remove the +1 in the listMetadata splice
** Shorten the metadata variable by dropping the merging of the
   metadata right before and right after the internal list; it was
   also including the metadata right after the internal list twice
*** We still need to deal with this in some way though, left a TODO
** Fix the metadata insertion test for these changes
* Fix null reference keys in the test data; we made all references
  keyed a while ago, but this test data was never updated for that
** The remapping of reference data doesn't remap auto/N keys yet,
   left a FIXME for that

Change-Id: I8ef4e6ee7c1808574d81d0b83294848afd400cd7
2013-11-04 14:37:26 +00:00
Zeljko Filipin efa741baea [browser test] Updated Ruby gems
Change-Id: I8c298efe8dd1abbb42b5c42ee0b8075a0aad9acf
2013-11-04 15:36:03 +01:00
jenkins-bot d9ee8f20aa Merge "Add OO.ui.Element.getDir" 2013-11-04 07:59:46 +00:00
Trevor Parscal 4c3a49dfc0 Add OO.ui.Element.getDir
Stop using this.$.frame.dir - a horrible hack made of duct tape
and bubble gum.

Or perhaps rather, masking tape and post-it-notes...

Change-Id: I53690e4485974b95edbdd255c0b96c2f639c5261
2013-11-03 23:55:53 -08:00
jenkins-bot 0ca1c5d52e Merge "Rename this.$ to this.$element, and this.$$ to this.$" 2013-11-04 07:06:59 +00:00
Trevor Parscal db9f941fa6 Rename this.$ to this.$element, and this.$$ to this.$
Objectives:
* Rename this.$ to this.$element
* Rename this.$$ to this.$
* Get rid of the need to use this.frame.$$
* Rename OO.ui.Element.get$$ to OO.ui.Element.getJQuery

Changes: (using Sublime Text regex patterns)
* Replace "get$$" with "getJQuery"
* Replace "\.(\$)([^\$a-zA-Z])" with ".$element$2"
* Replace "\.(\$\$)" with ".$"
* Replace "'$$'" with "'$'"
* Set this.$ to null in constructor of OO.ui.Window
* Set this.$ to this.frame.$ in initialize method of OO.ui.Window
* Replace "\.(frame.\$)([^\$a-zA-Z])" with ".\$$2"

Bonus:
* Use this.$() in a bunch of places where $() was erroneously used

Change-Id: If3d870124ab8d10f8223532cda95c2b2b075db94
2013-11-03 23:03:49 -08:00
Trevor Parscal e6f6decb12 Followup 6ec34a3dee: prevent focus loss on tool clicks
Change-Id: I7b756013ac234ad80937466a5881a1f92d8723d1
2013-11-02 00:04:21 +00:00
jenkins-bot 1ca353a34d Merge "Expand highlighting support for syntaxhighlight module" 2013-11-01 21:24:06 +00:00
Roan Kattouw 5b3ed2bc56 Provide a default implementation for OO.ui.msg
Just a simple message map in English. Also document localizaton-related
things in OO.ui

Change-Id: Ie74762238ca66747776610157c838dd75a864463
2013-11-01 13:36:05 -07:00
Roan Kattouw 2ea9437e32 Get rid of OO.ui.extendObject and OO.ui.indexOf
Replaced uses of extendObject with $.extend . Replaced the one use of
OO.ui.indexOf with Array.prototype.indexOf because that's what
everything else was already using.

Change-Id: I63f40989057b8065ec977efafbf68d6e22c8e679
2013-10-31 15:09:44 -07:00
jenkins-bot ac1a386c95 Merge "dm.MWTemplateSpecModel: Resolve translations through the TemplateData API" 2013-10-31 21:42:43 +00:00
jenkins-bot 7c6f534a74 Merge "Add reset method to toolbar" 2013-10-31 19:58:36 +00:00
Trevor Parscal b35383c299 Add reset method to toolbar
Make toolbar resetting code reusable.

Change-Id: I4e796309fc721622c313f6ec5121b4d011c25c51
2013-10-31 12:54:08 -07:00
Trevor Parscal 341138b16b Add 'classes' and '$content' config options to OO.ui.Element
Makes it easier to setup elements in a single call.

Change-Id: I6aba6ca121972b984401d845d0e7253049c490e4
2013-10-31 12:53:40 -07:00
jenkins-bot c00d8d6bb1 Merge "Fix: getDataFromDom tests should check for body or head" 2013-10-31 18:27:44 +00:00
jenkins-bot 78efb8a767 Merge "Fix: files missing from demo and test runner" 2013-10-31 18:26:30 +00:00
jenkins-bot 1cb87f73d4 Merge "Button tool to switch to edit source with changes" 2013-10-31 17:49:45 +00:00
Ed Sanders 7b2cacbe57 Button tool to switch to edit source with changes
By serialising the current DOM, and injecting it into a form we can
end up in the source editor with our VE changes converted.

Bug: 50687
Change-Id: Iafcc02a737d9c6c3a59dce1caff130d47ca25650
2013-10-31 10:46:51 -07:00
jenkins-bot 519a35dfe4 Merge "mw.Platform: Only add split lang codes with a dash" 2013-10-31 17:24:34 +00:00
jenkins-bot 316197ac4d Merge "dm.ModelRegistry: Fix documentation for #addType" 2013-10-31 17:23:19 +00:00
Zeljko Filipin abc5b9920d [browser test] Removed visual_editor from file names
No longer needed, since the files are now in VisualEditor repository.

Change-Id: Id677c2630ff5a1ae2d49f62058d0d4fdebeaf381
2013-10-31 16:22:08 +00:00