Commit graph

247 commits

Author SHA1 Message Date
Trevor Parscal 4c2d4c14ea Update VE core submodule to master (8b545f4)
Also update use of OO.ui.PageLayout to work with changes in OOUI.

See: I58a279dd949a867a4698a791103d5a6f2bd4b67f

New changes:
8b545f4 Update OOjs UI to v0.1.0-pre (3a9a4c1da8)

Change-Id: Ib5063db055a63082d08b2858bffb9f854d76c01b
2014-02-14 17:53:59 -08:00
Roan Kattouw cebb0ad9da Bring down arrows in CategoryItemWidget back
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
2014-02-14 16:12:12 -08:00
jenkins-bot 4944dff419 Merge "Let users set #REDIRECT and __STATICREDIRECT__ status" 2014-02-14 03:46:12 +00:00
jenkins-bot 912fda938d Merge "Explain what the number on the edit summary screen means" 2014-02-13 01:09:33 +00:00
jenkins-bot 813cbd087a Merge "Fix more code that misreads API data with $wgDebugToolbar enabled" 2014-02-12 23:32:36 +00:00
James D. Forrester 5af9f61520 Let users set #REDIRECT and __STATICREDIRECT__ status
Adds setting and unsetting the #REDIRECT status of the page from the page
settings pane of the meta dialog, and toggle whether this is a static
redirect (i.e., it is not automatically changed when its target is moved).

If the page has a redirect set, the meta dialog will be shown on opening
the page so that users can adjust the redirect more swiftly.

Bug: 47328
Bug: 50878
Bug: 57173
Change-Id: Ibd89cf04486799f292b9fd045dae5bc23fcf6fd4
2014-02-12 15:24:12 -08:00
Roan Kattouw d4e8be5f49 A couple more OO.ui.deferMsg() calls
So as to not show message keys as labels :)

Change-Id: I98951d48449ed26cf35c192e871e4bb56fcd4e8b
2014-02-12 15:04:28 -08:00
Moriel Schottlender 02c072a29e Update image size properly when size is default
When an image with default size has a size change, the defaultSize
attribute in the data model must be set to 'false' so the new size
can be updated in parsoid.

Bug: 61270
Change-Id: I84388aec62674a3e3c6773f29bda7156254b5f4a
2014-02-12 17:23:18 -05:00
jenkins-bot 2f9c71edd3 Merge "(Stand back again) Even moar label manias! (label refactoring) + VE core update" 2014-02-12 22:08:27 +00:00
Trevor Parscal eca0a08ad9 (Stand back again) Even moar label manias! (label refactoring) + VE core update
Update VE core submodule to master (84ced37) and update calling code
for changes in OOUI.

Depends on Ic967b88d55daf48d365487e17f76488b3f02c60f and Ib599b9bd5028e2df084fcc3da657aeb7f1569d2a

New changes:
94f03c3 Undefined variables first in selectNodes
62b5648 Localisation updates from https://translatewiki.net.
10c5a18 Don't descend into handlesOwnChildren nodes in selectNodes
4ed2432 Update jquery.client to MW's master (45192156d7)
d7e24b8 Localisation updates from https://translatewiki.net.
babb9da Localisation updates from https://translatewiki.net.
4639d18 Localisation updates from https://translatewiki.net.
a561537 Localisation updates from https://translatewiki.net.
8f7053a Localisation updates from https://translatewiki.net.
7112cc2 Update OOjs UI to v0.1.0-pre (a290673bbd)

Change-Id: Ie7d58472619509782f23a7dedc1ec27c3dcc7543
2014-02-12 14:05:23 -08:00
Moriel Schottlender 80558f85dc Quick fix: image size property update
This is a bit of a workaround for scalable image nodes to update the
current size rather than only the original one. This is done so the
MediaSizeWidget in the media edit dialog is fed the current dimensions
of the image even without the image being saved.

Ideally, the node's 'currentDimensions' property should be constantly
updated to current dimensions. This workaround fixes the given bug, in
which all images show the original wikitext/default size even after
being resized.

