Commit graph

70 commits

Author SHA1 Message Date
Kunal Mehta 3501819bea build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I063d035702bf538bcf1b05730c295a09210eb2d1
2017-06-20 00:09:00 -07:00
harej 9767ef7f08 Allow appending searchfilters to terms
For search-style inputboxes, if you have `searchfilter=foo` as a
parameter, it will append `foo` after the search term. This is
useful for leveraging search filters in custom search boxes without
exposing it to the user.

Bug: T147951
Change-Id: Ie23ce220ff9657c38fe5b41195e297ca7cebf7f1
2017-06-06 11:47:20 -07:00
Umherirrender 67e27d00b7 Add phpcs and make pass
Change-Id: I80f669257f2daa12d7b0a9de88b146e5027a2343
2017-05-18 20:14:36 +02:00
Florian dd0a0035ef Add option to use VE instead of WikitextEditor
Added "useve" option to commentbox and createbox to decide, if these
inputboxes should redirect to the wikitext editor (default) or the
VE editor (if it is installed).

Bug: T89341
Change-Id: I9df0e3c00f7eb4bf4146532a0fef57f8b0e3d9d9
2015-09-10 07:56:10 +02:00
Florian eaf3bd414b Don't add a margin if no line break is added between input and button
If there is no line break between the button and the input field (both
fields are in the same line), don't add a margin-bottom[1] to the inputfield.

[1] Originally added to make some space between the button and the input field,
which doesn't make sense, if both are in the same line. Added in:

Follow up: I6435df752530

Bug: T108512
Change-Id: I51f3ede288a220a54937a7b79dc9366e0a031db8
2015-08-13 21:32:35 +02:00
Bartosz Dziewoński 445a10e797 Use Html::hidden() for hidden input fields
This was mostly done with search-and-replace.

Change-Id: I085b8d9c2a12fdae5a7dfecfbc419314dcbb6401
2015-08-06 09:25:57 +02:00
Florian 50b015d7fe Add space between input fields and buttons
It looks strange, if the button is directly after the input field
without any space.

Change-Id: I6435df75253080b68164415b354248ace2bbaede
2015-07-11 22:34:45 +00:00
glaisher ddf6329103 Make createboxButton disabling work again
'createboxButton' class was erroneously removed in Ia608324703987371
so add it back again. Also prefixed "inputbox-element" class with
a "mw-" for consitency as well.

Bug: T92611
Change-Id: I36718671e6012427a647de7a1cc712e3c8394ee1
2015-03-21 13:40:47 +05:00
Florianschmidtwelzow 99277a4d0f Hygiene: Use MediaWiki-UI for all elements
For checkboxes and text input fields, not only for buttons.

Fix missing space between input and submit button in search2, too.

Follow up: Ia608324703987371aa66beccbac962024fc6e897

Bug: T63526
Change-Id: Id9fb22885b836c0dfe6a086e2ec45e2018244210
2015-02-23 09:47:05 +01:00
Chad Horohoe 7ce6d6c49e Remove obvious function-level profiling
Change-Id: I16f2978a6028937e10a8fac66231646cc4078169
2015-02-10 14:15:36 -08:00
Evan McIntire 7ce80c51a5 Update buttons to use mw-ui styles
The current button styles are outdated, and due to the adoption of a new
standard UI and the wide use of this extension, they should be brought up
to the standard

bug: T63526
Change-Id: Ia608324703987371aa66beccbac962024fc6e897
2015-01-24 15:16:47 -05:00
jenkins-bot 474dd170d2 Merge "Add support for preloadparams[]" 2014-11-13 01:47:33 +00:00
Jackmcbarn 2b9fbd23d6 Add support for preloadparams[]
Bug: 70493
Change-Id: Ice61fd0581b3ef8220b6a603b52463c973fb770b
2014-11-12 17:46:29 -08:00
tonythomas01 7096213874 Adding a JS Class to inputBox to grey out Submit button.
If the user does not enter a title in the <inputbox> for type=create
and hits the submit button, it opens the Main page for editing (or
view-source) due to empty title= param in URL. Greying out the submit
button until user enters the title solves the issue.

Bug: 61606
Bug: 62975
Change-Id: I5c6c34b90c6c499ef7cb96ad8d47fdbbcbbcd8a8
2014-10-04 13:35:42 +00:00
jenkins-bot d9dc4ca640 Merge "Inputbox: Some code conventions cleanup" 2014-05-19 16:56:55 +00:00
Derk-Jan Hartman a1a1e64e46 Inputbox: Some code conventions cleanup
Change-Id: I16fcd16d81a7eecc845b5d36fd8af8e14792eea1
2014-05-18 23:19:20 +02:00
jenkins-bot 417e67d74a Merge "InputBox: Don't append id to class" 2014-05-18 17:05:16 +00:00
jenkins-bot ea7c78f446 Merge "InputBox: Cleanup usage of inline styles" 2014-05-18 17:00:08 +00:00
jenkins-bot 8160f5815d Merge "Avoid duplicate ids" 2014-05-18 16:54:47 +00:00
Brian Wolff 8b4932ca81 Avoid duplicate ids
There can be more then one <inputbox> in page. Don't reuse id
attributes.

