jenkins-bot has submitted this change and it was merged.

Change subject: (bug 45887) Improve error popup discoverability
......................................................................


(bug 45887) Improve error popup discoverability

The Scribunto "Script error" can be clicked, which is indicated by a CSS
cursor:pointer style. To make it more discoverable, also have it show an
underline on hover (as links do by default).

And while we're messing with it, let's remove that "style" attribute and
use the already-existing CSS class to assign the styles.

Bug: 45887
Change-Id: Ibbbf0ed268efd78e4b7844cc2639fe154ee3ab8a
---
M Scribunto.php
A modules/ext.scribunto.css
M modules/ext.scribunto.js
3 files changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Demon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Scribunto.php b/Scribunto.php
index d07cc7d..c83a599 100644
--- a/Scribunto.php
+++ b/Scribunto.php
@@ -71,6 +71,7 @@
 
 $wgResourceModules['ext.scribunto'] = $sbtpl + array(
        'scripts' => 'ext.scribunto.js',
+       'styles' => 'ext.scribunto.css',
        'dependencies' => array( 'jquery.ui.dialog' ),
        'messages' => array(
                'scribunto-parser-dialog-title'
diff --git a/modules/ext.scribunto.css b/modules/ext.scribunto.css
new file mode 100644
index 0000000..184691a
--- /dev/null
+++ b/modules/ext.scribunto.css
@@ -0,0 +1,7 @@
+.scribunto-error {
+       cursor: pointer;
+}
+
+.scribunto-error:hover, .scribunto-error:focus {
+       text-decoration: underline;
+}
diff --git a/modules/ext.scribunto.js b/modules/ext.scribunto.js
index 91163ef..b871a39 100644
--- a/modules/ext.scribunto.js
+++ b/modules/ext.scribunto.js
@@ -25,7 +25,6 @@
                                }
                                var errorId = parseInt( matches[1] );
                                $( span )
-                                       .css( 'cursor', 'pointer' )
                                        .bind( 'click', function ( evt ) {
                                                if ( typeof that.errors[ 
errorId ] !== 'string' ) {
                                                        console.log( 
"mw.scribunto.init: error " + matches[1] + " not found, " +

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbbf0ed268efd78e4b7844cc2639fe154ee3ab8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to