Index: trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationTemplates.php |
— | — | @@ -129,8 +129,9 @@ |
130 | 130 | |
131 | 131 | return <<<HTML |
132 | 132 | <div class="ac-button-wrap"> |
133 | | - <a class="ac-article-button ac-button ac-button-$color |
| 133 | + <a class="ac-article-button ac-button |
134 | 134 | ac-article-$button" data-ac-button="$button" |
| 135 | + data-ac-label="$buttonTitle" |
135 | 136 | data-ac-color="$color" href="$target"> |
136 | 137 | <div class="ac-arrow ac-arrow-forward"> </div> |
137 | 138 | <div class="ac-button-text"> |
Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js |
— | — | @@ -29,31 +29,32 @@ |
30 | 30 | } |
31 | 31 | }); |
32 | 32 | |
| 33 | + ac.panel.find('.ac-button').button( {} ); |
| 34 | + ac.panel.find('.ac-action-button').addClass('ui-button-green'); |
| 35 | + |
33 | 36 | //setup button hover states |
34 | 37 | ac.panel |
35 | 38 | .find( '.ac-article-button' ) |
| 39 | + .addClass('ui-button-blue') |
| 40 | + //attach other events here, just making first tooltip for now |
| 41 | + //testing hover effects |
| 42 | + .hover (function (){ |
| 43 | + if ( $('.ac-button-selected') ) |
| 44 | + return; |
| 45 | + |
| 46 | + $( this ).parent() |
| 47 | + .find('.mw-ac-tooltip') |
| 48 | + .show(); |
| 49 | + }, function(){ |
| 50 | + if ( $(this).hasClass('ac-button-selected') ) |
| 51 | + return; |
| 52 | + $( this ).parent() |
| 53 | + .find('.mw-ac-tooltip') |
| 54 | + .hide(); |
| 55 | + }) |
36 | 56 | .each( function (i, e) { |
37 | | - var button = $(this).data('ac-button'), |
38 | | - $tooltip; |
| 57 | + var button = $(this).data('ac-button'); |
39 | 58 | |
40 | | - $(this) |
41 | | - //attach other events here, just making first tooltip for now |
42 | | - //testing hover effects |
43 | | - .hover (function (){ |
44 | | - if ( $('.ac-button-selected') ) |
45 | | - return; |
46 | | - |
47 | | - $( this ).parent() |
48 | | - .find('.mw-ac-tooltip') |
49 | | - .show(); |
50 | | - }, function(){ |
51 | | - if ( $(this).hasClass('ac-button-selected') ) |
52 | | - return; |
53 | | - $( this ).parent() |
54 | | - .find('.mw-ac-tooltip') |
55 | | - .hide(); |
56 | | - }); |
57 | | - |
58 | 59 | //set the pointy position |
59 | 60 | var $button = $(this); |
60 | 61 | |
— | — | @@ -61,11 +62,8 @@ |
62 | 63 | function() { |
63 | 64 | ac.setupTipHeights( $(this), $button ); |
64 | 65 | } ); |
65 | | - }); |
66 | | - |
67 | | - // setup button click states |
68 | | - ac.panel |
69 | | - .find('.ac-article-button') |
| 66 | + }) |
| 67 | + // Click states |
70 | 68 | .click (function (e) { |
71 | 69 | e.preventDefault(); |
72 | 70 | e.stopPropagation(); |
— | — | @@ -97,8 +95,8 @@ |
98 | 96 | |
99 | 97 | $( this ) |
100 | 98 | //make it green |
101 | | - .removeClass('ac-button-blue') |
102 | | - .addClass('ac-button-green') |
| 99 | + .removeClass('ui-button-blue') |
| 100 | + .addClass('ui-button-green') |
103 | 101 | .addClass('ac-button-selected') |
104 | 102 | .parent() |
105 | 103 | .find('.mw-ac-tooltip' ) |
— | — | @@ -107,11 +105,8 @@ |
108 | 106 | .find('.mw-ac-interstitial') |
109 | 107 | .show(); |
110 | 108 | |
111 | | - }); |
112 | | - |
113 | | - //setup hover / fade effects |
114 | | - ac.panel |
115 | | - .find('.ac-article-button') |
| 109 | + }) |
| 110 | + // Hover states |
116 | 111 | .hover (function (){ |
117 | 112 | $( '.ac-article-button' ) |
118 | 113 | .not( this ) |
— | — | @@ -210,11 +205,11 @@ |
211 | 206 | hideInterstitial : function($elements) { |
212 | 207 | //remove green states and hide their tooltips |
213 | 208 | $elements |
214 | | - .removeClass('ac-button-green') |
| 209 | + .removeClass('ui-button-green') |
215 | 210 | .removeClass('ac-button-selected') |
216 | 211 | .each ( function (i, e) { |
217 | 212 | var color = $(this).data('ac-color'); |
218 | | - $(this) .addClass( 'ac-button-'+color ) |
| 213 | + $(this) .addClass( 'ui-button-'+color ) |
219 | 214 | .parent() |
220 | 215 | .find('.mw-ac-tooltip,.mw-ac-interstitial') |
221 | 216 | .hide(); |
Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.core/ext.articleCreation.core.css |
— | — | @@ -18,15 +18,16 @@ |
19 | 19 | width: 250px !important; |
20 | 20 | } |
21 | 21 | |
| 22 | +.ac-action-button { |
| 23 | + width: 150px !important; |
| 24 | +} |
| 25 | + |
22 | 26 | .ac-button { |
23 | | - display: inline-block; |
24 | | - border-radius: 5px; |
25 | | - color: #FFFFFF !important; |
26 | 27 | padding: 5px 10px; |
27 | 28 | margin: 8px 0; |
28 | 29 | cursor: pointer; |
29 | 30 | text-decoration: none; |
30 | | - width: 150px; |
| 31 | + text-align: left; |
31 | 32 | } |
32 | 33 | |
33 | 34 | .ac-button:hover { |
— | — | @@ -37,79 +38,6 @@ |
38 | 39 | opacity: .5; |
39 | 40 | } |
40 | 41 | |
41 | | -.ac-create-article { |
42 | | - background-color: #3365ba; |
43 | | -} |
44 | | - |
45 | | -.ac-article-wizard { |
46 | | - background-color: #3365ba; |
47 | | -} |
48 | | - |
49 | | -.ac-button-blue { |
50 | | - background-image: linear-gradient(bottom, #21437a 10%, #3366bb 90%); |
51 | | - background-image: -o-linear-gradient(bottom, #21437a 10%, #3366bb 90%); |
52 | | - background-image: -moz-linear-gradient(bottom, #21437a 10%, #3366bb 90%); |
53 | | - background-image: -webkit-linear-gradient(bottom, #21437a 10%, #3366bb 90%); |
54 | | - background-image: -ms-linear-gradient(bottom, #21437a 10%, #3366bb 90%); |
55 | | - |
56 | | - background-image: -webkit-gradient( |
57 | | - linear, |
58 | | - left bottom, |
59 | | - left top, |
60 | | - color-stop(0.1, #21437a), |
61 | | - color-stop(0.9, #3366bb) |
62 | | - ); |
63 | | -} |
64 | | - |
65 | | -.ac-button-blue.ac-button-hover { |
66 | | - background-image: linear-gradient(bottom, #43649c 10%, #6699ee 90%); |
67 | | - background-image: -o-linear-gradient(bottom, #43649c 10%, #6699ee 90%); |
68 | | - background-image: -moz-linear-gradient(bottom, #43649c 10%, #6699ee 90%); |
69 | | - background-image: -webkit-linear-gradient(bottom, #43649c 10%, #6699ee 90%); |
70 | | - background-image: -ms-linear-gradient(bottom, #43649c 10%, #6699ee 90%); |
71 | | - |
72 | | - background-image: -webkit-gradient( |
73 | | - linear, |
74 | | - left bottom, |
75 | | - left top, |
76 | | - color-stop(0.1, #43649c), |
77 | | - color-stop(0.9, #6699ee) |
78 | | - ); |
79 | | -} |
80 | | - |
81 | | -.ac-button-red { |
82 | | - background-image: linear-gradient(bottom, #850000 10%, #CC0000 90%); |
83 | | - background-image: -o-linear-gradient(bottom, #850000 10%, #CC0000 90%); |
84 | | - background-image: -moz-linear-gradient(bottom, #850000 10%, #CC0000 90%); |
85 | | - background-image: -webkit-linear-gradient(bottom, #850000 10%, #CC0000 90%); |
86 | | - background-image: -ms-linear-gradient(bottom, #850000 10%, #CC0000 90%); |
87 | | - |
88 | | - background-image: -webkit-gradient( |
89 | | - linear, |
90 | | - left bottom, |
91 | | - left top, |
92 | | - color-stop(0.1, #850000), |
93 | | - color-stop(0.9, #CC0000) |
94 | | - ); |
95 | | -} |
96 | | - |
97 | | -.ac-button-green { |
98 | | - background-color: #3cb878; |
99 | | - background-image: linear-gradient(bottom, #27784e 10%, #3cb878 90%); |
100 | | - background-image: -o-linear-gradient(bottom, #27784e 10%, #3cb878 90%); |
101 | | - background-image: -moz-linear-gradient(bottom, #27784e 10%, #3cb878 90%); |
102 | | - background-image: -webkit-linear-gradient(bottom, #27784e 10%, #3cb878 90%); |
103 | | - background-image: -ms-linear-gradient(bottom, #27784e 10%, #3cb878 90%); |
104 | | - |
105 | | - background-image: -webkit-gradient( |
106 | | - linear, |
107 | | - left bottom, |
108 | | - left top, |
109 | | - color-stop(0.1, #27784e), |
110 | | - color-stop(0.9, #3cb878) |
111 | | - ); |
112 | | -} |
113 | | - |
114 | 42 | .ac-button-wrap { |
115 | 43 | position: relative; |
116 | 44 | } |
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php |
— | — | @@ -79,6 +79,7 @@ |
80 | 80 | 'dependencies' => array( |
81 | 81 | 'ext.articleCreation.core', |
82 | 82 | 'jquery.localize', |
| 83 | + 'jquery.ui.button', |
83 | 84 | ), |
84 | 85 | ); |
85 | 86 | |
— | — | @@ -142,6 +143,13 @@ |
143 | 144 | <div class="mw-ac-tooltip-title"><html:msg key="ac-click-tip-title-create" /></div> |
144 | 145 | <div class="mw-ac-tooltip-body"> |
145 | 146 | <div class="mw-ac-create-verbiage"><html:msg raw="1" key="ac-create-warning-create" /></div> |
| 147 | + <input |
| 148 | + type="checkbox" |
| 149 | + id="mw-ac-dismiss-create" |
| 150 | + class="ac-dismiss-interstitial" /> |
| 151 | + <label for="mw-ac-dismiss-create"> |
| 152 | + <html:msg key="ac-create-dismiss" /> |
| 153 | + </label> |
146 | 154 | <div class="ac-button-wrap"> |
147 | 155 | <a class="ac-button-green ac-button ac-action-button" data-ac-action="create"> |
148 | 156 | <div class="ac-arrow ac-arrow-forward"> </div> |
— | — | @@ -151,13 +159,6 @@ |
152 | 160 | </div> |
153 | 161 | </a> |
154 | 162 | </div> |
155 | | - <input |
156 | | - type="checkbox" |
157 | | - id="mw-ac-dismiss-create" |
158 | | - class="ac-dismiss-interstitial" /> |
159 | | - <label for="mw-ac-dismiss-create"> |
160 | | - <html:msg key="ac-create-dismiss" /> |
161 | | - </label> |
162 | 163 | <div style="clear: both"></div> |
163 | 164 | </div> |
164 | 165 | HTML |