Commit graph

90 commits

Author SHA1 Message Date
Ed Sanders 313a261f7c Make '/doc' subpage an MW message for local overrides
Bug: T125222
Change-Id: I48c666a1e313a56fd3be98d28edc24d200a35309
2018-02-16 18:16:33 +00:00
jenkins-bot f162c748aa Merge "Block duplicate parameter names when editing existing parameters" 2018-02-08 16:37:20 +00:00
David Lynch f75b144129 Block duplicate parameter names when editing existing parameters
Previous behavior was to silently append a number to the name, which was hard
to notice. New parameters with duplicate names were already blocked.

Also, fix the disabling of the done button when there are errors.

Bug: T166520
Change-Id: I1d0c51a2aa8b8158874c98ac48fe257baeb1aee1
2018-02-07 11:09:47 -06:00
zoranzoki21 3538fb022d Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I2cbd47182a275be366282de60027092ca798caa8
2018-02-03 16:30:02 +01:00
Ed Sanders b1d7ad8bc8 Use textSelection API to modify textarea
Bug: T73363
Change-Id: I411027236cbb3b349372a64ecbf670062758cfab
2018-01-26 10:32:03 -08:00
Brian Wolff d45f29bb8f Bump version for security release of extension
Change-Id: I382b095ab78de2286b77d14daf0ce94df4230d22
2017-12-18 20:58:39 +00:00
Fomafix 84ef237bde Rename PHP files to match class names
This avoids the exclusion of the rule
MediaWiki.Files.ClassMatchesFilename.NotMatch in .phpcs.xml.

Change-Id: Ifd7f5f59097c6dedc19f031baaef538023a33336
2017-12-15 23:58:46 +01:00
Bartosz Dziewoński e094a5c11d Add appropriate OOjs UI icon pack dependencies
modules/widgets/ext.templateDataGenerator.paramWidget.js
* Add 'layout' as it uses 'menu'

modules/ext.templateDataGenerator.ui.tdDialog.js
* Add 'interactions' as it uses 'advanced'

Bug: T166730
Change-Id: I5b09f629ec274a89f96030de8af64cfe5d659143
2017-06-03 12:49:41 +02:00
Timo Tijhof d7069bcc7f Fix styles queue violation for "ext.templateData"
Only contains a stylesheet and has a dependency. Module is only
loaded via addModuleStyles, which means the dependency is ignored.

It triggers the warning because it has a dependency, which means
it's not a pure styles-only module (despite being used as such)

> Unexpected general module "ext.templateData" in styles queue.

Aside from the addModuleStyles() load, it is also specified as
a dependency for "ext.templateDataGenerator.ui".

Dependencies on style modules from JS modules are supported since
T87871 was resolved, however the indirect dependency still doens't
make sense.

Move the dependency on ext.templateData.images, which wasn't needed
or triggered by "ext.templateData" styles anyway, to the UI module
directly.

This also fixes the fact that the "ext.templateData" css is loaded
twice (once as blocking stylesheet without dependency, and then
again as async module via "ext.templateDataGenerator.ui" with dependency).

Bug: T92459
Change-Id: I4c3bb44c135fccb85a26ad901ec9660d647dfe86
2017-05-10 02:48:40 +01:00
jenkins-bot a31aaedb88 Merge "Extend 'format' spec to include custom format strings." 2016-12-13 21:52:45 +00:00
jenkins-bot 48f9d52a5f Merge "Move icons to RL and generate inverted variants" 2016-12-06 20:53:09 +00:00
Ed Sanders e21a2563ce Move icons to RL and generate inverted variants
Also remove unused parameter icon.

Change-Id: I0ce10a50a0738ba111cfd63bc9cc5de03fae8c8d
2016-12-06 11:53:52 +00:00
Ed Sanders 94d0e73a6b Move all init code over to target
Change-Id: I9ba06bb3a57a7683e246461341c67462cab465d0
2016-12-05 17:02:38 +00:00
Ed Sanders a586d54e93 Abstract out editor manipulation form UI
Create target classes with get/setWikitext methods.

