Sophivorus has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344447 )

Change subject: Mark parameters in the UI according to their status
......................................................................

Mark parameters in the UI according to their status

- Required parameters are marked with the class "proveit-required"
- Suggested parameters are marked with the class "proveit-suggested"
- Optional parameters are marked with the class "proveit-optional"
- Deprecated parameters are marked with the class "proveit-deprecated"

Bug T150414

Change-Id: Id23a4cd25e65e8bb3122e8d0ecb1e3d39e37fc94
---
M proveit.css
M proveit.js
2 files changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikipedia/gadgets/ProveIt 
refs/changes/47/344447/1

diff --git a/proveit.css b/proveit.css
index a9195cb..8a63e1d 100755
--- a/proveit.css
+++ b/proveit.css
@@ -120,6 +120,10 @@
        font-weight: bold;
 }
 
+#proveit-reference-form .proveit-deprecated label {
+       text-decoration: line-through;
+}
+
 #proveit-reference-form input,
 #proveit-reference-form select,
 #proveit-reference-form textarea {
diff --git a/proveit.js b/proveit.js
index 14fb906..282190d 100755
--- a/proveit.js
+++ b/proveit.js
@@ -1026,9 +1026,15 @@
                                paramValueColumn = $( '<td>' ).append( 
paramValueInput );
                                row = $( '<tr>' ).addClass( 
'proveit-param-pair' ).append( paramNameColumn, paramValueColumn );
 
+                               // Mark the parameters according to their status
                                if ( paramData.required ) {
-                                       // Mark the required parameters as such 
to style them appropriattely
                                        row.addClass( 'proveit-required' );
+                               } else if ( paramData.suggested ) {
+                                       row.addClass( 'proveit-suggested' );
+                               } else if ( paramData.deprecated ) {
+                                       row.addClass( 'proveit-deprecated' );
+                               } else {
+                                       row.addClass( 'proveit-optional' );
                                }
 
                                // Add the row to the table

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id23a4cd25e65e8bb3122e8d0ecb1e3d39e37fc94
Gerrit-PatchSet: 1
Gerrit-Project: wikipedia/gadgets/ProveIt
Gerrit-Branch: master
Gerrit-Owner: Sophivorus <scheno...@gmail.com>

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

Reply via email to