Commit graph

1431 commits

Author SHA1 Message Date
jenkins-bot 53dbf3ac2f Merge "Replace 'source' icon with OOUI's 'wikiText' one" 2015-11-11 01:42:00 +00:00
Alex Monk 87affb5ca4 Restructure education popup code to work without overriding onSelect
That code was breaking on mobile which uses a subclass of the normal
link inspector.

Bug: T117603
Change-Id: I75541230c21b1ee9eb73f6fb4b1fe5a5f9c14e75
2015-11-09 23:18:01 +00:00
Ed Sanders 216d0ea7a7 Update CommandHelpRegistry calls for breaking change in core
New changes:
281b543 Slugs: Remove vertical alignment hack
d6ddbe4 Localisation updates from https://translatewiki.net.
94bb263 Follow-up d6ddbe4: Fix build for added language 'sd'
bc8579d [BREAKING CHANGE] CommandHelp: Cleanup registry API

Change-Id: I65e2bfc299fbd60d6bdc7a57a030980b6cb8ab18
2015-11-05 07:29:44 -08:00
Ed Sanders 3716682570 CommandHelpDialog: Move registrations to where sequences are defined
Change-Id: I031575bbf40cd789252ac5e082bb5fa435eab257
2015-11-04 15:03:58 -08:00
David Lynch 6df227d4e0 MWCommandHelpDialog: update for core changes
Also: update VE core submodule to master (61f3fe7)

New changes:
4ef3666 Localisation updates from https://translatewiki.net.
cfa3482 Localisation updates from https://translatewiki.net.
d3486d4 CommandHelpDialog: Rename 'category' to 'groupName'
b5578d1 Localisation updates from https://translatewiki.net.
926595e Update OOjs UI to v0.13.1
61f3fe7 [BREAKING CHANGE] Create CommandHelpRegistry for CommandHelpDialog

Change-Id: If651ed30ab85175c7a262d9ccccc2e1613b0f3d6
2015-11-04 12:01:45 -06:00
Alex Monk 6341c4a3b5 Apply same hide/show logic to both education popup dots
Bug: T117627
Change-Id: Icbde23f396935b7f6275ed89ce264ce5e49ebf6a
2015-11-04 15:56:40 +00:00
James D. Forrester 09800aa249 Replace 'source' icon with OOUI's 'wikiText' one
Change-Id: Id66d436b9140604ace7ebfbec1f80dc8f3830a20
2015-11-04 06:15:29 -08:00
Ed Sanders 42b3463e7d Source icon: Use double brakcets
This is now a candidate for upstreaming to OOUI as the
'wikitext' icon, which is slightly larger.

Bug: T111038
Change-Id: I19a287926d6f100d2cb5ed1d713387a2dac56b37
2015-11-04 14:07:41 +00:00
Alex Monk b550323b53 Use mw.loader.using instead of weird hacks to load OOjs UI on action=edit
Change-Id: If03dab6130aed7662b04000b809884a514bb2762
2015-11-03 23:55:17 +00:00
Ed Sanders 6dd7576941 AceEditorWidget: Add method to clear undo stack
After the widget is initialised the caller will probably
want to clear the undo stack, so that the first state
is the initial value provided.

Bonus: Add documentation for the widget.

Change-Id: Ia331acc4177e32784061cae55c450eb0f83fd744
2015-11-03 13:41:09 -08:00
Ed Sanders 1b40e6434f VESwitchConfirmDialog: Set pending on the correct button
Button indices were the wrong way around; find the button by
name to avoid future problems.

Change-Id: I778ff11875539d38f5a8905c9ff472fd3bd6baae
2015-11-03 18:58:59 +00:00
Ed Sanders 28a5d0db84 VESwitchConfirmDialog: Use modes to hide 'keep' button
Change-Id: I92110ea14ded335db330721c08314c7a20169886
2015-11-03 18:57:15 +00:00
Ed Sanders 17898270ee CommandHelpDialog: Move insertions into a separate group
Also add table and comment insertions.

