r112661 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112660‎ | r112661 | r112662 >
Date:23:57, 28 February 2012
Author:kaldari
Status:ok
Tags:
Comment:
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 (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.core/ext.articleCreation.core.css (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js
@@ -29,13 +29,18 @@
3030 }
3131 });
3232
 33+ // Make links into jQuery UI buttons
3334 ac.panel.find('.ac-button').button( {} );
 35+ // Designate article buttons as large buttons (to get different button graphics)
 36+ ac.panel.find('.ac-article-button').addClass('ui-button-large');
 37+ // Make action buttons green and give them an arrow icon (these are regular size buttons)
3438 ac.panel.find('.ac-action-button').addClass('ui-button-green');
 39+ ac.panel.find('.ac-action-button').button( 'option', 'icons', {secondary:'ui-icon-triangle-1-e'} );
3540
3641 //setup button hover states
3742 ac.panel
3843 .find( '.ac-article-button' )
39 - .addClass('ui-button-blue-large')
 44+ .addClass('ui-button-blue')
4045 //attach other events here, just making first tooltip for now
4146 //testing hover effects
4247 .hover (function (){
@@ -95,8 +100,8 @@
96101
97102 $( this )
98103 //make it green
99 - .removeClass('ui-button-blue-large')
100 - .addClass('ui-button-green-large')
 104+ .removeClass('ui-button-blue')
 105+ .addClass('ui-button-green')
101106 .addClass('ac-button-selected')
102107 .parent()
103108 .find('.mw-ac-tooltip' )
@@ -237,11 +242,11 @@
238243 hideInterstitial : function($elements) {
239244 //remove green states and hide their tooltips
240245 $elements
241 - .removeClass('ui-button-green-large')
 246+ .removeClass('ui-button-green')
242247 .removeClass('ac-button-selected')
243248 .each ( function (i, e) {
244249 var color = $(this).data('ac-color');
245 - $(this) .addClass( 'ui-button-'+color+'-large' )
 250+ $(this) .addClass( 'ui-button-'+color )
246251 .parent()
247252 .find('.mw-ac-tooltip,.mw-ac-interstitial')
248253 .hide();
Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.core/ext.articleCreation.core.css
@@ -23,7 +23,6 @@
2424 }
2525
2626 .ac-button {
27 - padding: 5px 10px;
2827 margin: 8px 0;
2928 cursor: pointer;
3029 text-decoration: none;
@@ -104,6 +103,7 @@
105104
106105 .ac-action-button {
107106 float: right;
 107+ font-weight: bold;
108108 }
109109
110110 .mw-ac-help {
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php
@@ -58,6 +58,7 @@
5959 'dependencies' => array(
6060 'mediawiki.util',
6161 'jquery.localize',
 62+ 'jquery.ui.button',
6263 'user.tokens',
6364 ),
6465 );
@@ -164,13 +165,7 @@
165166 <html:msg key="ac-create-dismiss" />
166167 </label>
167168 <div class="ac-button-wrap">
168 - <a class="ac-button-green ac-button ac-action-button" data-ac-action="create">
169 - <div class="ac-arrow ac-arrow-forward">&nbsp;</div>
170 - <div class="ac-button-text">
171 - <div class="ac-button-title"><html:msg key="ac-create-button" /></div>
172 - <div class="ac-button-text"></div>
173 - </div>
174 - </a>
 169+ <a class="ac-button ac-action-button" data-ac-action="create"><html:msg key="ac-create-button" /></a>
175170 </div>
176171 <div style="clear: both"></div>
177172 </div>

Status & tagging log