Commit graph

1505 commits

Author SHA1 Message Date
Ed Sanders a04d2ff52b MWLinkAnnotationInspector: Update actions when changing tabs
Change-Id: I825531683eeb8b7e21b741f1dc5d338abc9d347a
2015-09-27 14:03:29 +01:00
jenkins-bot 763b9c8058 Merge "Update VE core submodule to master (27fc244)" 2015-09-26 13:38:42 +00:00
jenkins-bot 03d4e08a83 Merge "Allow autolinking ISBN/PMID/RFC inside list items" 2015-09-26 13:38:37 +00:00
jenkins-bot 81282a7769 Merge "Autolink of magic links should create node not annotation" 2015-09-26 13:38:34 +00:00
Ed Sanders 6ed5877c69 Update VE core submodule to master (27fc244)
New changes:
18e46b6 [BREAKING CHANGE] LinkAnnotationWidget: Abstract .text property to getTextInputWidget

Local channges:
* MWLinkAnnotationInspector: Use new getTextInputWidget method

Change-Id: Ia33797d612be7b4521e7212047a38480ee2520df
2015-09-26 12:27:56 +01:00
Alex Monk 3386f66770 Save dialog: Make review/resolve actions work in mobile
Depends on Ic92378b7

Bug: T111894
Change-Id: I5ca5f803642dd12db4e9fb213dc6478701661528
2015-09-26 00:08:31 +01:00
C. Scott Ananian 92bfa93e4e Autolink of magic links should create node not annotation
Depends on: I9679cf0fd550c9b156370fc88953414460c801a4

Bug: T112675
Change-Id: I97a1750b3424c09e181976029f10ee161129b166
2015-09-25 14:21:33 -04:00
Thalia b7bdf2d867 Adjust uses of renamed PreviewWidget to PreviewElement
Depends on I516b87f3be in VE core.

Change-Id: I9ad4bab3fff0bf0fb8a79673dbe67be4a9b2c363
2015-09-25 09:37:34 +00:00
C. Scott Ananian 07f67bdb22 Allow autolinking ISBN/PMID/RFC inside list items
Depends on I18b73514e5a3d967cce02d9706a11e30ede71d9a in ve core.

Bug: T113535
Change-Id: Ifc749951a6e92e19a7eb27ed631f8ba11d88a5cf
2015-09-25 10:35:18 +01:00
Alex Monk 03a1d04bde Don't error when trying to re-use a reference as itself.
Bug: T90476
Change-Id: I0e2cafa885f5606c4f6611529f11de4fa6f7aedf
2015-09-24 22:58:30 +01:00
Alex Monk 0fb38cc824 Use ve.setProp to set new pages list in MWTemplateTitleInputWidget#getLookupRequest
Bug: T113647
Change-Id: I537a235064cf8e95b0e1cde46f3079e0af082e7c
2015-09-24 22:35:38 +01:00
jenkins-bot 8a0ead0940 Merge "Allow pressing 'escape' from all pages of save dialog" 2015-09-21 23:06:49 +00:00
jenkins-bot 9beb40c40e Merge "Make save dialog variable height" 2015-09-21 23:03:42 +00:00
Ed Sanders 7e0d4daf3d Allow pressing 'escape' from all pages of save dialog
Bonus: Add 'Resume editing' button to review changes page

Change-Id: Ief200c8aa2e2c8363bf6c9be3544ec1c56e07ff4
2015-09-21 22:59:21 +01:00
jenkins-bot 14600662b6 Merge "Template placeholder: Don't show delete button if we're the only transclusion part" 2015-09-21 17:27:52 +00:00
Ed Sanders a1147f764b Make save dialog variable height
Change-Id: I90437b3130d08441e5c93b2a34fd9083106a14b3
2015-09-21 17:52:19 +01:00
jenkins-bot 03ef91fade Merge "MWReferenceResultWidget: Remove border from last item" 2015-09-21 06:56:12 +00:00
Ed Sanders d7adf533ca MWReferenceResultWidget: Remove border from last item
Change-Id: I56c16711d6467647b0bb5b9bdf2d89fff1122ef4
2015-09-20 21:50:11 +01:00
Ed Sanders 7d4692a635 Make gallery icon slightly lighter and smaller by thinning borders
Makes the icon more consistent with other VE icons in terms of weight.

Change-Id: I37ad04394e9811c9d44c7c2b3af63e1ae03dd297
2015-09-20 18:23:15 +01:00
jenkins-bot 664e2db006 Merge "MWWelcomeDialog: .html, not .text, as we're inserting HTML" 2015-09-18 21:20:41 +00:00
jenkins-bot 377944f6e9 Merge "Exclude citefromid and cite-(book,journal,...) commands from ref dialog" 2015-09-18 16:05:05 +00:00
Alex Monk 2d46e57709 Template placeholder: Don't show delete button if we're the only transclusion part
Bug: T95252
Change-Id: I62ebe56a2c5d5a0a39a5d806b2fcb348e25f6a17
2015-09-17 00:31:18 +00:00
James D. Forrester 48c849ca5b MWWelcomeDialog: .html, not .text, as we're inserting HTML
Change-Id: I2cc35af4c6ed59ec1b5df991af1568c85c050fae
2015-09-16 14:54:11 -07:00
James D. Forrester 9b0779da9b MWWelcomeDialog: Split text, tweak styling
Change-Id: If15dc9fe4a01e81cf7d85e2670878bbd5899f068
2015-09-16 10:16:44 -07:00
James D. Forrester 004ae8570a MWWelcomeDialog: Switch out graphic for new one
Change-Id: I7ca0625e16535cf287161f66aaf1ce7e8db740aa
2015-09-15 10:50:19 -07:00
Ed Sanders 9ebda54297 WelcomeDialog: Fix vertical spacing
Change-Id: I10667512dff829195af43ea47d51d662836512bf
2015-09-15 11:58:20 +01:00
James D. Forrester e5e1810f02 MWWelcomeDialog: Alter to be welcoming, use a nice image
Drop beta-ness as users don't care and it confuses them. Leaving the preference
alone for now.

Bug: T99963
Bug: T112354
Change-Id: I0e039dec54d528fce24226e76b931b593dd13a9e
2015-09-14 18:29:07 -07:00
jenkins-bot aa7fcf27e6 Merge "MWSaveDialog: Checkbox vertical alignment tweak" 2015-09-14 14:52:48 +00:00
Ed Sanders 2280b0db20 MWSaveDialog: Checkbox vertical alignment tweak
Change-Id: I3741d2d5c9bc5b5500440c053766582cfd298841
2015-09-14 12:14:12 +01:00
jenkins-bot 85bc110774 Merge "Remove command help height hack" 2015-09-11 18:48:19 +00:00
Ed Sanders b68099bcb4 Remove command help height hack
No longer needed, depends on Ia98a91c8a in core.

Change-Id: I3789e629fef7883984bd944d2c44472d4b89199a
2015-09-11 12:46:10 +01:00
Alex Monk 821ceb9920 Order template title results by provided index
This only comes back in results from certain modules, so I'm not entirely
sure whether we want to do this in here or mw.widgets.TitleInputWidget.

Bug: T111598
Change-Id: If2916706db359d520c41c2dec7ded44e0d3a56a9
2015-09-10 20:53:35 +01:00
Ed Sanders b900adfe74 Exclude citefromid and cite-(book,journal,...) commands from ref dialog
So that users can't place references in references.

Change-Id: I7953f8137dc5422ecd0cee648a30e2c181fbb43c
2015-09-09 12:42:39 +01:00
jenkins-bot f6a2e3658c Merge "Abstract mwExtension behaviour into MWExtensionWindow" 2015-09-05 21:26:31 +00:00
Ed Sanders 8815d1397f Abstract mwExtension behaviour into MWExtensionWindow
Allows us to create an MWExtensionDialog base class that shares
the logic.

Change-Id: I53c8f1713a3513d2635cfd736ec8fc3f9616d864
2015-09-05 18:18:24 +01:00
Alex Monk 6d94d060ac Bump Schema:Edit to revision 13457736
* Remove page.length
* Add action.abort.type = switchnochange

Needs to be deployed at the same time as Ib99700ac

Bug: T111420
Change-Id: I7ee245157d4de6c220d7cdf54cd1dd69ff836f15
2015-09-04 00:51:05 +00:00
Alex Monk 7c2f6e1f5f Don't break when you cancel the link inspector
Bug: T111241
Change-Id: Iff96aa4d97fe64a2472a58b3bf782085313899c6
2015-09-02 21:30:51 +01:00
jenkins-bot 38a94dd8d5 Merge "Fix cancelling of extension inspectors" 2015-09-02 11:50:18 +00:00
Alex Monk a02d8573b4 Fix cancelling of extension inspectors
* Don't insert/update/remove nodes on cancel in MWExtensionInspector
* Don't forget to popStaging on cancel in MWLiveExtensionInspector

Bug: T110992
Change-Id: I1e30206595e304eb502c7e745bf5e00d145d12d7
2015-09-02 02:32:11 +01:00
Ed Sanders 471df53aaf MWLinkInspectorTool: Add parent method call to #updateState
Bonus: No need to check if fragment is a SurfaceFragment.

Bug: T111099
Change-Id: Ieaa3ee979477175d0f129e30838853bc04937fad
2015-09-01 21:09:13 +00:00
jenkins-bot 8502d3ea05 Merge "Specialized inspector for ISBN magic links" 2015-09-01 18:34:23 +00:00
C. Scott Ananian 7cc23367f6 Specialized inspector for ISBN magic links
Implement a special node type, context item, and inspector for
ISBN/PMID/RFC magic links.  Add buttons to the link inspectors
to convert back and forth between "simple" links, and magic links.

Depends on I5d000d8b63dafdfe0a2753069d3f0ac5b03b8829 in Parsoid
for clean round-tripping of localized ISBN magic links.

Bug: T63558
Change-Id: Id5b7a2ae3c80b0e5eed598f0bd024d3e94f7e9aa
2015-09-01 14:25:59 -04:00
C. Scott Ananian 3ce4ac25f8 Allow trailing punctuation for typed ISBN/PMID/RFC autolinks
Bug: T110690
Change-Id: I7d3b550588a75b08b1a587705f02a86ab7c5806c
2015-08-28 12:41:38 -04:00
jenkins-bot 64c73a4ac6 Merge "ve.dm.MWReferenceModel: Require parent document" 2015-08-27 15:38:01 +00:00
Roan Kattouw e4d2d4785e ve.dm.MWImageModel: Require parent document
Add a parentDoc parameter to the MWImageModel constructor and use
it to inherit language, direction and HTML document. Remove
getLang(), setLang(), getDir() and setDir() whose only purpose
was to propagate the language and direction from the parent document
in a hacky way.

