Commit graph

165 commits

Author SHA1 Message Date
se4598 64195b8ff7 fix mw.popups.selectPopupElements
Hotfix for Ie34064860a81c7866b8e8b86858d2e12a8a196f4
Still won't show up popups for anchored links, but dunno if intended. 

Change-Id: I91a15153cb8bcae6d8ef2e5616855e4d45be6d78
2015-02-24 00:14:02 +01:00
jenkins-bot 782d9e37ba Merge "eventLogging: Use generateRandomSessionId" 2015-02-20 11:06:01 +00:00
jenkins-bot fd5cc437a3 Merge "Add a check for the EventLogging library before the logEvent call" 2015-02-20 11:03:32 +00:00
Prateek Saxena 44c57834b1 Disable Navigation Popups on render rather than document load
Bug: T64952
Change-Id: I7985341006d587671077f3dc32dd02e8dfb38972
2015-02-20 11:54:17 +01:00
Prateek Saxena b4cfa5c6d5 Add a check for the EventLogging library before the logEvent call
Bug: T70341
Change-Id: Idae926b1ddce544ab37b95018abc13879f515f71
2015-02-20 11:49:39 +01:00
Prateek Saxena 37442e6457 eventLogging: Use generateRandomSessionId
Bug: T88919
Change-Id: Ib859db7f55358d0cbd9f26b25d9fe96b76e718e9
2015-02-20 11:48:36 +01:00
se4598 45cf9c13e7 core: Better article link detection
Use the getUrl method to check that the <a> actually links
to the article that it has the title of. Only those elements
are returned by selectPopupElements.

Bug: T70039
Bug: T72512
Change-Id: Ie34064860a81c7866b8e8b86858d2e12a8a196f4
2015-02-18 17:02:14 +05:30
jenkins-bot 2fd9ac3569 Merge "Access native a.href property instead of attribute" 2015-02-18 10:33:55 +00:00
jenkins-bot f8e7b47bd9 Merge "core: Add missing leading '.' to oo-ui-buttonedElement-button in IGNORE_CLASSES" 2015-02-18 00:15:18 +00:00
Thiemo Mättig ddab3f9fd7 Access native a.href property instead of attribute
This is a subset of patch Ie340648. If reviewing and merging the much
larger other patch (it does much more things) is a problem, we can
merge this first, rebase the other one and have a much more focussed
discussion.

Change-Id: I4549fb1810c7dd36df8a70983d9508015c2bfadf
2015-02-17 15:03:13 +01:00
Prateek Saxena 7a51668e56 core: Add missing leading '.' to oo-ui-buttonedElement-button in IGNORE_CLASSES
Follows up I418508fad97e81127084150221e10ccec418167a

Change-Id: Ib3c187feeb8de053416bb3ef131c8f5cfedf0c63
2015-02-17 18:19:11 +05:30
Thiemo Mättig bf4016ecf1 Fix TypeError on <a> with no href
HTML5 allows <a> elements with no href="..." attribute. We do this in
Wikibase/Wikidata in a few places. Hovering these <a> elements causes
TypeErrors.

This is a hotfix. Please see Ie340648 for a much more advanced fix.

Change-Id: Ib20ef8348c964a6ba736d0fc76909fd4d496c11e
2015-02-12 15:37:37 +01:00
jenkins-bot 72362616a2 Merge "settings: Add help dialog" 2015-01-21 16:47:19 +00:00
Prateek Saxena 9c1c62ce05 Fix event logging issues
- Don't prevent the link click event.
- Check with the currentLink element rather than jQuery selectoin.
- Add click handler to images (used to be only extract).
- Stop the 'closePopup' if 'reset' has already been run.

Bug: T86378
Change-Id: I8748ecffe55954425656c5103fa9ddc99b6f3f72
2015-01-13 18:48:02 +05:30
Prateek Saxena f7d5f890b6 Re-position #mwe-popups-svg out of the view port
This <div> had been sitting visible at the bottom of the page
and went unnoticed till it caused problems with the ContentTranslation
extension.

