https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112661

Revision: 112661
Author:   kaldari
Date:     2012-02-28 23:57:19 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
some of the button styling has been moved to our jquery ui skin; making 
jquery.ui.button dependancy explicit since we need the css from that module to 
load before our module does; using jquery ui arrow icon for smaller buttons

Modified Paths:
--------------
    trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php
    
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.core/ext.articleCreation.core.css
    
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js

Modified: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php
===================================================================
--- trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php        
2012-02-28 23:51:54 UTC (rev 112660)
+++ trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php        
2012-02-28 23:57:19 UTC (rev 112661)
@@ -58,6 +58,7 @@
        'dependencies' => array(
                'mediawiki.util',
                'jquery.localize',
+               'jquery.ui.button',
                'user.tokens',
        ),
 );
@@ -164,13 +165,7 @@
                                                <html:msg 
key="ac-create-dismiss" />
                                        </label>
                                        <div class="ac-button-wrap">
-                                               <a class="ac-button-green 
ac-button ac-action-button" data-ac-action="create">
-                                                       <div class="ac-arrow 
ac-arrow-forward">&nbsp;</div>
-                                                       <div 
class="ac-button-text">
-                                                               <div 
class="ac-button-title"><html:msg key="ac-create-button" /></div>
-                                                               <div 
class="ac-button-text"></div>
-                                                       </div>
-                                               </a>
+                                               <a class="ac-button 
ac-action-button" data-ac-action="create"><html:msg key="ac-create-button" 
/></a>
                                        </div>
                                        <div style="clear: both"></div>
                                </div>

Modified: 
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.core/ext.articleCreation.core.css
===================================================================
--- 
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.core/ext.articleCreation.core.css
      2012-02-28 23:51:54 UTC (rev 112660)
+++ 
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.core/ext.articleCreation.core.css
      2012-02-28 23:57:19 UTC (rev 112661)
@@ -23,7 +23,6 @@
 }
 
 .ac-button {
-       padding: 5px 10px;
        margin: 8px 0;
        cursor: pointer;
        text-decoration: none;
@@ -104,6 +103,7 @@
 
 .ac-action-button {
        float: right;
+       font-weight: bold;
 }
 
 .mw-ac-help {

Modified: 
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js
===================================================================
--- 
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js
       2012-02-28 23:51:54 UTC (rev 112660)
+++ 
trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js
       2012-02-28 23:57:19 UTC (rev 112661)
@@ -29,13 +29,18 @@
                                }
                        });
 
+                       // Make links into jQuery UI buttons
                        ac.panel.find('.ac-button').button( {} );
+                       // Designate article buttons as large buttons (to get 
different button graphics)
+                       
ac.panel.find('.ac-article-button').addClass('ui-button-large');
+                       // Make action buttons green and give them an arrow 
icon (these are regular size buttons)
                        
ac.panel.find('.ac-action-button').addClass('ui-button-green');
+                       ac.panel.find('.ac-action-button').button( 'option', 
'icons', {secondary:'ui-icon-triangle-1-e'} );
 
                        //setup button hover states
                        ac.panel
                                .find( '.ac-article-button' )
-                                       .addClass('ui-button-blue-large')
+                                       .addClass('ui-button-blue')
                                        //attach other events here, just making 
first tooltip for now
                                        //testing hover effects
                                        .hover (function (){
@@ -95,8 +100,8 @@
 
                                        $( this )
                                                //make it green
-                                               
.removeClass('ui-button-blue-large')
-                                               
.addClass('ui-button-green-large')
+                                               .removeClass('ui-button-blue')
+                                               .addClass('ui-button-green')
                                                .addClass('ac-button-selected')
                                                .parent()
                                                .find('.mw-ac-tooltip' )
@@ -237,11 +242,11 @@
                hideInterstitial : function($elements) {
                        //remove green states and hide their tooltips
                        $elements
-                               .removeClass('ui-button-green-large')
+                               .removeClass('ui-button-green')
                                .removeClass('ac-button-selected')
                                .each ( function (i, e) {
                                        var color = $(this).data('ac-color');
-                                       $(this) .addClass( 
'ui-button-'+color+'-large' )
+                                       $(this) .addClass( 'ui-button-'+color )
                                                .parent()
                                                
.find('.mw-ac-tooltip,.mw-ac-interstitial')
                                                .hide();


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

Reply via email to