Also add a parentDoc parameter to newFromImageAttributes(), replacing
the lang and dir parameters. Remove the unused and ill-conceived
caption parameter.

This causes caption documents to always have an HTML document
for URL resolution. Previously, this worked when editing existing
images because a document generated by cloneFromRange() (which
propagates the HTML document) was passed into setCaptionDocument(),
but it didn't work when creating new images.

Bug: T109599
Change-Id: Ida36862092cd779ffc2f04c0ecbc1164f8d71453
2015-08-27 00:09:21 -07:00
Roan Kattouw f11fbee278 ve.dm.MWReferenceModel: Require parent document
Add a parentDoc parameter to the MWReferenceModel constructor and use
it to inherit language, direction and HTML document. Remove
getLang(), setLang(), getDir() and setDir() whose only purpose
was to propagate the language and direction from the parent document
in a hacky way.

This causes ReferenceModel documents to always have an HTML document
for URL resolution. Previously, this worked when editing existing
references because the newFromReferenceNode() code path calls
cloneFromRange() which propagates the HTML document, but it didn't work
when creating new references.

Bug: T109599
Change-Id: I5d9d34d4343be8428318fa0b795fa54c110e34f4
2015-08-26 23:48:45 -07:00
Roan Kattouw 6eee029159 MWSaveDialog: Use .moveCursorToEnd() instead of ve.selectEnd()
ve.selectEnd() removed by I44f43f312c78 in VE core.
Depends on Ia63e6c6a0 in OOjs UI.

Change-Id: Ic7ed8a24abd8288d68cf89839a553a569081e8c7
2015-08-26 23:51:58 +00:00
James D. Forrester 463077e05c page-not-found*.svg: Provide semi-flipped variant for he, yi
Bug: T110429
Change-Id: Ieef0e8f068e22baabb1aa509bdd110ec9533d996
2015-08-26 23:21:54 +00:00
jenkins-bot c010450e08 Merge "Move MWReferenceSourceSelectWidget out to Citoid" 2015-08-26 15:40:19 +00:00
jenkins-bot c02874842b Merge "Fix pattern for matching wikitext headings" 2015-08-25 16:23:15 +00:00
jenkins-bot e7a9af30d8 Merge "Use mw.Title to localise file: prefix on new images" 2015-08-25 16:23:12 +00:00
Ed Sanders 6e44d8a7c0 Use mw.Title to localise file: prefix on new images
Bug: T110104
Change-Id: I25e28367bf4b00a0447c941b7359ebff5fe59147
2015-08-25 17:17:49 +01:00
Ed Sanders 48a07e0bdc Use new internal link builder
Bug: T64816
Change-Id: I9ec857eef948028e65eb5e8bf21707f5f5bfd9c0
2015-08-25 16:39:32 +01:00
jenkins-bot ce6d4eb8c5 Merge "ve.ce.MWTransclusionNode: Pass number of templates to context" 2015-08-24 21:47:08 +00:00
Alex Monk b5dd86685b ve.ce.MWTransclusionNode: Pass number of templates to context
Fixing <visualeditor-dialog-transclusion-contextitem-description>.

Bug: T109564
Change-Id: Icdf762b3761227c3fcedefc947ffc512520cff76
2015-08-24 14:41:07 -07:00
Ed Sanders 456439923a Fix pattern for matching wikitext headings
Fix the back-reference to \1 (1st set of brakcets).

Add an test to make sure the example sequences actually trigger the
wikitextString handler, and tweak test to ensure that the start-of-line
restriction in the heading regexp doesn't affect link matches.

Change-Id: I76187a12292a4923d1ee2505cfb955431ac252bb
2015-08-24 16:54:45 -04:00
Alex Monk b0507f692d Move MWReferenceSourceSelectWidget out to Citoid
Merge after Iaca69f17

Bug: T109988
Change-Id: I80c1be419e545aecdc9f7db98133776d4b4cc326
2015-08-24 15:24:17 +01:00
Ed Sanders a33b082c13 MWWikitextStringTransferHandler: Show indeterminate progress bar while converting
Also store the abortable API request so it can be cancelled
by the dialog.

To test this, put sleep(4); in ApiVisualEditor.php.

Depends on Ied21e574baa in core.

Change-Id: I83ffa9e0b7164ca4a34eae86cde452d8f38dc853
2015-08-23 14:18:40 -07:00
C. Scott Ananian ee06f94879 Update VE core submodule to 89f6c2d7
New changes:
89f6c2d Strip trailing quotes when autolinking URLs

Local changes:
* Strip trailing quotes and non-URL characters when auto-linking

  Update ve-mw to match I58a9c7f97ef10d9f495e65da17f208b9fc431aa4 in core,
  since otherwise the ve.ui.LinkAction.test.js case with a quoted link
  will begin to fail.

  Make the set of stripped characters better match the combination of
  EXT_LINK_URL_CLASS in the PHP parser and the explicitly-stripped
  trailing punctuation in Parser.php::makeFreeExternalLink().

  Add some international quotation marks while we're at it to make
  everyone equally happy.

Change-Id: Iaffac4b073aeafa4f1137265c2d95e425c24d553
2015-08-23 14:03:01 -07:00
C. Scott Ananian ceb0e1f867 Autolink typed ISBN/RFC/PMIDs
Depends on Ibdad2fa98fca08eeaa96bf33a08dd7723c1edb8c in Parsoid.

Depends on I3dcd289ed7b565b9162ee671038eeb45449e1215 in ve-core.

Bug: T109498
Change-Id: I5650410d7fca30c90baddd4f0c3f6d80e6b39042
2015-08-23 13:59:22 -07:00
Ed Sanders e59ee87887 Add spacer above basic reference option
Also add classes to basic/reuse so they can be differently styled.

Bug: T108725
Change-Id: I4d128afe86c7fae2d8cbd8a57749970942e39e76
2015-08-23 20:06:35 +01:00
jenkins-bot a2060f57c1 Merge "MWLinkNodeInspector: Remove 'Open' button" 2015-08-21 19:30:40 +00:00
James D. Forrester 55f78fcbf6 MWLinkNodeInspector: Remove 'Open' button
You can now do this from the context menu. No need to have extra buttons, and
this makes it consistent with the MWInternal/MWExternal link inspector.

Bug: T109646
Change-Id: Ifd4b3645c66ba2f32ccee7e2848967cf5e7ec82e
2015-08-19 15:58:13 -07:00
C. Scott Ananian 21b86a2b69 Use ve.dm.MWInternalLinkAnnotation for autolinks where appropriate
Change-Id: I904e797732c98a07654772a4f2432ba3ae5d7050
2015-08-19 16:57:06 -04:00
C. Scott Ananian 2852f6368f Builder for ve.dm.MWInternalLinkAnnotation
Add ve.dm.MWInternalLinkAnnotation.static.newFromTitle to build an
appropriate internal link annotation from a mw.Title.  Tweaked some
method signatures to avoid repeated reparsing of the title text.

Also refactor ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref
to explicitly return a boolean indicating whether the result was determined
to be an internal link.

Bug: T64816
Change-Id: I74385d7b3ede1794398dabb749185f4080509b99
2015-08-19 16:57:06 -04:00
James D. Forrester bf520fee03 build: Enable jscs jsDoc rules 'require*Types' and make pass
Change-Id: I60c769f1cb028e4f4da7aeb04ed2383b689ddbc8
2015-08-19 11:38:35 -07:00
James D. Forrester 282ddfa1b6 build: Enable jscs jsDoc rule 'checkTypes' and make pass
Change-Id: Idbf6e698ba7015ee5e4f1cf78234ad3f187f1c06
2015-08-19 11:37:13 -07:00
James D. Forrester 00d3226be1 build: Enable jscs jsDoc rule 'checkParamNames' and make pass
Change-Id: Ifcd3f67524c32148ff3591263d6374b31ee57d3b
2015-08-19 11:33:59 -07:00
James D. Forrester 85f91f394e build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass
Change-Id: I7c0fabc93834d19198caea8f5dd1834e9e473d0a
2015-08-19 11:21:01 -07:00
James D. Forrester 945242a55a build: Enable jscs jsDoc rule 'checkAnnotations' and make pass
Change-Id: I76abb1eb1f3e1a2e8a4c03f577a080f4889b3a6d
2015-08-19 11:09:34 -07:00
James D. Forrester 19df1d4c8a build: Enable jscs rule 'requireVarDeclFirst' and make pass
Change-Id: Ia2f765d12bde001c329c2ff4c080a36b71de9803
2015-08-19 11:05:01 -07:00
James D. Forrester f5c6f61163 build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass
Change-Id: I846d36c15e1b1f810d2ef7fd422f8412790bcb0f
2015-08-19 10:33:02 -07:00
Alex Monk 5e02fe9f7c Save dialog: Don't try to pass in undefined checkboxes fields to setupCheckboxes
checkboxFields in the setup data is optional, it's only actually set up by
DesktopArticleTarget's overridden openSaveDialog function, not mobile's
(or presumably other Target classes).

Bug: T109501
Change-Id: Ibc5f821be822fa3704bbfb55345687dd7795e203
2015-08-18 20:34:32 +00:00
Ed Sanders 17f0fffe85 Update VE core submodule to master (1191940)
New changes:
de69c36 Fix typos in function names
fa80099 [BREAKING CHANGE] Split out linear context from context
db1d28c Only show alien context for focusable nodes
1191940 build: Bump grunt-jscs to 2.0.0 and make pass

Local changes:
* Update context inheritance

Change-Id: I284e2b30cd1903770482ee1c554687b676a2d626
2015-08-18 11:24:08 -07:00
jenkins-bot d0b3c40239 Merge "Set the default feedback message to the page URL" 2015-08-18 15:55:25 +00:00
jenkins-bot 46f87b4aba Merge "Detect paste of wikitext and convert it" 2015-08-18 15:55:22 +00:00
C. Scott Ananian a6775796fe Detect paste of wikitext and convert it
This invokes Parsoid to convert likely wikitext pastes.

This addresses about 20% of the <nowiki> insertion quantified at
https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:%C3%89diteurVisuel/Avis/Nowiki
for 2015-04-08 which were due to inadvertent pastes of wikitext.