Change-Id: If87261bf3d01854ab1f7ce1b447589fa8098dcf2
2015-11-03 17:03:56 +00:00
Ed Sanders 91152e2c05 CommandHelpDialog: Use new method for getting access key prefix
Change-Id: I85628e9282d7b78a4fdd2ea2f3b0b72019302dcc
2015-11-03 11:06:54 +00:00
jenkins-bot adb0c427ef Merge "[PULL THROUGH] Remove resize detection now that TextInputWidget implements it" 2015-11-03 01:47:41 +00:00
Alex Monk f71a5a5bca Dialog for switching between wikitext and visual editing
Change-Id: I7046ffbe318d046b4baee11f4148ab77fc2af7fd
2015-11-03 01:36:29 +00:00
jenkins-bot 097482bbff Merge "MWEducationPopupTool: Changes to the dot" 2015-11-03 01:24:35 +00:00
jenkins-bot ab42a490d9 Merge "AceEditorWidget: Preserve selection on setValue" 2015-11-03 01:17:18 +00:00
Alex Monk 5eaa211d43 MWEducationPopupTool: Changes to the dot
Make the dot more like the one in the designs, with two circles etc.

Change-Id: Ic3e1b2dcd846c5825455b68697acab44016ee598
2015-11-03 01:15:44 +00:00
Ed Sanders e582fae840 [PULL THROUGH] Remove resize detection now that TextInputWidget implements it
This depends on the OOUI release which contains Iaadaf1f9f.

Change-Id: I24d3756d627fc3514d8b476f9af87fdecbaa1e09
2015-11-03 01:13:26 +00:00
jenkins-bot fdafb7e887 Merge "ve.ui.MWMediaDialog: Wait for upload booklet to initialize when setting up" 2015-11-02 19:08:06 +00:00
David Lynch 8bda88f661 Add mediawiki-specific sequences to the command help dialog
The extension registers a lot of sequences that don't apply to core
VisualEditor. Pretty much the opposite of the trigger situation, where
almost all are in core. So, merge them into the help dialog.

Update VE core submodule to master (be148ae)
New changes:
7380244 [BREAKING CHANGE] Include sequences in the command help dialog

Bug: T116013
Change-Id: I5ad2939c10140b954fb29e1e50414ab7d79aeab7
2015-10-31 21:28:57 -05:00
Ed Sanders bd22be33db AceEditorWidget: Preserve selection on setValue
Also avoid calling setValue when the value hasn't changed
so as not to pollute the undo stack.

Change-Id: I07fc5db0480a8583b361d472723f863ca90046f7
2015-10-30 16:14:09 +00:00
Thalia 7731508134 Make new error element
Bug: T114754
Change-Id: I5839ba62fe4b4708ff51dc549c5294189d7f8843
2015-10-29 22:32:42 +00:00
Bartosz Dziewoński 0238c53262 ve.ui.MWMediaDialog: Wait for upload booklet to initialize when setting up
Depends on I65a92e3915a6844056fb7b3a2758a168eb12e6b8 in MediaWiki core.

Change-Id: If59979f30315c7a2164457108362803544431615
2015-10-28 22:31:45 +01:00
Ed Sanders def886b845 AceEditorWidget: Make setters chainable and support invalid flag
Change-Id: I78f395459f526164c0c506beec62a0083817e64b
2015-10-27 19:02:17 +00:00
Ed Sanders 35b9c4119a AceEditorWidget: Use mw.loader#getState instead of private moduleRegistry
Change-Id: I845651af837ccc042b6193876e17ba2b571dfe9c
2015-10-26 09:31:37 +00:00
Ed Sanders 21aec73795 AceEditorWidget: Use showLineNumbers instead of showGutter
The gutter is still useful even if line numbers are hidden.

Change-Id: Ia85ce7cd4987eb0b7022dc35cfd1029fbe78e3dc
2015-10-23 00:04:57 +01:00
jenkins-bot 2018249d97 Merge "Create more MW sequences" 2015-10-22 21:49:54 +00:00
Ed Sanders 07d56b6b5d Create more MW sequences
* '{|' for tables
* '<!--' for comments
* '<gallery' for galleries

