Commit graph

1036 commits

Author SHA1 Message Date
jenkins-bot 9b3d3080ce Merge "Remove use of bind() for inline functions" 2014-12-17 00:13:22 +00:00
Timo Tijhof 2b7ae8c175 Remove use of bind() for inline functions
Follows-up b0e8900, 447e8de, d3f26e65.

Contrary to binding a reference, this-overiddes for inline
functions gets messy and fragile. There's also a minor
performance overhead that can be avoided. No separation of
concerns, eiter, as the object is held by the closure.

Also:
* Remove left-over instances of @method.
* Remove redundant '0' argument to setTimeout.
* Use null instead of $ for apply() on static methods like $.when.
* Use .empty().append() instead of .html(). Does the same but
  without additional overhead and without confusion association
  with "html" which isn't used (it doesn't serialise and re-parse
  or clone, it just appends when given one or more nodes).

Change-Id: I797a3667c67d52568150be9be5d043d149f22077
2014-12-16 23:27:53 +00:00
Bartosz Dziewoński 08654b4f60 Update VE core submodule to master (fe2d908)
New changes:
fd433fa Add getter for toolbarDialogs in ve.ui.Surface
00c3eb7 Add 'done' button to find and replace dialog
3642dc8 Localisation updates from https://translatewiki.net.
fe2d908 Update OOjs UI to v0.6.0

Local changes to ve.ui.MWFormatTool.css for OOjs UI breaking change.

Change-Id: I6bf98ea988b3e1deb4824189ef8e6d59387b6ffc
2014-12-16 13:27:43 -08:00
Alex Monk 0d0172d43b Set 's' accesskey on save button inside save dialog
Can be done much nicer than I expected last time I looked at this task

Bug: T76161
Change-Id: I9541cd9dac69330ed8a802f301617619221bc263
2014-12-15 21:07:54 +00:00
Bartosz Dziewoński 29ff7b737e Rename some things for my sanity
Change-Id: I101943fa027947e73f7f7559bd706faadad90e95
2014-12-12 20:49:00 +00:00
Bartosz Dziewoński 16e8255f69 Update VE core submodule to master (b5e2b87)
New changes:
96d0936 Mark primary buttons as progressive as well
68f184c Localisation updates from https://translatewiki.net.
b96c9dc [BREAKING CHANGE] Rename method cmpOffsetPaths to compareOffsetPaths
862f31d Convenience compareDocumentOrder method
b5e2b87 Update OOjs UI to v0.5.0

Local fixes to correct for breaking change I32608c7f in OOjs UI.

Change-Id: I64f5e2f6ccc0056bfa9eda5e65e87789b97b8ad5
2014-12-12 12:29:05 -08:00
jenkins-bot 87143d4c36 Merge "Mark primary buttons as progressive as well" 2014-12-11 22:59:04 +00:00
James D. Forrester 57a68d082b Mark primary buttons as progressive as well
Also make save button primary.

In anticipation of Iee91d2c6 in OOjs UI

Change-Id: I123044bfaba631866ad32a35643f23686a17a16f
2014-12-11 22:55:16 +00:00
jenkins-bot fcdae1deba Merge "Fix image alignment in media dialog search" 2014-12-11 22:25:46 +00:00
Moriel Schottlender fbb6cd92b4 Fix image alignment in media dialog search
Make the image results align to the full width of the dialog. This
fix uses dynamic values of the width of the container rather than
a hard-coded value so it should work properly on all themes.

Bug: T78050
Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016
2014-12-11 17:15:25 -05:00
Ed Sanders 45518019eb Update VE core submodule to master (9ac8136)
New changes:
9929b6d [BREAKING CHANGE] Make ve.init.target an OO.ui.Element

Local changes:
* Fix target constructors now they generate this.$element

Change-Id: Ia6bf604c67305834a3f73863a10336cfbb83fa77
2014-12-11 14:00:28 -08:00
jenkins-bot 5a3c81db4f Merge "Surfaces should have parent document direction" 2014-12-11 19:04:13 +00:00
jenkins-bot edf1ed3dbc Merge "Bump command help dialog height again" 2014-12-11 00:45:06 +00:00
Roan Kattouw e68dd9c7c1 Bump command help dialog height again
Change-Id: I348ce317b46f040bc8a2d70e4392ce0dfe24611c
2014-12-10 16:24:14 -08:00
Moriel Schottlender e0894b807f Surfaces should have parent document direction
Make sure all surface widgets have documents that are initialized
with the direction of the parent document, so the alignment is set up
correctly.

Bug: T71969
Change-Id: I6e5f003e18a9c5808d9a4b148eddf0d0f7e29e67
2014-12-10 16:46:16 -05:00
James D. Forrester eac5aabeb3 ve.ui.MWParameter*: Use the destructive flag for all four remove buttons
Previously we were only doing it for one of the four.

Bug: T78033
Change-Id: Ib0091052a5c858dfd37b8755b6e3b84406b7c745
2014-12-09 14:28:40 -08:00
Roan Kattouw 3321261e98 Split up ve.init.mw.ViewPageTarget.css
* Move styles that apply to all targets to ve.init.mw.Target.css
* Move styles for MWPopupTool subclasses to ve.ui.MWPopupTool.css

Change-Id: I34c8a6200ee337debf00c4e432948f1b86f1b60a
2014-12-08 15:42:19 -08:00
Timo Tijhof ee954cbdd5 Use String#slice instead of discouraged String#substr
Aside from the confusion and differences between substr() and
substring() and IE8 bugs with substr(), substr() was removed from
the spec as of ECMAScript 5. It's been standardised in the
optional Annex B section of ES5.

Change-Id: I221ef6ae6956ce20dd9bb74510500f747d04c3b1
2014-12-06 21:26:20 +00:00
James D. Forrester baffe9d7e1 Update VE core submodule to master (32397d8)
New changes:
5e60f12 Ensure clipboard key is removed from paste target
32397d8 Update OOjs UI to v0.4.0

Local changes to compensate for new OOUI version, and updated wfUseMW call.