Also refactor some of the window manager code.

Bug: T152230
Change-Id: I7dcc137d79e029b69467ca282d8c52683e022598
2016-12-05 17:01:15 +00:00
jenkins-bot 9f109b8d63 Merge "Don't pull in oojs-ui-toolbars, it's big and we don't use it" 2016-09-01 21:38:24 +00:00
C. Scott Ananian 5812413f11 Extend 'format' spec to include custom format strings.
Thanks to Thiemo Mättig for the suggestion and specification at
Wikimania 2016 in Esino Lario.

This is an extended version of Thiemo's original specification.  This
version also allows specification of "own line" properties for
templates; that is, whether the template should be preceded/followed
by a newline, as requested by James Forrester.

Bug: T138492
Bug: T135667
Change-Id: Idc6b2680330e6bf5caec2bf6fc86a705d25bc649
2016-09-01 14:14:47 -07:00
James D. Forrester 4b85bdcb62 Don't pull in oojs-ui-toolbars, it's big and we don't use it
Change-Id: Id95bf98362f06d6b4db7426d2fdcacba2291d57b
2016-09-01 14:14:47 -07:00
Kunal Mehta f033cdcdd0 Bump MediaWiki requirement to 1.26+
Parser::enableOOUI() was introduced in 1.26.

Change-Id: I718ce9350b4f75585cdc7b4e8a7c39f0c22f3d12
2016-08-31 17:29:07 +00:00
jenkins-bot 9e56136c0e Merge "Warn editors when they're adding blank TemplateData" 2016-08-17 16:47:11 +00:00
Reedy 080aa0cfe7 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: I1e6718113af00c1bfc1ca0adff7abb36c3982b8a
2016-08-05 17:42:24 +01:00
Alex Monk 1de010108e Warn editors when they're adding blank TemplateData
Bug: T123207
Change-Id: I512ce01a0c7221e7636d26e546d1cbac5395b76b
2016-07-14 03:01:38 +01:00
Alex Monk 84b1ddf44c Localise names of types in HTML rendering
Reuses some messages, renaming them in the process.
Changes undefined on the client to unknown.

Bug: T61745
Change-Id: I2cf5c25acbe1c854c33b2eb3f23dc74393a456d4
2016-04-06 19:00:58 +00:00
Bartosz Dziewoński 8e55adab59 [BREAKING CHANGE] Change default format to null instead of 'inline'
Don't enforce 'inline' as the default format if none is specified.
Instead preserve the unspecified value as 'null'. This allows
third-party tools to provide a better default experience when changing
existing content (e.g. by using smart detection to follow the format
already used).

Bug: T128337
Change-Id: I911c7999e3731c0125fc058118f8d7287d8f88f4
2016-03-01 22:53:27 +00:00
Ed Sanders beaea898c2 Make main template param select widget drag/drop re-orderable
Not having two lists of all the parameters seems like a good idea.

Depends-On: I30d1f7f56230d73eb47ccbf9881c0b952b15bd89
Change-Id: I5b2ba39fb7b98fc50816f63bc4fbfc9fe25e02a5
2016-02-21 02:43:48 +00:00
Alex Monk d723905034 Don't show warning about already-known parameters that weren't imported
Bug: T124223
Change-Id: Id102799b925ebaec6a1d819f1d2294982c24e407
2016-01-20 22:29:45 +00:00
jenkins-bot a9a56605ba Merge "Make ext.templateDataGenerator.ui depend on ext.templateData" 2016-01-13 17:43:47 +00:00
Alex Monk 68423b1a69 Make ext.templateDataGenerator.ui depend on ext.templateData
To get the correct styles... Alternatively, I suppose we could split the
style file?