Change-Id: Ib78c411bf8676bc1974bb80515fd56c642cd67b7
2015-10-22 22:23:13 +01:00
Bartosz Dziewoński cf6178f3a1 ve.ui.MWMediaDialog: Reset upload booklet when done uploading
Bug: T115380
Change-Id: I7c252a08cc2f09385102650e4d437e74d3919e59
2015-10-22 20:30:44 +02:00
jenkins-bot 9e74b26c41 Merge "ve.ui.MWMediaDialog: Correct harmless typo in method name" 2015-10-22 18:26:15 +00:00
Bartosz Dziewoński 777fc0445e ve.ui.MWMediaDialog: Correct harmless typo in method name
Change-Id: Ibeb037896123349edac6bc74ab0d9541a2a63e93
2015-10-22 20:18:43 +02:00
Bartosz Dziewoński c5434b2db8 ve.ui.MWMediaDialog: Only disable 'upload' and 'save' actions on setup, not on tab switch
When the tab is switched, we already set a mode that doesn't allow
using these actions.

Bug: T116299
Change-Id: Ib3ba50f578face3d49bcd14e41afe01a3b3d15af
2015-10-22 20:12:03 +02:00
Bartosz Dziewoński bc9487cc8e ve.ui.MWMediaDialog: Move upload booklet init further up
The first time this is called, it will try to switch panels, so it has
to be done before we switch to the right panel.

Bug: T116217
Bug: T116219
Change-Id: I22411024995e22ae65bde1e6418748aedf026b1b
2015-10-22 19:44:39 +02:00
jenkins-bot bc15c3e189 Merge "Move sequence registrations adjacent to commands" 2015-10-22 16:12:38 +00:00
jenkins-bot ca982073aa Merge "Introduce Ace editor widget" 2015-10-22 15:47:07 +00:00
Ed Sanders 57d33a291e Move sequence registrations adjacent to commands
If a command is not registered because a file/module is not
loaded, the sequence should not be loaded either.

Change-Id: I45d86ad371c7b717601b6593eaa573292ebdd4ed
2015-10-22 15:15:41 +01:00
Ed Sanders 524c2c9ee0 '<ref' sequence: Trigger basic dialog if Citoid not installed
Change-Id: Ibb7589e760e5583e12581cd4fc07dc88101420ea
2015-10-22 11:21:20 +01:00
Ed Sanders 60c1ee7d56 Introduce Ace editor widget
The widget attempts to load the ext.codeEditor.ace.modes module
and if it fails, will fall back to regular TextWidget behaviour.

Bug: T49742
Change-Id: Ie483f6eba25e3732a396c18decc0e1844b806b23
2015-10-21 20:59:08 +01:00
Ed Sanders 760d9c130c EducationPopup: Tidy up DOM and CSS
Change-Id: I4effa34a4d3ddfca0f6ee61fe169a726dc0ec3f6
2015-10-15 22:35:30 +01:00
Roan Kattouw 17a5cf6a93 Followup 9d6fbc894e: fix JS error in education popup
If a tool had an education popup bound to it, but it was
suppressed because the user has already seen it (according to
the cookie or localStorage), then clicking that tool would
cause a JS error.

Also remove a workaround for a ClippableElement problem
that appears to be unnecessary.

Change-Id: I73a3f5f9cc1726e28e70fc545b72960afc5ac41c
2015-10-14 16:32:14 -07:00
jenkins-bot 81a89952ef Merge "Educational popups and highlights for links+citations" 2015-10-14 21:52:50 +00:00
Ed Sanders 4943127cde Link inspector: Show redlink in suggestions
This feature was accidentally dropped when the widget was moved to core.

Change-Id: I302b4b001f1db64b023dae73e36c85e491617e92
2015-10-14 17:24:53 +01:00
Prateek Saxena d1bf196f68 Media upload: Initialize booklet before setting file on drag drop
Calling initialize will clear all fields including the
OO.ui.SelectFileWidget that was just set.

Follows up I521909d27c390faad7d62f717f2b97b7676e5a63.