Bug: 61052
Change-Id: I902d1f51b1389f2f9b2b5c871b578ee2244a946f
2014-02-12 16:53:13 -05:00
Krenair 0fea59f171 Fix more code that misreads API data with $wgDebugToolbar enabled
See also I907ef6fc.

Change-Id: Ie44faa15629ebba834cb08ba6247ff3beaabd0ae
2014-02-11 10:28:55 +00:00
Moriel Schottlender bee4e5323f Make MWMediaSearchDialog not ignore empty scriptDirUrl
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
2014-02-10 13:42:05 -05:00
Krenair c4903ac684 Explain what the number on the edit summary screen means
Bug: 50902
Change-Id: Ic548e624c1e7375b3151cc9d2f051a5bc665c759
2014-02-09 03:14:09 +00:00
jenkins-bot b12445f81b Merge "Pluralise visualeditor-linkinspector-suggest-(matching|redirect|disambig)-page" 2014-02-08 01:19:54 +00:00
jenkins-bot 6907654de1 Merge "Add image type change to media edit dialog" 2014-02-08 00:45:49 +00:00
Moriel Schottlender 19c584d166 Add image type change to media edit dialog
Adding a type change to the media edit dialog. Also changing SelectWidgets
to ButtonSelectWidgets for consistency.

Bug: 38129
Change-Id: I9c855e6381d970b5f08460822366f6333af24f82
2014-02-07 16:41:50 -08:00
Krenair a7f6b37096 Pluralise visualeditor-linkinspector-suggest-(matching|redirect|disambig)-page
Bug: 61071
Change-Id: Ia9893b8bfb80aa5d8a2bab9ecfe9ca1b6c85afbe
2014-02-08 00:35:30 +00:00
jenkins-bot 50b6de4866 Merge "Mark disambiguation and redirect pages in the link inspector" 2014-02-08 00:09:26 +00:00
Krenair 60d8021765 Mark disambiguation and redirect pages in the link inspector
Bug: 50240
Change-Id: If975398e4d6b13eea6207ee80b33067e65acd724
2014-02-07 23:48:41 +00:00
jenkins-bot fd6fb32db2 Merge "Auto-select first auto-added required param and fix param order" 2014-02-07 23:21:00 +00:00
Ed Sanders cf62801694 Move paste rules to Target
Because ViewPageTarget isn't always loaded.

Bug: 60912
Change-Id: I16bd6a329120b3dd7dcb0de3e76e69e84c18553f
2014-02-06 22:41:51 +00:00
Trevor Parscal d487b44dd0 Auto-select first auto-added required param and fix param order
Symptoms:
* When adding a template with required parameters, the last parameter
  is initially focused
* Parameters and parts appear out of order, and adding/remove/moving
  them shows them in almost random placement

Diagnoses:
* Parameters are auto-focused when added, and parameters are auto-added
  in forward order
* TransclusionModel's process method had a bug in which the code to
  derive an offset from the item being removed would not be reachable
  due to an inverted logic statement

Prognosis:
* Fatal, with a 10% chance of survival

Treatment:
* Set focus on the first parameter after auto-adding required
  parameters to a template
* Invert the logic in TransclusionModel's process method, so that if
  the index IS undefined we will proceed to define it

Change-Id: I299053b63045ec933747831f1b4aa63493760f8b
2014-02-06 13:21:14 -08:00
Ed Sanders 0d0b7b2e46 Always show 'File:' in content language for gallery placeholder
Requires extending placeholder text to use a getter, rather than
a simple message name.

Change-Id: I712aae40bf89fc14fb03530b2a1c2bdf183ab19d
2014-02-06 04:15:11 +00:00
Ed Sanders 406e54036d Don't allow extensions to have no content by default
Change-Id: I5788de6d39aedb1f40842fa1e218374e330c9f6c
2014-02-06 04:14:58 +00:00
jenkins-bot a1d4acca0f Merge "Adding position setting to media edit dialog" 2014-02-06 03:02:41 +00:00
jenkins-bot 78680bb527 Merge "Adding alternate text to media edit dialog" 2014-02-06 02:59:21 +00:00
Ed Sanders 5aafc1256f Hide automatic reference names
Anything which matches :[0-9]+ is not particularly helpful
to display.

