Commit graph

46 commits

Author SHA1 Message Date
jenkins-bot 56e314ca0c Merge "New VectorAfterToolbox and VectorBeforeFooter hooks" 2017-11-17 21:16:26 +00:00
Timo Tijhof 6e8a52a8d2 VectorTemplate: Restore 'id' for siteNotice wrapper
Follows-up bc47b4f.

Change-Id: I4220077679ac6d33650ed82a59696f22f1715485
2017-11-13 21:19:36 -08:00
Timo Tijhof bc47b4fb3e VectorTemplate: Refactor literal HTML by using Html methods instead
To some degree the literal HTML was (maybe) useful and self-documenting
at some point when the template was really simple, but until and unless
we really use an Html template for this, it's probably a lot easier to
maintain, understand and review (incl. from security perspective) if
we consistently use the Html class abstraction.

For now, I'm only focussing on cases where there is mixed literal HTML
with embedded PHP statements. The cases where HTML is created plain without
embedded PHP I'm leaving untouched for now.

Any case where attribute or content comes from PHP, use the Html class
instead to clearly indicate which values are escaped, and which are not.

Change-Id: Ib2d6425994918b0c17ef29c1b5d0f9893f61a889
2017-11-10 19:37:38 +00:00
Timo Tijhof ae0d9f9f72 VectorTemplate: Some consistency in mixed PHP/HTML formatting
Consistently do the following in this file:
* Consider '<?php' the start of a block indented level, like other code blocks.
* Don't increase indentation between the opening of '<?php' and the top scope
  within, consistent with other PHP files and most of this file.
* Don't manually create tabs or new lines to try to align with the HTML,
  this is a pointless excercise that already doesn't line up anyway. It just
  creates more arbitrary whitespace. Most portlet, personal, sidebar stuff
  is already not doing any indentation, this removes some of the remainder,
  at least in places where it was manually being emulated. The natural stuff
  stays for now.
* Remove some arbitrary line breaks.

Change-Id: I42627ac8473604c7c1309db370302f5ee5f1df0e
2017-11-10 19:27:49 +00:00
Bartosz Dziewoński b677192582 Do not special-case ULS and "Not logged in" in RTL in personal bar
Follow-up to 5d0a07bf9d.

Bug: T48947
Bug: T177312
Change-Id: I65c0961d19885c262fdaebf4ee199e1d1e6d5fe6
2017-10-04 18:58:10 +02:00
Rammanoj 5d0a07bf9d Vector: Flip horizontal nav elements with CSS
Flip horizontal nav elements with CSS prperties in RTL(right-to-left) mode

Bug: T48947
Change-Id: I30a5837f84bcdeab205760644bfa40b12cefbece
2017-09-26 10:30:11 -05:00
jenkins-bot 765a143a60 Merge "Tabs (Read / View Source / Search) collapsed under more in resolution < 700px" 2017-09-21 20:21:01 +00:00
Rammanoj f74002b727 Tabs (Read / View Source / Search) collapsed under more in resolution < 700px
tabs such as read/view source are collapsed into more in screens
whose resolution is less than 700 px so that they don't wrap to
the next line and cover the content of the page

Bug: T56919
Change-Id: I30e0642d3cb93c4d9a8b2bdfb7f04912d8ca8649
2017-09-21 20:03:39 +00:00
Umherirrender 73e498d24b Improve some parameter docs
Change-Id: Iade09edaa5d10dfa68defc1735b1fb4f888855e3
2017-09-09 13:52:04 +00:00
Kunal Mehta edff0350a1 Don't pass $this by reference
Bug: T153505
Change-Id: Ife076b323b1f4091fd851acb4b470000d2206cae
2017-09-01 15:32:45 +01:00
Bartosz Dziewoński 8c9c30781e Use makeListItem() for menu items rather than building HTML by hand
This affects the four tabs menus (namespaces, variants, views, actions).
Other menus (personal menu and sidebar) have already been using it.

We need some minor overrides to get the same results as the hand-built
HTML, but I think this still makes the code a lot nicer.

The output is the same as before, except for unimportant whitespace
differences and the order of some tag attributes.

I tested this with several extensions and configuration options that
mess with the tabs:
* $wgUsePigLatinVariant = true
* VisualEditor extension
* FileAnnotations extension
* FileExporter extension
* Viewing the page as administrator

Change-Id: I2d1255442abf5fa4bac2de1b084d0bcacbba7d0f
2017-07-29 04:02:36 +00:00
jenkins-bot 79647bb41e Merge "Add target support for view_urls" 2017-07-26 17:15:01 +00:00
jdlrobson c4bab69e96 Don't print #siteSub
Bug: T169823
Change-Id: I45f0abe6ab9378830fa59356b29ff6953962f477
2017-07-18 14:14:15 -07:00
Fomafix 56ec1a3c87 Remove <div> inside of the <h3>
The <div> was introduced in aba11a7b but this is not valid in HTML 5.

This change ommits the <div> and attaches the background image to the
existing <span>.

