r108960 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108959‎ | r108960 | r108961 >
Date:06:07, 15 January 2012
Author:johnduhart
Status:resolved (Comments)
Tags:
Comment:
Adding jquery.arrowSteps to core, from UploadWizard
Modified paths:
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/jquery/images/jquery.arrowSteps.divider-ltr.png (added) (history)
  • /trunk/phase3/resources/jquery/images/jquery.arrowSteps.divider-rtl.png (added) (history)
  • /trunk/phase3/resources/jquery/images/jquery.arrowSteps.head-ltr.png (added) (history)
  • /trunk/phase3/resources/jquery/images/jquery.arrowSteps.head-rtl.png (added) (history)
  • /trunk/phase3/resources/jquery/images/jquery.arrowSteps.tail-ltr.png (added) (history)
  • /trunk/phase3/resources/jquery/images/jquery.arrowSteps.tail-rtl.png (added) (history)
  • /trunk/phase3/resources/jquery/jquery.arrowSteps.css (added) (history)
  • /trunk/phase3/resources/jquery/jquery.arrowSteps.js (added) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/images/jquery.arrowSteps.tail-ltr.png
@@ -0,0 +1,6 @@
 2+�PNG
 3+
 4+ +IHDR*O�$��tEXtSoftwareAdobe ImageReadyq�e< PLTE���������^(�tRNS���� +A�IDATxڴ�9�0 CA$�?t�x�,.�T�S���]z�Sl��ڍB����ك{R`/�ۛ�v��ic'Zۙ��A+���]hnW�ڀf6�� +ilcڄF6��M�js�؂>mE�����d:ڎ�����e=-��Et���,�����2�� �%�˒���ce�.2TB�� F�n(C�!eȐ�dHo2$M�_y*�Y�'x>�i��0|2�0���yA]IEND�B`�
\ No newline at end of file
Index: trunk/phase3/resources/jquery/images/jquery.arrowSteps.tail-rtl.png
@@ -0,0 +1,13 @@
 2+�PNG
 3+
 4+ +IHDR*O��W�sRGB���gAMA�� �a pHYs���o�dtEXtSoftwareAdobe ImageReadyq�e<UIDAThC��9�@DQ��"��#Cb�Ƴ�^�&��ҿ��ϕ�]��u9ry3���v���u���D�A�H&���"�"$*F"�*$
 5+�F"�&d5Ԍ����UP7��̆�!3���,h82�����!#���(h:2Z��Bːh)�
 6+-GZ��
 7+Cj�P�
 8+GJ���9�R!{P:d J����"���S.���e[����Lt�Q���� +v��S`%P
 9+�
 10+�j�P�
 11+�Z��Z��@K�^h6Z����c#���hh6��͂�c3���lh�������P�j�"�&,
 12+��"�*,*�2@EX��b٠],#��e������a_�2lk��1IEND�B`�
\ No newline at end of file
Index: trunk/phase3/resources/jquery/images/jquery.arrowSteps.head-ltr.png
@@ -0,0 +1,10 @@
 2+�PNG
 3+
 4+ +IHDR�OO�sRGB���gAMA�� �a PLTE���������^(�tRNS���� +A pHYs���o�dtEXtSoftwareAdobe ImageReadyq�e<�IDATx^��[��0CQ��=�# v�_�+�n떊)n��J�v�|�VM�@`�fM'�� �2�IӉ��=;��NtUA`mS�N�������t�+
 5+���t��~dϏ�Ħ]MX��pӉ���%@`��DW 6�� G����]E� p��D�8�\n:���N��#ˁ�Ŧ]=�!��t��Y��Nt�@ �@gӉ�tdY�l:�U�,�M'z֑�A���DW �46��iG��Ʀ]-�#��D�;�D�l:ѕ�D�M'z�eB��DW 2 6��G�
 6+�æ]!H%��t��Y.v�Ntu@ ��gӉ�{d��l:ѕ�d�M'z�eC��DW� <7���G���]H'�0���G��Ǧ] +H'`��/,���J�@��^��"�'�������h>}^�xx�W�EWr ����J������',�V �J�7̤^V.���i�5�L�6�R!�'p���$�K-�W� �#��,Zt +A ��_Sͻ�D� �x��J�@�_ωwd��hxN�� �@�s��]Y�����z-�#����ag�8���D/� ��<'z֝��M��9�kC�(}ωuhaJ��襛!|�+ω�tiY*���蕫!{�kωtjQ
 7+xN���=���s���Z�����n9$�!0���1��,� ω^������)ז�*�)ω^�r����!��(�Iω^�bg�����@:��@w�IEND�B`�
\ No newline at end of file
Index: trunk/phase3/resources/jquery/images/jquery.arrowSteps.head-rtl.png
@@ -0,0 +1,13 @@
 2+�PNG
 3+
 4+ +IHDR�OO�sRGB���gAMA�� �a PLTE���������^(�tRNS���� +A pHYs���o�dtEXtSoftwareAdobe ImageReadyq�e<:IDATx^���NQ E�!��с�ӗs�m�xnKVYK�z�/��*�����ٛ���b辟��z�@��Z�:ϻ��l,��� +Q�X ]灇�����u��Y����<�nv"�%p�η<=L R�.t�G��R�nB���� d
 5+\���̫ي���e�:���8�P���uz4k��]绘�'�*p��Sof/����|���X���u{2��8 ]���&�
 6+���܋ٌ@A�0t�$�8
 7+]������A�:�@�!�,��Γ�e7%���u^r4D Z�w�:�>���~����)�?C�y��lG�(�#t�����Ïe=U�o�뼊h�@��W�:O����>C�y�� �x���u* � �]�uB���C�y��lH�!�/t�7� ���ʊ:���h�����'�Ɏz����L!�g�g�$���u���&0B����8�% ��f\��4�~�}ę,I�'��z~� ����#�dI=o����&0B�;�F�ɒz���3M`�����8�% �|RK��4�>{mę,I�'��T{~� ����#�dI=��н��'j�@��A�J�����BWz��0�<��Е�w(����Yq'�+=�R"�8 ]� +T��NCWzک�C�.p���& � \����[Y�@Y�*t��Y +�� ]�YDz +���u�J���#%p�ң�eE��Е^�5F I�6t�'��.j��+�&k�@��B�J��U�VBWz�����Е�s0������1��+=�b!PX +]�\#R��:��~�IEND�B`�
\ No newline at end of file
Index: trunk/phase3/resources/jquery/images/jquery.arrowSteps.divider-ltr.png
@@ -0,0 +1,5 @@
 2+�PNG
 3+
 4+ +IHDR*O�$��tEXtSoftwareAdobe ImageReadyq�e<PLTE������a{D�tRNS��0J�IDATxڴ��� Œ���
 5+�U{��`��C:�Y�,f3����bf1��Y�,f3����bf1��Y�,9�D9>��K��Y�|)��B��_�iiӥ��,�Z��u�2��ƒ�� �<��+z��v���&�~���,x8�8�����FI��]����7� ����-���}�%�'G����'�� �tM��IEND�B`�
\ No newline at end of file
Index: trunk/phase3/resources/jquery/images/jquery.arrowSteps.divider-rtl.png
@@ -0,0 +1,6 @@
 2+�PNG
 3+
 4+ +IHDR*O��W�sRGB���gAMA�� �a pHYs���o�dtEXtSoftwareAdobe ImageReadyq�e<�IDAThC��� �@A�OĐ�œ
 5+�^<�jx�e�m ���>L��nI��@��I��@��I��@��I��@��I��@��I��@��I��@��I��@��I��@��D���u�궿wȒ}d L5@��O�{v��d=`S +�%�l�� �o�)\�d��� Kvѯ��z?iyIEND�B`�
\ No newline at end of file
Index: trunk/phase3/resources/jquery/jquery.arrowSteps.js
@@ -0,0 +1,81 @@
 2+/**
 3+ * jQuery arrowSteps plugin
 4+ * Copyright Neil Kandalgaonkar, 2010
 5+ *
 6+ * This work is licensed under the terms of the GNU General Public License,
 7+ * version 2 or later.
 8+ * (see http://www.fsf.org/licensing/licenses/gpl.html).
 9+ * Derivative works and later versions of the code must be free software
 10+ * licensed under the same or a compatible license.
 11+ *
 12+ *
 13+ * DESCRIPTION
 14+ *
 15+ * Show users their progress through a series of steps, via a row of items that fit
 16+ * together like arrows. One item can be highlighted at a time.
 17+ *
 18+ *
 19+ * SYNOPSIS
 20+ *
 21+ * <ul id="robin-hood-daffy">
 22+ * <li id="guard"><div>Guard!</div></li>
 23+ * <li id="turn"><div>Turn!</div></li>
 24+ * <li id="parry"><div>Parry!</div></li>
 25+ * <li id="dodge"><div>Dodge!</div></li>
 26+ * <li id="spin"><div>Spin!</div></li>
 27+ * <li id="ha"><div>Ha!</div></li>
 28+ * <li id="thrust"><div>Thrust!</div></li>
 29+ * </ul>
 30+ *
 31+ * <script language="javascript"><!--
 32+ * $( '#robin-hood-daffy' ).arrowSteps();
 33+ *
 34+ * $( '#robin-hood-daffy' ).arrowStepsHighlight( '#guard' );
 35+ * // 'Guard!' is highlighted.
 36+ *
 37+ * // ... user completes the 'guard' step ...
 38+ *
 39+ * $( '#robin-hood-daffy' ).arrowStepsHighlight( '#turn' );
 40+ * // 'Turn!' is highlighted.
 41+ *
 42+ * //-->
 43+ * </script>
 44+ *
 45+ */
 46+
 47+( function( $j ) {
 48+ $j.fn.arrowSteps = function() {
 49+ this.addClass( 'arrowSteps' );
 50+ var $steps = this.find( 'li' );
 51+
 52+ var width = parseInt( 100 / $steps.length, 10 );
 53+ $steps.css( 'width', width + '%' );
 54+
 55+ // every step except the last one has an arrow at the right hand side. Also add in the padding
 56+ // for the calculated arrow width.
 57+ var arrowWidth = parseInt( this.outerHeight(), 10 );
 58+ $steps.filter( ':not(:last-child)' ).addClass( 'arrow' )
 59+ .find( 'div' ).css( 'padding-right', arrowWidth.toString() + 'px' );
 60+
 61+ this.data( 'arrowSteps', $steps );
 62+ return this;
 63+ };
 64+
 65+ $j.fn.arrowStepsHighlight = function( selector ) {
 66+ var $steps = this.data( 'arrowSteps' );
 67+ var $previous;
 68+ $j.each( $steps, function( i, step ) {
 69+ var $step = $j( step );
 70+ if ( $step.is( selector ) ) {
 71+ if ($previous) {
 72+ $previous.addClass( 'tail' );
 73+ }
 74+ $step.addClass( 'head' );
 75+ } else {
 76+ $step.removeClass( 'head tail lasthead' );
 77+ }
 78+ $previous = $step;
 79+ } );
 80+ };
 81+
 82+} )( jQuery );
Index: trunk/phase3/resources/jquery/jquery.arrowSteps.css
@@ -0,0 +1,45 @@
 2+.arrowSteps {
 3+ list-style-type: none;
 4+ list-style-image: none;
 5+ border: 1px solid #666666;
 6+ position: relative;
 7+}
 8+
 9+.arrowSteps li {
 10+ float: left;
 11+ padding: 0px;
 12+ margin: 0px;
 13+ border: 0 none;
 14+}
 15+
 16+.arrowSteps li div {
 17+ padding: 0.5em;
 18+ text-align: center;
 19+ white-space: nowrap;
 20+ overflow: hidden;
 21+}
 22+
 23+.arrowSteps li.arrow div {
 24+ /* @embed */
 25+ background: url(images/jquery.arrowSteps.divider-ltr.png) no-repeat right center;
 26+}
 27+
 28+/* applied to the element preceding the highlighted step */
 29+.arrowSteps li.arrow.tail div {
 30+ /* @embed */
 31+ background: url(images/jquery.arrowSteps.tail-ltr.png) no-repeat right center;
 32+}
 33+
 34+/* this applies to all highlighted, including the last */
 35+.arrowSteps li.head div {
 36+ /* @embed */
 37+ background: url(images/jquery.arrowSteps.head-ltr.png) no-repeat left center;
 38+ font-weight: bold;
 39+}
 40+
 41+/* this applies to all highlighted arrows except the last */
 42+.arrowSteps li.arrow.head div {
 43+ /* TODO: eliminate duplication of jquery.arrowSteps.head.png embedding */
 44+ /* @embed */
 45+ background: url(images/jquery.arrowSteps.head-ltr.png) no-repeat right center;
 46+}
Index: trunk/phase3/resources/Resources.php
@@ -82,6 +82,10 @@
8383 'jquery.appear' => array(
8484 'scripts' => 'resources/jquery/jquery.appear.js',
8585 ),
 86+ 'jquery.arrowSteps' => array(
 87+ 'scripts' => 'resources/jquery/jquery.arrowSteps.js',
 88+ 'styles' => 'resources/jquery/jquery.arrowSteps.css',
 89+ ),
8690 'jquery.async' => array(
8791 'scripts' => 'resources/jquery/jquery.async.js',
8892 ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r108961Adding note about jquery.arrowSteps being added to core, ping r108960johnduhart06:15, 15 January 2012
r108962Fixed properties from r108960johnduhart06:26, 15 January 2012
r108987Fix image properties from r108960/r108962reedy15:01, 15 January 2012
r109834Redoing r108960 with history...reedy17:02, 23 January 2012

Comments

#Comment by Johnduhart (talk | contribs)   06:15, 15 January 2012

Argh, git-svn

#Comment by Santhosh.thottingal (talk | contribs)   06:58, 16 January 2012

Please update the documentation of jquery default modules ResourceLoader/Default modules

#Comment by Hashar (talk | contribs)   11:05, 18 January 2012

Files did not get copied with their svn history .... So you should probably revert this rev and follow up and redo it properly (unless nobody care ...)

Status & tagging log