Commit graph

776 commits

Author SHA1 Message Date
jenkins-bot 7c8931f655 Merge "Update initialHash after getting defaultDimensions in image model" 2014-10-23 20:00:20 +00:00
Roan Kattouw 2d3bf973d2 Actually set parameter autoValues as values
The autoValue was displayed in the UI but was never
actually written into the template model, unless you
changed the text input and then undid your change.

Bug: 71157
Change-Id: I08e2ba88c24fdee030104c6fb9baafb558ce8a80
2014-10-22 15:46:20 -07:00
jenkins-bot 5a3c2a9f4c Merge "MWLinkNodeInspector: Provide an open button here too" 2014-10-22 03:04:15 +00:00
jenkins-bot eaa3b222f7 Merge "Open the linkNode inspector when pressing Ctrl+K on a link node" 2014-10-22 03:03:32 +00:00
James D. Forrester 7149cc5279 MWLinkNodeInspector: Provide an open button here too
Also add validation now that we need it for the open button.

Bug: 71904
Change-Id: I50515671bb3ff08da8dc6c247c9959c27957c867
2014-10-21 20:00:27 -07:00
Roan Kattouw 4bc24e795d Open the linkNode inspector when pressing Ctrl+K on a link node
* Introduced MWLinkAction which opens the right link inspector
  based on what is selected.
* Added MWLinkInspectorTool overriding core's 'link' tool that
  executes MWLinkAction
* Removed MWLinkNodeInspectorTool and linkNode command,
  they're unneeded now

