Spin out all the CSS used on special pages into their own mediawiki.special module...
authorHappy-melon <happy-melon@users.mediawiki.org>
Sat, 12 Mar 2011 22:42:58 +0000 (22:42 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Sat, 12 Mar 2011 22:42:58 +0000 (22:42 +0000)
14 files changed:
includes/specials/SpecialAllmessages.php
includes/specials/SpecialAllpages.php
includes/specials/SpecialBlock.php
includes/specials/SpecialContributions.php
includes/specials/SpecialEmailuser.php
includes/specials/SpecialListgrouprights.php
includes/specials/SpecialPrefixindex.php
includes/specials/SpecialSearch.php
includes/specials/SpecialSpecialpages.php
includes/specials/SpecialStatistics.php
includes/specials/SpecialUserrights.php
resources/Resources.php
resources/mediawiki.special/mediawiki.special.css [new file with mode: 0644]
skins/common/shared.css

index 1f39971..eb1fe80 100644 (file)
@@ -59,6 +59,8 @@ class SpecialAllmessages extends SpecialPage {
                        $this->outputHeader( 'allmessagestext' );
                }
 
+               $wgOut->addModuleStyles( 'mediawiki.special' );
+
                $this->filter = $wgRequest->getVal( 'filter', 'all' );
                $this->prefix = $wgRequest->getVal( 'prefix', '' );
 
index 04b8d20..1fe2a96 100644 (file)
@@ -76,6 +76,7 @@ class SpecialAllpages extends IncludableSpecialPage {
                        wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
                        wfMsg( 'allarticles' )
                );
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                if( isset($par) ) {
                        $this->showChunk( $namespace, $par, $to );
index f173954..7541048 100644 (file)
@@ -78,7 +78,7 @@ class SpecialBlock extends SpecialPage {
                }
 
                $wgOut->setPageTitle( wfMsg( 'blockip-title' ) );
-               $wgOut->addModules( 'mediawiki.special.block' );
+               $wgOut->addModules( 'mediawiki.special', 'mediawiki.special.block' );
 
                $fields = self::getFormFields();
                $this->alreadyBlocked = $this->maybeAlterFormDefaults( $fields );
index d4fb945..406c0f3 100644 (file)
@@ -40,6 +40,7 @@ class SpecialContributions extends SpecialPage {
 
                $this->setHeaders();
                $this->outputHeader();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                $this->opts = array();
 
index 6127122..2d058a9 100644 (file)
@@ -88,6 +88,7 @@ class SpecialEmailUser extends UnlistedSpecialPage {
 
                $this->setHeaders();
                $this->outputHeader();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                $this->mTarget = is_null( $par )
                        ? $wgRequest->getVal( 'wpTarget', $wgRequest->getVal( 'target', '' ) )
index e351729..63dd2b8 100644 (file)
@@ -51,6 +51,7 @@ class SpecialListGroupRights extends SpecialPage {
 
                $this->setHeaders();
                $this->outputHeader();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                $wgOut->addHTML(
                        Xml::openElement( 'table', array( 'class' => 'wikitable mw-listgrouprights-table' ) ) .
index 55309f3..5797f35 100644 (file)
@@ -42,6 +42,7 @@ class SpecialPrefixindex extends SpecialAllpages {
 
                $this->setHeaders();
                $this->outputHeader();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                # GET values
                $from = $wgRequest->getVal( 'from', '' );
index 02f21a7..79ca41c 100644 (file)
@@ -44,6 +44,7 @@ class SpecialSearch extends SpecialPage {
                $this->setHeaders();
                $this->outputHeader();
                $wgOut->allowClickjacking();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                // Strip underscores from title parameter; most of the time we'll want
                // text form here. But don't strip underscores from actual text params!
index d13fb03..9832137 100644 (file)
@@ -37,6 +37,7 @@ class SpecialSpecialpages extends UnlistedSpecialPage {
                $this->setHeaders();
                $this->outputHeader();
                $wgOut->allowClickjacking();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
 
                $groups = $this->getPageGroups();
 
index d043863..046f525 100644 (file)
@@ -41,6 +41,7 @@ class SpecialStatistics extends SpecialPage {
                global $wgDisableCounters, $wgMiserMode;
                
                $this->setHeaders();
+               $wgOut->addModuleStyles( 'mediawiki.special' );
        
                $this->views = SiteStats::views();
                $this->edits = SiteStats::edits();
index e03f439..606b669 100644 (file)
@@ -112,7 +112,7 @@ class UserrightsPage extends SpecialPage {
                }
 
                $this->outputHeader();
-
+               $wgOut->addModuleStyles( 'mediawiki.special' );
                $this->setHeaders();
 
                // show the general form
index 7d4f50e..ba7f7bf 100644 (file)
@@ -416,6 +416,12 @@ return array(
                'scripts' => 'resources/mediawiki.action/mediawiki.action.watch.ajax.js',
                'dependencies' => 'mediawiki.util',
        ),
+
+       /* Special pages */
+
+       'mediawiki.special' => array(
+               'styles' => 'resources/mediawiki.special/mediawiki.special.css',
+       ),
        'mediawiki.special.preferences' => array(
                'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js',
                'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css',
@@ -444,6 +450,7 @@ return array(
                ),
                'dependencies' => array( 'mediawiki.util.jpegmeta' ),
        ),
+
        'mediawiki.language' => array(
                'scripts' => 'resources/mediawiki.language/mediawiki.language.js',
                'languageScripts' => array(
diff --git a/resources/mediawiki.special/mediawiki.special.css b/resources/mediawiki.special/mediawiki.special.css
new file mode 100644 (file)
index 0000000..f1e40a1
--- /dev/null
@@ -0,0 +1,262 @@
+
+/**** Special:AllMessages ****/
+#mw-allmessagestable .allmessages-customised td.am_default {
+       background-color: #fcffc4;
+}
+
+#mw-allmessagestable tr.allmessages-customised:hover td.am_default {
+       background-color: #faff90;
+}
+
+#mw-allmessagestable td.am_actual {
+       background-color: #e2ffe2;
+}
+
+#mw-allmessagestable tr.allmessages-customised:hover + tr.allmessages-customised td.am_actual {
+       background-color: #b1ffb1;
+}
+
+/**** Special:Allpages ****/
+table.mw-allpages-table-form, table.mw-allpages-table-chunk {
+       width: 100%;
+}
+td.mw-allpages-alphaindexline {
+       text-align: right;
+}
+td.mw-allpages-nav, p.mw-allpages-nav {
+       text-align: right;
+       font-size: smaller;
+       margin-bottom: 1em;
+}
+table.mw-allpages-table-form tr {
+       vertical-align: top;
+}
+
+/**** Special:Block ****/
+tr.mw-block-hideuser {
+       font-weight: bold;
+}
+
+/**** Special:Contributions ****/
+.mw-uctop {
+       font-weight: bold;
+}
+
+/**** Special:EmailUser ****/
+table.mw-emailuser-table {
+       width: 98%;
+}
+td#mw-emailuser-sender,
+td#mw-emailuser-recipient {
+       font-weight: bold;
+}
+
+/**** Special:ListGroupRights ****/
+table.mw-listgrouprights-table tr {
+       vertical-align: top;
+}
+.listgrouprights-revoked {
+       text-decoration: line-through;
+}
+
+/**** Special:Prefixindex ****/
+table#mw-prefixindex-list-table,
+table#mw-prefixindex-nav-table {
+       width: 98%;
+}
+td#mw-prefixindex-nav-form {
+       font-size: smaller;
+       margin-bottom: 1em;
+       text-align: right;
+       vertical-align: top;
+}
+
+
+/**** Special:Search ****/
+.searchresults {
+}
+
+.searchresults p {
+       margin-left: 0.4em;
+       margin-top: 1em;
+       margin-bottom: 1.2em;
+}
+div.searchresult {
+       font-size: 95%;
+       width: 38em;
+}
+.mw-search-results {
+       margin-left: 0.4em;
+}
+.mw-search-results li {
+       padding-bottom: 1em;
+       list-style: none;
+       list-style-image: none;
+}
+.mw-search-results li a {
+       font-size: 108%;
+}
+.mw-search-result-data {
+       color: green;
+       font-size: 97%;
+}
+.mw-search-formheader {
+       background-color: #f3f3f3;
+       margin-top: 1em;
+       border: 1px solid silver;
+}
+.mw-search-formheader div.search-types {
+       float: left;
+       padding-left: 0.25em;
+}
+.mw-search-formheader div.search-types ul {
+       margin: 0 !important;
+       padding: 0 !important;
+       list-style: none !important;
+}
+.mw-search-formheader div.search-types ul li {
+       float: left;
+       margin: 0;
+       padding: 0;
+}
+.mw-search-formheader div.search-types ul li a {
+       display: block;
+       padding: 0.5em;
+}
+.mw-search-formheader div.search-types ul li.current a {
+       color: #333333;
+       cursor: default;
+}
+.mw-search-formheader div.search-types ul li.current a:hover {
+       text-decoration: none;
+}
+.mw-search-formheader div.results-info {
+       float: right;
+       padding: 0.5em;
+       padding-right: 0.75em;
+}
+.mw-search-formheader div.results-info ul {
+       margin: 0 !important;
+       padding: 0 !important;
+       list-style: none !important;
+}
+.mw-search-formheader div.results-info ul li {
+       float: right;
+       margin: 0;
+       padding: 0;
+}
+fieldset#mw-searchoptions {
+       margin: 0;
+       padding: 0.5em 0.75em 0.75em 0.75em !important;
+       border: none;
+       background-color: #f9f9f9;
+       border: 1px solid silver !important;
+       border-top-width: 0 !important;
+}
+fieldset#mw-searchoptions legend {
+       display: none;
+}
+fieldset#mw-searchoptions h4 {
+       padding: 0;
+       margin: 0;
+       float: left;
+}
+fieldset#mw-searchoptions div#mw-search-togglebox {
+       float: right;
+}
+fieldset#mw-searchoptions div#mw-search-togglebox label {
+       margin-right: 0.25em;
+}
+fieldset#mw-searchoptions div#mw-search-togglebox input {
+       margin-left: 0.25em;
+}
+fieldset#mw-searchoptions table {
+       float: left;
+       margin-right: 3em;
+}
+fieldset#mw-searchoptions table td {
+       padding-right: 1em;
+}
+fieldset#mw-searchoptions div.divider {
+       clear: both;
+       border-bottom: 1px solid #DDDDDD;
+       padding-top: 0.5em;
+       margin-bottom: 0.5em;
+}
+td#mw-search-menu {
+       padding-left:6em;
+       font-size:85%;
+}
+div#mw-search-interwiki {
+       float: right;
+       width: 18em;
+       border: 1px solid #AAAAAA;
+       margin-top: 2ex;
+}
+div#mw-search-interwiki li {
+       font-size: 95%;
+}
+.mw-search-interwiki-more {
+       float: right;
+       font-size: 90%;
+}
+div#mw-search-interwiki-caption {
+       text-align: center;
+       font-weight: bold;
+       font-size: 95%;
+}
+.mw-search-interwiki-project {
+       font-size: 97%;
+       text-align: left;
+       padding: 0.15em 0.15em 0.2em 0.2em;
+       background-color: #ececec;
+       border-top: 1px solid #BBBBBB;
+}
+span.searchalttitle {
+       font-size: 95%;
+}
+div.searchdidyoumean {
+       font-size: 127%;
+       margin-top: 0.8em;
+       /* Note that this color won't affect the link, as desired. */
+       color: #c00;
+}
+div.searchdidyoumean em {
+       font-weight: bold;
+}
+.searchmatch {
+       font-weight: bold;
+}
+/* Advanced PowerSearch box */
+td#mw-search-togglebox {
+       text-align: right;
+}
+table#mw-search-powertable {
+       width: 100%;
+}
+form#powersearch {
+       clear: both;
+}
+
+/**** Special:Specialpages ****/
+.mw-specialpagecached {
+       font-style:italic;
+}
+.mw-specialpagerestricted {
+       font-weight:bold;
+}
+
+
+/**** Special:Statistics ****/
+td.mw-statistics-numbers {
+       text-align: right;
+}
+
+/**** Special:UserRights ****/
+.mw-userrights-disabled {
+       color: #888;
+}
+table.mw-userrights-groups * td,
+table.mw-userrights-groups * th {
+       padding-right: 1.5em;
+}
\ No newline at end of file
index 75df71b..faadfb7 100644 (file)
@@ -11,7 +11,9 @@
 
 /* Links to redirects appear italicized on [[Special:AllPages]], [[Special:PrefixIndex]],
    [[Special:Watchlist/edit]] and in category listings */
