[MediaWiki-commits] [Gerrit] Add tooltip to annotation indicator - change (mediawiki...CodeEditor)

2015-05-25 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Add tooltip to annotation indicator
..

Add tooltip to annotation indicator

In the past I had made the annotation indicators clickable, and your
cursor will in this case navigate to the next annotation in editor.
This was not really easily discoverable, so I have added a tooltip to
make it slightly more discoverable.

I also added a CSS line to prevent users from accidently selecting the
text (or rather numbers) in this area, which I had noticed happened to
me at times when trying to click it.

Change-Id: I47ecba232ff925169d0f64d85ae34ff6564cc1a5
---
M CodeEditor.php
M i18n/en.json
M i18n/qqq.json
M modules/jquery.codeEditor.css
M modules/jquery.codeEditor.js
5 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor 
refs/changes/93/213493/1

diff --git a/CodeEditor.php b/CodeEditor.php
index 74cea86..0feca04 100644
--- a/CodeEditor.php
+++ b/CodeEditor.php
@@ -58,6 +58,7 @@
'user.options',
),
'messages' = array(
+   'codeeditor-next-annotation',
'codeeditor-toolbar-toggle',
'codeeditor-save-with-errors'
)
diff --git a/i18n/en.json b/i18n/en.json
index 13eca13..9aaca60 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,6 +6,7 @@
 ]
 },
 codeeditor-desc: Syntax-highlighted editing for JavaScript and CSS 
pages using [http://ace.ajax.org/ Ace editor],
+codeeditor-next-annotation: Go to next annotation,
 codeeditor-toolbar-toggle: Toggle code editor,
 codeeditor-save-with-errors: The document contains errors. Are you sure 
you want to save?
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b438d00..52fa59e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -8,6 +8,7 @@
]
},
codeeditor-desc: {{desc|name=Code 
Editor|url=https://www.mediawiki.org/wiki/Extension:CodeEditor}};,
+   codeeditor-next-annotation: Used as a label for button to navigate 
to the next line in the editor that has an annotation,
codeeditor-toolbar-toggle: Used as label for toolbar button.,
codeeditor-save-with-errors: Used as message in a dialog before 
saving a document with errors.
 }
diff --git a/modules/jquery.codeEditor.css b/modules/jquery.codeEditor.css
index 50c56d5..ee71d9c 100644
--- a/modules/jquery.codeEditor.css
+++ b/modules/jquery.codeEditor.css
@@ -26,6 +26,7 @@
 
 .codeEditor-status-worker {
padding: 0 0.3em;
+   user-select: none;
cursor: pointer;
display: table-cell;
*float: left;
diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 11cc2d0..46cc36b 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -331,6 +331,7 @@
$lineAndMode = $( 'div' ).addClass( 
'codeEditor-status-line' ),
$workerStatus = $( 'div' )
.addClass( 
'codeEditor-status-worker' )
+   .attr( 'title', mw.msg( 
'codeeditor-next-annotation' ) )
.append( $errors )
.append( $warnings )
.append( $infos );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47ecba232ff925169d0f64d85ae34ff6564cc1a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add tooltip to annotation indicator - change (mediawiki...CodeEditor)

2015-05-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add tooltip to annotation indicator
..


Add tooltip to annotation indicator

In the past I had made the annotation indicators clickable, and your
cursor will in this case navigate to the next annotation in editor.
This was not really easily discoverable, so I have added a tooltip to
make it slightly more discoverable.

I also added a CSS line to prevent users from accidently selecting the
text (or rather numbers) in this area, which I had noticed happened to
me at times when trying to click it.

Change-Id: I47ecba232ff925169d0f64d85ae34ff6564cc1a5
---
M CodeEditor.php
M i18n/en.json
M i18n/qqq.json
M modules/jquery.codeEditor.css
M modules/jquery.codeEditor.js
5 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/CodeEditor.php b/CodeEditor.php
index 74cea86..0feca04 100644
--- a/CodeEditor.php
+++ b/CodeEditor.php
@@ -58,6 +58,7 @@
'user.options',
),
'messages' = array(
+   'codeeditor-next-annotation',
'codeeditor-toolbar-toggle',
'codeeditor-save-with-errors'
)
diff --git a/i18n/en.json b/i18n/en.json
index 13eca13..9aaca60 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,6 +6,7 @@
 ]
 },
 codeeditor-desc: Syntax-highlighted editing for JavaScript and CSS 
pages using [http://ace.ajax.org/ Ace editor],
+codeeditor-next-annotation: Go to next annotation,
 codeeditor-toolbar-toggle: Toggle code editor,
 codeeditor-save-with-errors: The document contains errors. Are you sure 
you want to save?
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b438d00..52fa59e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -8,6 +8,7 @@
]
},
codeeditor-desc: {{desc|name=Code 
Editor|url=https://www.mediawiki.org/wiki/Extension:CodeEditor}};,
+   codeeditor-next-annotation: Used as a label for button to navigate 
to the next line in the editor that has an annotation,
codeeditor-toolbar-toggle: Used as label for toolbar button.,
codeeditor-save-with-errors: Used as message in a dialog before 
saving a document with errors.
 }
diff --git a/modules/jquery.codeEditor.css b/modules/jquery.codeEditor.css
index 50c56d5..ee71d9c 100644
--- a/modules/jquery.codeEditor.css
+++ b/modules/jquery.codeEditor.css
@@ -26,6 +26,7 @@
 
 .codeEditor-status-worker {
padding: 0 0.3em;
+   user-select: none;
cursor: pointer;
display: table-cell;
*float: left;
diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 11cc2d0..46cc36b 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -331,6 +331,7 @@
$lineAndMode = $( 'div' ).addClass( 
'codeEditor-status-line' ),
$workerStatus = $( 'div' )
.addClass( 
'codeEditor-status-worker' )
+   .attr( 'title', mw.msg( 
'codeeditor-next-annotation' ) )
.append( $errors )
.append( $warnings )
.append( $infos );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47ecba232ff925169d0f64d85ae34ff6564cc1a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Bartosz DziewoƄski matma@gmail.com
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits