Commit graph

648 commits

Author SHA1 Message Date
jenkins-bot 2ab168efe7 Merge "MWMediaSearchWidget: Use json/jsonp for local/foreign api respectively" 2014-07-30 17:13:42 +00:00
James D. Forrester 1fcc9fa035 Update VE core submodule to master (61dea59)
New changes:
76bbf3b [BREAKING CHANGE] Fix camel-casing of countNonInternalElements

Local changes:
Use renamed countNonInternalElements function

Change-Id: Ib5f86ea5cfeb5e577f61349ed4bbb231ea155638
2014-07-29 17:15:35 -07:00
Moriel Schottlender 2411a174e4 MWMediaSearchWidget: Use json/jsonp for local/foreign api respectively
In the media search widget use 'json' for remote searches and
'jsonp' for local searches.

Bug: 64822
Bug: 67749
Change-Id: Iccc9adb1261602f4bc7426f1caf5aed87aad51e5
2014-07-29 23:55:36 +00:00
jenkins-bot 3783d6e328 Merge "Remove unused CSS classes" 2014-07-29 23:30:22 +00:00
Moriel Schottlender 50dae0ab16 Focus the caption surface on initialization
Whenever the edit mode is active, focus the caption surface. This
is also true for cases where the dialog starts in the 'insert' mode
and then switches to 'edit'.

Bug: 68806
Change-Id: I60b862dc5738a65a6bb31eb32184c35cc108b232
2014-07-29 15:34:09 -04:00
Ed Sanders 840c871a97 Remove unused CSS classes
By searching for CSS classes that don't exist in the code.

In some cases the classes were used but had been renamed.

Change-Id: I76442a632c18d2133cdf78c4555da149c0a7888c
2014-07-28 19:43:35 +01:00
Ed Sanders c23cebd5f6 Comment used messages
Change-Id: I22594b11f06f349c43162d52646a5c647c6ad0a3
2014-07-28 13:08:39 +01:00
Ed Sanders 61d40bd5ac SVG fixes
* Fix encoding
* Remove unused attributes
* Fix some IDs
* Fix pixel snapping in gallery icons

Change-Id: I084b3d7e3e5ba9b4ec234b94622cac076c7665e1
2014-07-26 18:38:11 -07:00
Roan Kattouw 7cc31d0c34 Actually show the corruption warning in the save dialog
It was being set, then immediately cleared again.

Also remove the unused dirtymsg div.

Change-Id: I22e5fbe814d14684626a7502d2401f414838709b
2014-07-25 11:39:03 -07:00
jenkins-bot 04abfb3e79 Merge "Revert "Provide contextual help for the page settings dialog's controls"" 2014-07-24 02:12:35 +00:00
Jforrester f84c33f074 Revert "Provide contextual help for the page settings dialog's controls"
This reverts commit 9ba9b35b41.

Change-Id: I95dd24ec94f4e0ecc3a32fbcdac689cee4116ed5
2014-07-24 02:09:27 +00:00
jenkins-bot 9774ceed20 Merge "Bump the height of the references list a little" 2014-07-24 00:43:02 +00:00
jenkins-bot 3771aa92c1 Merge "Make the image model work without a node" 2014-07-24 00:32:54 +00:00
Moriel Schottlender 1bc7d074fe Make the image model work without a node
The image model should go by image attributes (whether it comes from
an existing node or a new one) and not a node.

Bug: 68242
Bug: 68000
Change-Id: I4cabd678157619331b3c47d3b44bc16a28fd7bd7
2014-07-23 17:27:30 -07:00
jenkins-bot c7026baf26 Merge "Defer building of MWReferenceSearchWidget index" 2014-07-24 00:27:16 +00:00
James D. Forrester 833baef313 Bump the height of the references list a little
Bug: 68226
Change-Id: Ic3c7b31dcaa6f7f8da3d86efab8c7ab94f4b1e62
2014-07-23 17:24:21 -07:00
Roan Kattouw 71dd2bf852 Actually document .static.nodeModel in MWExtensionInspector
Undocument abstract static properties are bad.