Change-Id: I005f7b23a36e04f1305d4aa037c19a5c7db9a699
2014-12-06 12:28:07 -08:00
Alex Monk fc6eaf6825 Don't re-enable apply changes in reference dialog if the changes have been undone
Per Roan on Ib5229bdc

Bug: T57976
Change-Id: I0450ab59ea8aa2e3130eb9124de74e67ffc0497f
2014-12-05 23:50:57 +00:00
jenkins-bot 7a0e11ed0c Merge "Disable Apply Changes in reference dialog until changes have been made" 2014-12-05 22:46:26 +00:00
Bartosz Dziewoński d39dfaa837 MWCategoryInputWidget: Don't explode on invalid titles
canonicalQueryValue can be null at this point, so let's not insert it
into an array that contains strings.

Bug: T76868
Change-Id: I8096a9c1017e883d28124bf807d2d375ae98452a
2014-12-05 21:07:57 +01:00
James D. Forrester e722c1726f Update VE core submodule to master (0229301)
New changes:
5eb7294 Find and replace
123a6ad Find and replace tool
557f70f Go backwards through find and replace results on shift enter
4a4ed81 Allow language widget to filter on available languages

Local changes to adjust.

Change-Id: I15e14d6d3c7ee60e465baf3a4df7572851cbca3e
2014-12-03 10:36:39 -08:00
Alex Monk db4d034fd7 Disable Apply Changes in reference dialog until changes have been made
Bug: T57976
Change-Id: Ib5229bdc480ec437436c5d8d351b06417d4ffd9b
2014-12-02 01:34:44 +00:00
jenkins-bot 7734e0083a Merge "i18n: Pass value to <visualeditor-dialog-meta-settings-newsectioneditlink-help>" 2014-12-01 19:35:34 +00:00
James D. Forrester 7ab402eeb5 i18n: Pass value to <visualeditor-dialog-meta-settings-newsectioneditlink-help>
Bug: T75969
Change-Id: I6bbe2dbec74edae9fb1b09e03f3102b7a2d0be97
2014-12-01 11:22:34 -08:00
jenkins-bot 55eba4c1cc Merge "Change event listener for caption surface in media dialog" 2014-12-01 19:05:09 +00:00
Moriel Schottlender 78b86cd72d Set panels after everything is initialized in media dialog
Only change the panels (and focus the caption surface) after the
surface is actually appended and initialized.

Bug: T76074
Change-Id: I3d514f38b5fd9f794c4ff8c44a64f5f3475a84bd
2014-11-26 19:26:44 -05:00
Roan Kattouw 8fc9b290c0 Followup c56a921: use cite-transclusion-* tools in MWReferenceDialog, not cite-*
Because a lot of toolbar customization was removed, use an evil
hack to get this in there for now. Should be cleaned up later.

Bug: T76082
Change-Id: I0fd5ddc6fa11162deb615f0b387d6d59c5cc4a3a
2014-11-26 15:49:04 -08:00
Moriel Schottlender 30ce139955 Change event listener for caption surface in media dialog
Make sure the dialog is listening to the correct event for when
caption surface changes.

Bug: T76074
Change-Id: I214947a440e4f78adf1541d8008599fe65ac8b2c
2014-11-26 20:04:07 +00:00
James D. Forrester e90cbe6a37 Follow-up I5bc30eca7: Register <visualeditor-formatdropdown-format-blockquote>
Also push it into correct place in the toolbar, and disable it from media and
reference dialogs' toolbars.

Change-Id: Icc3bf056860e35def13e03e77ffc6782acc4196a
2014-11-25 19:01:02 -08:00
jenkins-bot cee93a0758 Merge "If the user types in ':' at the beginning of a line, make it a blockquote" 2014-11-26 02:02:32 +00:00
jenkins-bot cb9a96f845 Merge "Follow normalisation response from category status query" 2014-11-26 02:02:27 +00:00
jenkins-bot dc76bb63fb Merge "If the user types in '==' at the start of a line, make it an H2" 2014-11-26 02:02:21 +00:00
James D. Forrester e314ed9938 If the user types in ':' at the beginning of a line, make it a blockquote
Depends on I9507219 in VE-core.

Change-Id: I2e3219b473799194f8d305d228fc9eb3403921a8
2014-11-26 01:58:53 +00:00
James D. Forrester 9a7eddee79 If the user types in '==' at the start of a line, make it an H2
Bug: T53897
Change-Id: Ic858a38f866d929d46041fb7df93102ec89eefb3
2014-11-25 17:52:57 -08:00
James D. Forrester f1fa43225a Provide '[[' and '{{' to trigger the appropriate window open actions
Bug: T52093
Change-Id: I917201ee07ee9a4269f5fe4cfa06aad9302aa69d
2014-11-25 17:50:10 -08:00
James D. Forrester 70c0b36ba6 Warn users who write ';' or ':' on a new line that it won't work
Bug: T71689
Change-Id: Id0ebae825ea013fe0968dcf458922802290e0b2b
2014-11-25 17:08:58 -08:00
jenkins-bot d34c275020 Merge "Work around broken BooketLayout#focus method in OOUI for now" 2014-11-25 23:57:26 +00:00
Roan Kattouw d2b8091372 Work around broken BooketLayout#focus method in OOUI for now
Change-Id: I1750951487fc7a8e1fcb5fff5dea6ee9a2547cf1
2014-11-25 15:54:03 -08:00
Alex Monk 378ab667e9 Follow normalisation response from category status query
To do things like strip off invalid invisible characters from the end of names.
(see bug)

Also rename that function because it covers more than just hidden status now

Bug: T74080
Change-Id: I8374695a991c4d3e397992ad9277b99d9288eec4
2014-11-25 23:35:43 +00:00
Ed Sanders 9ce13e70ac Register '<p># ' sequence for creating numbered lists
Replaces wikitext warning sequence.

Change-Id: I438654212284d4a022b11bd59ea2f8bc52f0d737
2014-11-25 22:40:05 +00:00
Ed Sanders 5ce4885529 Replace hacky wikitext warning listener with sequences
Uses the generic sequence detection now available in core instead
of a custom hack that had to been manually bound and unbound to
every surface and surface widget.

As the sequence detection looks at just-typed characters the behaviour
has reverted to showing a auto-hide message. This resolves an issue
with the previous system whereby typing in the same paragraph as existing
wikitext patterns triggered the warning.