-.allpagesredirect, .redirect-in-category, .watchlistredir { font-style: italic; }
+.allpagesredirect, .redirect-in-category, .watchlistredir {
+       font-style: italic;
+}
 
 /* Comment and username portions of RC entries */
 span.comment {
@@ -145,213 +147,6 @@ p.mw-revdel-editreasons {
        float: right;
 }
 
-/* Search results */
-.searchresults {
-}
-
-.searchresults p {
-       margin-left: 0.4em;
-       margin-top: 1em;
-       margin-bottom: 1.2em;
-}
-
-div.searchresult {
-       font-size: 95%;
-       width: 38em;
-}
-
-.mw-search-results {
-       margin-left: 0.4em;
-}
-
-.mw-search-results li {
-       padding-bottom: 1em;
-       list-style: none;
-       list-style-image: none;
-}
-.mw-search-results li a {
-       font-size: 108%;
-}
-
-.mw-search-result-data {
-       color: green;
-       font-size: 97%;
-}
-
-.mw-search-formheader {
-       background-color: #f3f3f3;
-       margin-top: 1em;
-       border: 1px solid silver;
-}
-.mw-search-formheader div.search-types {
-       float: left;
-       padding-left: 0.25em;
-}
-.mw-search-formheader div.search-types ul {
-       margin: 0 !important;
-       padding: 0 !important;
-       list-style: none !important;
-}
-.mw-search-formheader div.search-types ul li {
-       float: left;
-       margin: 0;
-       padding: 0;
-}
-.mw-search-formheader div.search-types ul li a {
-       display: block;
-       padding: 0.5em;
-}
-.mw-search-formheader div.search-types ul li.current a {
-       color: #333333;
-       cursor: default;
-}
-.mw-search-formheader div.search-types ul li.current a:hover {
-       text-decoration: none;
-}
-.mw-search-formheader div.results-info {
-       float: right;
-       padding: 0.5em;
-       padding-right: 0.75em;
-}
-.mw-search-formheader div.results-info ul {
-       margin: 0 !important;
-       padding: 0 !important;
-       list-style: none !important;
-}
-.mw-search-formheader div.results-info ul li {
-       float: right;
-       margin: 0;
-       padding: 0;
-}
-fieldset#mw-searchoptions {
-       margin: 0;
-       padding-left: 0.75em !important;
-       padding-right: 0.75em !important;
-       padding-bottom: 0.5em !important;
-       padding-top: 0.5em !important;
-       border: none;
-       background-color: #f9f9f9;
-       border: 1px solid silver !important;
-       border-top-width: 0 !important;
-}
-fieldset#mw-searchoptions legend {
-       display: none;
-}
-fieldset#mw-searchoptions h4 {
-       padding: 0;
-       margin: 0;
-       float: left;
-}
-fieldset#mw-searchoptions div#mw-search-togglebox {
-       float: right;
-}
-
-fieldset#mw-searchoptions div#mw-search-togglebox label {
-       margin-right: 0.25em;
-}
-fieldset#mw-searchoptions div#mw-search-togglebox input {
-       margin-left: 0.25em;
-}
-fieldset#mw-searchoptions table {
-       float: left;
-       margin-right: 3em;
-}
-fieldset#mw-searchoptions table td {
-       padding-right: 1em;
-}
-fieldset#mw-searchoptions div.divider {
-       clear: both;
-       border-bottom: 1px solid #DDDDDD;
-       padding-top: 0.5em;
-       margin-bottom: 0.5em;
-}
-
-td#mw-search-menu {
-       padding-left:6em;
-       font-size:85%;
-}
-
-div#mw-search-interwiki {
-       float: right;
-       width: 18em;
-       border-style: solid;
-       border-color: #AAAAAA;
-       border-width: 1px;
-       margin-top: 2ex;
-}
-
-div#mw-search-interwiki li {
-       font-size: 95%;
-}
-
-.mw-search-interwiki-more {
-       float: right;
-       font-size: 90%;
-}
-
-div#mw-search-interwiki-caption {
-       text-align: center;
-       font-weight: bold;
-       font-size: 95%;
-}
-
-.mw-search-interwiki-project {
-       font-size: 97%;
-       text-align: left;
-       padding-left: 0.2em;
-       padding-right: 0.15em;
-       padding-bottom: 0.2em;
-       padding-top: 0.15em;
-       background-color: #ececec;
-       border-top: 1px solid #BBBBBB;
-}
-
-span.searchalttitle {
-       font-size: 95%;
-}
-
-div.searchdidyoumean {
-       font-size: 127%;
-       margin-top: 0.8em;
-       /* Note that this color won't affect the link, as desired. */
-       color: #c00;
-}
-
-div.searchdidyoumean em {
-       font-weight: bold;
-}
-
-.searchmatch {
-       font-weight: bold;
-}
-
-
-/*
- * Advanced PowerSearch box
- */
-td#mw-search-togglebox {
-       text-align: right;
-}
-
-table#mw-search-powertable {
-       width: 100%;
-}
-
-form#powersearch {
-       clear: both;
-}
-
-/*
- * UserRights stuff
- */
-.mw-userrights-disabled {
-       color: #888;
-}
-
-table.mw-userrights-groups * td,table.mw-userrights-groups * th {
-       padding-right: 1.5em;
-}
-
 /*
  * OpenSearch ajax suggestions
  */