Bug: 57875
Change-Id: I63e7c6fffe275f7869adeafb35390de4b85d0c1b
2014-02-06 00:57:41 +00:00
Moriel Schottlender b522994344 Adding position setting to media edit dialog
This adds an image position/alignment to the media edit dialog.

Bug: 51293
Change-Id: I15fbd1ed0998a9093fa039b76624395d661af05b
2014-02-05 20:56:37 +00:00
Moriel Schottlender e8205a7133 Adding alternate text to media edit dialog
Adding an option to add or edit alt text to images in the media edit
dialog.

Bug: 38129
Change-Id: I6d339781822175c40c66a4689ec6e1a873cb081d
2014-02-05 20:56:30 +00:00
Ed Sanders fb4f7d3e24 The great image scaling rewrite of 2014 (MW)
Implement new logic in ve.Scalable from I5b4f0f91b.

Also update VE core submodule to master (57ed8d3).

New changes:
59a0afe The great image scaling rewrite of 2014

Change-Id: I24a2976036310d3814cc7d1853a68745e0499bd5
2014-02-05 12:55:11 -08:00
Ed Sanders 61d010df2f Move image info API call to media node
As other widgets may be interested in the image info, this should
be part of the DM node, which the media edit dialog then fetches
and uses to populate the MediaSizeWidget.

Other fixes:
* Remove spinner, not really necessary as the orignal size button is
  disabled if the orignal dimensions aren't set.
* Don't wait until image info call to resolve to initialise size
  widget values. These should always be available instantly from the
  attributes.

Depends on I9530ed4257e88b in core.

Change-Id: I394f49941b621059bc08c8a8f79471b2fe16c7d8
2014-02-05 12:48:31 -08:00
Ed Sanders 425d6fee54 Exclude galleries from reference/caption surface tools
Because putting galleries in either would just be silly.

Change-Id: I03013607f3caae0053661c3c47d46b888ab5fde0
2014-02-05 19:45:56 +00:00
Ed Sanders d7e9564d22 Hide structure tools in MWReferences
Technically these are possible to render (although there's currently
a Parsoid bug preventing it) but really references should just contain
one single paragraph.

Change-Id: I405d75a0935d3f4610e10b942b48fa0fa2679a20
2014-02-05 19:39:39 +00:00
Ed Sanders 1e6daf1ee6 Implement surface paste rules for media/ref dialogs
Extend default paste rules to prevent lists/tables/references/headings
as applicable.

Also update submodule to master (76ff210).

New changes:
f1a927f Internal paste rules and type conversions

Bug: 59603
Change-Id: I952f98477219a55d25a2bd817344bde58a4862d4
2014-02-05 11:17:33 -08:00
Ed Sanders 047d6bf6cc Fix usage of '$' in MWReferenceSearchWidget
Easier to just use native getAttribute.

Change-Id: Ibd72eb457bb82b3b134d1eb29c4c33b3b9a7242f
2014-02-04 16:09:38 +00:00
Ed Sanders c528a0ffea Fix 'use existing reference' list rendering
Got broken by mass $ -> $element conversion in If3d870124ab8d1

Bug: 57209
Change-Id: Iada098d0fa361f4a825a4c87aa8a7493386855e4
2014-02-04 15:55:04 +00:00
James D. Forrester 87dd841150 Add placeholder for gallery editor
Change-Id: Id351cea8614282924eb9b1644693f7cd71fd9fa4
2014-02-03 14:05:49 -08:00
Krenair fc56562364 Fix search results when $wgDebugToolbar is enabled
When $wgDebugToolbar is enabled, a debuginfo key is always returned from the
API.
Unfortunately that broke the ve.isArray check on the result, breaking the
opensearch calls by the linker.

Change-Id: I907ef6fc2589581cf7333af3968b63b483af65a9
2014-01-31 02:34:39 +00:00
Roan Kattouw 12e4b41660 Don't throw JS errors when opening MWExtensionInspector on the wrong node type
The setup method just assumed this.node was of the right type, and
would just crash if it wasn't. You could select an image, open the
gallery inspector, and it would happily try to inspect it until
crashing because there was no .mw.extsrc attribute.