Bug: T119361
Change-Id: Idc2d35cd929b239448c9c317c89d70f174a4eb05
2016-01-13 05:06:46 +00:00
Alex Monk cc6487498b Prompt user to confirm closing modified TemplateData edit dialog
Depends on Ieaf19fe4485b679e0ee21d16f8f2e0693808f386 to take effect with the
escape key. Otherwise only handles the visible 'Cancel' button.

Bug: T106382
Change-Id: Ibc55727fd6a5becfe10b4e74cae5e573d110575d
2016-01-12 17:43:50 +00:00
jenkins-bot 0ca4dc4621 Merge "Introduce new 'format' template property" 2015-11-11 23:56:03 +00:00
eranroz 01821eae64 Introduce new 'format' template property
Adding format data, which defines the preferred source format
to use when using templates.

Possible formats:
* Inline - all parameters in a single line
* Block - each parameter is in its own line

Bug: T64147
Change-Id: Id856c4a38890526060d0619432f06174d66f7792
2015-11-11 23:52:17 +00:00
Kunal Mehta 0006cff10c Specify MediaWiki version requirement in extension.json
...and get rid of the wfUseMW() call.

Change-Id: Ie83a8275e2531bcd836a56c19300ea261b5aa2a0
2015-10-29 17:03:52 -07:00
James D. Forrester 017fa53e65 Add a url type for URLs
Bug: T54880
Change-Id: I722fcbc957825c2aaea32d9350480d29a388bb68
2015-09-30 22:15:19 +00:00
James D. Forrester 62d3138216 Add a wiki-template-name type for template names
Bug: T88900
Change-Id: Ia1c87072f453df4b756de6725c4b3ab1dda84497
2015-09-17 12:28:11 -07:00
Ed Sanders 9f96761044 Dialog: Use a 'done' button on edit param page instead of 'back'
'Back' suggests that changes in the form won't be saved.

Change-Id: I0df0887caa6317393a3a891dd292aa4dc54cc32b
2015-09-14 12:25:22 +01:00
Ltrlg fdd0514024 Go back to using a configurable link for documentation
The message allows per-wiki configuration. The default target is better
for normal users of TemplateData than the previous hard-coded one and
has already been translated in some languages from when it was used
previously.

This also moves the messages dependencies from `ext.templateData` to
`ext.templateDataGenerator.ui`, which is the only module that uses
them: the correct strings were displayed only by inheritance.

Bug: T112011
Change-Id: I81ab684bb0ed9b0767df75635284c51129ac7000
2015-09-10 21:56:05 +00:00
Kunal Mehta 8a6d96e50a Use valid spdx license identifier
See <http://spdx.org/licenses/>

Change-Id: I69edaef3fda68543b60f731a95734b012a680ba5
2015-05-29 12:44:57 -07:00
Kunal Mehta 43d4a9124d Sync extension.json, empty PHP entry point
Change-Id: I7c78caba6075989c3996e766cadb9618a91d1f3d
2015-05-29 12:44:39 -07:00
Kunal Mehta 5710798ece Remove i18n shim
Change-Id: I60404e3ef83891619778a8dc40c81a9404723911
2015-05-29 12:33:48 -07:00
Moriel Schottlender 3820295f23 Reorganize api calls and add sourceHandler and error message
Add a sourceHandler that deals with all source-related actions
like fetching template source and validating the existing
TemplateData string.

Also add a MessageDialog warning the user in case the TemplateData
is invalid. In this case, the user will be given the option either
to correct the JSON by hand or to start the editor to replace the
existing TemplateData with a new one.

Bug: T91730
Bug: T91325
Change-Id: I4e6d04f02565a02d8dcf5c70a575ab6433caa27f
2015-03-18 18:21:02 +00:00
James D. Forrester bad08f37da Convert to use extension registration
Bug: T87977
Change-Id: Ie1b822636289f9d7a1ec0a0b8175255441357cd3
2015-02-20 15:58:43 -08:00