Hiding it using 'display: none;' causes issues with the masking
of the images, thus putting the div out of the view port.

Bug: T76718
Change-Id: I731128c827aa093e0ffab52dc378aea386b0bb3c
2014-12-29 14:44:39 +05:30
jenkins-bot dbd3f6ff2b Merge "Make ':after' triangle larger so that the border of div is covered" 2014-12-03 15:37:00 +00:00
jenkins-bot eb7fb53baa Merge "article: Fix distance between image and text (landscape image & non flipped)" 2014-12-03 15:36:53 +00:00
jenkins-bot 1b6eaddba0 Merge "Reduce max height of text extract" 2014-12-03 15:33:21 +00:00
Prateek Saxena b24e39e9fc Run mw.html.escape on page extract and title
Add test for XSS attack

Bug: T69180
Change-Id: I213169bd9daed979e63f50cf3926f7196eb6181c
2014-12-01 11:23:14 -08:00
Prateek Saxena 9ab483ec6f settings: Add help dialog
Change-Id: I5f4cf435356748a1aceb05fcaf8c8980b8267804
2014-11-26 11:43:01 +05:30
jenkins-bot 895b6dfae0 Merge "Add rule to not show thumnail if its smaller than the card" 2014-11-23 20:07:41 +00:00
Prateek Saxena 77538a1001 Reduce max height of text extract
Currently .mwe-popups-extract keeps some empty space after the last
line. This shifts a little when zooming in causing part of the text
of the next line to be visible. Reducing this to have lesser extra
empty space solves the problem.

Bug: 73551
Change-Id: I968fca23fe2de04cb3f73ba4e7d4f676fbf88536
2014-11-20 14:54:14 +05:30
Prateek Saxena 24a7d02080 article: Fix distance between image and text (landscape image & non flipped)
Change-Id: I4fb6891cd89546b6a55b6952be7e1a6df41fa0b5
2014-11-20 11:46:37 +05:30
Prateek Saxena cbebde39b9 Make ':after' triangle larger so that the border of div is covered
When zooming in the border of the div is visible over the :after
pseudo element.
 - Update top and bottom triangle mixins to include @extra argument
 - Update pseudo elements to use the new mixin and position them
   correctly according the extra size

Bug: 73550
Change-Id: I05b9c74a675c69e407c4c78771504f447da754c5
2014-11-19 11:12:12 +05:30
Prateek Saxena 45172f1f7b Increase z-index of hovercards from 5 to 110
Hovercards is currently at 5 z-index which causes
it to be rendered behind the compact personal bar.
Changing this also effects the border triangles and
masked SVGs, thus incrementing them too.

Bug: 72882
Change-Id: Ib3c889c748a9c919754d8281e68fd0664db7c408
2014-11-12 14:39:47 +05:30
Prateek Saxena 0a7d7573fa Add rule to not show thumnail if its smaller than the card
Added two conditions based on portrait and landscape sizes.

Bug: 73009
Change-Id: I022267430b540be48952f0cfc8dc0cf962cd13d5
2014-11-11 10:23:34 +05:30
Prateek Saxena a9bc4e4ba8 Fix bottom margin issues with portrait images
This was happening due to:
 * Stale CSS selector
 * Incorrect margin values

Also added missing triangle pokey for a particular
orientation of the hovercard.

Bug: 71872
Change-Id: Ic4986f9cee2a92b29548ef21f9bec3f2c2117e98
2014-10-09 15:40:12 +05:30
jenkins-bot eccb7bf037 Merge "render.article: Correctly space extract for landscape images with smaller heights" 2014-09-22 16:17:20 +00:00
jenkins-bot 7c1e6398ad Merge "article: Fix settings' icon alignment" 2014-09-22 16:07:45 +00:00
Prateek Saxena 0630ff518c renderer: Actually use eventLogging
This was accidentally removed during the refactor
and went unnoticed for quite some time.