Bug: T40031
Change-Id: Ibc7ddafae9cb7718372520245a356938f4731479
2015-10-14 12:49:31 +00:00
Ed Sanders e1f9adebfe Rename ImageTransferHandler to MediaTransferHandler
Change-Id: If68e2e4a9dbff4707fb9cbbadcd69a7ff8375a4b
2015-10-14 12:41:25 +00:00
Ed Sanders a6c4c3b3e1 Follow-up Id473b45: Call getResults on input widget
Bug: T115448
Change-Id: I8bfbb3092aa49750930c6437b0526a8b900722f1
2015-10-14 11:34:36 +00:00
jenkins-bot cbddb00638 Merge "Stop using raw HTML for 'visualeditor-dialog-transclusion-no-template-description'" 2015-10-14 02:39:50 +00:00
Ed Sanders 7f2d9d0042 Media upload: Use new setFile method
Depends on I30ec98be0 in MW core.

Change-Id: Ied82ac8fd25a1c4b9818029429231ce2f39916d4
2015-10-13 18:25:09 +00:00
Ed Sanders 557340426f Media upload: Initiate upload process on image drop
Bug: T40031
Change-Id: I521909d27c390faad7d62f717f2b97b7676e5a63
2015-10-13 11:24:34 -07:00
jenkins-bot 3efea1d05e Merge "MWLinkAnnotationInspector: Close inspector when a search result is clicked" 2015-10-13 16:07:33 +00:00
jenkins-bot 7ac49bcfd9 Merge "ReferenceContextItem: Factor out getReferenceNode and use correct node" 2015-10-13 12:16:01 +00:00
jenkins-bot caaf0bd3cd Merge "MWLinkAnnotationInspector: Use IndexLayout for internal/external" 2015-10-11 12:42:02 +00:00
Ed Sanders d5766c2d5f Media upload: Hide tabs after first stage of upload booklet
Change-Id: Ie0cd0fe7761b3937de685ed18b96cc95b8ca4d4f
2015-10-10 16:52:35 +01:00
Ed Sanders aa5f0c2faf Media upload: Only reset upload booklet on dialog setup
Bug: T115059
Change-Id: I4ee9b408624ee3b0dfc3079f02ebbaf2e66f3fa3
2015-10-10 16:52:25 +01:00
Ed Sanders afb556813a MediaDialog: Rename bookletLayout to mediaSettingsBooklet
Change-Id: I04dbdfd14daedf614e8a47992231d48d72f7ff33
2015-10-10 16:26:40 +01:00
Ed Sanders f1f75bf511 MWLinkAnnotationInspector: Close inspector when a search result is clicked
Change-Id: Id473b45a222d53f6bca0168dad4adf536ccdf97a
2015-10-10 15:49:45 +01:00
Ed Sanders fff96cdc8f MWLinkAnnotationInspector: Use IndexLayout for internal/external
As originally intended, but avoided because of since-fixed CSS issues.

Change-Id: I60186c8f8a13eb9a7708716329dc959e1913665d
2015-10-10 13:02:16 +01:00
Bartosz Dziewoński 2e5a31d66a Stop using raw HTML for 'visualeditor-dialog-transclusion-no-template-description'
The bug in jqueryMsg that required this is now fixed. Depends on
I56d8f7ec03a70f5c2360d9c5099496ecb2f668ad and
Icc360724c75755a6ffc31792d8439cba142642ae in MediaWiki core.