See also r60072

Bug: 11777
Change-Id: If7c518445c966aa5c0b16929ccdf22cdf014b59d
2014-05-18 13:46:53 -03:00
Derk-Jan Hartman c76ede7b4f InputBox: Don't append id to class
The search2 form type was adding the id to the classname. Probably a
left over from a rewrite.

Change-Id: I0f8c962a3fdadd7555c2b8add93e2b131aedece9
2014-05-18 11:53:13 +02:00
Derk-Jan Hartman d05173bdd2 InputBox: Cleanup usage of inline styles
Change-Id: I2e1384e1f46e8592ecba7bbfea81884804f0128a
2014-05-18 11:51:07 +02:00
Kevin Israel 6cfaec4f1a Remove use of message 'postcomment'
Also changed spaces to tabs in i18n/en.json.

Change-Id: Id613f71d87150d7b6701952c27f9f5f9c0e68d8f
2014-04-22 11:53:22 -04:00
jenkins-bot a95d45c730 Merge "Fix capitalization and tests of $this->mId." 2014-04-06 13:49:14 +00:00
Jackmcbarn c3fd290fff Allow InputBoxes to be used to move pages
Add an option to InputBoxes to allow them to prefill Special:MovePage with
prefixes and other similar options to pages being created

Change-Id: I1740497030b5e9872162a1a261ac38791bb1373a
2014-04-05 22:16:16 -04:00
Brian Wolff 048a97e560 Fix capitalization and tests of $this->mId.
Property name is $mID, certain parts were testing $mId, and then
using isset to (presumably) hide the undefined property warnings.

Change-Id: I0c2d29fbdb8314aa0c04bea387364a7307e68b9b
2014-04-05 20:58:33 -03:00
Siebrand Mazeland f14419180a Use key names with the extension name as prefix
This prevents possible current or future key conflicts. Keys for
translations will be updated at translatewiki.net.

Change-Id: Ie94fa53340c9534f45a70cbafc4d55a7e2d58a7c
2014-04-05 22:00:44 +02:00
grunny b4b70b55d9 Remove cases of double escaping
These variables are included in attributes of elements built
with Xml::openElement or Xml:element which escape them using
Sanitizer::encodeAttribute.