For a better user experience, suppress Parsoid's P-wrapping if the
output consists of a single top-level P element.  This ensures that
pasting '[[Foo]]' won't add an unexpected newline before the paste.

Bug: T54204
Bug: T109449
Change-Id: I26a4cd8dc5b7e7caf16ca081dbe7baf6a7db8e5c
2015-08-18 15:16:06 +00:00
Ed Sanders 87daf4773d Fix typos in function names
Change-Id: Id8a9bcd1b4409bc8132ac6007b75274074f5f477
2015-08-18 13:54:51 +01:00
jenkins-bot a150550bea Merge "MWNumberedExternalLinkNode: Provide a context item" 2015-08-17 20:16:27 +00:00
James D. Forrester 31b4466d5f MWNumberedExternalLinkNode: Provide a context item
Bug: T98211
Change-Id: I0ca7811f5be5ce058f2ec22b2ce80e3228af5886
2015-08-17 13:10:58 -07:00
jenkins-bot 14dde31998 Merge "Convert save checkboxes to OOUI widgets" 2015-08-17 17:53:16 +00:00
Ed Sanders 960ecf8103 Convert save checkboxes to OOUI widgets
Anything with type=checkbox is coverted, and its label is found,
either by for=id or by finding a wrapping label.

All other inputs are stored in $otherFields for form building.

Bug: T86617
Bug: T70572
Change-Id: I94376fef18d02d2058bb548c11ae17f3dec7268c
2015-08-17 18:37:06 +01:00
C. Scott Ananian c197d0b075 Update VE core submodule to master (d020898)
New changes:
985edd2 Localisation updates from https://translatewiki.net.
9883b44 Follow-up 985edd24: Fix build for added language 'shn'
b0d5ee2 Localisation updates from https://translatewiki.net.
18ca837 Localisation updates from https://translatewiki.net.
f6a0945 Don't include trailing punctuation in autolinked typed text

Local changes:
* Add MW-specific trailing punctuation rules for autolinking

Change-Id: Iaa620142222f47e9fde2d03b935f38c24d38800b
2015-08-17 10:01:54 -07:00
Alex Monk 48f941caf9 Set the default feedback message to the page URL
Bug: T109081
Change-Id: Ibc36acd38738e2d45621d477c0406b28a744290a
2015-08-17 17:26:12 +01:00
jenkins-bot 02bb6f2cea Merge "MWMediaResultWidget: Fallback for 'images' without dimensions" 2015-08-14 19:47:39 +00:00
Robert Vogel 7047830bf3 MWMediaResultWidget: Fallback for 'images' without dimensions
When the MWMediaResultWidget receives a file that has no graphical
represenation (width:0 height:0) it uses minWidth of 30px for width of the
thumbnail.

This is, for example, the case with PDF files if the PdfHandler extension is
not active.

This patch solves the issue by falling back to the thumbwidth/thumbheight
values if width/height are 0.

Change-Id: I6bdaf1aafc0c45e26d31cd9dd9504e193f04e717
2015-08-14 19:40:48 +00:00
James D. Forrester 1d6085b801 Update VE core submodule to master (e61ebf2)
New changes:
61d20a1 Hide on-screen keyboard when selecting nodes on all mobile platforms
e5aff79 Localisation updates from https://translatewiki.net.
a99a897 Update OOjs UI to v0.12.3
3c01a14 Make DM nodes sensibly hashable
a611eb9 Make ve.dm.example.postprocessAnnotations fluent
496c895 Update ve.dm.ElementLinearData#hasContent documentation
fcaa035 Support RegExp sequences; trigger sequence matcher after newline
edda1d4 Add a mechanism to wait until ve.init.platform has been created
e174155 Autolink URLs when typing
ac9248f Allow drag and drop of links (and subsequent autolinking)
c88fad6 Localisation updates from https://translatewiki.net.

Local changes:
* Define `ve.init.platform.getUnanchoredExternalLinkUrlProtocolsRegexp`.
* Make `ve.ui.MWLinkAction` extend `ve.ui.LinkAction`.
* Override `ve.ui.LinkAction.getLinkAnnotation` so auto-links use the proper
  `ve.ui.MWExternalLinkAnnotation` type.

Change-Id: I934f76158512e2e89b614ed92fef6481f70728e7
2015-08-12 14:31:06 -07:00
jenkins-bot e6fe32902d Merge "Don't reset edit summary every time we open the save dialog" 2015-08-11 22:45:41 +00:00
Alex Monk 45a2beeaff Don't reset edit summary every time we open the save dialog
We were setting the edit summary box to the contents of the 'summary' parameter
every time the save dialog opened, but actually we only want to pay attention
to that the first time the save dialog opens.

Bug: T108329
Change-Id: Ic7b456ca8d7dd7cef8bc27629e3655ce9b97e755
2015-08-11 20:39:31 +01:00
jenkins-bot 788788f11d Merge "Don't error when we try to close a reference/media dialog with inspectors still open" 2015-08-11 19:01:41 +00:00
jenkins-bot 17297c94b4 Merge "ve.ui.MWMediaDialog: Remove dead code with 'HACK' comments" 2015-08-10 22:24:20 +00:00
jenkins-bot b186920c10 Merge "ve.ui.MWMediaDialog: Remove weird spinner relicts" 2015-08-10 22:24:18 +00:00
Bartosz Dziewoński 7bef835dfb ve.ui.MWMediaDialog: Remove dead code with 'HACK' comments
I am unable to find any trace of a .oo-ui-dialog-content-footless
CSS class anywhere.

Change-Id: I9a363c1305ca8f5ce25b8684daf0cb6d6c79bf73
2015-08-11 00:07:52 +02:00
Bartosz Dziewoński bfb5ba34ad ve.ui.MWMediaDialog: Remove weird spinner relicts
This seems to be dead code.

* ve.ui.MWMediaSearchWidget does not have a #$spinner property.
* .ve-specialchar-spinner class does not have any styles defined.

Change-Id: I6fd35274bc1444303b67f8138ab875f0c6da7e4a
2015-08-10 23:47:20 +02:00
Ed Sanders d9ff657c51 Remove Minerva MobileWindowManager.css
Moved to core in Ic916562d.

Bonus: rename default folder form apex to default.

Bug: T96703
Change-Id: Ied452d831e497125ce312a03b180e3581b30e4ec
2015-08-10 08:49:35 -07:00
Ed Sanders 0e62e577e4 MWMobileSaveDialog: Use short save messages for space
Change-Id: I04e01a8941f905384e385caf1267d7c36cb2aa52
2015-08-07 17:38:52 +00:00
Ed Sanders ac9f1a0919 MobileArticleTarget: Give toolbar split focused/unfocused modes
Split the toolbar into two modes depending on if the surface is focused:
* When unfocused, show a hamburger containing back and source switch
* When focused, show editing tools, and a check button to unfocus

For the editing toolbar, space the tools out using table-cell layout
and hide labels below 480px.

Depends on I06813e3ff in core (surface blur method).

Bug: T93325
Change-Id: Ibf09cb29019d7a71e1e144b326710b1f6506cd0c
2015-08-06 15:43:36 -07:00
Ed Sanders 707628cfb1 [BREAKING CHANGE] Use save dialog in mobile
Bug: T96186
Change-Id: I4319e23da2d1bfd0cbba9719dbc9642a233bdf67
2015-08-06 21:52:14 +00:00
Ed Sanders f579ce52a2 *Dialog: Flag back/cancel actions
Change-Id: If3772863078a020eba9b9b43f58044a5aacb7296
2015-08-06 21:51:32 +00:00
jenkins-bot f4192a7847 Merge "Make transclusions which are td/th elements behave as table cells" 2015-08-04 20:37:41 +00:00
Ed Sanders de98382a55 Make transclusions which are td/th elements behave as table cells
Depends on Ic94242c0 in core.

Bug: T85648
Change-Id: I0f65fca37fe94486d0a736d763270b3dc5503649
2015-08-04 17:52:13 +00:00
Alex Monk 871a0a288f Unbreak meta dialog cancel button
Don't try to apply page settings changes to meta list unless we're actually
applying. "Cancel" shouldn't apply changes, we have another button for that.

Bug: T97682
Change-Id: I9eae20c3946b315413340268e44537cdbec2e455
2015-08-03 22:36:53 +00:00
Ed Sanders 322d1f54c6 MWMediaDialog: Remove redundant check of this.imageModel existence
The fact it has to exist for the two previous statements to
not fatal is a bit of a clue. I assume this made sense at
some point in the past.

Change-Id: Ic9c04395408301f514ff7e9a224b8e2c30d64896
2015-08-03 01:09:03 +00:00
Ed Sanders 022fa98856 Use target-specific command registry for lookup
Only use was in MWHelpPopupTool#onKeyboardShortcutsClick.

Depends on Ie24369b9 in core.

Change-Id: I630d3e55057ddf6f87e39ab2e99e93a71bd1d8bb
2015-08-03 01:07:47 +00:00
Ed Sanders dedc107507 MWCommandRegistry: Move commands' registrations to their code
By moving the registration to the code which introduce the commands, if any
module such as 'media' is omitted from an integration, we don't register a
command which is never used.

MWCommandRegistry.js remains to be used for over-rides of core tools' exact
commands, such as insertTable.

Change-Id: I84b4351b980a764d3c72a564f605821ae1c761f9
2015-08-02 17:55:09 -07:00
Ed Sanders 4ab947d336 MWSaveDialog: Remove unnecessary <br /> from diff panel
Change-Id: I430794d781c91886abb4802c7f53ad4e0ff14c3b
2015-08-03 00:43:51 +00:00
jenkins-bot a15c54f4db Merge "MWSaveDialog: Make a FragmentDialog now that's available" 2015-08-01 22:44:18 +00:00
Ed Sanders dc71b4849b MWSaveDialog: Make a FragmentDialog now that's available
* Make save a FragmentDialog and open with WindowActions so
  the selection is restored automatically.
* Pass in some information in setup data.

