New changes:
c06fa64 Account for isValid() becoming async
12e4840 Account for WhitespacePreservingTextInputWidget#getValue being called early
Local changes:
* Make MWLinkTargetInputWidget#isValid asynchronous
Bug: 71237
Bug: 71246
Change-Id: Iab83e743f99973f01a54b23fd5ddf1081f7effd6
New changes:
8d5ec7a [BREAKING CHANGE] Rename ve.Document.getNodeFromOffset to getBranchNodeFromOffset
Local changes:
* Update calls for rename of getNodeFromOffset to getBranchNodeFromOffset
Change-Id: Ibc69f5a5deeed5698368bb19b30f14497c579e90
Category redirect stuff is currently broken because of I5c536697, but no one seems to have noticed.
Fix bug 69886 while we're here
Bug: 69886
Change-Id: I62cf23d0e86bc43d739bb4c4610a5a852146fa3f
Before sending new searches to the API, abort the previous ones if
they were not resolved. This will assure that the result presented
on the screen is valid to the latest search that was done even if
the user types quickly and sends many async requests simultaneously.
Bug: 67438
Change-Id: If88123019bfa972520e9db7c627a7f4cd8fc2526
After resolving the search queries to the API, make sure to display
or hide (!) the "no results" message.
Bug: 67438
Change-Id: I518fbf5ae18bb2265710600516d556c60e2b4924
New changes:
5d063a2 Don't use three different coordinate systems in getSelectionRect()
feeb1ae Only focus the paste target if focusedNode has changed
2c1bb97 Update OOjs UI to v0.1.0-pre (4cef83f702)
Local changes:
* Update references to renamed classes
* Update calling patterns element mixins
Change-Id: I330c0e308807597dec31dad8dbf713eb29fdc290
The categories table holds all categories that exist OR have at one
point existed. This means it also contains a lot of vandalism and
other inappropriate names that happily come up in the suggestions.
This is undesirable. This changes the query to only list categories
with at least 1 entry.
Though technically it can be argued that an empty category with an
existing page might 'exist' and should thus be listed, with this
change they won't be. I don't think that is terribly incorrect to
say that such would be a 'new category', but we could also consider
renaming the label in the suggestion list to say:
'Currently unused category' or something similar.
As far as I can tell there is no way to test for page existance OR
generate a list based on allcategories with one API query.
Bug: 70025
Change-Id: I0e195d3ce26e69d4710d6a505b9da7d1b7678d92
The solution to this problem was two-fold:
* Initialize the menu selection based on current annotation data
* Don't re-open the LinkTargetInput suggestions menu after choosing
It unfortunately involves assuming that setAnnotation will always synchronously emit 'change' events.
Bug: 65343
Change-Id: Ia92751add5ee59ba581141a31c8433c5e7e521a5
Using the same tricks as ve.ce.MWReferenceListNode... Like listening to list
node updates, which will probably catch unrelated changes? I'm not sure about
this.
Bug: 68890
Change-Id: Id9443c9574063933bc8fb35d09ab8b80b69bcd44
Use $.when() to check if there were results to the search. This
also makes sure that the 'results not found' message only appears
when it actually should.
Bug: 65321
Bug: 67438
Change-Id: I437ef639918ace1041bb8c9f7fdd04a4e83885eb
In the media search widget use 'json' for remote searches and
'jsonp' for local searches.
Bug: 64822
Bug: 67749
Change-Id: Iccc9adb1261602f4bc7426f1caf5aed87aad51e5
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
* 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
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
Looks like I messed up in Ia67f9054 and got a setting backwards
Also prefix titles in a couple more places
Bug: 67384
Bug: 66893
Change-Id: Id6d5841ee1645be62a024308da48ddc6769c78b6
In this fix:
* Adding 'go back' button to appear in the search panel.
* Hiding/showing the correct buttons within each panel.
* Disable the 'apply' button, and only enable when changes are done.
* Load the search query API and send API requests only when the
search panel is up.
* Make sure the search query is updated with the page name every
time the search page is loaded
Bug: 67443
Change-Id: I635986f30579c6358e0cc6fe54fbf97f49c83465
Stop prefixing all requested titles with 'Template:', and don't try to use
colon prefixes when transcluding except when deliberately transcluding from the
main namespace.
(A title prefixed with a colon on MediaWiki is used to create a link to
something that would normally be included as a File/Category)
Bug: 52609
Change-Id: Ia67f9054a56e71153339f961bbbcadb565115748
Per bug 59604. The TypeError isn't coming from calling ".abort". That
method is always there and part of every jqXHR object, always.
This reverts commit c5dbc13c65.
Change-Id: I43bb53d8c98ca83688020c029d9a3db2c34d54ee
Depends on I468d4eb4 in core.
Uses various hacks to trick the test runner into thinking
an MW target is in use, when in fact we still use SA targets.
Change-Id: If4611307d5d7aaee4af84f86ef82faf9078043b6
Sometimes we have to load images in a way that we can't abort.
In that case, don't bother trying to abort, it just creates annoying console
messages.
Bug: 59604
Change-Id: Idb675f57284d9ffa1fe69c87806009a31711dabe
Implement new language platform functions.
Also remove unused MWLanguageSearchDialog and MWLanguageSearchWidget.
New changes:
4d919d2 [BREAKING CHANGE] Move language functions to the platform
Change-Id: I54c0a8e5816a3c81851f95f1d3062a6091a9f4a3
In namespaces that allow for subpages, use the subpage part of the
page title for the initial search string in the MediaInsertDialog
search widget.
Bug: 51290
Change-Id: I31db88b484eee2206719dc337fbd7c70aef93b3a
Make sure that SVG drawings have default size of the wiki default
even if their optimal defined size is smaller.
Bug: 62893
Change-Id: I682d832e456a501836f33ed1dfc7dbd78a4edf53
Instead of suggesting categories that have pages but don't necessarily exist.
Replaces part of If39e6f9c
Bug: 49044
Change-Id: I5c53669776c4c5bbbfe7b753747f3f677a752d91
At the moment, if you have a category on a page, and the category redirects
to another category which is hidden, VE does not mark it as hidden when
loading the page.
Change-Id: I9303838d36fbc1e2c0ed16b8bb0020bf52a6c211
Naturally, the 'no results found' should only appear as long as there
are actually no results found.
Bug: 52463
Change-Id: I0116b769b9e4995678975d43a74c54c4d426f672
jshint:
* Update to grunt-contrib-jshint v0.10.0 (jshint v2.5.0).
* Remove coding style options covered by jscs.
* Enable new option "freeze" (prohibits changing native prototypes).
http://www.jshint.com/blog/new-in-jshint-oct-2013/#option-freeze
* Re-order to match http://www.jshint.com/docs/options/
jscs:
* Update to grunt-jscs-checker v0.4.4 (jscs v1.4.5).
* Format .jscsrc file in a more spacious way and order the
properties less arbitrarily (using the jscs's readme order).
* Enforce more details of our coding style
* Get rid of the unsable "sticky" operator rules which have been
deprecated in favour of using other rules instead that are able
to enforce this more accurately.
- disallowLeftStickedOperators: Remove deprecated rule.
* Ternary covered by requireSpacesInConditionalExpression.
* Rest covered by requireSpace{Before,After}BinaryOperators.
- requireLeftStickedOperators: Remove deprecated rule.
* Comma covered by disallowSpaceBeforeBinaryOperators.
- requireRightStickedOperators: Remove deprecated rule.
* Logical not (!) covered by disallowSpaceAfterPrefixUnaryOperators.
See also If46b94ce1, Ib731f11b1 and I0b0cadbc5 in oojs/core.
Also:
* Update grunt-contrib-watch to latest upstream version.
Change log at https://github.com/gruntjs/grunt-contrib-watch/blob/v0.6.1/CHANGELOG#L1-L17
Change-Id: I6c5a34afea8b05a3dca617897c192594df06ca90
Add a message indicating to the user that no image results were
found in the media insert dialog in case no results are found.
Bug: 52463
Change-Id: I93aea897d864298bf891a90c2fb147f7d34df06d
> JQMIGRATE: jQuery.fn.error() is deprecated.
While at it, also avoid using the overloaded .load(). It has
quite a few different signatures (one of them is to load $.ajax
by url and replace the contents of the element, completely
unrelated), and calling .on() directly is quicker as well.
Change-Id: I139b0c603577b5a0102d2ff679bd86b792830e3e
The logic was checking that there were at least three items to show, then triggering
the MWMoreParametersResultWidget widget with the number of items left in the overflow
if the limit was two. Whoops. :-)
Change-Id: Icec16a2d26bef8bf8d74ed619341afd494ca0479
Move various bits of code from initialize to setup as required.
MWDialog is now useless so use ve.ui.Dialog directly.
New changes:
0b2d03f [BREAKING CHANGE] Pass fragments, not surfaces, to windows (reprise)
0101ac4 Update OOjs UI to v0.1.0-pre (ac6848398c)
Change-Id: I0fae3e5ff2bd0da5b74c244af226b07b1f5883bd
* Truncate beyond 3 parameters
* Add a special option class that, when clicked, shows the remaining parameters
* Use a special option class for the no parameters item instead of hacking the normal one
* Simplify the design of the no parameters item: no icon, centered text
Change-Id: Ia8259e91b42a59c2b08019df36217d485208ad99
Changes:
* Change uses of initializeSelection to selectItem
* Use "choose" event to respond to deliberate item selection by the user
Depends on changes in OOJS-UI (Ib3826ed)
Change-Id: Ia167a70ca5f40b1f15adad30620fdb13ef0d02d7
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
This works the first time the dialog is opened, but if the user types
a value into the search widget that yields 0 results, then closes
and reopens the dialog, that value will persist and the search widget
will still be empty, so we'll wrongly disable the "Use existing reference"
button.
Instead, check what we're actually interested in directly: whether
the index of reusable references is empty.
Bug: 61960
Change-Id: If4bf6ced7dc3af643f602c07f3142a0e637a3247
This is the normalized title without the fragment, which is what
should be used for existence check purposes. Also add a test for
an internal link to a page's section.
Change-Id: I0e04f64c1bebeff84a0c17ef9b6c8dc06876f769
TOC Widget is created in the mw target view class.
Adding and removing a heading rebuilds the TOC Widget based
on the the order of the page heading nodes.
TOC Widget considers TOC page settings and displays in the default manor
unless forced or disabled.
TOC Widget still needs to be finalized by being placed in the surface.
This could be a problem until we have a CE node for it to live in or
have some DM work added. Roan and I have discussed how to go forward.
To enable the widget you must add the following to LocalSettings.php:
$wgVisualEditorEnableTocWidget = true;
Change-Id: I488cfbbdb060e50d81f51e0f757e67d0114b8936
This gives users a clue to understand why they won't display in the
category box at the foot of the page.
Bug: 50763
Change-Id: I1cf3a76bbf6370e7f67ec16f0a931f6ea4ba9d28
As per changes in core:
* Use new #this.setAnnotationFromValues method.
* Inline 'initialize' in constructor.
* Bring over 'Change language' button.
* Rename 'Change language' button to 'Find language' and
move to top of form so that it's obvious it's not just a submit
button for the form.
* Properties -> local vairables.
Depends on If121603b5637 in core.
Change-Id: I059acea7258fc5097b747595e09fae394ab066ec
Switch to using FieldLayout for laying out forms.
New changes:
64650c6 Update OOjs UI to v0.1.0-pre (424b40373e)
Change-Id: I757aecf3485673f54aa9e7f38e88c079dda4451d
This escaped the icon -> indicator migration because it was rolling
its own class (!).
Now using IndicatedElement to render the indicator.
Also, cleaned up some incorrectly named CSS classes.
Change-Id: I7f3369f2ffd3c34f0d29c0a235d1a15ddd68d1e3
When a new search is performed in the MWMediaSearchWidget,
image thumbnail details are extracted from the API's imageinfo.
In some cases, this parameter does not exist. MWMediaResultWidget
relies on that parameter to get image details like 'src' and
width/height. Without it the search fails.
This fix makes sure that the thumbnail result is only displayed
if there are 'imageinfo' details at all. Otherwise, the image
result is ignored.
Bug: 61392
Change-Id: I5261059bb42d3a57441514eafaa0bffa3a3c3ba4
For wikis that are installed in root directory, the API parameter
'scriptDirUrl' is an empty string. This change makes sure it is not
ignored.
Change-Id: Ib58adf76c184c32c0cdbb9dba31db1e4028fa383