Change-Id: Iae19fb83840fe7edaaaa5e80dff092064dc76361
2014-07-23 13:49:39 -07:00
Ed Sanders d8d3a8c98e Defer building of MWReferenceSearchWidget index
It can be very slow on pages with lots of references and
isn't required until you click 'Use existing reference'.

What is required is knowing if the list will be empty for
greying out the button, but that can be precomputed very cheaply.

Change-Id: I56909801a5685bb04e0c83cfb95463f705b8dfae
2014-07-23 15:12:31 +01:00
jenkins-bot 960922cdb0 Merge "MWReferenceSearchWidget buildIndex optimisations" 2014-07-23 02:23:43 +00:00
jenkins-bot e9f78820c3 Merge "Fix reference dialog focus" 2014-07-23 02:08:32 +00:00
Ed Sanders 24c322a124 Use native focus
It's faster.

Change-Id: I0a8a2452aa987e2b93c5c8ba3c6efa2bcafbaa86
2014-07-22 19:05:14 -07:00
James D. Forrester 27c30322ed Clamp height of MWReferenceDialog to between 300 and 400px to avoid it being too small
Bug: 68232
Change-Id: If32edc5622565b28ae1f6a2423a7c2289965733c
2014-07-22 18:57:39 -07:00
jenkins-bot 08c3f6be04 Merge "Provide contextual help for the page settings dialog's controls" 2014-07-23 01:43:54 +00:00
James D. Forrester 9ba9b35b41 Provide contextual help for the page settings dialog's controls
Change-Id: I5c24d7f41ce33d1145f8bfbfd60bd78d08df39ce
2014-07-22 18:41:17 -07:00
jenkins-bot 55dcb46311 Merge "MWLinkNodeInspector: Actually preserve annotations when converting to link annotation" 2014-07-23 00:44:43 +00:00
jenkins-bot f7c7efbad7 Merge "test: Move mw into the global list of globals for VE-MW" 2014-07-23 00:02:22 +00:00
jenkins-bot 016c93c29b Merge "Auto-open "Add parameter" part of template dialog when tabbed to or opening with no required/suggested params" 2014-07-22 23:37:41 +00:00
James D. Forrester a9356992d8 Put "re-use reference" in the toolbar "Cite" menu, and give it an icon
Bug: 68201
Change-Id: I9fc61e498748fb086c3e506959bee2438b8cbea6
2014-07-22 13:10:06 -07:00
jenkins-bot 107ce12f9d Merge "Fix heights of Reference, ReferenceList and Template dialogs" 2014-07-22 16:11:39 +00:00
Alex Monk 42db347213 Auto-open "Add parameter" part of template dialog when tabbed to or opening with no required/suggested params
Bug: 55925
Change-Id: I8475074e25de3969717a6d4dbb88bbb0000ebb4e
2014-07-21 22:38:05 +01:00
Ed Sanders d4cd816b6f MWReferenceSearchWidget buildIndex optimisations
* Each item builds an MWReferenceModel which creates a document
  slice clone. This is very expensive and we only use the model
  for getting basic attributes, so defer the evaluation of the
  document.
* $.show is expensive and, in this case, unnecessary.

Change-Id: I99abc4c1b17f05559a9cae68b15121a8be6d23fb
2014-07-21 14:44:58 +01:00
Ed Sanders 9bc8d07486 Fix reference dialog focus
Wasn't migrated to processes.

Change-Id: Idb5f614c172378aad5d37bf8f726adad338c3eb1
2014-07-21 13:58:48 +01:00
James D. Forrester c2f37a0450 test: Move mw into the global list of globals for VE-MW
Silly to have 38 MW-specific files needing to declare that they're using mw.

Change-Id: I97891ed922fe0c37d8c96425a4d23bd15098438b
2014-07-19 17:42:45 +00:00
James D. Forrester ed82afc14c Fix heights of Reference, ReferenceList and Template dialogs
Bug: 68226
Bug: 68232
Change-Id: I93916875a6b4b1e7b837efce33a9aa20857f227a
2014-07-18 19:14:30 -07:00
James D. Forrester cc089d6bd3 Scrap the cancel button from the toolbar
It's unnecessary, big and ugly, way too close to an actually useful button, and
adds oodles of complexity to the mire that is VPT without significant user benefit
whilst taking up an unjustifiably huge amount of the already-over-burdened space.
This means that the minimum browser width for English on default Vector to show
the toolbar correctly is now 945px, down from 1029px.

