Prtksxna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/172486

Change subject: Add link to survey
......................................................................

Add link to survey

T1005

Change-Id: I24bfd5fd622d1afc4372dbd4bfca3879927b0c17
---
M Popups.hooks.php
M i18n/en.json
M i18n/qqq.json
M resources/ext.popups.core.less
M resources/ext.popups.renderer.article.js
A resources/horn.svg
A resources/horn_hover.svg
7 files changed, 58 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/86/172486/1

diff --git a/Popups.hooks.php b/Popups.hooks.php
index 98d4acf..99dfe42 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -91,6 +91,7 @@
                                "popups-settings-save",
                                "popups-settings-cancel",
                                "popups-settings-enable",
+                               "popups-send-feedback",
                        ),
                        'remoteExtPath' => 'Popups',
                        'localBasePath' => __DIR__,
diff --git a/i18n/en.json b/i18n/en.json
index 2b8a7a4..c1f6910 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -16,5 +16,6 @@
     "popups-settings-option-off-description": "You can change this setting 
using the link in the footer of the page",
     "popups-settings-save": "Save",
     "popups-settings-cancel": "Cancel",
-    "popups-settings-enable": "Enable previews"
+    "popups-settings-enable": "Enable previews",
+    "popups-send-feedback": "Send Feedback"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 8777f01..32e6526 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -19,5 +19,6 @@
        "popups-settings-option-off-description": "Description for turn off 
hovercards option",
        "popups-settings-save": "Save buttton for the setting's 
dialoag\n{{Identical|Save}}",
        "popups-settings-cancel": "Cancel button for the setting's 
dialog\n{{Identical|Cancel}}",
-       "popups-settings-enable": "Link on the footer to enable hovercards if 
its disabled.\n\nSee also:\n* {{msg-mw|Popups-settings-option-off}}"
+       "popups-settings-enable": "Link on the footer to enable hovercards if 
its disabled.\n\nSee also:\n* {{msg-mw|Popups-settings-option-off}}",
+       "popups-send-feedback": "Tooltip for the send feedback icon on the 
hovercard"
 }
diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 931fc60..7670342 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -102,6 +102,23 @@
                        width: 16px;
                        .background-image-svg( "gear_gray.svg", "gear_gray.png" 
);
                }
+
+               .mwe-popups-survey-icon {
+                       display: inline-block;
+                       vertical-align: text-top;
+                       cursor: pointer;
+                       margin-left: 5px;
+                       height: 16px;
+                       width: 16px;
+                       background-image: url( "horn.svg" );
+                       background-size: 16px 16px;
+                       border-left: 1px solid #ccc;
+
+                       &:hover {
+                               background-image: url( "horn_hover.svg" );
+                       }
+               }
+
        }
 
        .mwe-popups-extract {
diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index c2c62d3..8158cdd 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -112,12 +112,17 @@
                                'mwe-popups-timestamp-recent' :
                                'mwe-popups-timestamp-older',
                        $settingsImage = $( '<a>' ).addClass( 
'mwe-popups-settings-icon' ),
+                       $surveyImage = $( '<a>' )
+                               .attr( 'href', 
'https://wikimedia.qualtrics.com/SE/?SID=SV_d1irF0VbOxZREvr' )
+                               .attr( 'target', '_blank' )
+                               .attr( 'title', mw.message( 
'popups-send-feedback' ) )
+                               .addClass( 'mwe-popups-survey-icon' ),
                        $timestamp = $( '<div>' )
                                .addClass( timestampclass )
                                .append(
                                        $( '<span>' ).text( mw.message( 
'popups-last-edited',
                                                moment( timestamp ).fromNow() 
).text() ),
-                                       $settingsImage
+                                       $settingsImage, $surveyImage
                        );
 
                if ( $thumbnail.prop( 'tagName' ) !== 'SPAN' ) {
diff --git a/resources/horn.svg b/resources/horn.svg
new file mode 100644
index 0000000..6dd5515
--- /dev/null
+++ b/resources/horn.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 
6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg version="1.1" id="Layer_1" 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns";
+        xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="2048px" 
height="2048px"
+        viewBox="-976 -976 2048 2048" enable-background="new -976 -976 2048 
2048" xml:space="preserve">
+<g id="Page-1" sketch:type="MSPage">
+       
+               <g id="horn_basic_grey" transform="translate(450.500000, 
450.500000) rotate(-15.000000) translate(-450.500000, -450.500000) 
translate(157.000000, 229.000000)" sketch:type="MSLayerGroup">
+               <path id="Shape" sketch:type="MSShapeGroup" fill="#AAAAAA" 
d="M381.425,74.757L182.126,21.354l-68.861,116.641
+                       
c-24.55,42.522-85.111,55.599-127.632,31.049l2.518,1.426c-42.522-24.55-56.256-78.986-31.706-121.508L2.031-26.902
+                       
l-549.295-147.183l345.337-603.592l685.244,675.348C497.582-49.636,433.841,60.849,381.425,74.757L381.425,74.757z"/>
+       </g>
+</g>
+</svg>
diff --git a/resources/horn_hover.svg b/resources/horn_hover.svg
new file mode 100644
index 0000000..a4157d2
--- /dev/null
+++ b/resources/horn_hover.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.0.2, SVG Export Plug-In . SVG Version: 
6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg version="1.1" id="Layer_1" 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns";
+        xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="2048px" 
height="2048px"
+        viewBox="-976 -976 2048 2048" enable-background="new -976 -976 2048 
2048" xml:space="preserve">
+<g id="Page-1" sketch:type="MSPage">
+       
+               <g id="horn_basic_grey" transform="translate(450.500000, 
450.500000) rotate(-15.000000) translate(-450.500000, -450.500000) 
translate(157.000000, 229.000000)" sketch:type="MSLayerGroup">
+               <path id="Shape" sketch:type="MSShapeGroup" fill="#555555" 
d="M381.425,74.757L182.126,21.354l-68.861,116.641
+                       
c-24.55,42.522-85.111,55.599-127.632,31.049l2.518,1.426c-42.522-24.55-56.256-78.986-31.706-121.508L2.031-26.902
+                       
l-549.295-147.183l345.337-603.592l685.244,675.348C497.582-49.636,433.841,60.849,381.425,74.757L381.425,74.757z"/>
+       </g>
+</g>
+</svg>

-- 
To view, visit https://gerrit.wikimedia.org/r/172486
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24bfd5fd622d1afc4372dbd4bfca3879927b0c17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to