Commit graph

6941 commits

Author SHA1 Message Date
MatmaRex 6cade7eba3 Make items on notifications flyout behave like links
We want the notifications in the flyout to behave just like links,
including standard middle-click and Ctrl-click behavior. The simplest
way to do that would be to actually make them links - but the area can
contain a few other links, so we can't do that and have to resort to
ugly hacks.

Or do we?

Turns out that while browsers won't accept HTML containing nested <a>
tags[1], such a structure is valid XHTML, and it's possible to create
such structure in HTML mode using DOM manipulation. It works like one
would expect: the entire thing is clickable, but inner <a> tags' hrefs
override outer ones.

Firefox even had a request to make that work[2] which was happily
fulfilled.

Tested the basic case [see below] on Firefox 22, Opera 12, Opera 15
(which uses the Blink engine like Chrome), IE 8 and IE 6 and it works
the same on all of them. Tested the XHTML variant [see below] on all
of the above except for the IEs which don't grok XHTML and it exhibits
the same behavior.

[1] Simple test: $('<div>1<a>2<a>3</a>4</a>5</div>').html() is
    "1<a>2</a><a>3</a>45", not actually "1<a>2<a>3</a>4</a>5" like one
    might expect.
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=331959

----

The test cases used are below. When trying out the XHTML one make sure
that the browser uses application/xhtml+xml MIME type; saving the file
with .xhtml extension should be enough.

XHTML:
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <body>
  <div>1<a href="http://google.com/">2<a href="http://example.com/">3</a>4</a>5</div>
  </body>
  </html>

HTML:
  <!DOCTYPE html>
  <html>
  <body>
  <script type="text/javascript">
  var div = document.createElement('div');
  var a1 = document.createElement('a');
  a1.href = "http://google.com/";
  var a2 = document.createElement('a');
  a2.href = "http://example.com/";

  div.appendChild( document.createTextNode('1') );
  div.appendChild( a1 );
  a1.appendChild( document.createTextNode('2') );
  a1.appendChild( a2 );
  a2.appendChild( document.createTextNode('3') );
  a1.appendChild( document.createTextNode('4') );
  div.appendChild( document.createTextNode('5') );

  document.body.appendChild(div);
  </script>
  </body>
  </html>

----

Bug: 52319
Change-Id: I311eca70f025ce92129c828cd88f96686b7cff72
2013-08-06 13:23:33 +00:00
Translation updater bot ca6271c898 Localisation updates from http://translatewiki.net.
Change-Id: Ic6a552b1fc1f7bdbc7352d66534c65d9773709b7
2013-08-05 19:35:54 +00:00
jenkins-bot cfe1fc06dc Merge "Making title-params no longer required." 2013-08-05 11:30:16 +00:00
jenkins-bot 5037b7733c Merge "Add colon to notification-edit-talk-page-email-batch-body2" 2013-08-05 08:18:24 +00:00
Translation updater bot 9e54f0e50e Localisation updates from http://translatewiki.net.
Change-Id: I7d0739df3ec5220e32ce2c92ff953e2166dc8875
2013-08-04 18:52:59 +00:00
Nemo bis e1171cc409 Add colon to notification-edit-talk-page-email-batch-body2
To clarify the sentence is completed by the following line.
<https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Notification-edit-talk-page-email-batch-body2/en>

Change-Id: Ib96f4ee55819365a92949ea0b7afb4fd234a12b4
2013-08-04 19:26:16 +02:00
MatmaRex dd87542a40 ext.echo.special: Cross-skin adjustments
Out of the default MW skins these only seem to affect CologneBlue.

* Reset padding and list-style-image on ul#mw-echo-special-container
  ourselves, do not rely on the skin doing it
* Use transparent background on .mw-echo-notification (and
  semi-transparent black on hover) instead of solid white and
  light grey to accomodate colored skin backgrounds

Change-Id: I2c178627e4dbe889c4958afc41e4969aaa45a717
2013-08-04 14:56:32 +02:00
MatmaRex 02bf709c97 Do not offset the heading of Special:Notifications from the left
Bug: 52508
Change-Id: Ia9f5a82b1c297d0e1de09bf228a2bbadccb98739
2013-08-04 14:34:33 +02:00
MatmaRex c351851277 ext.echo.special: Move #firstHeading styling from JS to CSS
Also some code cleanup in the part about converting subtitle links
into header icons.

Change-Id: I25eacb9c512fd6883a65df3af97608749b53b228
2013-08-04 14:34:30 +02:00
Translation updater bot ac59d1344f Localisation updates from http://translatewiki.net.
Change-Id: I01ff7ac3d92ad1ce751f7e27342441f38e3756b2
2013-08-03 19:43:38 +00:00
Translation updater bot 8c81c51d8c Localisation updates from http://translatewiki.net.
Change-Id: Idc4c095594c0e6d7d737d775f992c926ce6ddf91
2013-08-02 21:35:41 +00:00
kaldari 2f6591febe Making title-params no longer required.
In theory, a notification could not need any contextual information
so there's no reason we should make it required.