Cached HTML with the <div></div> does not matter for the result.

Bug: T169551
Change-Id: I04f7032b6f6bafe10548fde690f55de66b56f61f
2017-07-12 06:21:51 +02:00
addshore f804c100b6 Add target support for view_urls
Bug: T160676
Change-Id: I07890d17fdf86ece3e01cd8fa0c0e572a4d988c5
2017-06-30 10:54:04 +01:00
Umherirrender 40167a9335 build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
Change-Id: I5d9643f9a0dc33c05b7404a88209d244b4badae3
2017-06-23 22:06:01 +02:00
Fomafix aba11a7b1c Use <div> instead of <a> for action menu
This change prevents that a middle click opens a new tab with the URL "#" and
prevents a wired outline around the button when selected of focused in Chrome.

The selector "> a" will be removed in a separate change which must get
deployed not before the HTML cache has expired.

Bug: T44241
Bug: T68388
Change-Id: I7255552d3bdec9e40727721b91630623ae24a08b
2017-06-06 08:02:49 +02:00
Fomafix 0ce7fe792e Use tabs instead of spaces for indenting
Change-Id: Id88ed98763265f0eea75514e52fbd0f546ef72b4
2017-03-25 14:56:54 +01:00
Ed Sanders 44473d2a2b Change mw-body ancestor selector to mw-body-content and add to siteNotice
Bug: T155863
Bug: T159578
Change-Id: I036d4def3f61d4a604c804c5368d74ec74883d2e
2017-03-03 22:32:09 +00:00
Jack Phoenix 6807fdeffc New VectorAfterToolbox and VectorBeforeFooter hooks
Example use case: the ShoutWiki Ads extension

Change-Id: I0eadf18b9a20147a097729f5f8053cfc65594553
2017-01-06 18:48:54 +02:00
Stephan Gambke 3bd180e3ad Fix order of univ lang selector and "not logged in" message
Bug: T121793
Change-Id: I1a42443dab0dd064c35f858ece69e6d9cdb398a1
2016-05-18 20:43:36 +00:00
Stephan Gambke 26f3f8c732 Show "Not logged in" message
Show "Not logged in" message left or right (depending on language) of an anon
user's personal tools in case general edit permission is given.

The display of the message was previously done in MW core
(SkinTemplate::buildPersonalUrls, introduced by I6f44e3e5d), which needs to be
reverted first (done in I5cfa9b4e).

Bug: T127758
Depends-on: I5cfa9b4e
Change-Id: Ic560d3fd4e9f6ad194e6ff928c8749084af311b5
2016-05-17 20:06:06 +00:00
Siebrand Mazeland 8a09ba2014 Use mediawiki-codesniffer 0.6.0
Change-Id: Ibbc42739d1bafea203c14f0ab351e7e063dc66bc
2016-03-07 14:24:27 +01:00
Siebrand Mazeland 024598fcf6 Use single quotes where possible
Change-Id: I633b4e250e61417ad02b6f8af3d9c3c352f4fe52
2016-03-07 14:09:39 +01:00
Bartosz Dziewoński 51278f2d10 Don't output an empty h1 element (once more, with feeling)
Bug: T103077
Change-Id: I786fb10c5688d13b779e84b4d83efc6c0fd992d8
2015-06-25 11:55:24 +00:00
Kunal Mehta a85145a5c8 Display the page title on pages named '0'
Using empty() will consider the string '0' to be false, so use isset instead.

Bug: T103077
Change-Id: I4b07d55ba59cbbc9eeb3784fbbe8ae9e9ae15c3a
2015-06-24 10:15:27 -07:00
Vivek Ghaisas 73f8dcc8b5 Remove superfluous whitespace from HTML output
Fixing regression caused by
I38dcb7a5389cf6986dc1247b9291bfb1ad3fca7d.

Bug: T102861
Change-Id: Ib8502ae55880fe97992ae471790f08aba8cc5040
2015-06-18 01:52:48 +03:00
Kunal Mehta 3502a6f8d9 Support 'rel' attributes in namespace navigation elements
Needed to support 338a6627aadbeab in MediaWiki core.

Bug: T65198
Change-Id: Iff9e22565c5ca667b35cd53e61347a02b06243c6
2015-06-12 19:21:29 -07:00
Vivek Ghaisas e0289b7d0c Run phplint and phpcs through "composer test" entry point
Also fixed files to match coding standards. (Checked against
tools/codesniffer v0.2.0)

Bug: T90943
Change-Id: I38dcb7a5389cf6986dc1247b9291bfb1ad3fca7d
2015-06-09 16:37:14 +03:00
Jack Phoenix 9bd09ce773 Trying to clean this up a bit
No functional changes are intended.