Change-Id: Ib34a21a6312ba88b390110115d655b46a64b9dcd
2014-01-04 20:14:39 +10:00
Siebrand Mazeland edc7b6931d Replace usage of deprecated Title::escapeLocalURL()
Change-Id: I1bd4bc60cba052ac158de91322e6621ad5badfa7
2013-12-29 15:31:12 +01:00
shirayuki a8e6cdf204 American spelling for "unrecognized"
Change-Id: I9739f4767e0c549e300a636baa74745c5d6612cd
2013-03-05 21:18:56 +09:00
Marius Hoch e18b7e6c7b Make InputBoxes cache ones per language
InputBoxes creates HTML which will later be cached (probably).
Right now this can lead to strange button labels eg.
https://www.wikidata.org/wiki/Wikidata:Requests_for_comment?uselang=qqx&action=purge
will cache the qqx of the createarticle button so that all users
see it (till it's purged again). To prevent this we set the parser
to cache per user language.

Change-Id: I69ade88bb43f73404965b7cb63e88b824561d988
2012-11-17 19:43:47 +01:00
Amir E. Aharoni 60c610da47 (bug 37018) Explicit dir attribute for input boxes
Change-Id: I76f5d2316ef26c05b81f6912128005347360eadc
2012-09-03 16:40:18 +03:00
Siebrand 81177b5e68 Merge "(bug 39728) Replace obsolete align attribute with CSS" 2012-09-03 06:49:18 +00:00
Siebrand Mazeland 4b7fdd00cc Maintenance for InputBox extension.
* Replace deprecated methods.
* Remove superfluous newlines.
* Fix docs for a few methods.
* Add some type hints.

Change-Id: I09671b5e70d33ffa9746e95c965bd1bc2bbd4a3f
2012-08-30 18:20:32 +02:00
Krenair baf4944903 (bug 39728) Replace obsolete align attribute with CSS
Change-Id: I29db1146b7c907133b69d85df141ae7daecd34bc
2012-08-28 13:22:43 +01:00
Chad Horohoe 4d2eef4508 (bug 31158) Multiple namespaces marked as default (**) should all be used instead of just one. Patch by Bagariavivek 2012-01-12 17:23:46 +00:00
Mark A. Hershberger 6b49e7d6d8 Apply patch from Bug 29580 - “allow placeholder for inputbox” from Grunny 2011-10-26 20:31:20 +00:00
Sam Reed c8ae65ce9c Swap
/*
 *

for

/**
 *
2011-10-26 03:49:06 +00:00
Brian Wolff 0950958d3a (bug 29066) Decode character references in input to InputBox so they don't get double-encoded later by Xml::openElement. 2011-10-25 13:16:01 +00:00
Robin Pepermans a5347ca4d3 Use strpos() instead of strstr(), per Catrope on r92138. 2011-08-22 23:47:01 +00:00
Robin Pepermans f16ce57a5e InputBox:
* instead of checking each namespace if it is given through the parameter, check each given namespace if it is a valid one
* this fixes the inconsistency where 2 namespaces are given but only 1 is valid and that one is shown (normally if there is only 1 given, it is hidden)
* fix bug 22591 (Allow i18n of Main namespace search option label)
* allow namespace aliases as well
* also trim the given namespaces, so spaces do not make them invalid
2011-07-14 03:51:10 +00:00
Mark A. Hershberger f2a1bb33fc Bug 17504 - Inputbox extension should have single namespace search option
Apply patch from DaSch
2011-07-04 17:01:45 +00:00
Sam Reed ea4384d8c9 Swap else if for elseif
Trimming trailing whitespace also
2011-06-17 16:26:31 +00:00
Sam Reed 71e04c06a0 Another big cull on unused variables and such 2010-10-29 21:55:29 +00:00
Sam Reed 0200023513 More deprecated method call removals and updates 2010-10-29 15:32:44 +00:00
Sam Reed fbe7fb6395 Start removing/fixing calls to deprecated methods in WMF used extensions 2010-10-29 15:14:44 +00:00
Aryeh Gregor a1c4503226 Remove most named character references from output
Recommit of r66254 to trunk.  This was just

find extensions phase3 -iname '*.php' \! -iname '*.i18n.php' \! -iname 'Messages*.php' \! -iname '*_Messages.php' -exec sed -i 's/&nbsp;/\&#160;/g;s/&mdash;/―/g;s/&bull;/•/g;s/&aacute;/á/g;s/&acute;/´/g;s/&agrave;/à/g;s/&alpha;/α/g;s/&auml;/ä/g;s/&ccedil;/ç/g;s/&copy;/©/g;s/&darr;/↓/g;s/&deg;/°/g;s/&eacute;/é/g;s/&ecirc;/ê/g;s/&euml;/ë/g;s/&egrave;/è/g;s/&euro;/€/g;s/&harr;//g;s/&hellip;/…/g;s/&iacute;/í/g;s/&igrave;/ì/g;s/&larr;/←/g;s/&ldquo;/“/g;s/&middot;/·/g;s/&minus;/−/g;s/&ndash;/–/g;s/&oacute;/ó/g;s/&ocirc;/ô/g;s/&oelig;/œ/g;s/&ograve;/ò/g;s/&otilde;/õ/g;s/&ouml;/ö/g;s/&pound;/£/g;s/&prime;/′/g;s/&Prime;/″/g;s/&raquo;/»/g;s/&rarr;/→/g;s/&rdquo;/”/g;s/&Sigma;/Σ/g;s/&times;/×/g;s/&uacute;/ú/g;s/&uarr;/↑/g;s/&uuml;/ü/g;s/&yen;/¥/g' {} +

followed by reading over every single line of the resulting diff and
fixing a whole bunch of false positives.  The reason for this change is
given in <http://lists.wikimedia.org/pipermail/wikitech-l/2010-April/047617.html>.
I cleared it with Tim and Brion on IRC before committing.  It might
cause a few problems, but I tried to be careful; please report any
issues.

I skipped all messages files.  I plan to make a follow-up commit that
alters wfMsgExt() with 'escapenoentities' to sanitize all the entities.
That way, the only messages that will be problems will be ones that
output raw HTML, and we want to get rid of those anyway.

This should get rid of all named entities everywhere except messages.  I
skipped a few things like &nbsp that I noticed in manual inspection,
because they weren't well-formed XML anyway.

Also, to everyone who uses non-breaking spaces when they could use a
normal space, or nothing at all, or CSS padding: I still hate you.  Die.
2010-05-30 17:33:59 +00:00
Chad Horohoe 8f51920bac Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh. 2010-05-27 15:56:53 +00:00
Chad Horohoe 7d30faca78 Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
Tobias 77107c56a7 Adding nosummary as option for newsection-comment 2010-03-31 12:33:11 +00:00