Change-Id: I254b71f252adce064b9c2d2bf2cb6c8d0018e31f
2015-08-01 22:41:17 +00:00
Alex Monk d6306d8a16 Don't error when we try to close a reference/media dialog with inspectors still open
Bug: T96630
Change-Id: Ie148149c9681a883116df12a23ae6e4c3b470daa
2015-08-01 22:44:34 +01:00
jenkins-bot c8ab0003f3 Merge "Stop removal of only template placeholder from transclusion" 2015-07-31 21:58:58 +00:00
jenkins-bot 16357376d0 Merge "When saving from review screen, swap to main save screen" 2015-07-30 19:13:23 +00:00
Alex Monk 45325e0db7 Settings dialog: Focus redirect target input when redirect is enabled
Bug: T106616
Change-Id: Ia635552825194908503b8e8eef61f5fa2733a9da
2015-07-29 23:58:43 +01:00
Alex Monk 7b7219fcb6 When saving from review screen, swap to main save screen
Bug: T107251
Change-Id: I78fb0b8804ffa4b8accd4d2619d7bbd34e2c4f1e
2015-07-29 17:48:43 +01:00
Alex Monk 5931751771 Trim external link before validating
We already trim it before setting it as the actual annotation href

Bug: T103450
Change-Id: I4c7117d7e1e89c98abbafb999033ab7b5f58bdff
2015-07-25 19:42:33 +01:00
Alex Monk 8ae71e205a Stop removal of only template placeholder from transclusion
Bug: T95252
Change-Id: Ibf0537fd63f8315750e398f72807741187985b19
2015-07-25 14:47:36 +01:00
jenkins-bot 43eb2acf84 Merge "Change reference context title from 'Basic' to 'Reference'" 2015-07-24 19:22:01 +00:00
jenkins-bot af015c120d Merge "Make missingref references uneditable, not uninspectable" 2015-07-24 19:21:59 +00:00
Ed Sanders 29116355e1 Change reference context title from 'Basic' to 'Reference'
'Basic' only makes sense in the context of other reference types.

Change-Id: I8137af3481e4ccbd2589e917e24898ff204440b6
2015-07-24 12:03:05 -07:00
Ed Sanders 97e0cd28a5 Make missingref references uneditable, not uninspectable
Depends on I1ba8978dd in core.

Bonus: remove not-allowed-cursor & highlight title (which was
broken) now that we can display this information properly.

Bug: T106810
Change-Id: I1800490ba1b8e10ff54b26372a8a78661c1c7d68
2015-07-24 12:03:05 -07:00
Florian b390a32fda ParameterWidget: Connect to Search results widget 'choose' events
Instead of using the removed 'select' event submission on SearchWidget.

Rename event fired by MWParameterSearchWidget to reflect the new re-
emissioned choose event.

Follow up: I7fa97f208da0b3b185f1b09b87fef9c9afaee2f1

Bug: T106696
Change-Id: I1d954a7243649d7834373537d70bfadf68f52c9d
2015-07-24 20:25:01 +02:00
Alex Monk 3b978f0b4e Add save button to review mode on save dialog
Bug: T69868
Change-Id: I393a37333ea4988547c82e1fa9747b5e034de9bd
2015-07-24 01:34:13 +01:00
James D. Forrester 57f8fc5368 build: Drop last jscs over-ride and make pass
Change-Id: I4ff60af79cfc6e09e284d51f9b7ac2afa900f0f5
2015-07-22 15:13:09 -07:00
Bartosz Dziewoński 9134ec2d73 Disallow typing newlines in the edit summary
Prevent typing newlines by pressing the 'Enter' key on the keyboard,
like in a single-line <input type=text />; and filter newlines from
pasted / IME'd text.

Also:
* Use 'classes' config rather than .$element.addClass()
* Remove no-op 'tabIndex' setting (this is the default already)

Bug: T106325
Change-Id: I42d18f51f5ca989818577d6f045f6a516bb5b121
2015-07-20 13:57:25 +02:00
Ed Sanders 8e0394da5c Support command whitelist feature
Depends on I87d8aa3 in core.