Depends on I6a4d71d in core.

Bug: T53751
Change-Id: I7d914b1b60a1cf8c79a724e5f634e1e666c9562d
2014-11-25 22:39:29 +00:00
jenkins-bot a7dc4af551 Merge "Catch pagedeleted errors and give the ability to re-create the page" 2014-11-25 19:42:58 +00:00
jenkins-bot 0130b6b45c Merge "Create ve.ui.MWCommandHelpDialog.css for height hack" 2014-11-25 19:42:43 +00:00
jenkins-bot 9fd9730549 Merge "Fix rounded corners issue on help button by destroying notices" 2014-11-25 19:42:39 +00:00
Ed Sanders fa34e91da8 Create ve.ui.MWCommandHelpDialog.css for height hack
Height differs to core due to extra commands.

Change-Id: I8162ff4db86ceeac0ca92d165b185a418f9e4fc7
2014-11-25 19:19:16 +00:00
Ed Sanders 0ab28904e6 Fix rounded corners issue on help button by destroying notices
Empty this.$element in notices when there are no elements to display
as just hiding with CSS makes other items in the group no the last
child and therefore breaks any CSS rounded corners rules.

As notices are only ever generated at load, destroying the tool
is not a problem.

Bug: T63575
Change-Id: I63a044ca63f61b976f57e34ce9537034e68a2614
2014-11-25 17:12:40 +00:00
Ed Sanders f79aed7572 Update VE core submodule to master (8ca8c41)
Local changes:
* Rename paste rules to import rules (also used by drag and drop)

New changes:
f5d83f8 Remove data-parsoid removal hack
99f938f Create 'preserveGenerated' mode for cloneElements and use in copy
938b44d [BREAKING CHANGE] Rename paste rules to import rules
c51288c ve.ce.Surface: Move insert HTML path to DM
10ce4cf Provide a FileDropHandler for HTML files
701bb9c Provide a FileDropHandler for CSV and TSV files
ca6b444 build: Update update-oojs.sh and update-oojs-ui.sh scripts

Change-Id: I5cfa15ab3efd03e2c64c2f9f725cb3098f53b32a
2014-11-24 18:55:32 -08:00
jenkins-bot 17fd82b99a Merge "Fix MW skin hacks" 2014-11-25 00:47:32 +00:00
Ed Sanders c56a921585 Change command list from whitelist to blacklist
Also remove toolbar definitions as they can now be derived from
command availability.

Depends on If32d514a in core.

Change-Id: I2313f3cc2531686b27f96dc1110b28bb4b295f89
2014-11-24 18:28:37 +00:00
jenkins-bot 6b11f8d05e Merge "Always return boolean from an action" 2014-11-23 21:21:58 +00:00
jenkins-bot b69fef2196 Merge "Focus the bookletLayout on ready in the template dialog" 2014-11-23 17:19:11 +00:00
Ed Sanders 2ee4fc0b36 Always return boolean from an action
Command#execute expects this so it knows if the action was
successful.

Change-Id: Iaef1b7d217f0a6cd848b8df4a920c6546a79f503
2014-11-23 17:19:10 +00:00
Ed Sanders 2653ce3bb3 Fix MW skin hacks
* Ensure surface widget font size matches main surface,
  move vector-specific hack to vector css file and fix.
* Fix base font size in non-isolated monobook windows.
* Move monobook z-index hack to global overlay only.

Change-Id: I1607dc77f81ac9c522e09a3b502aeb38fee02178
2014-11-22 17:52:46 +00:00
Roan Kattouw 0bc3edfd91 Focus the bookletLayout on ready in the template dialog
Depends on I60377cb5 in oojs-ui

Change-Id: I5d8b73f878bf136efdc97493ef1f6e7bd6f56066
2014-11-21 18:13:27 -08:00
James D. Forrester a8b4fc4966 Update VE core submodule to master (c8201dd)
New changes:
ff237d4 Fix z-indexes in core
e88d43e Localisation updates from https://translatewiki.net.
cf61803 Consistently use ve.ui.WindowManager everywhere
f9dfdb8 Update OOjs UI to v0.1.0-pre (23565e7519)
f79f7e3 Update OOjs UI to v0.1.0-pre (8f8896196f)
c8201dd Update OOjs UI to v0.1.0-pre (9ed4cf2557)

Local changes for the breaking change to OptionWidget and sub-classes.

Change-Id: Ife6abd312d4dc97be67cb84eea4cb9c6a0a31b1d
2014-11-21 17:41:04 -08:00
Roan Kattouw 4cf254a31b OO.ui.WindowManager -> ve.ui.WindowManager
In keeping with Id6660a4b54 in VE core.

Change-Id: I6fa6c0cdc3e514a66889e41c2eb4c710650a3405
2014-11-21 13:58:53 -08:00
Alex Monk 9bb766c5bb Catch pagedeleted errors and give the ability to re-create the page
Bug: 52073
Change-Id: I86a6e1510ccb5e59e94a5262dd3ccd91fdf05a70
2014-11-21 21:44:15 +00:00
Ed Sanders 2997cee444 Fix lots of spelling mistakes and typos
Change-Id: Icf78d3d599326d3f12d09edcd2b8491ed35ade04
2014-11-21 13:00:50 +00:00
James D. Forrester 7317114187 Update VE core submodule to master (029fc7e)
New changes:
029fc7e Update OOjs UI to v0.1.0-pre (1fa4eb7a73)

Update changes:
Changes were generated by running this script:
https://gist.github.com/trevorparscal/265f1b8c854190637a1e

File changes:

Scripts (modules/ve-mw/ui/widgets)
- ve.ui.MWInternalLinkMenuItemWidget.js → ve.ui.MWInternalLinkMenuOptionWidget.js
- ve.ui.MWLinkMenuItemWidget.js → ve.ui.MWLinkMenuOptionWidget.js

File content changes:

Scripts (*.js)
- MWInternalLinkMenuItemWidget → MWInternalLinkMenuOptionWidget
- MWLinkMenuItemWidget → MWLinkMenuOptionWidget
- ContextMenuWidget → ContextSelectWidget
- ContextItemWidget → ContextOptionWidget
- TextInputMenuWidget → TextInputMenuSelectWidget
- MenuWidget → MenuSelectWidget
- MenuItemWidget → MenuOptionWidget
- MenuSectionItemWidget → MenuSectionOptionWidget
- OutlineWidget → OutlineSelectWidget
- OutlineItemWidget → OutlineOptionWidget

Styles (*.less)
- contextMenuWidget → contextSelectWidget
- contextItemWidget → contextOptionWidget
- textInputMenuWidget → textInputMenuSelectWidget
- menuWidget → menuSelectWidget
- menuItemWidget → menuOptionWidget
- menuSectionItemWidget → menuSectionOptionWidget
- outlineWidget → outlineSelectWidget
- outlineItemWidget → outlineOptionWidget

Change-Id: Ifded7f9e17923dbb56a722b7424ccd2854194c21
2014-11-19 17:04:26 -08:00
jenkins-bot bec4ecfb37 Merge "Rename input variables in media dialog" 2014-11-12 20:48:24 +00:00
Ed Sanders 320206fe42 Rename input variables in media dialog
Change-Id: I9b8edfaccb163aff313e267bb1a0f74455502242
2014-11-12 19:51:48 +00:00
Ed Sanders 06bccbe986 MWLiveExtensionInspector: Move event unbinding to teardown process
Change-Id: I6fae2ca3e1bc02b8edb707b4248b884a9f022c3f
2014-11-12 19:33:24 +00:00
jenkins-bot 287b2e8296 Merge "Follow redirects in the category input widget" 2014-11-12 18:59:28 +00:00
Alex Monk ba81c45da9 Restore selection after closing save dialog
Also simplify some weird focus code in MWSaveDialog

Bug: 72911
Change-Id: Ifb8fd9be96a199f86412247211e3920a35dd22bf
2014-11-11 23:55:39 +00:00
James D. Forrester 385f895980 Update VE core submodule to master (f5083c6)
New changes:
6ec286e Support for generic file drop handlers
4f2ab66 Generic progress dialog for drag and drop uploads
742e0fe Fix pasteSpecial command
87ea9e9 Fix up/down arrowing off a focusable node
643ea34 spinner.gif: Update with new version from Trevor
ffd8b1e Position the table context relative to the first section node
393776a Fix logic for ignoring (col|row)span=1
f94b10e Don't unmerge spanned cells when spanned cell is removed
3416764 TableContext: Simplify row/column overlays styles
e6c0038 Localisation updates from https://translatewiki.net.
fb1a922 Register select all as a command and perform programmatically
3c1ce93 Make caption tool available when caption selected
dd0ac7d Move disabling logic from tools to commands
8bf33a5 Bold & italic icons for Armenian
058b32c Update OOjs UI to v0.1.0-pre (05f0fefc3f)
c01d115 Create filedrophandlers folder for implementations

Local changes:
* Register new files
* Move disabling logic from tools to commands
  onUpdateState should only ever call setActive. setDisabled should
  already be determined by the command so that it can prevent itself
  being called by triggers.

Change-Id: Icdeaa4c152a0dcd839c8e7cc4e64b2215eb2de1e
2014-11-11 16:51:24 +00:00
Alex Monk 5462b5b219 Follow redirects in the category input widget
Change-Id: Ie33dc3779cb7f602949d2d1f25ebd7b60e894c97
2014-11-11 00:30:08 +00:00
Roan Kattouw aa84df021a Followup a86d824: fix reference to this in foreach callback
Bug: 73235
Change-Id: Ib8f877f747df6c8047c7e3d2c152e0e7a9f60b8a
2014-11-10 15:22:19 -05:00
Alex Monk de73246ee1 Show category items as red if they don't have description pages
Also fix some lies I wrote in related code/docs

Bug: 65517
Change-Id: Iafacee7d8e460913d84808fe38ecc8da4a1817c0
2014-11-08 14:27:27 +00:00
Roan Kattouw a86d824c56 Fix craziness in template dialog focusing
setMode() is called multiple times, but it didn't
check whether the mode being set was already set.
Because it's a setter, make it idempotent.

This fixes the problem where the first input will
be focused first, then blurred later, but it
introduces a new problem because the label for
the 'mode' ActionWidget is set from setMode().
To solve that, factor the setting of this label
out into its own function and call it on setup.

Bug: 73138
Change-Id: I9bb127f22f6c0b745b393c523ec42f320fc85cf3
2014-11-07 16:41:03 -08:00
jenkins-bot 27e70a6a21 Merge "Matching pages from suggestions in link dialog now actually work as links" 2014-11-06 21:49:07 +00:00
suchetag cb704dee84 Matching pages from suggestions in link dialog now actually work as links
* A subclass of MenuItemWidget from OOUI, MWLinkMenuItemWidget, is introduced that, when used in MWLinkTargetInputWidget for both
external and internal links, returns actual page links.

* MWInternalLinkMenuItemWidget is extended from MWLinkMenuItemWidget to support the internal links.

* LinkCache is being used in MWInternalLinkMenuItemWidet to stylize the links. Thus, getting rid of some old css classes.

Bug: 51205
Change-Id: I3ac18dabd514ca539fff1db3c67ae97931c3d4fc
2014-11-06 13:46:09 -08:00
jenkins-bot 1a6c46f7ee Merge "Use hasOwnProperty instead of 'key in obj'" 2014-11-06 12:37:04 +00:00
Alex Monk 3628fc0ffc Disable review button while save dialog is pending
Bug: 65310
Change-Id: I7cfb5d84b91b4a20282e126b8c863c15519b5a9d
2014-11-05 23:36:33 +00:00
Ed Sanders 0efbfa7e21 Use hasOwnProperty instead of 'key in obj'
Change-Id: I48f044c547b48a97cdfb31f7b887dca0ed7e341b
2014-11-05 20:54:50 +00:00
jenkins-bot d6c3a4aa92 Merge "Kill MWCategoryWidget#onLookupEnter" 2014-11-05 01:18:15 +00:00
Roan Kattouw a5e9e1f456 Fix indicator alignment in MWCategoryItemWidget
We were setting the height to 2.25em which just happened
to be right, but it depended on the browser's default
line-height being a certain value. Now that that's changed
with unisolation, the alignment breaks.