Now, if the title-params are not provided in the notifcation
definition, it just sets the value to an empty array.

Change-Id: Iba5ce5cc56010101c5e64976c95b37a215dc99fa
2013-08-01 17:52:47 -07:00
Yuki Shira 32087f7605 Add full-stops & fix quotation marks
Spotted by Siebrand
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Echo-email-footer-default-html/en
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Echo-email-batch-body-intro-daily/en
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Echo-email-batch-body-intro-weekly/en
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Notification-mention/en

Change-Id: Ia1c61c4f78f7b93343ba1174b7446829c216cbfa
2013-08-02 08:05:59 +09:00
Translation updater bot 5d30ae9e6b Localisation updates from http://translatewiki.net.
Change-Id: I7574e4f39243df4a8a5d11f5fe84e88142c96ffb
2013-08-01 20:10:50 +00:00
bsitu 08e2dd4ddb user-rights notification primary link has incorrect message key
The current message key is notification-learn-more, but this message key
is not defined in the language file, it should be echo-learn-more

Change-Id: I4e2f19e3663727ff8c4083fd295c80cb350297c4
2013-07-31 17:18:23 -07:00
bsitu a0902ceca8 (bug 52313) Do not show text snippet with undecoded chars
Change-Id: I1760c8ab3f313241965c93571f9637c5b0aeebc4
2013-07-31 14:45:09 -07:00
Translation updater bot aa05a0fc0d Localisation updates from http://translatewiki.net.
Change-Id: I5f7e57e438bfbdb01c046b4f614b151f81b0575e
2013-07-31 19:57:20 +00:00
Matthias Mullie 54e2e0f69a Split the code to generate a proper URL/link from setTitleLink()
The reason I'm splitting this is that, not only do I want to create
a link to the 'title', but also for another param (in my case: link
to the AFTv5 permalink page)

Change-Id: I834b50ca144e7d08db830726480da19e1b406a27
2013-07-31 17:07:50 +02:00
bsitu 2c7ec70dc6 The email should be sent in the recipient's language
At the moment it is sent in the sender's language.

Bug: 52298
Change-Id: I7f689963105585cf74a902cf975fffb592135ed4
2013-07-31 02:47:15 +00:00
jenkins-bot 347cdf3247 Merge "Revert "(bug 51640) wgUserNewMsgRevisionId is null with only one rev"" 2013-07-30 20:47:16 +00:00
Bsitu 63c1d25d3a Revert "(bug 51640) wgUserNewMsgRevisionId is null with only one rev"
This reverts commit b9e5b2f64a.

Change-Id: I64cd03dd0789f482221f8f38bbf9a034025e45f9
2013-07-30 20:45:03 +00:00
Translation updater bot d88fb582b2 Localisation updates from http://translatewiki.net.
Change-Id: I7d554607b875cc17e764624b821c7bfbd0851590
2013-07-30 20:09:25 +00:00
jenkins-bot 82e97088a1 Merge "(bug 51005) Add secondary link to the archive page" 2013-07-30 08:54:44 +00:00
jenkins-bot 9ee210f7cd Merge "(bug 52225) Some javascript and css fix for IE7" 2013-07-30 08:40:40 +00:00
bsitu ced3989f2a Update email text color and add a period to email notification text
Change-Id: I9d9da6aee9ce36f6350f934b11a49cdf2492ea9c
2013-07-30 10:36:27 +02:00
jenkins-bot e374ce8cb2 Merge "user talk and mention notification improvement" 2013-07-30 08:28:29 +00:00
bsitu 0b1275b9e3 user talk and mention notification improvement
http://www.mediawiki.org/wiki/Echo_%28Notifications%29/Feature_requirements#Improved_Notification_Structure

Change-Id: I2da35e8ed092c42ac95ae34012426834a37c3cde
2013-07-29 18:07:43 -07:00
bsitu 372b5f2f28 (bug 52225) Some javascript and css fix for IE7
1. clone() breaks the flyout layout in IE7
2. inline-block needs some adjustment for IE7