Bonuses: fix MWCancelConfirmDialog's cancel button to be destructive (it is) and
remove a now-recently-fixed comment asking for the save button to be styled using
a generic class (provided by the constructive flag).

Change-Id: I30dc7020121f0dd6907b61ef674a7cb14eb00652
2014-07-18 16:38:17 -07:00
Moriel Schottlender 2a114815ab Listen to widget changes in MediaDialog
Attach event listener to the alternate text and the media size widget
in the MediaDialog, so that when either of those are changed the
'Apply Changes' button is enabled.

Related to I88c3f3dcc7667b3ffdd2a8a8433cb47b82ba1531

Bug: 67684
Change-Id: I03efbed2f9b2909b055d96b9ae1e27b6d5e2bdbf
2014-07-16 22:46:47 +00:00
Moriel Schottlender e94a185fda Update VE core submodule to master (ad18102)
New changes:
65042de Fix alien test data
83dccbe Add toolbar menu labels to each group for consistency
2e40ef9 Move 'language' tool from the insert to the styling menu, like in VE-MW
6fb21b2 Add toolbar action section to SA demo with keyboard shortcuts tool
f3eb000 ve.ui.Toolbar: Optimise onSurfaceViewKeyUp performance
eb4e9eb Make sure the document is focused when setting a selection
48584d3 Fixes to getRelativeOffset and getRelativeRange		
fcc427f [BREAKING CHANGE] Remove generatedContents argument from afterRender
825e4be Documentation fixes in test utils		
dbbbe0b Unit tests for showSelection		
1ba9234 Don't handle up/down on focusableNodes even if backwards
a667b87 Remove label from 'insert' menu, and instead use a large plus icon
88885b1 Localisation updates from https://translatewiki.net.		
1f3b79f Initialize data first		
18369b1 Add 'clone' and make 'getDimensionsFromValue' static in ve.dm.Scalable		
92e6b7b Switch to 'custom' when MediaSizeWidget updates		
d0cd87e Localisation updates from https://translatewiki.net.		
1ee21ff Remove lies from documentation		
164f07f Safely ignore requests to open unrecognized windows

Local changes:
Work on a cloned scalable when editing images

Make sure the image model handles a cloned copy of the node's
scalable object, which is then shared with the media size widget.

Bug: 67687
Change-Id: Ie3676b715f5bae3d83da03d667cef3a6a847e212
2014-07-16 22:38:09 +00:00
jenkins-bot de9491ea0e Merge "Make a message dialog for cancelling VE" 2014-07-16 20:45:28 +00:00
jenkins-bot 1c099f4184 Merge "Always initialize data before use" 2014-07-16 00:52:09 +00:00
Alex Monk 54a1a85e6e Make a message dialog for cancelling VE
Confirm dialog was replaced in refactor, so until this is merged the 'Cancel'
button is broken.

Bug: 68068
Change-Id: I77d1c82bf0d68013eef361174a134860a197cd44
2014-07-16 00:07:24 +01:00
Bartosz Dziewoński 5ed43c266a MWLinkNodeInspector: Actually preserve annotations when converting to link annotation
This was implemented, but didn't work because the node was removed
before its annotations were copied.

Also fixed:
* Don't do an unnecessary transaction to change attributes of a node
  we're going to remove anyway.