Instead of using a magic value, use height: 100%; so it
takes the parent's height. We don't even have to make the
parent position: relative; because it already is.

Also change the width to 2em, which is a much more defensible
value than 2.25em. Previously 2.25em kind of made sense because
that was also the height (resulting in a square box), but
now we don't have that excuse any more.

Bug: 72962
Change-Id: Id617bfaafefd1fc1530fbee29be5d935ec486b92
2014-11-04 16:53:11 -08:00
James D. Forrester 31bafa183d Update VE core submodule to master (a942301)
New changes:
2cc219a Update OOjs UI to v0.1.0-pre (571f26d0ab)
3543cb7 Protect against offset=-1 in insertContent()
7a3d456 [BREAKING CHANGE] Move selection restrictions from tools to commands
3d847bb Disable desktop context on table selections
41282dd Missed function rename from RangeFix change
dd6c8b8 Support toDomElements returning an empty array
9be6464 Placholder -> placeholder
9bdd0a8 Restore basic styling to toolbar in core target (only)

Local changes:
Move selection restrictions from tools to commands

Change-Id: I88f3d04946bd1d03ed001d747475a8b495a0f64c
2014-11-04 14:11:04 -08:00
Alex Monk b1e47365d0 Kill MWCategoryWidget#onLookupEnter
This code was somehow broken by Ia47bc897 (wtf, how?)
Actually removing it seems to do no harm (wtf?), as far as I've been able to tell...

Bug: 72906
Change-Id: If7eb34a20cc8060b594a567278241b02a8ee327a
2014-11-04 20:35:55 +00:00
jenkins-bot bb96a9083f Merge "Replacing MWTitleInputWidget.getValue() with MWTitleInputWidget.getTitle()" 2014-11-04 01:18:38 +00:00
suchetag 0165a53044 Replacing MWTitleInputWidget.getValue() with MWTitleInputWidget.getTitle()
Now that we have .getTitle() as a method in MWTitleInputWidget, replacing the callers
of MWTitleInputWidget.getValue() with .getTitle(). This fixes a bug in the .getTitle()
method in MWTitleInputWidget which was not taking the namespaces into account before.

Also fixes: the error when entering "Talk:" as a template title. The button to add template
remains disabled when "Talk:" is given as an input to the title here.

Bug: 71998
Change-Id: I1e629a61ec8b035d93a4b7acfecab81934019166
2014-11-03 17:05:51 -08:00
Roan Kattouw fe2895b145 MWReferenceGroupInputWidget: Remove dummy call to onInputChange()
This was needed to make the ComboBoxWidget initialize
its selection, but Idcbf38c53 makes that happen automatically.

Depends on Idcbf38c53 in oojs-ui.

Bug: 72783
Change-Id: I8d3a014f862ece7f4f201af205a8a7ca6c365eaa
2014-11-03 21:12:17 +00:00
James D. Forrester d0e62e1ab3 MWGalleryInspectorTool: Provide the tool in the toolbar
Now that the toolbar hides extra features by default, we don't need to
use autoAddToGroup and autoAddToCatchall over-rides.

Change-Id: I493f7d46a3f77e7c62af05f8e05ae4dde7147e4b
2014-11-03 11:19:04 -08:00
jenkins-bot b5e235ea85 Merge "Clean up LookupInputWidget subclasses and use new functionality" 2014-11-03 18:41:48 +00:00
Roan Kattouw a0167c08c7 Clean up LookupInputWidget subclasses and use new functionality
MWCategoryInputWidget:
* Use @inheritdoc
* Don't modify data parameter in getLookupCacheItemFromData()

MWLinkTargetInputWidget:
* Remove this.choosing in favor of setLookupsDisabled()
* Explicitly close menu on choose
* Remove manual emission of change events
** This looks ridiculous, it doesn't seem to be necessary,
   and it causes infinite event loops. But I'm very curious
   why this was added in the first place.
* Remove onLookupInputChange override that is now unnecessary
* Use {} rather than [] for fake empty result
* Prevent programmatic focus from opening the menu

MWTitleInputWidget:
* On choose, close menu and disable lookups while changing value
* Use @inheritdoc
* Remove mentions of "template" from getTitle() documentation

Bug fixed:
* When choosing a suggestion in MWTitleInputWidget,
  new suggestions would be loaded and the menu would reopen

Depends on Iecae9b582 in oojs-ui.

Change-Id: I716f99bb464a5cebd4f17701197f768e4e0e02a9
2014-11-03 10:39:03 -08:00
Alex Monk 0dde78bd54 Pass $overlay to redirectTargetInput in MWSettingsPage
So the TOC options don't display over the top of suggestions for it

Bug: 72838
Change-Id: I73f0f9e3a44a9f641b6bed2a42cac2c8293cc5c9
2014-11-01 04:49:36 +00:00
jenkins-bot 8f8613f27b Merge "MWTransclusionDialog: Blur active input when switching modes" 2014-10-31 22:55:24 +00:00
Roan Kattouw c324ed8b9a MWTransclusionDialog: Blur active input when switching modes
When show/hide options is clicked, the inputs in the main pane
move as the outline transitions in or out. This causes any dropdowns
below these inputs to become mispositioned: they don't move
because they're in an overlay.