Bug: 72150
Change-Id: I03bd6ab1f67f31a6e6cb717cf4298e80e64637b7
2014-10-21 19:47:42 -07:00
jenkins-bot 9d25c2823d Merge "Drop nonexistent &redirect= parameter from API requests" 2014-10-22 01:38:32 +00:00
jenkins-bot d0c794b08d Merge "Disable the reuse citation tool when selection is null" 2014-10-22 01:36:32 +00:00
Roan Kattouw 942440c7df Drop nonexistent &redirect= parameter from API requests
The correct parameter is &redirects=. Which we really don't want
to use anyway, because if Foo->Bar, using &redirects=1 would
cause a search for "Fo" to return "Bar" as a search suggestion
with no explanation why (and "Foo" wouldn't be visible).

This isn't unsurmountable, we could put in handling similar to
how the category widget handles redirects, but what this code
is trying to do by passing this parameter is definitely wrong.

Change-Id: Idd12c03aaef897d7c1dc70b2a7692e7d71980efe
2014-10-21 18:34:27 -07:00
Roan Kattouw ecc4c6e188 Disable the reuse citation tool when selection is null
This was broken when requiresRange was renamed to requiresSelection
and MWUseExistingReferenceDialogTool wasn't updated.

Change-Id: Ia1018520fc253e2f09755d5e85a94a325df80005
2014-10-21 18:33:19 -07:00
jenkins-bot 827d1fe45b Merge "CategoryPopupWidget: Track popup hiding again so sortkey changes are applied" 2014-10-22 00:13:19 +00:00
Moriel Schottlender 14e1de1009 Update initialHash after getting defaultDimensions in image model
On initialization, the image model has an initial scalable that has
the given currentDimensions from Parsoid; these are usually correct.
However, in cases where the wiki settings do not fit the user settings
and the images appear smaller or bigger in practice than the values
of the wiki-defaults, the initial hash will store the wrong values.

We will only know what the real values for the comparison will be
after we get them from the API and the calculation; only at that
point we can update the image model initial hash.

This is important so that later the dialog can properly understand
whether to enable the "apply" button if a user changed an image
to custom size and then back to default.

Change-Id: If17b50cc4a39993f98a20a3fec3ddf5d8cb400b3
2014-10-22 00:11:43 +00:00
Alex Monk d7a5f4c1ac CategoryPopupWidget: Track popup hiding again so sortkey changes are applied
OOjs UI killed the 'hide' event that was running this code in the dialog refactor
back in July (Id121fc3a), but left it documented (along with 'show').

Just use the 'toggle' event instead.

Bug: 72168
Change-Id: I172fac81c4cbb89505522011aed57db57ccbc52f
2014-10-21 17:10:42 -07:00
jenkins-bot dee3bc2357 Merge "ve.ui.MWFormatTool: Update heading size CSS for new OOUI version" 2014-10-21 20:30:00 +00:00
James D. Forrester e20b47f84b Update VE core submodule to master (db78bdd)
New changes:
69ecc8e Remove MW-specific mobile hack from core
e556440 doc: Use wildcards for Desktop/Mobile …Context and …Surface for simplicity of extension

Local change:
Bring in MobileContext hack to filter out all tools except links and citations from core where
it didn't belong.

Change-Id: Ica837abd45f0ff02b49a44da617bc1fd8e9872d4
2014-10-20 12:43:39 -07:00
James D. Forrester 4fd4367d6a Update VE core submodule to master (f8a563a)
New changes:
e251898 [BREAKING CHANGE] Allow tools to specify which selection types they support

Local changes:
New requiresSelection api for tools

Change-Id: Idc3f62d60bfb5710f786734c342f71b1c73fd4c0
2014-10-20 12:15:29 -07:00
Bartosz Dziewoński 2c325fa4f2 ve.ui.MWFormatTool: Update heading size CSS for new OOUI version
* Use .oo-ui-tool-title-text selector rather than .oo-ui-tool-title
  to avoid styling accelerator keys.
* Divide all sizes by 0.8, as we no longer need to match the font-size
  rule on .oo-ui-tool-title.
* Add CSS for heading1 (which differs between Vector and core VE)
  and heading2 (because it looks silly if it's missing).

Change-Id: I12226f0a674037f904149cc10893f5c154767bfc
2014-10-19 21:13:21 +02:00
jenkins-bot 6a12cac9a2 Merge "Use relative positioning for category popups, move out of overlay" 2014-10-17 22:57:35 +00:00
Alex Monk d087052ada Only validate required template params after blur
Bug: 72096
Change-Id: Ib699f8d89af02c9109a5711bd2c3ab4ef664d8ea
2014-10-17 17:59:13 +01:00
Roan Kattouw 7157488e20 Use relative positioning for category popups, move out of overlay
Instead of putting these popups in an overlay, put them
in the category widget. This makes scrolling work more
nicely, and makes things easier to deal with in general.

This requires that the popup position itself using
getRelativePosition(), because it's no longer in an
overlay. This also means these popups should now position
themselves correctly no matter where they are.

Change-Id: I09a1e5891a897d634c41d386a2307fe3df2a9157
2014-10-15 22:58:05 -07:00
Trevor Parscal 77eae16b88 Apply mw-body-content styles to SurfaceWidget
Changes:
* Override ve.ui.SurfaceWidget for use in MW
* Add mw-body-content class to surface view container
* Assert 1em sizing for surface view container to prevent
  mw-body-content from applying its own sizing
* Add new scripts and styles to RL config

Bug: 71652
Change-Id: Iac86facdc0c7a0e48c0f3617e2f6c2e7f001525e
2014-10-15 23:58:46 +00:00
jenkins-bot 1b6a234d09 Merge "Put category popups in the inner overlay for now" 2014-10-15 00:17:47 +00:00
Roan Kattouw 267212c531 Put category popups in the inner overlay for now
We really shouldn't need the inner overlay for this,
we should be able to deal with popups being in
oo-ui-window-overlay. But for now, we're not, and
this fixes the current problems.

Depends on If16d16d2b in oojs-ui.

Bug: 72052
Change-Id: Ie06056b96db19ac4caf1f9c0e3a1c49cfddc6682
2014-10-14 17:02:51 -07:00
jenkins-bot 0436c01489 Merge "Correctly place CategoryPopupWidget in RTL" 2014-10-14 23:52:31 +00:00
Moriel Schottlender 64604f8415 Correctly place CategoryPopupWidget in RTL
The previous check for RTL did not properly recognize
when the UI was in RTL, since the element in question has no explicit
'dir' attribute. The test now uses $element.css( 'direction' ) which
is inherited, and produces a correct result.

Change-Id: Ie30c2038428b10709dc30cb8320bdc94d76a5a18
2014-10-14 23:50:50 +00:00
Roan Kattouw ed33c2583c Followup 1fc13cc: fix JS errors caused by incorrect context binding
Bug: 71997
Change-Id: Idb84a1c9dad91ef69554acb73398c0a0e30fece2
2014-10-14 12:27:46 -07:00
jenkins-bot 6fc5ea0cab Merge "Style required but currently-invalid parameters on the template dialog" 2014-10-14 18:43:05 +00:00
Ed Sanders 58ecea8d0a Fix icon opacity
As of Ieb27c3fd1 apex uses solid black icons with opacity
set in CSS, so make VE icons consistent.

Change-Id: I4c38c497875686503d46a2376a7842f50bf7f2fd
2014-10-12 18:27:04 +01:00
Alex Monk 8bc150f901 Sort out some odd file permissions
Bug: 71933
Change-Id: I520ee83a9b4d6adec4b430238640cfd58b49aeb4
2014-10-12 03:01:31 +01:00
jenkins-bot 36caeb442c Merge "MWCategoryWidget: Use TextInputWidget#event-enter instead of keypress" 2014-10-10 23:44:37 +00:00
jenkins-bot 8005868566 Merge "Make MWTransclusionModel and MWTemplateDialog extensible" 2014-10-10 20:40:19 +00:00
Christian Williams 1fc13cce68 Make MWTransclusionModel and MWTemplateDialog extensible
Wikia has done some work on the template user experience, including
automatically showing all available parameters without the use of
TemplateData. In order to make our changes, we had to make some changes
to VE-MW.

ve.dm.MWTransclusionModel.js
* this.specCache is created so subclasses can reference it.
* Promise handlers in the fetch() method have been broken out as class
  methods so they can be overridden in subclasses.

ve.ui.MWTemplateDialog.js
* addPromptedParameters() has been moved to the
  initializeNewTemplateParameters() class method so subclasses can
  overwrite. In Wikia's implementation, we have a method of getting
  all parameters and a dialog that shows all of the parameters, so the
  request to addPromptedParameters is overwritten.
* Added a done() handler to the transclusionModel promise for Wikia
  extensibility.

Change-Id: I073c5850420e7719e82957f879423c2717af674a
2014-10-10 20:38:18 +00:00
Timo Tijhof 3c50bd617f MWCategoryWidget: Use TextInputWidget#event-enter instead of keypress
The TextInputWidget class inherited by MWCategoryInputWidget,
already has a keypress listener that emits an "enter" event on
the OO.ui.Element object for us to listen to. No need to duplicate
that logic again.

Change-Id: Ia47bc8976f22dfe7e3a6fb6068dc4b6e03a3357b
2014-10-10 22:36:42 +02:00
Alex Monk 0678ad2929 Style required but currently-invalid parameters on the template dialog
Relies on I693a8bc9 and I7e3a2a16

Bug: 70957
Change-Id: Ieaf4c194fbcd05b81368b086136274084470d3c7
2014-10-09 16:50:50 -07:00
suchetag 7d82d173c6 Replacing title attribute with mixin TitledElement
The title attribute for byte counter in MWSaveDialog is replaced with the mixin TitledElement from label widget in OOUI

Change-Id: Ic4b37fac9e16b6db9091a16376e06d55bbb3d649
2014-10-09 22:57:04 +00:00
suchetag 36f95e4b21 Bringing back the edit summary byte counter in the save dialog
Bug: 71837
Change-Id: I14b1c8a8f0b8501e5ea5a3041f6aa99ae2529b2f
2014-10-10 02:56:01 +05:30
Roan Kattouw 77ba5c62c1 Followup 78e3a91: can't assign getValue() to $textarea, oops
Well spotted, Ed.

Change-Id: Ic3ce07591130d59fb2da5df2e410f39f672c71e1
2014-10-08 22:55:27 +02:00
jenkins-bot 922032f5d0 Merge "Replacing $input in save dialog" 2014-10-08 20:26:22 +00:00
suchetag 78e3a91455 Replacing $input in save dialog
Bug: 56647
Change-Id: I4703d0625767efd1b15bbc00848c77b322b43e53
2014-10-09 01:51:48 +05:30
Roan Kattouw 56953f89e4 Followup b8d8a5b: pass selections, not ranges, to SurfaceFragment#clone
Bug: 71825
Change-Id: I095d20840a1844f557a023f933aa1e6104138002
2014-10-08 20:00:21 +00:00
suchetag 0bb6d3b333 Getting rid of ve.splitClusters in ve-mw
Bug: 57628
Change-Id: I28cb52bd2af564f208b9414154977c351f5c3fcb
2014-10-08 08:09:19 +00:00
Ed Sanders 1af18c3c12 Update VE core submodule to master (984b57a)
New changes:
6bbcd6a Localisation updates from https://translatewiki.net.
b8d8a5b [BREAKING CHANGE] The Great Selection Rewrite of 2014

Local changes:
Update to use new selection/range API

Change-Id: I5480d5c77d599c93c2d374fac88bb2fdb68b0024
2014-10-07 21:39:33 +02:00
Roan Kattouw ff587f4f61 Account for categories being removed twice in MWCategoryWidget
Now that we use staging in the meta dialog, the following
sequence is possible:
* Add Category:Foo in UI (adds to DM and adds a widget)
* Remove Category:Foo in UI (removes from DM, removes widget)
* Click Cancel to leave meta dialog
** popStaging()
*** Undo removal of Foo (adds to DM, does not add a widget)
*** Undo addition of Foo (removes from DM, tries to remove nonexistent widget)

Add a check so trying to remove an already-removed widget
doesn't cause a JS error.

Bug: 71471
Change-Id: I34690364ce302b858e2a4429dbb97b57d39aae5f
2014-09-30 11:11:09 -07:00
jenkins-bot 64b2568465 Merge "Use mw.Title#getRelativeText to deal with titles relative to specific namespaces" 2014-09-26 02:50:43 +00:00
Alex Monk ef1cebd111 Use mw.Title#getRelativeText to deal with titles relative to specific namespaces
Added in MW core in Ie554adef, was backported to 1.24.

Change-Id: Iedc0319042529d41d29846d1734b5481850e9552
2014-09-26 02:47:18 +00:00
Alex Monk 89f8334d58 Really fix CategoryWidget checks for redirects to hidden categories this time
Previous commit dealt with only part of a related problem.

Change-Id: Iffe319d5b6d1a5ea91acca26a9613e07bea0d8fe
2014-09-24 23:18:44 +01:00
Alex Monk ea9ce0f5b0 Unbreak category widget check for hidden pages
Fixes Icb62b9b2. I have no idea how I managed to screw this up.
Was also causing an error in console when one of the categories was a redirect

Change-Id: I0321c8be1386cb010c3babb33e08fae0fcaf75ce
2014-09-24 22:59:53 +01:00
Roan Kattouw 6347274f47 Update VE core submodule to master (6e68242)
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
2014-09-24 12:18:16 -07:00
Roan Kattouw 8517777b9f Update VE core submodule to master (8d5ec7a)
New changes:
8d5ec7a [BREAKING CHANGE] Rename ve.Document.getNodeFromOffset to getBranchNodeFromOffset

Local changes:
* Update calls for rename of getNodeFromOffset to getBranchNodeFromOffset

Change-Id: Ibc69f5a5deeed5698368bb19b30f14497c579e90
2014-09-24 11:34:14 -07:00
jenkins-bot 02a85676b9 Merge "Use LinkCache instead of an object in MWCategoryWidget to store hidden status (to be shared with the input widget)" 2014-09-24 01:06:38 +00:00