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

Revision: 88786
Author:   janpaul123
Date:     2011-05-25 12:10:07 +0000 (Wed, 25 May 2011)
Log Message:
-----------
Icon CSS now loaded on top of the page per 
http://www.mediawiki.org/wiki/User:Krinkle/Extension_review/WikiLove

Modified Paths:
--------------
    trunk/extensions/WikiLove/WikiLove.hooks.php
    trunk/extensions/WikiLove/WikiLove.php
    trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css

Added Paths:
-----------
    trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css

Modified: trunk/extensions/WikiLove/WikiLove.hooks.php
===================================================================
--- trunk/extensions/WikiLove/WikiLove.hooks.php        2011-05-25 11:59:53 UTC 
(rev 88785)
+++ trunk/extensions/WikiLove/WikiLove.hooks.php        2011-05-25 12:10:07 UTC 
(rev 88786)
@@ -54,6 +54,7 @@
                
                $title = self::getUserTalkPage( $skin->getTitle() );
                if ( !is_null( $title ) ) {
+                       $out->addModules( 'ext.wikiLove.icon' );
                        $out->addModules( 'ext.wikiLove' );
                }
                return true;

Modified: trunk/extensions/WikiLove/WikiLove.php
===================================================================
--- trunk/extensions/WikiLove/WikiLove.php      2011-05-25 11:59:53 UTC (rev 
88785)
+++ trunk/extensions/WikiLove/WikiLove.php      2011-05-25 12:10:07 UTC (rev 
88786)
@@ -70,11 +70,18 @@
 // api modules
 $wgAPIModules['wikilove'] = 'WikiLoveApi';
 
+$extWikiLoveTpl = array(
+       'localBasePath' => dirname( __FILE__ ) . '/modules/ext.wikiLove',
+       'remoteExtPath' => 'WikiLove/modules/ext.wikiLove',
+);
+
 // resources
 $wgResourceModules += array(
-       'ext.wikiLove' => array(
-               'localBasePath' => dirname( __FILE__ ) . 
'/modules/ext.wikiLove',
-               'remoteExtPath' => 'WikiLove/modules/ext.wikiLove',
+       'ext.wikiLove.icon' => $extWikiLoveTpl + array(
+               'styles' => 'ext.wikiLove.icon.css',
+               'position' => 'top',
+       ),
+       'ext.wikiLove' => $extWikiLoveTpl + array(
                'scripts' => array(
                        'ext.wikiLove.core.js',
                        'ext.wikiLove.defaultOptions.js',

Modified: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css
===================================================================
--- trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css     
2011-05-25 11:59:53 UTC (rev 88785)
+++ trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.css     
2011-05-25 12:10:07 UTC (rev 88786)
@@ -1,46 +1,3 @@
-/* include fix from r87101 here for older versions; these three blocks can 
become deprecated later */
-div.vectorTabs span {
-       display: inline-block;
-       /* @embed */
-       background-image: url(images/tab-break.png);
-       background-position: bottom right;
-       background-repeat: no-repeat;
-}
-
-div.vectorTabs li a {
-       background-image: none;
-}
-
-#ca-unwatch.icon,
-#ca-watch.icon {
-       margin-right: 0px;
-}
-
-/* icon style */
-#ca-wikilove.icon a {
-       margin: 0;
-       padding: 0;
-       outline: none;
-       display: block;
-       width: 27px;
-       /* This hides the text but shows the background image */
-       padding-top: 3.1em;
-       margin-top: 0;
-       /* Only applied in IE6 */
-       margin-top: -0.8em !ie;
-       height: 0;
-       overflow: hidden;
-       /* @embed */
-       background-image: url(images/heart-icons.png);
-}
-#ca-wikilove.icon a {
-       background-position: 5px 60%;
-}
-#ca-wikilove.icon a:hover,
-#ca-wikilove.icon a:focus {
-       background-position: -19px 60%;
-}
-
 /* dialog */
 #mw-wikilove-dialog {
        margin: 10px;

Added: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css
===================================================================
--- trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css        
                        (rev 0)
+++ trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css        
2011-05-25 12:10:07 UTC (rev 88786)
@@ -0,0 +1,42 @@
+/* include fix from r87101 here for older versions; these three blocks can 
become deprecated later */
+div.vectorTabs span {
+       display: inline-block;
+       /* @embed */
+       background-image: url(images/tab-break.png);
+       background-position: bottom right;
+       background-repeat: no-repeat;
+}
+
+div.vectorTabs li a {
+       background-image: none;
+}
+
+#ca-unwatch.icon,
+#ca-watch.icon {
+       margin-right: 0px;
+}
+
+/* icon style */
+#ca-wikilove.icon a {
+       margin: 0;
+       padding: 0;
+       outline: none;
+       display: block;
+       width: 27px;
+       /* This hides the text but shows the background image */
+       padding-top: 3.1em;
+       margin-top: 0;
+       /* Only applied in IE6 */
+       margin-top: -0.8em !ie;
+       height: 0;
+       overflow: hidden;
+       /* @embed */
+       background-image: url(images/heart-icons.png);
+}
+#ca-wikilove.icon a {
+       background-position: 5px 60%;
+}
+#ca-wikilove.icon a:hover,
+#ca-wikilove.icon a:focus {
+       background-position: -19px 60%;
+}


Property changes on: 
trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.icon.css
___________________________________________________________________
Added: svn:eol-style
   + native


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

Reply via email to