Change-Id: I850126461b503419d1e219398f3d61747fbccb23
2014-09-09 10:31:51 +05:30
Prateek Saxena 91da0e7536 article: Fix settings' icon alignment
Bug: 70147
Change-Id: I26c41395557420aea6c995a59aada0079f1a896c
2014-09-02 11:18:06 +05:30
jenkins-bot f835d52857 Merge "Force mw.popups.supportsSVG to false on InternetExplorer" 2014-08-26 17:52:55 +00:00
Prateek Saxena 7918944356 Force mw.popups.supportsSVG to false on InternetExplorer
Change-Id: I1d59167f3c2e166e32ef2f46fa4a527dd3a3410f
2014-08-26 13:56:22 +05:30
Prateek Saxena 8c0f64662e render.article: Correctly space extract for landscape images with smaller heights
Change-Id: Ie781621366650fe4c5a0affcae564fa512fab65c
2014-08-26 12:02:29 +05:30
jenkins-bot 6eb4a3a930 Merge "Reduce space between extract and timestamp" 2014-08-26 04:01:05 +00:00
jenkins-bot e50cf04603 Merge "Remove preventDefault from settings.open" 2014-08-25 17:51:59 +00:00
Prateek Saxena ca8b7f8658 Remove preventDefault from settings.open
Bug: 69579
Change-Id: I6e457542060d147c35ccb2dfeade5b90f20bd2ca
2014-08-25 18:02:46 +05:30
Prateek Saxena 13f3f1cf67 settings: Fix strings, copy and capitalization
Addresses the issues pointed out in:
https://gerrit.wikimedia.org/r/#/c/140086/16/i18n/en.json

Discussion:
https://trello.com/c/NYQ0nMeE/101-hovercards-phase-3

Bug: 68812
Change-Id: I7b4f6d2be08a1ee20b19aec95d99a73fd4bf9d29
2014-08-25 14:26:59 +05:30
Prateek Saxena fe487868d1 core: Ignore '.oo-ui-buttonedElement-button' links
Bug: 65442
Change-Id: I418508fad97e81127084150221e10ccec418167a
2014-08-21 13:07:24 +00:00
jenkins-bot 9d0a792e8f Merge "article: Fix settings icon" 2014-08-20 14:12:47 +00:00
jenkins-bot 7533c5c09a Merge "disablenavpop: Use winow onload instead of dom ready" 2014-08-20 14:12:18 +00:00
jenkins-bot 4436415d7c Merge "settings: Fix margins" 2014-08-20 14:10:34 +00:00
jenkins-bot 79cf8eb23a Merge "settings: Fix alignment issues" 2014-08-20 14:10:19 +00:00
Prateek Saxena 8f4e12d4b1 disablenavpop: Use winow onload instead of dom ready
This code has not been working because processAllPopups does
not execute. Test the change with:
https://en.wikipedia.org/wiki/User:Prtksxna/common.js

Bug: 62952
Change-Id: I3c8b5590b89693743c85c006fc0ee0a50e8b8342
2014-08-20 19:36:23 +05:30
Prateek Saxena e66ec613db article: Fix settings icon
1. Change color from #777 to #AAA
2. Add PNG fallback using `background-image-svg`

Bug: 69022
Change-Id: I0bbfe2aaa0c6e6ed1300bafa1352dd54037929b9
2014-08-19 22:22:21 +05:30
Prateek Saxena 10e9192719 settings: Fix margins
Change-Id: I3ad652b05d990377c6a01a0abb8091f1ff2443c7
2014-08-19 20:36:08 +05:30
Prateek Saxena d9322cfe9e settings: Fix alignment issues
Change-Id: Iacc1e934822f58fbc848b426783d02b5f9c9477e
2014-08-18 17:54:47 +05:30
Prtksxna 4cba605476 Merge "Don't render popup on "javascript:..." links." 2014-08-13 11:08:46 +00:00
jenkins-bot 26cd77cfdc Merge "Replace hardcoded path with wgExtensionAssetsPath" 2014-08-12 13:36:36 +00:00
Prateek Saxena d77d6005c1 Replace hardcoded path with wgExtensionAssetsPath
Change-Id: I3cf15bc4f9c9f1273b896d0e256f5821f15222fb
2014-08-12 18:08:31 +05:30