Change-Id: I014318aacb15000f132c4e4af74f5ea40a064712
2013-07-29 12:52:29 -07:00
Translation updater bot 239b183cf7 Localisation updates from http://translatewiki.net.
Change-Id: I053a6bc5d63492b38c7d2044a2d59a14f359a308
2013-07-29 19:33:08 +00:00
jenkins-bot 7ba728aaf0 Merge "link-from-page should be linked in html email outputformat" 2013-07-29 13:21:06 +00:00
Translation updater bot cf1d0e85a9 Localisation updates from http://translatewiki.net.
Change-Id: I476a696a0572aa13bdafb8026c4575e82a5aaf42
2013-07-28 19:11:03 +00:00
Nemo bis dc26245524 More consistency with "Email options" preferences subsection
Cf. "Display options" in the line below and, in core,
I35608d99eff9a95a14bc12ace8de9a8e1dd808a1

Change-Id: I6ba88fa9ee3e22c865b54fcd74d4341a4c3d509e
2013-07-27 19:24:18 +02:00
Translation updater bot 50c85e3d72 Localisation updates from http://translatewiki.net.
Change-Id: I87f97a3e32cf7e10684e852644601919305c2b98
2013-07-26 20:35:11 +00:00
Translation updater bot 8bd3d400b6 Localisation updates from http://translatewiki.net.
Change-Id: If8f9c31a933b36c81112ba362cb7257280c23df1
2013-07-25 19:28:02 +00:00
bsitu 6ec1b94fbf link-from-page should be linked in html email outputformat
Change-Id: I6ee1232a9b55fb424897c8bc5c94806ff203e4ca
2013-07-24 14:01:46 -07:00
Translation updater bot 7b144838b8 Localisation updates from http://translatewiki.net.
Change-Id: Ica63d6446b146fbbdb13e76e91e4190660b24b4a
2013-07-24 19:52:41 +00:00
jenkins-bot f1cc118b1f Merge "Remove override of skin behaviour for inline anchor's text-decoration" 2013-07-24 12:11:11 +00:00
Translation updater bot 54219259c2 Localisation updates from http://translatewiki.net.
Change-Id: I133d142ea783785bdae3e854298e71618b28da66
2013-07-23 18:37:40 +00:00
bsitu 7f33cc98fa (bug 46665) Add HTML email support to email digest
Change-Id: I3b881acbcf4b18fc0401364ea0a6bc993d2c2246
2013-07-23 13:20:33 +02:00
bsitu 2c74f66f18 Add HTML email support to Echo notification
To test the HTML email:

1. install the latest version of php-mail and php-mail-mime package, they are required
   by the core sendmail function to send HTML email
2. set $wgAllowHTMLEmail = true before loading Echo in LocalSetting.php

Change-Id: Ia4b98b14e135742b84f1b0e04589b0efdd24e954
2013-07-23 13:20:33 +02:00
jenkins-bot b20a030b1a Merge "Fix an i18n message" 2013-07-23 04:29:47 +00:00
Translation updater bot 58e72c5873 Localisation updates from http://translatewiki.net.
Change-Id: Ifacb51ea86726c7f30efeff8c932bdb99d64b25f
2013-07-22 20:12:49 +00:00
bsitu caa1ce5338 Fix an i18n message
Change-Id: Ie48dcfc23fcddee2d31b99189e65017c8afc253e
2013-07-22 11:03:35 -07:00
Translation updater bot b121932086 Localisation updates from http://translatewiki.net.
Change-Id: I3f9e7dbf21dd035b84817884bd75a5df5861371f
2013-07-21 19:13:25 +00:00
Translation updater bot a417d6be7b Localisation updates from http://translatewiki.net.
Change-Id: I6ed4a726936c6cfaffb0da2b8c34c167fcd557e8
2013-07-20 20:46:57 +00:00
Translation updater bot d6c1b58d14 Localisation updates from http://translatewiki.net.
Change-Id: I5c4a3dba5f28ac033e5d43245420cd770635c1b5
2013-07-19 21:23:31 +00:00
bsitu b9e5b2f64a (bug 51640) wgUserNewMsgRevisionId is null with only one rev
wgUserNewMsgRevisionId is null with only one revision and that revision is
not viewed, this makes it not reliable for determining if there is new
message.  We just switch to check against $user->getNewtalk() instead.

We can still use wgUserNewMsgRevisionId to generate diff links if desired

Change-Id: I4cf50a944aada03151bd17f3610bd59b3bfb2bf2
2013-07-19 11:50:43 -07:00
Translation updater bot 7eb2b38404 Localisation updates from http://translatewiki.net.
Change-Id: I9825487d1a2be70694d06f051724d976db8505c5
2013-07-18 19:47:51 +00:00
jenkins-bot 9e631e764b Merge "(bug 48568) Bust IE browser ajax cache + some API clenaup" 2013-07-18 17:40:57 +00:00
bsitu f79c6a2e0f (bug 48568) Bust IE browser ajax cache + some API clenaup
Change-Id: Iaacdf41d85dc31a07d3d981086bcd919ba1a40e2
2013-07-18 10:31:23 -07:00