To work around this problem, blur the active input when show/hide
options is clicked, so any dropdown attached to it is closed.
I tried blurring and immediately refocusing the active input to
force the dropdown to reposition itself, but that looks awkward
because of the transition (we'd have to wait for the transition
to complete before repositioning it, and during the transition
it'll stay open in the wrong place).

Bug: 72789
Change-Id: Ibd963690573af905066839f7276077089fa893c6
2014-10-31 04:19:41 +00:00
Roan Kattouw 884aa1f243 Add forgotten $overlay pass-through in MWReferenceDialog
We were doing this for the exact same widget in
MWReferenceListDialog, but not here.

Bug: 72785
Change-Id: I4a905b944be44ec1aec5cdba7580283ec18c5c7c
2014-10-30 14:50:10 -07:00
Alex Monk b71bb51171 Remove more references to ve.bind
Seems some of them have crept back in since I1a7fc7f2 (and we missed one somehow)

Bug: 72156
Change-Id: I5631fb7d5963d06aeb238c1daa44344b2060ef1a
2014-10-30 20:55:44 +00:00
James D. Forrester 6626450419 Toolbar: Make styling and insert menus collapsible
Also re-synchronise toolbar in MWMediaDialog and MWReferenceDialog.

Change-Id: I8cd5f0d9f7e188fa1a7ab8d34a2796340f5e99b7
2014-10-30 12:22:20 -07:00
Ed Sanders e0981a327f Create mwTables with wikitable attribute by default
Change-Id: I094b1823248e16dd3b9a0a10ba13104f14798621
2014-10-29 12:52:24 -07:00
suchetag c6f7f361c2 Introducing isValid() in MWTitileInputWidget
A method isValid() is added to MWTitleInputWidget which would validate the titles given as inputs

Bug: 71249
Change-Id: I7749165652bd3c0bb08ca42289a425fe8e25483d
2014-10-29 11:13:42 -07:00
suchetag 9191465039 Introducing getTitle() in MWTitleInputWidget
A method for getTitle() is added which can return the valid title,
or, it can return null, in case the value isn't a valid title

Bug: 72468
Change-Id: I8a13afc9a66c167fe25010743c0d9e1424133d96
2014-10-29 18:12:04 +00:00
jenkins-bot d73a692f57 Merge "Show warning on reference dialog when editing a reference used in more than one place" 2014-10-28 17:36:07 +00:00
jenkins-bot 78b2a2885c Merge "Pass $overlay to widgets that need it" 2014-10-28 17:30:57 +00:00
jenkins-bot 5eb0baf55d Merge "Sprinke some child selectors around in MWTransclusionDialog.css" 2014-10-28 16:55:27 +00:00
jenkins-bot 1cc342a462 Merge "Put icons back in template parameter search" 2014-10-28 16:48:52 +00:00
Alex Monk 3846e20463 Show warning on reference dialog when editing a reference used in more than one place
Bug: 52792
Change-Id: I2b183c3867ddb601041f9989964aa6f78b5f37e4
2014-10-28 12:58:50 +00:00
Roan Kattouw 97dcee132d Put icons back in template parameter search
These disappeared when DecoratedOptionWidget was split
out of OptionWidget in I508c1555 in oojs-ui back in July,
and apparently no one noticed.

Make MWParameterResultWidget and MWMoreParameterResultWidget
inherit DecoratedOptionWidget instead of OptionWidget so
the icon config parameter is recognized again.

Change-Id: I08d8a0466c211a29eb62043131725073dece4eb5
2014-10-28 01:32:22 +00:00
Roan Kattouw 33c5b38b64 Remove oo-ui-{ltr,rtl} special-casing for parameter icons
It works both with and without in isolated dialogs,
but styling things this way breaks in non-isolated dialogs.

Change-Id: Ia498b48d8c199f50df326ddeb61d958cbe2c520d
2014-10-27 17:49:42 -07:00
Roan Kattouw d0f273d6db Sprinke some child selectors around in MWTransclusionDialog.css
Indiscriminately styling all .oo-ui-widget elements with a
descendant selector is very evil, use a child selector instead.
The use of a descendant selector broke inline dropdowns.

Change-Id: I25c5007ef1ffab9e59c46c3b11270b8f77610327
2014-10-27 17:38:20 -07:00
Roan Kattouw 61e8115e8b Pass $overlay to widgets that need it
Also change this.$overlay (which doesn't even exist) to
config.$overlay in MWTemplatePlaceholderPage and document it.

Compensates for I39df86373ea in oojs-ui.

Change-Id: I4a233c058439d6cfb38d80ece890c8fe57d58f49
2014-10-27 17:36:19 -07:00
jenkins-bot 0dad360036 Merge "Disable parameter add icon when there's no transclusion parts" 2014-10-27 20:39:46 +00:00
Alex Monk d128378f5a Disable parameter add icon when there's no transclusion parts
Would put this code in onBookletLayoutSet, but that doesn't appear to be
getting called in this case.

Have to detect whether or not we should be changing the disabled status, rather
than just setting it straight away, which would break every other case where
onBookletLayoutSet is called.

Bug: 63158
Change-Id: I6f62479291424d9b2ee0e42481dec9d085169c63
2014-10-27 20:33:35 +00:00
jenkins-bot 20b20bc97c Merge "Move autoValue logic from ui.MWParameterPage to dm.MWParameterModel" 2014-10-27 18:15:08 +00:00
Alex Monk 8120dac27b Move autoValue logic from ui.MWParameterPage to dm.MWParameterModel
Also add missing MWParameterModel#getDefaultValue

Bug: 72404
Change-Id: I4bb117d419f3845f44e321f848e95bb246a24e24
2014-10-27 03:31:36 +00:00
Alex Monk c4dfd834dd Allow removing all parts from a transclusion to remove the transclusion
Rather than make a new function to determine whether it should be apply-able or
not (and run some checks again), move the enable/disable call into a new
function to do these checks and set the result.

Bug: 72191
Change-Id: I133afa1784e1afd44054f93ed84018894f7c6400
2014-10-25 00:13:29 +01:00
suchetag 0b983d9f82 Add template button remains disabled when entering space as a template
Bug: 71998
Change-Id: I69edcf7ece1ccd02df8fbae20a8149e8a1981a44
2014-10-24 06:54:00 +05:30
jenkins-bot 7c8931f655 Merge "Update initialHash after getting defaultDimensions in image model" 2014-10-23 20:00:20 +00:00
Roan Kattouw 2d3bf973d2 Actually set parameter autoValues as values
The autoValue was displayed in the UI but was never
actually written into the template model, unless you
changed the text input and then undid your change.

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

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

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

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

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

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

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

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

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

Just use the 'toggle' event instead.

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

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

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

Local changes:
New requiresSelection api for tools

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

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

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

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

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

Depends on If16d16d2b in oojs-ui.

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

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

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

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

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

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

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

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

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

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

Local changes:
Update to use new selection/range API

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

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

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

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

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

Change-Id: I0321c8be1386cb010c3babb33e08fae0fcaf75ce
2014-09-24 22:59:53 +01:00
Roan Kattouw 6347274f47 Update VE core submodule to master (6e68242)
New changes:
c06fa64 Account for isValid() becoming async
12e4840 Account for WhitespacePreservingTextInputWidget#getValue being called early

Local changes:
* Make MWLinkTargetInputWidget#isValid asynchronous

Bug: 71237
Bug: 71246
Change-Id: Iab83e743f99973f01a54b23fd5ddf1081f7effd6
2014-09-24 12:18:16 -07:00
Roan Kattouw 8517777b9f Update VE core submodule to master (8d5ec7a)
New changes:
8d5ec7a [BREAKING CHANGE] Rename ve.Document.getNodeFromOffset to getBranchNodeFromOffset

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

Change-Id: Ibc69f5a5deeed5698368bb19b30f14497c579e90
2014-09-24 11:34:14 -07:00
jenkins-bot 02a85676b9 Merge "Use LinkCache instead of an object in MWCategoryWidget to store hidden status (to be shared with the input widget)" 2014-09-24 01:06:38 +00:00
Alex Monk 93e4c59e4f Use LinkCache instead of an object in MWCategoryWidget to store hidden status (to be shared with the input widget)
Change-Id: Icb62b9b27ea1d61097d059fa268cc4834d46fc9f
2014-09-23 23:56:27 +01:00
Bartosz Dziewoński 5849e7b8f8 ve.ui.MWLiveExtensionInspector: Fix comment typo
Change-Id: I6e35a5006364ba44de2804e6cd6cd79d6b73c0c3
2014-09-23 23:54:33 +02:00
Moriel Schottlender f4dc6fd240 Add 'autovalue' to TemplateData
Allow for an auto-value for parameters in TemplateData, and make sure
this autovalue is inserted as text when parameter is loaded. This is
mostly useful for referencing date or other dynamic templates inside
parameters.

Bug: 52029
Change-Id: I6203530798ffaa62cb26190c70f7ce391bddf123
2014-09-20 00:52:23 +00:00
jenkins-bot 82e62f8ec6 Merge "Get confirmation when trying to insert/edit template/citation with required parameters missing" 2014-09-17 19:33:48 +00:00
Alex Monk b3ba809ccb Get confirmation when trying to insert/edit template/citation with required parameters missing
Relies on I5d894f8a in MW core. We'll need to update our wfUseMW when that gets merged.

Bug: 50747
Change-Id: I35e55658a3990121afe4d996ef4ee06547d2aa0c
2014-09-17 12:31:23 -07:00
jenkins-bot d59053575e Merge "Refactor a bunch of CategoryInputWidget code, tear out dead/broken redirect handling that should be rewritten" 2014-09-17 02:13:22 +00:00
jenkins-bot bdbc75473b Merge "Validate size widget when activating/deactivating apply button" 2014-09-16 23:54:26 +00:00
jenkins-bot 0f4e85ce11 Merge "Template dialog: Show up to the limit of parameters, not up to the limit + 1" 2014-09-16 23:44:55 +00:00
jenkins-bot d2bcc9dc05 Merge "Show pending state on action button and keep dialog open when switching to source mode" 2014-09-16 23:44:22 +00:00
Moriel Schottlender 20c4fbbc1e Validate size widget when activating/deactivating apply button
In the Media Dialog, make sure the size widget is valid before
applying or disabling the apply/save buttons.

Bug: 70861
Change-Id: I6ec9eb69fe6576f1c668270b12157de9910f0214
2014-09-16 14:48:40 -04:00
jenkins-bot 6ec7789be6 Merge "Add contextual help to all remaining meta dialog controls" 2014-09-16 01:31:12 +00:00
James D. Forrester 712ea472d3 Add contextual help to all remaining meta dialog controls
Bug: 51798
Change-Id: I3f8141485c89e585595dbb853d32e69cbcaebac6
2014-09-15 16:26:12 -07:00
Alex Monk ceafcd5937 Check whether there is a range selected when enabling/disabling re-use citation tool
If there is no range selected, disable regardless of whether there are references in the document or not.

Bug: 70870
Change-Id: I2c281fefe7915345fafb735b3788166ab8118049
2014-09-16 00:18:23 +01:00
Alex Monk 65b232a35b Show pending state on action button and keep dialog open when switching to source mode
Instead of doing a blocking overlay, we're simply keeping the dialog open,
which is necessary for the pending status of the action buttons anyway.

Requires Ib2c8f336 in OOUI

Bug: 65012
Change-Id: I65b5de4a1666a81b157a71f6fec490007689eb44
2014-09-15 20:44:55 +01:00
James D. Forrester 8cde565899 Template dialog: Show up to the limit of parameters, not up to the limit + 1
Bug: 70609
Change-Id: I26dc9c17fe7572d7b864000781fff6583edf9f9b
2014-09-15 12:13:47 -07:00
James D. Forrester b46159eeed Relabel the cancel button in the save dialog to "Resume editing"
Bug: 69116
Change-Id: I35289ff02681c3bf46a7bb491c017c500f30c7a6
2014-09-11 11:52:21 -07:00
Alex Monk 72a118fc82 Disable re-use citation tool if there are no references in the document
Bug: 70640
Change-Id: I727857281644dffd23605d7792a3f71ee7c5b751
2014-09-11 00:13:10 +01:00
Alex Monk e6c4315d93 Refactor a bunch of CategoryInputWidget code, tear out dead/broken redirect handling that should be rewritten
Category redirect stuff is currently broken because of I5c536697, but no one seems to have noticed.
Fix bug 69886 while we're here

Bug: 69886
Change-Id: I62cf23d0e86bc43d739bb4c4610a5a852146fa3f
2014-09-10 23:21:12 +01:00
jenkins-bot d4f1f6ca7a Merge "Update LinkCache in MWTitleInputWidget" 2014-09-10 19:09:05 +00:00
Alex Monk 674f64dbaf Properly mark reference search index as empty when setting internal list
If it didn't get marked otherwise

Caused by I56909801

Bug: 70611
Change-Id: I81bca8f471c6685e48a7d3768f473a6faf5d8459
2014-09-10 00:13:42 +01:00
Alex Monk 056ef20a96 Update LinkCache in MWTitleInputWidget
Bug: 69886
Change-Id: If7439ea6f60533f8c3166ba4a24656ead0acc6cd
2014-09-09 23:08:14 +01:00
James D. Forrester a8180fe3c7 Provide contextual help for the page settings dialog's controls
Bug: 51798
Change-Id: Ief3c52e504a08d255a8778af6e24785d35154898
2014-09-08 19:22:44 +01:00
Bartosz Dziewoński 8e84d75383 Make it possible to create autonumbered external links from link inspector
Inserting a new external link from the link inspector when nothing is
selected (collapsed selection) will now produce an autonumbered external
link ('link/mwNumberedExternal' node, corresponding to wikitext
"[http://example.com]"). It used to produce annotated link text
('link/mwExternal' annotation, corresponding to wikitext
"[http://example.com http://example.com]" or "http://example.com").

Depends on two commits in VisualEditor/VisualEditor:
* Icc2e368a to insert unannotated content from the inspector.
* I40cd4d5a to insert non-text content from the inspector.

Bug: 51309
Change-Id: Ie4a633ed42907551337a62d96d0abd59e208d49d
2014-09-05 16:48:55 -07:00
jenkins-bot 5f71ecc80f Merge "Abort promises before sending new ones in MediaSearchWidget" 2014-09-05 22:56:18 +00:00
Moriel Schottlender 2e03a8276e Abort promises before sending new ones in MediaSearchWidget
Before sending new searches to the API, abort the previous ones if
they were not resolved. This will assure that the result presented
on the screen is valid to the latest search that was done even if
the user types quickly and sends many async requests simultaneously.

Bug: 67438
Change-Id: If88123019bfa972520e9db7c627a7f4cd8fc2526
2014-09-05 18:51:30 -04:00
Roan Kattouw e92e4912fe Followup cb86c4f: fix call to renamed setChanged() function
setChanged() was renamed to checkChanged(), but one call wasn't
updated. This was causing JS errors in a documentUpdate event
handler, which caused pawn nastiness.

Bug: 70450
Change-Id: I71e576638f9e2fde450f4412229cf980e6ba7e10
2014-09-05 14:50:24 -07:00
Moriel Schottlender ae4511a02b Hide "no results" messaage in media search widget
After resolving the search queries to the API, make sure to display
or hide (!) the "no results" message.

Bug: 67438
Change-Id: I518fbf5ae18bb2265710600516d556c60e2b4924
2014-09-04 19:03:03 -04:00
jenkins-bot 4be972799f Merge "Rename $label to $labelElement in MWParameterPage to avoid naming conflict" 2014-09-04 21:07:41 +00:00
Moriel Schottlender cb86c4f030 Check for changes in the model
Create an image model hash and check for changes to the image every
time the dialog is changed, so we can activate and deactivate the
apply button properly.

Bug: 68058
Change-Id: I94b7e4879c6e752432c6f937a8cf1b9f15d1b56d
2014-09-04 14:05:01 -07:00
Alex Monk 160d99d9f4 Rename $label to $labelElement in MWParameterPage to avoid naming conflict
Causing the label of each parameter to be missing ($label actually gets sent to the outline item
widget, for some reason). Looks like it was caused by I1abecd8a.

Bug: 70406
Change-Id: I598ffe5066d0ae8267324d4125d05514449064d5
2014-09-04 22:02:28 +01:00
James D. Forrester f2e22babaa Update VE core submodule to master (1f82a47)
New changes:
5d063a2 Don't use three different coordinate systems in getSelectionRect()
feeb1ae Only focus the paste target if focusedNode has changed
2c1bb97 Update OOjs UI to v0.1.0-pre (4cef83f702)

Local changes:
* Update references to renamed classes
* Update calling patterns element mixins

Change-Id: I330c0e308807597dec31dad8dbf713eb29fdc290
2014-09-03 17:20:09 -07:00
jenkins-bot bfbe8cbbeb Merge "Shrink height of summary box in save dialog from 80px to 4em" 2014-09-02 20:25:00 +00:00
jenkins-bot 567b0e7d53 Merge "Use combo box widget to suggest existing values for reference group" 2014-09-02 20:21:32 +00:00
James D. Forrester 0637104a17 Shrink height of summary box in save dialog from 80px to 4em
Change-Id: Ifd40bb19c7b57bab15c127d2de16940f9a239235
2014-09-01 12:06:22 -07:00
Alex Monk 802b018133 Use combo box widget to suggest existing values for reference group
Bug: 61574
Change-Id: I2ab47e79a8b90db8631d042c80b0759e9c250523
2014-08-30 02:33:04 +01:00
Alex Monk 14b23d7ba4 Make sure mediawiki.notification is loaded -before- calling ViewPageTarget#checkForWikitextWarning
That function needs to return the result immediately, not wait for module loading (via mw.notify).
This was breaking us being able to keep track of what wikitextWarning object was in use (but only
the first time we used the module), and therefore fail to close the warning when the wikitext
disappeared.

Bug: 70168
Change-Id: I0f1427423a5fe82ec8e70e2f0462a3044ca7ace8
2014-08-29 21:18:24 +01:00
jenkins-bot f79d099490 Merge "In LinkTargetInputWidget, put existence status into LinkCache" 2014-08-28 22:17:03 +00:00
Alex Monk 51d2de4547 In LinkTargetInputWidget, put existence status into LinkCache
Bug: 69886
Change-Id: Ib37ba971c006c0bedc94f3ea9f1185461c9617b5
2014-08-28 23:09:13 +01:00
James D. Forrester adb0593c92 Update VE core submodule to master (be42edf)
New changes:
7a2e989 Update OOjs UI to v0.1.0-pre (43f379c884)

Local changes:
Eliminate all references to Agora, now Minerva

Change-Id: I497e122a35090a909b1fbb00d0a9487d97e09da1
2014-08-28 13:51:10 -07:00
jenkins-bot 1135d066ac Merge "Make the image model persistent" 2014-08-28 16:08:03 +00:00