@@ -435,73 +230,10 @@ table.os-suggest-results {
        font-weight: bold;
 }
 
-/* Special:Contributions styling */
-.mw-uctop {
-       font-weight: bold;
-}
-
-/* Special:ListGroupRights styling */
-table.mw-listgrouprights-table tr {
-       vertical-align: top;
-}
-.listgrouprights-revoked {
-       text-decoration: line-through;
-}
-
-/* Special:Statistics styling */
-td.mw-statistics-numbers {
-       text-align: right;
-}
-
 #shared-image-dup, #shared-image-conflict {
        font-style: italic;
 }
 
-/* Special:EmailUser styling */
-table.mw-emailuser-table {
-       width: 98%;
-}
-td#mw-emailuser-sender, td#mw-emailuser-recipient {
-       font-weight: bold;
-}
-
-/* Special:Allpages styling */
-table.mw-allpages-table-form, table.mw-allpages-table-chunk {
-       width: 100%;
-}
-td.mw-allpages-alphaindexline {
-       text-align: right;
-}
-td.mw-allpages-nav, p.mw-allpages-nav {
-       text-align: right;
-       font-size: smaller;
-       margin-bottom: 1em;
-}
-table.mw-allpages-table-form tr {
-       vertical-align: top;
-}
-
-/* Special:Prefixindex styling */
-table#mw-prefixindex-list-table,
-table#mw-prefixindex-nav-table {
-       width: 98%;
-}
-td#mw-prefixindex-nav-form {
-       font-size: smaller;
-       margin-bottom: 1em;
-       text-align: right;
-       vertical-align: top;
-}
-
-/* Special:Specialpages style */
-.mw-specialpagecached{
-       font-style:italic;
-}
-
-.mw-specialpagerestricted{
-       font-weight:bold;
-}
-
 /*
  * Recreating deleted page warning
  * Reupload file warning
@@ -669,23 +401,6 @@ table.collapsed tr.collapsable {
        background-color: #ccccff;
 }
 
-/* Allmessages table */
-#mw-allmessagestable .allmessages-customised td.am_default {
-       background-color: #fcffc4;
-}
-
-#mw-allmessagestable tr.allmessages-customised:hover td.am_default {
-       background-color: #faff90;
-}
-
-#mw-allmessagestable td.am_actual {
-       background-color: #e2ffe2;
-}
-
-#mw-allmessagestable tr.allmessages-customised:hover + tr.allmessages-customised td.am_actual {
-       background-color: #b1ffb1;
-}
-
 /* filetoc */
 ul#filetoc {
        text-align: center;