http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90523

Revision: 90523
Author:   yaron
Date:     2011-06-21 12:39:14 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Added code to remove 'No subcategories' messages from CategoryTree-based 
'category' and 'categories' inputs

Modified Paths:
--------------
    trunk/extensions/SemanticForms/includes/SF_FormInputs.php

Modified: trunk/extensions/SemanticForms/includes/SF_FormInputs.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_FormInputs.php   2011-06-21 
12:16:01 UTC (rev 90522)
+++ trunk/extensions/SemanticForms/includes/SF_FormInputs.php   2011-06-21 
12:39:14 UTC (rev 90523)
@@ -1508,6 +1508,10 @@
                if ( $is_disabled ) {
                        $tree = str_replace( 'type="radio"', 'type="radio" 
disabled', $tree );
                }
+
+               // Get rid of all the 'no subcategories' messages.
+               $tree = str_replace( '<div class="CategoryTreeChildren" 
style="display:block"><i class="CategoryTreeNotice">' . wfMsg( 
'categorytree-no-subcategories' ) . '</i></div>', '', $tree );
+
                $text .= $tree . '</div>';
 
                $spanClass = "radioButtonSpan";
@@ -1604,6 +1608,10 @@
                if ( $is_disabled ) {
                        $tree = str_replace( 'type="checkbox"', 
'type="checkbox" disabled', $tree );
                }
+
+               // Get rid of all the 'no subcategories' messages.
+               $tree = str_replace( '<div class="CategoryTreeChildren" 
style="display:block"><i class="CategoryTreeNotice">' . wfMsg( 
'categorytree-no-subcategories' ) . '</i></div>', '', $tree );
+
                $text = '<div style="overflow: auto; padding: 5px; border: 1px 
#aaaaaa solid; max-height: ' . $height . 'px; width: ' . $width . 'px;">' . 
$tree . '</div>';
 
                $text .= "\t" . Html::Hidden( $input_name . '[is_list]', 1 ) . 
"\n";


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

Reply via email to