r94483 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94482‎ | r94483 | r94484 >
Date:00:35, 15 August 2011
Author:yaron
Status:deferred
Tags:
Comment:
Various changes to get display of form-validation error message to be more in line with MediaWiki style guide, at http://www.mediawiki.org/wiki/Style_guide/Error_handling_and_validation#Error_Notification_Techniques
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)
  • /trunk/extensions/SemanticForms/skins/MW-Icon-AlertMark.png (added) (history)
  • /trunk/extensions/SemanticForms/skins/SemanticForms.css (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -13,11 +13,13 @@
1414 class SFFormUtils {
1515 static function setGlobalJSVariables( &$vars ) {
1616 global $sfgAutocompleteValues, $sfgAutocompleteOnAllChars;
 17+ global $sfgScriptPath;
1718 // global $sfgInitJSFunctions, $sfgValidationJSFunctions;
1819 global $sfgShowOnSelect;
1920
2021 $vars['sfgRemoveText'] = wfMsg( 'sf_formedit_remove' );
2122 $vars['sfgAutocompleteOnAllChars'] = $sfgAutocompleteOnAllChars;
 23+ $vars['sfgScriptPath'] = $sfgScriptPath;
2224 // variables that are associative arrays need to be cast as
2325 // objects, to work with MW 1.15 and earlier
2426 $vars['sfgAutocompleteValues'] = (object)$sfgAutocompleteValues;
Index: trunk/extensions/SemanticForms/skins/MW-Icon-AlertMark.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/SemanticForms/skins/MW-Icon-AlertMark.png
___________________________________________________________________
Added: svn:mime-type
2527 + application/octet-stream
Index: trunk/extensions/SemanticForms/skins/SemanticForms.css
@@ -77,16 +77,16 @@
7878 border: 1px solid #777777;
7979 padding: 12px;
8080 margin: 25px;
81 - width:auto;
 81+ width: auto;
8282 background: #eeeeee;
8383 }
8484 div.warningMessage {
85 - border: 1px solid #777777;
86 - padding: 12px;
 85+ border: 2px solid red;
 86+ padding: 5px 10px 5px 10px;
8787 margin: 25px;
88 - width:auto;
 88+ width: auto;
8989 font-weight: bold;
90 - color: red;
 90+ color: black;
9191 }
9292 span.errorMessage {
9393 color: red;
Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -605,7 +605,7 @@
606606 if (num_errors > 0) {
607607 // add error header, if it's not there already
608608 if (jQuery("#form_error_header").size() == 0) {
609 - jQuery("#contentSub").append('<div id="form_error_header" class="warningMessage" style="font-size: medium">' + sfgFormErrorsHeader + '</div>');
 609+ jQuery("#contentSub").append('<div id="form_error_header" class="warningMessage" style="font-size: medium"><img src="' + sfgScriptPath + '/skins/MW-Icon-AlertMark.png" />' + sfgFormErrorsHeader + '</div>');
610610 }
611611 scroll(0, 0);
612612 } else {

Sign-offs

UserFlagDate
Nikerabbitinspected19:14, 15 August 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r94485Added space between new alert image and textyaron00:43, 15 August 2011