Changes to messages were done with search-and-replace:
  <a $2>       --->  [[{{ns:template}}:$1|
  </a>         --->  ]]
  {{GENDER:$3  --->  {{GENDER:$2

Bug: T87131
Change-Id: I67475edb75fb5192a76fbe629d735d1f2dcd1d48
2015-10-09 13:10:00 +02:00
Ed Sanders 8ac173894d MWParameterPage: Focus value input when focussing page
Logically depends on I6a439cb13e in OOUI.

Bug: T114562
Change-Id: Ic9ad6ceca8e8f6cb7b1a0f56cd6ed858e39e1dfa
2015-10-07 14:33:55 -07:00
Ed Sanders fcc9be4fa4 Fix typo in MWMediaDialog
Change-Id: Id8133f9eee523a7cd237d4ca2814b29bce02fa0d
2015-10-07 19:34:21 +01:00
jenkins-bot b83511ac54 Merge "Add image upload tab to media dialog" 2015-10-07 01:54:20 +00:00
Ed Sanders 97ddc8af2b Add image upload tab to media dialog
Uses the ForeignStructuredUpload BookletLayout.

Bug: T40030
Change-Id: I103044210e714d99350a28a48619beacefb43eaa
2015-10-06 18:40:19 -07:00
jenkins-bot f764155edc Merge "Don't error when trying to re-use a reference as itself." 2015-10-06 21:58:06 +00:00
Alex Monk 9d6fbc894e Educational popups and highlights for links+citations
Bug: T108620
Change-Id: I42b0e06f50aca5cb783d88f79a080461e745ceee
2015-10-06 14:33:57 +01:00
jenkins-bot cd29e0376d Merge "Add error element to MWLiveExtensionInspector" 2015-10-05 22:53:20 +00:00
Ed Sanders 3f2a885e3e Ensure full error message is shown when inspector is closed
Applying staging doesn't emit an update event on the node, so
forcefully emit one with 'staged' equal to false, so the full
error is rendered (if present).

Logically depends on I8ebb26d4bc in core.

Bug: T114480
Change-Id: I7ba54b67982fc5b10839426cdc216e14c0e33c01
2015-10-05 17:15:40 +00:00
jenkins-bot 4878313bea Merge "Consistently use spaces inside brackets in CSS" 2015-10-05 15:02:25 +00:00
Ed Sanders 2c9b9e4d73 ReferenceContextItem: Factor out getReferenceNode and use correct node
Use the node from the parent dm document, not the internal list document.

Change-Id: Ieeb0a63bd40de7a8a2944322ba800feec7a7f4dd
2015-10-05 16:01:54 +01:00
jenkins-bot 7c0f17c2cf Merge "ve.ui.MWParameterPage: Use more natural DOM order for text field and buttons" 2015-10-05 11:55:04 +00:00
Thalia 9307fa7095 Add error element to MWLiveExtensionInspector
As part of the plan to render extension errors in the
inspector instead of the view, append an element to
contain the error. More specifically, the element is
a div that contains a LabelWidget (in which the error
message is displayed) and a ButtonWidget (to expand
and collapse the error).

Initially the error element is hidden, but if Parsoid
returns an error, the element will be shown. If the
error is longer than 1 line, it is truncated but can
be expanded. On closing the inspector, any remaining
error is collapsed and hidden.

Depends on I6002d9870d2b to work

Bug: T113172
Change-Id: Ie84130d4ac0da9a738bf98ad0a3677d47566d585
2015-10-05 00:22:22 +01:00
jenkins-bot 291065459c Merge "Use ve.setProp to set new pages list in MWTemplateTitleInputWidget#getLookupRequest" 2015-10-04 19:54:45 +00:00
Bartosz Dziewoński 205beb2b49 ve.ui.MWParameterPage: Use more natural DOM order for text field and buttons
OO.ui.BookletLayout does not respect tabindices when trying to focus
the first focusable element after a page is switched. Remove the need
for manually set tabindices in ve.ui.MWTemplateDialog by using natural
DOM order and absolutely positioning things to keep current design.

Bug: T114562
Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf
2015-10-04 20:39:16 +02:00
Ed Sanders 1eb0ef2011 Consistently use spaces inside brackets in CSS
Change-Id: Ie63a50cb16cb89dac7060857220485d7d23f2fe3
2015-10-04 18:33:43 +01:00
Thalia 34f6e11a19 Call updatePreview when closing the LiveExtensionInspector
Call updatePreview in insertOrUpdate node, when closing the
inspector. If edits have only been made to attributes that
don't affect the rendering, updatePreview will not have been
called, so the model won't have changed. Therefore
updatePreview should be called every time the inspector is
closed to make sure such edits are applied.

Bug: T113078
Change-Id: I48fb291487f76fc515f122646d205366a60dca62
2015-10-01 15:58:20 +01:00
Ed Sanders f814ea719b MWLinkAnnotationInspector: Use TitleSearchWidget instead of TitleInputWidget
Depends on I335bd912d in MediaWiki core.

Bug: T101169
Change-Id: I2932c9df5444d1363af5af9b438bb905ed298148
2015-09-27 14:03:52 +01:00
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