Bug: 60502
Change-Id: Idf0e9cf7ccaa37e607374ced150db732926a19f8
2014-01-27 19:21:36 -08:00
jenkins-bot 2c0faa4bb1 Merge "Store original dimensions results in IV store" 2014-01-28 02:33:57 +00:00
Roan Kattouw 3acd206a6a Followup 7994eae8c2: fix MWLinkInspector breakage
getAnnotationFromText was renamed to getAnnotationFromFragment,
update MWLinkInspector for this.

Bug: 60374
Bug: 60378
Change-Id: I202a2777f0202dcf42c5968daf8bdf5583b0a11b
2014-01-27 13:11:06 -08:00
Ed Sanders f6acb93d5a Store original dimensions results in IV store
* Remove the this.mediaSize custom store object and replace
  with a hash function and the document's IV store.
* Remove this.inputs/this.fieldsets namespaces.
* Calculate this.filename as soon as this.mediaNode is set.
* Rename getMediaSize to getOriginalDimensions

Change-Id: I2030aade5d96555451f6a390d0aa3d44b860841f
2014-01-26 14:26:57 +00:00
Ed Sanders 5dff7fc7d0 Fix typo in ui.MWCategoryItemWidget
Change-Id: I6270753598bed3179451d17919b445f15db42233
2014-01-24 19:00:11 +00:00
Moriel Schottlender 8130acebfd Changing image size in MWMediaEditDialog
Adding the ability to edit image size in the media edit dialog.
The size is now a separate widget.

The following changes were made:
* The dialog was changed to a booklet with 'general settings' and
  'advanced settings', in preparation for other edit features.
* The original image maximum size is fetched from the API and cached.
* Maximum size is limited to the image's original maximum size.
* Aspect ratio is kept when changing height or width, using original
  image size to preserve a sane ratio through the MediaSizeWidget.
* If an error is found in the size, the image will retain its previously
  set dimensions.

Depends on MediaSizeWidget: I3d0f9348a52

Bug: 38129
Change-Id: I2946fb21c46ce05583b219f665ef68928188899e
2014-01-22 18:43:45 -08:00
Trevor Parscal 49471fc9b5 Update VE core submodule to master
Also update for indicator changes in Iaf7726150

New changes:
f981943 Fix toolbar indicators in demo
e849941 Update OOjs UI to v0.1.0-pre (11632fcada)

Change-Id: I16c38259ccedbfba8260f8a508b572cee6389517
2014-01-17 18:30:00 -08:00
Trevor Parscal 7994eae8c2 MediaWiki language inspector updates
* Add ULS, which was removed from VE core
* Add experimental mwlanguage module which adds ULS integration
* Hook in ULS to the existing language widget

Also update VE core submodule with changes:
* 1e92abe Generic language inspector

Bug: 47759
Change-Id: I325a4dcc316d0334fadfcaa46ad3acd45c6bf84b
2014-01-18 01:02:23 +00:00
Trevor Parscal f4156bd09f Update VE core submodule to master (e7e2833)
New changes:
* e7e2833 - Update uses of Push/IconButtonWidget to ButtonWidget
* d9d9eb5 - Update OOjs UI to v0.1.0-pre (d9bab13)
  * d9bab13 - The Great Button Refactor of 2014
* 22b93ef - Update OOjs UI build (88b2871)
  * 88b2871 - Fix png transparency on required.png
  * 670c468 - Add i18n

Also:
* Update uses of Push/IconButtonWidget to ButtonWidget as there
  is a breaking change in new OOjs UI version.
  This was separated from commit I325a4dcc316d0.

Change-Id: I82220d15221c52be03feafcfc85c2bd6c12ba462
2014-01-17 16:29:36 +01:00
Timo Tijhof 8e7a864e90 Clean up and doc fixes
Remove odd comment and move node property to list of properties.

Change-Id: Ife3161bbdbf01075e987e65d9bfef41994efa916
2014-01-16 17:41:08 +00:00
Ed Sanders 26392cc1db Fix png transparency on gallery.png
Change-Id: Ia202294e1d27517c5317654e1d2d3410286c1773
2014-01-16 11:45:32 +00:00