* Apply the same link href fixups when converting as when not
  (previously, changing the href to 'example.com' and clicking "Add
  label" would break the link in interesting ways).
* Do a single transaction from replacement instead of removal+insertion
  when possible.

Bug: 67377
Change-Id: I0318ae62c799300fb7696506a9736b839e2c8578
2014-07-16 00:50:23 +02:00
Trevor Parscal f30336bc2e Always initialize data before use
LinkNodeInspector was broken when you clicked away/pressed escape, because data was not set.

Normalizing on data being initialized at the top of get*Process methods if used.

Change-Id: I89728ac558545a6f2c325014b6f457ec6bef17b8
2014-07-15 15:49:51 -07:00
jenkins-bot a9b757a174 Merge "MWTitleInputWidget: Remove prefixColon option and use relative title instead" 2014-07-15 22:10:42 +00:00
jenkins-bot a5e1cfcf78 Merge "ve.ui.MWExtensionInspector: Prevent from setting impossible content" 2014-07-15 22:09:06 +00:00
Trevor Parscal 8ebea5a75b Close the citation dialog after the apply changes button is clicked
Change-Id: If3976389f0a1574fce993f5b79b9b18067a88878
2014-07-14 17:09:24 -07:00
James D. Forrester fbdff76263 Update VE core submodule to master (f2277ea)
New changes:
56de6f5 Localisation updates from https://translatewiki.net.
f8bda64 Widgetise demo menu
6ac48d8 Localisation updates from https://translatewiki.net.
365e131 builderloader: Omit value for boolean "disabled" attribute per HTML5
706e4b3 Prevent double counting of DM nodes in getNodeAndOffset
b141a7d Update OOjs UI to v0.1.0-pre (d2451ac748)
c5b3921 Localisation updates from https://translatewiki.net.
1606983 Update reference to ConfirmationDialog to use MessageDialog

Deletions:
* Styles for ve.ui.MWBetaWelcomeDialog - not needed anymore because
  OO.ui.MessageDialog provides them
* Styles for ve.ui.MWGalleryInspector - not needed anymore because
  ve.ui.MWExtensionInspector provides part of them and the rest are being
  replaced by programatic sizing

Modifications:
* ve.ui.MWLinkTargetInputWidget - Added support for validation and href
  getter
* Split message between tool and dialog title for ve.ui.MWEditModeTool
  and ve.ui.MWWikitextSwitchConfirmDialog

General changes:
* Updated inheritance.
* Added manager param to constructors of dialogs and inspectors.
* Updated use of show/hide with toggle.
* Added meaningful descriptions of dialog and inspector classes.
* Configured dialog and inspector sizes statically.
* Configured dialog action buttons statically.
* Interfaced with OO.ui.ActionSet to control action buttons.
* Moved applyChanges code into getActionProcess methods.
* Always using .next in setup/ready process getters and .first in
  hold/teardown process getters.

Change-Id: Ia74732e6e32c0808eee021f0a26225b9e6c3f971
2014-07-14 23:24:45 +00:00
Alex Monk 3acca7cdf5 Fix cite/template dialogs
I1a7fc7f2 broke cite/template dialog - onDescriptionClick is not defined.
I can't find it anywhere in the VE-MW or OOUI source.
Before my change, it was simply a no-op. But now we try to bind it in a way
that breaks everything. This commit just removes that line since it was
apparently not doing anything.

Bug: 67814
Change-Id: I0b9c3318b3de8530e0ba9e355cd73eb7f70a6b5a
2014-07-10 21:37:07 +01:00
jenkins-bot 6d8e900d57 Merge "Replace ve.bind( fn, ... ) calls with fn.bind( ... )" 2014-07-10 14:11:43 +00:00
Alex Monk 51142e8b11 Replace ve.bind( fn, ... ) calls with fn.bind( ... )
Bug: 62762
Change-Id: I1a7fc7f27fa737d17f5c6b3d084ef4a35e4bebc0
2014-07-10 13:54:07 +00:00
Timo Tijhof fd83cafa4b MWTemplatePage: Account for template.title being null
Example:
* Transclusion with html comment in target
  {{ Unsigned <!-- ignored -->  |Example}}.
* Transclusion with wikitext expression as target
  {{ {{echo|Unsigned}} <!-- ignored -->  |Example}}.

The first case was handled already (Parsoid strips the comment
when it normalises the target title). The second case, however,
is not handled and ends in template.title being null.

This was already documented (MWTemplateModel#getTitle returns
{string|null}), but not used correctly.

The title of the dialog is unaffected as it fallsback to
displaying target.wt instead of target.title.

Bug: 66724
Change-Id: Ib6696ac3538f6cb9e93da2f6f8666f373247eeb4
2014-07-10 13:49:41 +00:00