Bug: T106061
Change-Id: I694e4e5a83f281da92380a895b72611141838f42
2015-07-18 18:20:49 -05:00
Ed Sanders bb46c34255 Update VE core submodule to master (edaa19b)
New changes:
aab2e90 Localisation updates from https://translatewiki.net.
826055a [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget

Local changes:
* [PULL THROUGH] Rename MWSurfaceWidget to MWTargetWidget

Bug: T94066
Change-Id: If578e15c1ee7effd5ca1d6073521a6c59caac255
2015-07-18 17:19:05 -05:00
Vikas S Yaligar d42e10cacb [BrowserTest] Added screenshots scenarios for links and categories
Also minor cleanup of rspec old "should" syntax, changed all occurences to
"expect" syntax.

Change-Id: I0c2dfc18d06812ed9da2f6c0056c95b7755e5afd
2015-07-18 15:39:28 +00:00
Ed Sanders 0c1eb0cf33 Remove listeners from deprecated search widget 'select' events
Attach listeners to search *result* widget 'choose' events instead.

Also, pass reference model as 'data' to MWReferenceResultWidget, instead
of index so we don't have to do a lookup later.

Change-Id: I8a9b7ddaa70e29406726ac8463582a8bcf813128
2015-07-13 17:06:28 +02:00
Ed Sanders 5fb8d3a4d0 ve.ui.MWReferenceResultWidget: Remove unused 'divider' code and styles
Also, tweak documentation.

Change-Id: Iaf5045bd65d0d484c8810f4bbe097d6710ca6e7e
2015-07-13 17:06:27 +02:00
Alex Monk b8c39de8ef Bypass ve.ui.MWInternalLinkAnnotationWidget.prototype.getHref when determining text
Bug: T104838
Change-Id: I0f754c949e494744adab5f191b5e8acce0c5d0fe
2015-07-09 02:03:04 +01:00
Ed Sanders 84eadef74a Use core dimension widget times separator
For de-duplication, and because trailing whitespace is not allowed.

Bug: T104691
Change-Id: I2e65799daae7e57e6e638b3d6dcf968a6f4582c7
2015-07-03 13:21:29 +01:00
jenkins-bot 3321989d82 Merge "Populate the internal target lookup menu when the user opens the link inspector" 2015-07-02 22:39:23 +00:00
jenkins-bot de8afeb833 Merge "MWInternalLinkAnnotationWidget: Force 'Open' button to use full path" 2015-07-02 22:39:21 +00:00
Alex Monk a5281d01c7 Populate the internal target lookup menu when the user opens the link inspector
Instead of only having it be populated upon setup.

Bug: T97723
Change-Id: I5ead32625efa79289b38955546a5843adef13101
2015-07-02 20:37:13 +00:00
jenkins-bot 78aba18b1e Merge "Use new hasContent method on linear data" 2015-06-30 15:47:42 +00:00
Ed Sanders 472c98053d Ensure placeholder styling matches document
Bug: T96593
Change-Id: I23bb1393a9a6779b70ed1004496f3ca6ff038e43
2015-06-30 09:47:34 +01:00
Ed Sanders 6822635158 Use new hasContent method on linear data
Change-Id: I430e628a9db30970ecdf6996bc51e7440a474077
2015-06-30 09:45:24 +01:00
Roan Kattouw 6aac8eed78 Follow-up 8112c3ba30: fix JS error on link inspector teardown
LinkAnnotationInspector in VE core calls
this.setAnnotation( null ); on teardown, which causes
MWLinkAnnotationInspector#onInternalLinkChange to be invoked
with a null fragment.

Bug: T103176
Bug: T104231
Change-Id: Ibb50ba1696609bebdfc2857ea292ee30b6b5126a
2015-06-29 23:53:49 +00:00
Bartosz Dziewoński 6d18641e4d Specify 'associatedWindows' for link and citation tools
Depends on I21fb955ecb697060263538914014d5712e013695 in core.

Bug: T98845
Change-Id: Id7f59c0095e8d85bb608bed0ab60603665fbca47
2015-06-29 16:26:32 -07:00
Alex Monk 93c2ac5014 Don't add basic reference tool to catch-all
Bug: T101130
Change-Id: I225da5cb6a9b961af556029166bdf728197475e4
2015-06-29 19:42:00 +01:00
jenkins-bot e3f439d5fe Merge "Get rid of Category: prefix when looking up categories from the API" 2015-06-26 15:34:35 +00:00
jenkins-bot 112d1e3744 Merge "MWLinkAnnotationInspector: Get HtmlDocument in a different way" 2015-06-26 10:45:16 +00:00
Alex Monk d4e2c55cfc Get rid of Category: prefix when looking up categories from the API
Bug: T103777
Change-Id: I27a81d832e3da7a0177d1c69af605c0525415b6b
2015-06-25 20:19:15 +01:00
Matthew Flaschen 8112c3ba30 MWLinkAnnotationInspector: Get HtmlDocument in a different way
Get the HtmlDocument in a different way that doesn't involve
ve.init.target.

For page (non-Flow) MW VE, I checked that it yields the same result.

Bug: T103176
Change-Id: I54bdf4f29f6acf4359be45b5b2ddfd23b5835c34
2015-06-25 11:08:54 -07:00
jenkins-bot ee6c0fb892 Merge "Use new MediaWiki core TitleInputWidget" 2015-06-25 00:23:44 +00:00
Ed Sanders 52cb066dc7 Use new MediaWiki core TitleInputWidget
All link input/title input functionality has been moved to core, so
we can replace the link widget, redirect widget and template search
widget with it.

Depends on Ib463e60cad96 in MediaWiki core.

Change-Id: I452f3b86ead403307072cf904f0553c9771f4300
2015-06-24 17:06:00 -07:00
Alex Monk c0de5f2f51 MWInternalLinkAnnotationWidget: Force 'Open' button to use full path
Instead of just assuming we're in /wiki/. That might be OK for VE core
and external links, but not for internal MW links.

Bug: T85619
Change-Id: I53d7fed63a66e3c72d4c8fd66cd1f85fb10a2e55
2015-06-23 22:26:10 +00:00
jenkins-bot 4984df9331 Merge "Improve readability of license text in save dialog" 2015-06-16 00:19:03 +00:00
Glaisher 8a134783bd Improve readability of license text in save dialog
Previously, it failed in WCAG contrast ratio tests. To make
it pass, font size has been slightly increased and color
has been darkened.
Increased the line height to match increased font size

Bug: T100017
Change-Id: I073ca96c64d5e3af3c01936d34e9e83e9384b4b5
2015-06-10 14:41:16 -07:00
C. Scott Ananian 85b86fb45d Stop using deprecated aliases for OO.ui.mixin.*
These classes were renamed in OOUI v0.11.4.

Change-Id: Ie932eb3bf5e65866ae4ba3bf2317facb1e740d3b
2015-06-10 20:25:04 +00:00
James D. Forrester df79ed8c4b Update VE core submodule to master (5befc34)
New changes:
3368c4c Remove some assumptions about the state of the context
79918af Move contexts to subfolder
820eaec Tests for some drag/drop functionality
e5f0e3e Convert CE surface tests to use a mock UI surface
c81dbcf Localisation updates from https://translatewiki.net.
7561ff3 Create a mock UI surface that only contains a model for model-only action tests
ad60333 Convert test timings on APIResultsQueue from seconds to milliseconds
b52d7df Table cursoring tests
3f8e821 Localisation updates from https://translatewiki.net.
9c737df Update OOjs UI to v0.11.4
5befc34 Stop using deprecated aliases for OO.ui.mixin.*

Change-Id: Ida6d4ba724686d8189975c55a18c4a6c2cfe4875
2015-06-10 12:44:55 -07:00
jenkins-bot b24a4529c5 Merge "Empty all inputs on link inspector teardown" 2015-06-08 14:37:26 +00:00
Bartosz Dziewoński abbb62fe8e ve.ui.MWTitleInputWidget: Restore 've-ui-mwTitleInputWidget' CSS class
've-ui-mwTitleInputWidget-menu', too. Removed in
b3d2e9013f, but we actually
use these classes in styles and in browser tests.

Bug: T101600
Change-Id: I40dae9c68bbcba2f980c307fe0dfa0956b4eb78a
2015-06-06 13:17:32 +02:00
Ed Sanders 5ac580e18b Empty all inputs on link inspector teardown
The parent class only nullifies the active input, but for completeness
we should nullify both.

Change-Id: I3017ef0ca61753fefde1c23b43178d46c6308e9f
2015-06-05 16:17:29 +01:00
jenkins-bot 236e02aed6 Merge "Account for MWTitleInputWidget having been moved into MW core" 2015-06-04 23:11:01 +00:00
jenkins-bot d6982bc880 Merge "Fix tabbing to info/delete buttons in template dialogs" 2015-06-04 22:30:27 +00:00
jenkins-bot 351c54d1ab Merge "Make sure reference result menu can wrap" 2015-06-04 22:30:00 +00:00
Ed Sanders 325c9cb521 Move cursor to end when changing link mode
Allows you to keep typing after 'http://' in Firefox

Bug: T98895
Change-Id: I785863e9a3bd3c0d548bee13ae2810eccc739a8f
2015-06-04 18:23:34 +01:00
Ed Sanders d3718edb4d Add in required calls to updateActions
Change-Id: I8c584d7bd48c957b5b07ff1bf6b52748165c18dc
2015-06-02 22:57:12 +01:00
Ed Sanders e8149e2588 Always preserve input when switch between internal/external links
Although an internal link is unlikely to be a valid external link, this
prevents an annoying experience when the user switches to external and
then back to internal while exploring features.

Change-Id: I178cf3f641db683f5dd0a49c246c204ded89760c
2015-06-02 22:03:08 +01:00
Ed Sanders e9384ad9ac Update VE core submodule to master (83d45d1)
New changes:
9d162ce Restore the selection to a sensible place when closing FindAndReplace
57229ac Only apply annotations if 'done' is clicked
bfb17ee Always show cancel button on annotation inspectors
91672cf Disable 'done'/'insert' button when input invalid
aef9cbd Only create annotations from text input if it is valid
a384b96 [BREAKING CHANGE] Make getTextFromAnnotation/getAnnotationFromText static
fa09ab7 Scroll table selection into view when it changes

Local changes:
Make getTextFromAnnotation/getAnnotationFromText static

Change-Id: Id3c2a1efb1f327fa6d5b93d57d90bb5bb8ee88f8
2015-06-02 00:47:13 +00:00
Roan Kattouw b3d2e9013f Account for MWTitleInputWidget having been moved into MW core
Depends on I43fb412ff6 in MW core.

Change-Id: Ia189e19f0ccb71adf9f3eeba4d600c2bcb360037
2015-06-01 17:24:52 -07:00
Ed Sanders 20d3526ae6 Use updateMwData when doing a live preview
Change-Id: Iadca47339c7d16034c5715677e0789de286f3ecf
2015-05-27 15:47:48 +01:00
Alex Monk d39e4c3ee9 Make sure reference result menu can wrap
OOUI was effectively overriding this with it's own rule for labels in an option
widget.

Bug: T99267
Change-Id: I82ce2d5ec1a859075d7bf1010ca76cdea9ead1a0
2015-05-17 14:23:45 +01:00
Alex Monk b2319433da Fix tabbing to info/delete buttons in template dialogs
We were selecting the outer <div>s rather than the actual links which you could
interact with via the keyboard.

Bug: T97323
Change-Id: I797739e45f2c0b4a1d39e4b1901bc0836c82f281
2015-05-17 14:03:04 +01:00
Ed Sanders 1962234efd Remove this.$ remnants
Change-Id: Ia32eebd4f6da156209fc0e9cc858e99ea454c262
2015-05-09 11:48:30 +01:00
Bartosz Dziewoński 82ae88a4a0 ve.ui.MWReferenceContextItem: Update context's size after rendering
Bug: T98430
Change-Id: I45eda8387774840020919948e164430038135f63
2015-05-09 01:59:21 +02:00
jenkins-bot f7839b9e8b Merge "Make sure switch to source editing button does not get disabled" 2015-05-08 23:32:42 +00:00
jenkins-bot b33ed74181 Merge "Use new selectItemByData method where possible" 2015-05-08 23:31:13 +00:00
Alex Monk db036ddd8d Make sure switch to source editing button does not get disabled
Was broken by Ief769ba0

Bug: T97646
Change-Id: I43ea85373a6ca427bf6a1c9e01d70b960d93db91
2015-05-09 00:25:19 +01:00
Ed Sanders 9d3d24ac81 Remove MWGeneralReferenceDialog
This was only opened by the Citoid inspector, which now
embeds a MWReferenceSourceSelectWidget.

Change-Id: Ic6fb3f3675de238f606acecc163ceda04ca78fb4
2015-05-08 11:11:33 -07:00
Ed Sanders 431f2abcfd Use new selectItemByData method where possible
Change-Id: I32f213bf2977623a0bde83fb9119fda42a1e9848
2015-05-08 16:15:51 +01:00
jenkins-bot 14f9edc493 Merge "Use new TabSelectWidget in link inspector" 2015-05-08 09:08:07 +00:00
jenkins-bot db741011b8 Merge "Update VE core submodule to master (2c0224d)" 2015-05-08 09:04:46 +00:00
Ed Sanders ec8a813dce Use new TabSelectWidget in link inspector
Don't use the full IndexLayout for now as it doesn't
work easily in variable height situations.

Depends on this feature being preset in MW core.

Bug: T97878
Change-Id: I5d949bf69b0721b288c37c1f12210b0265658eb5
2015-05-08 09:03:24 +00:00
Ed Sanders ff9bf1fcb3 Update VE core submodule to master (2c0224d)
New changes:
68959f2 Localisation updates from https://translatewiki.net.
2c0224d [BREAKING CHANGE] Link widget refactor
f81eefa [BREAKING CHANGE] Rename LinkInspector to LinkAnnotationInspector

Local changes:
Adjust for link inspector refactor

Create separate widgets for internal and external link
annotations. Remove annotation specific logic from link
target input widget.

Change-Id: I054c3fe7ac9c61fbc3302471abd58cab89fed5a4
2015-05-08 09:56:11 +01:00
Bartosz Dziewoński 5a896f726f ve.ui.MWParameterPage: Simplify handling of required parameters a bit
OOjs UI now implements this behavior with the right configuration.

Change-Id: I7c25508d0e2e59bd013b3ce7aff75fb05f58d9b0
2015-05-07 16:55:18 +02:00
jenkins-bot f1a6e87bc5 Merge "Don't show placeholder references in lists" 2015-05-06 23:17:28 +00:00
James D. Forrester 38239707b0 jshint: Kill file-level globals and add "moment" to the list
Change-Id: I923ba3490f5fc9b2aaf52d10a163f75dd6401c71
2015-05-06 19:01:27 +00:00
Ed Sanders 9811bc4fd9 Don't show placeholder references in lists
Allow references to be created as placeholders and exclude
them from ReferenceListNodes and the ReferenceSearchWidget.

Bonus: Fix reference numbering when items are skipped (in
list nodes and search widget).

Change-Id: I8dc5146c21f309e89ff4ddd939f7c65a0c358378
2015-05-06 19:15:20 +01:00
Ed Sanders 283047b604 Refactor reference source selection out into a widget
This can be re-used by Citoid.

Bonus: Improve placeholder copy.

Change-Id: I429ce5d7faae56955bcc09a9662d8a36c5098e44
2015-05-06 19:11:35 +01:00
jenkins-bot 79fd08b1d6 Merge "Remove bold from result titles so that query highlighting works" 2015-05-06 13:44:50 +00:00
Ed Sanders d2c096ceb8 Remove bold from result titles so that query highlighting works
Change-Id: I2ee03604ff000bbf9504236b4b3cf1120e1e100c
2015-05-05 19:17:15 +01:00
jenkins-bot b1e426d805 Merge "Convert 'external' links to internal pages pasted into the search field" 2015-05-05 17:47:43 +00:00
jenkins-bot 7d85bc3ae3 Merge "Highlight matching parts of link suggestions" 2015-05-05 10:12:28 +00:00
suchetag 6983fbe3d0 Highlight matching parts of link suggestions
Bug: T93697
Change-Id: I1778dc204e45e0b124e3a171b9cce171a3138a58
2015-05-05 10:08:26 +00:00
jenkins-bot 1094dc82cc Merge "MWTemplateTitleInputWidget: Add missing local var" 2015-05-05 00:00:45 +00:00
Ed Sanders d921a942b4 MWTemplateTitleInputWidget: Add missing local var
Change-Id: I7faf7610d3d75a4df1fa0f565fb32b08581e44d1
2015-05-04 16:55:02 -07:00
Ed Sanders 563bb66fc6 Make 'Search articles' / 'External links' i18n messages
Change-Id: I85e13821079c1c04c5f183fc63ba9243ce01a12d
2015-05-03 12:54:33 +01:00
jenkins-bot 0cda56dc15 Merge "ve.ui.MWParameterPage: Remove dead CSS" 2015-05-01 00:47:39 +00:00
jenkins-bot 2cda9f39a9 Merge "Fix line height inside notice/help popups" 2015-04-30 21:21:35 +00:00
Bartosz Dziewoński 2608a6c66b ve.ui.MWParameterPage: Remove dead CSS
Duplicates OOjs UI's 'invalid' flag styles.

Bug: T97516
Change-Id: Ic96c521ea07e02a4f3511550b0db09cf72111fc5
2015-04-30 22:19:12 +02:00
jenkins-bot 0824d064ec Merge "Make static methods static in linkCache" 2015-04-30 16:13:21 +00:00
Ed Sanders c32cccd90b Make static methods static in linkCache
Also switch out logic duplicated in MWLinkTargetInputWidget with
LinkCache#processpage.

Change-Id: Ie6f3599d4ea5cc9057cf4403f003da00f18cdebe
2015-04-30 17:00:45 +01:00
Ed Sanders fd538835ef Fix line height inside notice/help popups
In wikitext editor these messages were in mw-body-content where they
inherited a sensible line height, so apply one manually.

Bonus:
* Make header bold
* Remove some duplication with inheritance

Change-Id: Ia7eaa556815ee6645a85162de03198e5a4dc7b03
2015-04-30 14:02:36 +01:00
jenkins-bot 6cb513b29c Merge "Update for changes in OOjs UI (Ib40e3477)" 2015-04-30 02:19:18 +00:00
James D. Forrester 65112a7e10 Show different icons for different result types
* Disambiguation
* Redirect
* Not found
* Page exists

Bug: T93694
Change-Id: Ic4a60c95e37de372e8d0c12878dece67a2662343
2015-04-29 17:51:34 +01:00
Alex Monk 6f17fde4cd Convert 'external' links to internal pages pasted into the search field
Bug: T94334
Change-Id: I0ed67e6579b9ed0a0565968fd253fdf5c6151683
2015-04-29 16:11:32 +01:00
Ed Sanders 702fc724d7 Follow redirects in the link inspector API
Show redirect targets first, then any redirects to it
immediately after.

Change-Id: Ifde579410b4fbf42e0598e4b069963162333da55
2015-04-29 11:53:40 +01:00
Ed Sanders df6a570f82 Only pull description from wikibase
Filters out 'alias' and other terms not being used yet.

Change-Id: I5d155c76b85de1e5d1d5fb234f565fd6f1658766
2015-04-29 11:17:24 +01:00
Ed Sanders 377f6e4eea Separate inputting of internal and external links
* If the user switches to external links, clear the input
* If the user types something with a protocol, automatically switch
  them to external links. If they manually switch back to internal,
  remember that and don't auto switch them again.
* If the user inputs something without a protocol into the external
  link box, prepend 'http://'

Bug: T93699
Bug: T93700
Change-Id: Ia0e3a04f34077e7bd56254112dafd86ad865cbe2
2015-04-29 11:17:24 +01:00
suchetag 00745cda87 Replacing current order of link suggestions
Replace current, sectioned, order of link inspector suggestions
(existing, redirect, disambig) with order from API.

Reduce number of matches to 5, and show new page suggestion last.

Bug: T93698
Change-Id: Ida887d889730d7749041942636d24e181c335697
2015-04-29 11:17:11 +01:00
Ed Sanders 59a638491d Fix height when descriptions not present
Change-Id: I9ae9043ebcc99c99d1226635ff408ae1d4015925
2015-04-28 23:26:15 +00:00
Roan Kattouw cd7cb6190d Follow-up 85381a6b75: update another instance of 'language' to 'textLanguage'
Change-Id: Id4e636c25fb50448659d24f5432c9ac12ca6f2c6
2015-04-28 12:55:58 -07:00
jenkins-bot 116e8ca84b Merge "Add images and descriptions to link context items" 2015-04-28 17:23:00 +00:00
jenkins-bot d8c0f9e8b3 Merge "Link inspector images and descriptions" 2015-04-27 23:51:38 +00:00
Ed Sanders f83f9ddc1e Add images and descriptions to link context items
Bug: T93695
Change-Id: Ieaa3ced06887f561085f892c6fb34de75a20ff88
2015-04-28 00:23:40 +01:00
suchetag 3963b1daf2 Link inspector images and descriptions
Fetches images from PageImages extension and descriptions
from Wikibase.

Bug: T93693
Bug: T93694 (partial)
Change-Id: I1bea6b7b57ab951e79468cfa00e9eecddc113d18
2015-04-28 00:23:40 +01:00
jenkins-bot 1b4fecb61b Merge "Keep the parameter list expanded after it was expanded once" 2015-04-24 16:52:29 +00:00
Moriel Schottlender 3a7b99f6a6 Keep the parameter list expanded after it was expanded once
In the template dialog, keep the parameter search widget expanded
with all parameters showing if it was already expanded once.

Also keep the parameter list available after inserting each parameter
instead of asking the user to click the add details repeatedly.

Bug: T95696
Change-Id: I14a47dbea5c69532238e7e67290e613121fdc40e
2015-04-24 17:45:04 +01:00
Ed Sanders d7ac742fbe Fix old dates
Change-Id: Ib98878221eb26c6582c304247122fa420bccb029
2015-04-23 16:01:33 +01:00
Bartosz Dziewoński 89b79bb373 Update for changes in OOjs UI (Ib40e3477)
Depends on I175fe468 in VisualEditor core.

Bug: T91152
Change-Id: I08c80cec84242eabd3da5bd3c829022df3e21636
2015-04-23 13:52:12 +02:00
jenkins-bot 3375b2fcb9 Merge "Rearrange images when the media search window resizes" 2015-04-22 01:14:18 +00:00
Moriel Schottlender 1d1079e7fc Rearrange images when the media search window resizes
This is a quickfix to make the masonry fit recalculate itself after
the window is resized. It is most significant for orientation changes
in mobile devices, as those lead to a resizing of the window and a
complete reorganization of the masonry fit rows.

Bug: T95017
Change-Id: Ibf3c74ea21d42f4a159d0b855be5672c8455639f
2015-04-21 17:57:17 -07:00
Moriel Schottlender a7cda892df Correct display for full-screen dialogs in Mobile VE
Dialogs should not be position:fixed in mobile as they are full
screen, and that behavior is dangerously buggy in mobile webkit.

Also remove the rules that hide template pieces in mobile so we
can show the citation dialogs in all their glory and function.

* Depends on ve-core fix I748123a362f9

Bug: T86233
Change-Id: I3daa2b733a7685cb5ff127625f6d2e51b416ec33
2015-04-20 17:15:19 -07:00
jenkins-bot cd0cc27720 Merge "Show template description in the template search" 2015-04-17 09:28:23 +00:00
James D. Forrester 85381a6b75 Update VE core submodule to master (2714bfc)
New changes:
8dc8b26 Trim leading and trailing whitespace from annotations
306feb4 Add get(Col|Row)Count to TableSelection and use in isFull*
1c06d21 Cursor holders for native cursoring to ce=false nodes
b08384d Provide file extension fallback for FileTransferHandlers
28844ed [BREAKING CHANGE] Move all icons to OOjs UI's icon packs
9d37355 demo: Set 'lang' attribute of target
8945420 Follow-up 8dc8b266: account for annotations that return []
c2bbc97 Localisation updates from https://translatewiki.net.

Local changes:
* Switch to using OOjs UI icons for VisualEditor core features
* Update test for whitespace trimming

Change-Id: I12b22a411600b6e8e61858e7ed600fb53eedd95d
2015-04-16 14:02:59 -07:00
Moriel Schottlender a669a4fc52 Show template description in the template search
For each template result, ask for the templatedata description. If
that description exists, show it under the template result.

Bug: T53436
Change-Id: If28d1eb082edca6f50c6c15c933a0b7d014eaeaf
2015-04-16 12:30:55 -07:00
Moriel Schottlender 1ab496d65a Use the preview widget in context items
Use the newly created preview widget to render consistent previews
of references in the context items and search widget.

Depends on ve-core fix Ia7e96e048e4b

Bug: T93042
Change-Id: I3a7f6402018924a18efbb49ba61a16787c41f1f4
2015-04-16 01:47:16 +00:00
Moriel Schottlender 203d1e8600 Correctly use mwcite action and hide basic/existing ref inside basic reference
Disable the option for basic reference and for existing reference from inside
the basic reference dialog itself.

Also make sure the dialog opens its intended target citation dialogs with the
new mwcite action rather than directly so the reference to the inDialog surface
is preserved.

Change-Id: Idc6e5b849e2dbd422807a6d3cacde8f274e42854
2015-04-15 15:43:31 -07:00
jenkins-bot 17b160b125 Merge "Remove obsolete comment; this functionality is now in place" 2015-04-15 00:52:31 +00:00
jenkins-bot 2fb464e552 Merge "Focus on the first input in template dialog" 2015-04-14 22:43:37 +00:00
jenkins-bot ec01cdfb94 Merge "Comment potential override of wikitextRef sequence" 2015-04-14 21:46:42 +00:00
Ed Sanders 4b15914047 Remove HTML escaping from createTextNode
Change-Id: Icb5ad749ed48808f6cf377bdd368bff3cf035913
2015-04-14 19:30:21 +01:00
Timo Tijhof 66c9d538c5 MWPopupTool: Don't assume editnotice html has a single wrapping element
In case of FlaggedRevs, for example, the software is given a loose
string of html with a Bold element, Text nodes, and Anchor element.

Bug: T95989
Change-Id: I3d345677507ffc08feec0f7785e148ac98f19cb7
2015-04-14 12:39:42 +01:00
Roan Kattouw 95bffa22a0 Stop using this.$
Has been a backwards-compatibility alias since OOjs UI 0.7.0.

Change-Id: I17d7c03e9d1b9fa991d88444d22abfd403269ee0
2015-04-14 02:54:01 +01:00
Matthew Flaschen fee6681049 Remove obsolete comment; this functionality is now in place
Change-Id: I2752c69e871965ac408aaa70eb268e129b587013
2015-04-13 19:11:34 -04:00
Ed Sanders 2bbcb13e9d Comment potential override of wikitextRef sequence
Change-Id: Iac6df7ecd5482fd65ec91927f3a02e4efdcd617e
2015-04-11 12:03:58 +01:00
Moriel Schottlender 35059ee54c Focus on the first input in template dialog
When the dialog opens make sure the first input is focused.

** Depends on OOUI change I9f1e908e0d **

Bug: T95450
Change-Id: I789bcf98ada7c3e2b9544426546775f65bab0edd
2015-04-10 16:45:22 +00:00
Moriel Schottlender c10483999e Focus the search box in the re-use citation dialog
Bug: T91479
Change-Id: I3ad7c99d2fded2d2f21bd210dd57ad9807d88e13
2015-04-09 16:28:17 -07:00
Moriel Schottlender 7c0b307d8a Allow for citation tools to work under the reference dialog
Set up the surface widget as inside the reference dialog, and let
the citation action notify the template dialog the name of the
dialog it is in. If the tool was executed from within the reference
dialog, skip over creating a reference and instead insert the
citation as a template.

* Depends on ve-core fix I709eeb0de475 *

Bug: T94621
Change-Id: I4871f8c0afe190117cc90e88227b37f292a71e20
2015-04-09 12:18:54 -07:00
Ed Sanders fdcd42f73a Split AlienExtensionNode into inline and block
MWExtensionNode:
* Inherit from LeafNode at the top level. Inline and block only
  differ in CE where inline has isContent set.

MWAlienExtensionNode:
* Inhert from MW(Inline|Block)ExtensionNode respectively. Both
  mixin MWAlienExtensionNode.

Bonus:
* Bring in paragraph unwrapping on inline nodes from MWMathNode

Bug: T93712
Change-Id: Ib04234f740cf1f27c861d8b3cfeea5e323b94678
2015-04-09 16:32:02 +01:00
Ed Sanders ed4278912c [BREAKING CHANGE] Make MWExtensionInspector inherit from NodeInspector
Also fix up logic duplicated between ExtensionInspector
and LiveExtensionInspector.

BREAKING CHANGE:
* nodeModel property no longer exists, use NodeInspector's modelClasses
  property, which is an array.

Bug: T93592
Change-Id: Ib0131c9485a903d73b770090bf8a938056782ba3
2015-04-08 20:51:20 +00:00
jenkins-bot 8000633fee Merge "Set default size to category popup widgets" 2015-04-07 21:18:13 +00:00
Ed Sanders 7d38c3023f Fix opening of specific reference dialog
Don't bypass WindowAction which does necessary things to the surface.

Bug: T95069
Change-Id: I1a3a480f000aa7500d1954cbe13787cd23f68360
2015-04-07 16:35:30 +01:00
Moriel Schottlender de4a1d7012 Set default size to category popup widgets
Don't rely on this.$element.width()/height() when showing the
category widget popups - instead use the default sizing. If one
thing goes wrong and the popup is clipped, all subsequent popups will
have a smaller and wrong sizing.

Change-Id: I38ac0ae97dd5d7c38cdcdcfb31f736b19837bd5a
2015-04-02 16:50:25 -07:00
Moriel Schottlender 545791648f Open the proper window when adding citation from the general dialog
When a citation is selected from the general citation dialog that
opens from the citoid inspector, make sure it opens the correct
citation window, namely the relevant cite-XXX window rather than
the transclusion window.

Bug: T94602
Change-Id: Idc8dd653e42011bd02c4bcec4aa9a02c9e2b7567
2015-03-31 14:38:52 -07:00
jenkins-bot ef304b3755 Merge "Fix choose event listeners" 2015-03-30 21:41:40 +00:00
Timo Tijhof eca25738df mw.Target: Defer parsing of edit notices to MWNoticesPopupTool
Also use an array instead of an object. The keys were already
meaningless (index numbers). A "wikimedia/*" Git search did not
show any usage outside MWNoticesPopupTool. However, the array is
backward-compatible with any code using it as an object for keys
or looping (just in case).

This should also make the order more reliable.

Bug: T87412
Change-Id: I683cc902bda5ba768e962af6725e657871b79b9a
2015-03-30 20:47:25 +01:00
jenkins-bot 1b3a655ac6 Merge "Simplify context item for MWAlienExtensionNodes" 2015-03-29 21:39:21 +00:00
jenkins-bot 51de927b65 Merge "Parent constructor simplification" 2015-03-28 02:58:52 +00:00
Trevor Parscal a3c2ed7d27 Don't position category popups -10px up
Bug: T94114
Change-Id: I05ddbeb42b49dab925fe9b46caf12c6201e68441
2015-03-27 12:14:09 -07:00
Ed Sanders 06ad00bf71 Simplify context item for MWAlienExtensionNodes
Just show the name of extension. 'MediaWiki extension' is meaningless
to most people.

Change-Id: I64dc4914874b3fb3f807d7e0155ad31f2a8e703e
2015-03-27 19:05:26 +00:00
Ed Sanders 2e654c01f0 Parent constructor simplification
Change-Id: I93be028cb76d7586c5bb56eb0b63c87d99413683
2015-03-27 18:56:16 +00:00
Ed Sanders 0a2fa11a4e Fix choose event listeners
* Choose can't emit with null
* Connect search straight to results' choose event.

Change-Id: I434829511ea70859d14e26f39095e0d094dea6c0
2015-03-27 10:51:06 +00:00
jenkins-bot c9cfcc1a92 Merge "Fixed the empty Transclusion Box problem" 2015-03-26 22:38:05 +00:00
ankita-ks 9096ebf7a1 Fixed the empty Transclusion Box problem
Bug: T52281
Change-Id: If6ba91497849b5ba311908359fde7f1db82b1fd0
2015-03-26 21:45:27 +00:00
jenkins-bot a950b213a4 Merge "Replace buttons with select widgets in GeneralReferenceDialog" 2015-03-26 20:52:35 +00:00
jenkins-bot 1d99839288 Merge "Remove this.fragment setting from ReferenceDialog" 2015-03-26 20:47:53 +00:00
jenkins-bot 6688867c49 Merge "Move append to after list builder" 2015-03-26 20:47:32 +00:00
Ed Sanders 1c3cfea6d8 Vertially centre cite-web icon
Change-Id: Iab1ba7a0616821717ee68cf2f290b6dd40fc5b24
2015-03-26 15:53:45 +00:00
Ed Sanders 872c7a3f98 Replace buttons with select widgets in GeneralReferenceDialog
Change-Id: I22016f1a362ece79894c5577e737b1df5180d82d
2015-03-26 13:58:40 +00:00
Ed Sanders 4650010f4d Remove this.fragment setting from ReferenceDialog
This functionality is already provided by inheritance from FragmentDialog

Change-Id: Ie7bde7310d91d13b6eae95b826d59c06d286b749
2015-03-26 13:38:39 +00:00
Ed Sanders 8352cde31d Move append to after list builder
Change-Id: Idf4407de8ad86e3f147308c82e533f9294c65aad
2015-03-26 13:10:30 +00:00
jenkins-bot 2c8f47492b Merge "TransclusionDialog: Initialize label mode button" 2015-03-20 00:34:48 +00:00
Trevor Parscal 5e833f0c10 Update VE core submodule to master (5d5f8a4)
New changes:
622693a Work around JS errors when editing image properties
a0498f8 [BREAKING CHANGE] Emit rerender for dead nodes

Local changes:
Use the new traverse function to bind handlers to rerender events of
generated content nodes to update the target of async rendered reference
content in reference context items.

Bug: T91314
Change-Id: I762a6c4c9438b431444c7af7b43043ee1517a15c
2015-03-19 16:14:17 -07:00
Trevor Parscal 8fc1e2dea0 TransclusionDialog: Initialize label mode button
Because the mode label is set after measurements of the foot are made,
the body of a ProcessDialog was set to overlap the foot.

At some point T93290 will be fixed, but in the mean time we can solve
this problem by setting an &nbsp; initially.

Bug: T92986
Change-Id: I995d5ecd81b86ee188cf237f74487ec70480e297
2015-03-19 23:06:46 +00:00
Trevor Parscal 9f660f9db8 Restore async rendering of ReferenceContextItem
We moved toward serialization, but in the case where we don't have a
rendering yet and it's happening async, we need to use the same DOM
container that will be rendered into.

Bug: T91336
Change-Id: I53920591fde02175d4162b1fe5899b97b10a5b0f
2015-03-18 23:28:24 +00:00
jenkins-bot ddaee51606 Merge "Insert a new references list immediately, rather than showing a dialog" 2015-03-18 02:28:54 +00:00
Bartosz Dziewoński 44e47a6e8f Insert a new references list immediately, rather than showing a dialog
If a references list node is selected, open the dialog to edit it.
Otherwise just insert the references list for the default group, since
this is what the user wants to do in 99% of cases.

* Replaced the simple 'referencesList' command (which opened the dialog)
  with a custom implementation in ve.ui.MWReferencesListCommand, which
  inserts the references list or opens the dialog like before.
* Removed the ability to insert a references list from
  ve.ui.MWReferencesListDialog, since it should now never open without
  a references list selected. If it does, throw an error.

I considered the behavior of always showing the dialog if there is at
least one references list already in the document, but I think it would
be confusing if the tool behaved differently depending on the state of
the document (rather than merely current selection).

Bug: T71727
Change-Id: Ifbbfa28548de9c0435c5174fb7762079f59bac54
2015-03-17 15:20:22 -07:00
Moriel Schottlender 73356c333a Add general citations dialog
Add a dialog to group the possible citation types and allow the
user to choose the right citation dialog for them.

Depends on Ibf29417 in VE-core; useless without I3d9caef in VE-core.

Bug: T62768
Change-Id: I22a64265475b1b4c94b46c5af196bd08331a05e7
2015-03-16 17:20:38 -07:00
Trevor Parscal 5cbd04ac3e Stringify and parse rendered references
It turns out there are events bound to the rendering of CE nodes that
prevent certain events. The quick fix is to just round trip the
reference rendering to through the browser's HTML serializer and
parser, but T92583 has been filed to find a more general solution.

Bug: T92427
Change-Id: I725a0d2dbb24af9cbe7b1e7e0c8e0bda7fd8417c
2015-03-12 23:41:11 +00:00
jenkins-bot 4e6e0026b0 Merge "Remove unused ve.ui.*Inspector.static.removable = false;" 2015-03-12 19:42:15 +00:00
jenkins-bot 0c8f0d8c6f Merge "ve.ui.MWLinkNodeInspector: Restore action buttons" 2015-03-12 19:42:12 +00:00
Bartosz Dziewoński e75774f667 Remove unused ve.ui.*Inspector.static.removable = false;
Nothing seems to refer to this anywhere.

Change-Id: I3c1c5f16a897377a2d2f8345758fb6e67ba69ccb
2015-03-12 19:31:46 +01:00
Bartosz Dziewoński 345879b277 ve.ui.MWLinkNodeInspector: Restore action buttons
Bug: T92525
Change-Id: Id305268b76cce4e56f0e98a9d7ac4e6c571470d2
2015-03-12 19:31:01 +01:00
Timo Tijhof 1afd31d85a Fix "Error /styles/widgets/images/broken-image.png 404 (Not Found)"
Follows-up f8720326b0. The stylesheet was moved to widgets, but
the image was left behind.

Change-Id: I147f9318062e785a034c4cc009874011d9e0ecaf
2015-03-12 19:13:17 +01:00
jenkins-bot 557e0e28ad Remove use of ve.indexOf and ve.getObjectKeys
Change-Id: Icbaa729209605fca8018e4bcbbe29c9ded64e7f2
2015-03-10 17:28:00 +01:00
jenkins-bot ba7db69583 Merge "MWParameterPage: Show the field's example if it exists" 2015-03-09 21:34:27 +00:00
Moriel Schottlender 530f5c05f5 MWParameterPage: Show the field's example if it exists
Also appending both the default value and the example value to the
field description. The input placeholder will show the default
value, the example value, or nothing.

Related to TemplateData change I9e2d66a805e25 but works without.

Bug: T53049
Change-Id: I4e5e57546f6d3c22e778ba061a5344ddee085c17
2015-03-09 14:25:18 -07:00
Bartosz Dziewoński 4c22083d07 ve.ui.MWLinkTargetInputWidget: Fix documentation
This function was not returning a jqXHR for a long time. It's usually
a mw.Api promise, but might be something else.

Change-Id: I59975cc9dfbea70e5ae666fcc9915f10bd199e4d
2015-03-06 11:14:34 +00:00
jenkins-bot 1a40f3c048 Merge "Add a threshold to 'read more' calculation in media dialog info" 2015-03-04 19:15:01 +00:00
Moriel Schottlender 06f29f343a Add a threshold to 'read more' calculation in media dialog info
When calculating whether to show the 'read more' button on fields
that are configured 'descriptions', use a threshold to check if
the height is enough to be shown.

Bug: T87265
Change-Id: I0601e4fa92cb58903641a146500cf560bc029425
2015-03-04 11:04:53 -08:00
Roan Kattouw ec2bff5535 Resolve URLs in MWInternalLinkContextItem
Exactly the same change as Ifee722a7f60.
Because we have such excellent code reuse, or something.

Bug: T85622
Change-Id: I18bd5d3923771b6ff149aa589bb2fa23beecf4f5
2015-03-04 17:17:06 +01:00
Moriel Schottlender ae72184c8f Work with the new mw.Feedback and add UserAgent checkbox
Add the new feature for user agent checkbox for the mw.Feedback
dialog. This bumps our MediaWiki dependency to 1.25wmf20.

Change-Id: I741ded83de4f575777a15cb20735e351039dc81f
2015-03-03 10:58:34 -08:00
jenkins-bot 757e8d1950 Merge "MWCategoryWidget: Remove entries from this.categories when appropriate" 2015-02-28 01:00:15 +00:00
Trevor Parscal 34da7d56b8 Update VE core submodule to master (2e1a0bb)
New changes:
04a5947 Localisation updates from https://translatewiki.net.
dd4691b Update OOjs to v1.1.5
2e1a0bb Context refactor

Local changes:
Add context item support for references, citations, templates and links

Change-Id: I5d488ecbf9768dc63de6e545505dbfd5eb84cc61
2015-02-27 18:21:13 -05:00
Alex Monk 9246fcd2ff MWCategoryWidget: Remove entries from this.categories when appropriate
So for example MWCategoryWidget#getCategories doesn't return stuff that was removed.

Bug: T89923
Change-Id: Id99ea2e3b7c74e186bacbcf796b6df3a131a37b1
2015-02-27 22:05:58 +00:00
Moriel Schottlender f0f8f52080 Refactor MWMediaResultWidget to resize better
For the masonry view, the result widget resizes itself according to
the rows and other images in the row. Up until now the resize was
a bit buggy, occasionally missing height/width values. This is
mostly due to rounding errors, but also due to a small double
calculation that is now fixed with this code.

Change-Id: If18adc5280e4bdbb9174b7c7e6e4eadf3c1ab26d
2015-02-26 16:42:14 -08:00
jenkins-bot b4998f0932 Merge "Use mw.Api to run requests rather than our own stuff in ve.init.mw.Target" 2015-02-25 17:26:27 +00:00
jenkins-bot b167051f15 Merge "Follow-up I0b4b8dca: Set redirect checkbox correctly on page setup" 2015-02-25 16:57:14 +00:00
Alex Monk edd9b68ab1 Follow-up I0b4b8dca: Set redirect checkbox correctly on page setup
Use setSelected rather than setValue, as done in I0b4b8dca for the rest
of the file.

Bug: T89511
Change-Id: I16ff6f7dc872b427373df1634cfa2f1a12da54ba
2015-02-25 16:53:20 +00:00
jenkins-bot 228c0f838b Merge "Check whether template is altered before allowing apply" 2015-02-25 16:27:38 +00:00
Alex Monk 9611f50fbd Follow-up I5636e744: Only set noeditsection class for no edit checkbox
Change-Id: I0994b38bdfaff2dfb4238e60e44764b7c6fd5c42
2015-02-25 02:37:15 +00:00
Alex Monk 85373bcb9a Check whether template is altered before allowing apply
Again. Originally done in I5a664f86, the crucial part of which was reversed
in I1500f480.

Bug: T89913
Change-Id: I39b0cdcdb5f76fa75f506c874ef6223d8d8d53e6
2015-02-25 02:12:28 +00:00
Alex Monk 8e48f94580 Use mw.Api to run requests rather than our own stuff in ve.init.mw.Target
Bug: T58659
Bug: T89435
Change-Id: I18162f04c50f48606378aed62ee99fccdc3159f6
2015-02-25 01:57:22 +00:00
jenkins-bot b6ad119f15 Merge "Remove unused $popupOverlay" 2015-02-24 19:15:28 +00:00
jenkins-bot bd4289241a Merge "Adjust Queue and Provider to work with generalized parents" 2015-02-24 18:42:40 +00:00
Ed Sanders e0e0cb446e Remove unused $popupOverlay
Change-Id: I17342d451833298b5b45ebd7d00cc17f3086df71
2015-02-24 18:19:07 +00:00
Roan Kattouw 2e0c051a37 Load mw.feedback on demand
It depends on jQuery UI so it pulls in a bunch of things
that we can do without while loading VE.

This does mean there's a network delay while we load
mw.feedback (if it's not in localStorage cache already),
so after the user clicks "Leave feedback", nothing happens
for a little bit until the code arrives and the feedback
dialog appears. There is no spinner or anything during this
time; we may possibly want to add one.

Change-Id: Ie4dd9efcfff238fefad2783e22575ffd3fc648e7
2015-02-24 00:30:03 +00:00
Moriel Schottlender 093cf012ea Adjust Queue and Provider to work with generalized parents
Generalize MWResourceQueue and MWResourceProvider so they are
extending the general classes from ve-core. This also allows for
tests in ve-core on the resource queue system.

* Depends on ve-core change I5346081317e *

Change-Id: If34cd99334f4ccb93015c3646f68ae3040b9c5d7
2015-02-17 17:22:21 -08:00
Roan Kattouw 237bb053d6 Remove the sanity check
It's slow, especially on large pages, and it's triggered
very infrequently these days, and only for known bugs.

In the future we should replace this with a debugging
interface that displays the DOM diff between the original
DOM and the round-tripped DOM, as opposed to the boolean
interface we have now.

By extension, this also means the visualeditor-needcheck
tag won't be applied to new edits any more, although
its registration and messages are kept around because
edits with this tag still exist in page histories.

Bug: T87161
Change-Id: I909153492a5786b4b69fccd42ce3c1d4bdb3a059
2015-02-17 17:14:34 -08:00
Moriel Schottlender 07034a7774 Normalize external links from the API
In beta labs some local files displayed their links without http://
make sure they all are normalized to have the prefix.

Change-Id: Ia19de9b31e234138603495f06750d202654a8788
2015-02-17 11:05:48 -08:00
Moriel Schottlender a06df576b3 Correct the license URL in the media dialog
The license url read the response object instead of the response
value itself.

Bug: T89544
Change-Id: Ibb22e47e0097e012279e21211e1c7e2f1545f2b1
2015-02-16 14:49:12 -08:00
jenkins-bot e738abff3f Merge "Move svgMaxSize and namespacesWithSubpages to site config" 2015-02-13 18:44:25 +00:00
Moriel Schottlender d1ff9e125e Make sure category widget methods call parent class methods
Mouseover and click events in the category widget should also call
their parent method.

Depends on the ooui change Ie576f4422

Change-Id: I73b574b28a5a60e4f046f3008407dbf4b1323b58
2015-02-13 18:29:20 +00:00
Timo Tijhof 5bf0ac251a Move svgMaxSize and namespacesWithSubpages to site config
These are currently in page-specific mw.config. As these are
not related any page, they should be in the global export.

This is needed to have our tests (and code base) run error-free
without a MediaWiki page.

Bug: T89434
Change-Id: Ic42bcd14028772ff0c06e28c76ffaf156f8b985f
2015-02-13 08:20:26 +00:00
Trevor Parscal a65148d69e Update VE core submodule to master (9240a51)
New changes:
50ccb23 Localisation updates from https://translatewiki.net.
9240a51 Update OOjs UI to v0.7.0

Local changes:
* MWTemplateDialog: Stop waiting for removed loading promise to
  finish, as in OOjs UI I2bfa013 the loading promise is removed
  since iframes were the only reason we needed it.

Change-Id: I1500f480d40d06e417366014b9c2a76f7ce9c29b
2015-02-11 16:50:45 -08:00
Moriel Schottlender a3973145d5 Display image uploader and artist correctly in the media dialog
Add the display for the actual uploader, and change the label
for the artist to "Artist" for differentiating the two roles.

Bug: T88835
Change-Id: Ie939572e7c1240321556f6f81ed9e67d792a339d
2015-02-11 11:14:43 -08:00
jenkins-bot 7ac177c02e Merge "Template dialog: Disable 'Apply changes' until a change is made" 2015-02-10 23:17:01 +00:00
Ed Sanders d6818c558d Use ve.ui.AlignWidget in media dialog
Change-Id: I70579971a22c5bfee1e373b57ba7fe24a46ef406
2015-02-10 10:49:53 +00:00