Change-Id: Icec2df9744d13a4bdea632cad00422e3105ef43b
2015-06-09 00:12:40 +03:00
Florian 19b3bda973 Don't output an empty h1 element
Bug: T97891
Change-Id: Iad1fec58773e42b66030bff505113e43e66e807f
2015-05-09 16:11:14 +02:00
Chad Horohoe 7ad814d427 wfRunHooks() -> Hooks::run()
Change-Id: Ib2c61f675bb7bbd44cec5b7a9ab68721865b4b09
2015-04-27 21:53:29 -07:00
jenkins-bot c75d8183c5 Merge "Support "rel" attributes on content action links (e.g. rel=archives)" 2015-02-15 01:10:54 +00:00
Matěj Grabovský fab055d6a1 Support "rel" attributes on content action links (e.g. rel=archives)
MediaWiki has provided rel=archives for the History link since v1.15.0
(Introduced in r45988 / 4299d27956.). However Vector never used that
property until now.

Change-Id: I398828b62795955a73823decf00fdbf8496aaeca
2015-02-15 01:10:00 +00:00
Ebrahim Byagowi 89fb56dc61 Remove dir=auto from firstHeading
Follow up to Ibf408bc6c5d2f8c05667107a547b0b02e06de270

Bug: T51093
Change-Id: I90758a3491f3f85c0d19451e213c788913e27626
2015-02-01 19:49:42 +00:00
umherirrender 1ba842a765 Allow numeric headers in Sidebar
A numeric string set as key of an array gets casted to an integer. Since
I458c0af3114754ddf3d721f6c374e249f482e4cf wfMessage does not except
integer as message key, therefore cast the heading name back to string.

Bug: T73639
Change-Id: I376fb49d03251a71372738c531a09f014540b958
2015-01-10 21:38:46 +01:00
Jackmcbarn a925e9eae1 Restore backwards compatibility
When status indicators were added, backwards compatibility was unnecessarily
broken. This makes things like looking at old non-rebased branches, or running
git bisect, unnecessarily annoying. This change adds an is_callable to restore
backwards compatibility and removes the version check that was added in response
to this break.

Change-Id: Ia05aa73a1b027e667c52f54b6d6fdf6f42bbbadf
2014-12-29 14:16:05 -05:00
Roan Kattouw 359c32598b Use #mw-head, not #mw-navigation, for navigation link
mw-navigation is a collapsed div because all of its children
are absolutely positioned, and it's in a totally useless
place. Instead, point to #mw-head, which is where we pointed
to originally before it was changed to #mw-navigation.

This reverts 75858d59d from when this code was still in MediaWiki core.

Bug: T78207
Change-Id: I5e1f0edbf80f6f5f330df73cb06e4b0ee4323905
2014-12-10 15:36:40 -08:00
Bartosz Dziewoński deac602863 Add support for page status indicators
Corresponding patch in core: I2389ff9a5332a2b1d033eb75f0946e5241cfaaf4.

Bug: 23796
Change-Id: I90a8ae15ac8275d084ea5f47b6b2684d5e6c7412
2014-09-30 14:37:35 +02:00
Timo Tijhof 621e6fbd22 Use mw-wiki-logo class instead of inline background-image
Depends on I4e6db89a688 in mediawiki-core.

Bug: 56257
Change-Id: I0f9ab45ff2da29c2aac8559b9a0fe35c1dd238de
2014-09-26 22:03:31 +00:00
MZMcBride 2f6508d0a0 Kill errant tab
Change-Id: I5806d3fa815e641bbd743eba857f3cf1ce48a36a
2014-09-25 23:34:52 -04:00
Legoktm b74bb7ae9a Revert "Use mw-wiki-logo class instead of inline background-image"
Caused bug 71334.

This reverts commit 9ebb220b7f.

Bug: 71334
Change-Id: I19736c98d5f66319c1cb1425a28cd8acd4fd364e
2014-09-25 21:14:17 +00:00
Timo Tijhof 9ebb220b7f Use mw-wiki-logo class instead of inline background-image
Depends on I89e32fcd2 in mediawiki-core.

Bug: 56257
Change-Id: I890a7c3ec1531bc630aa8274f3e6ce28810d1b02
2014-09-22 18:11:25 +00:00
Bartosz Dziewoński 768ba62ad3 Vector: Remove compatibility for old variant menu HTML
Removing backwards-compatibility CSS from an earlier change.

Follow-up to Idf43d77dccff83ad81db776f3262e0ef12d25c92.

Change-Id: I2817c6e9eb52ffc785a04bb9d23b0802a553fd45
2014-08-21 20:29:48 +00:00
Kunal Mehta 83707028e5 Use SkinFactory to register skin, and Config instead of globals
Change-Id: Ic90969e5d71458c880f2b59e160ffedd7a5ac9be
2014-08-13 16:46:22 -07:00
Bartosz Dziewoński d28f09df31 Move Vector skin from core
This is the final step of the process described at
<https://www.mediawiki.org/wiki/Separating_skins_from_core_MediaWiki>.

Corresponding core change: Idfc38503.

Change-Id: I84fcf7ce6385b8323544cafe6912a00f1886d20d
2014-08-07 13:38:34 +02:00