r64373 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64372‎ | r64373 | r64374 >
Date:00:42, 30 March 2010
Author:neilk
Status:deferred
Tags:
Comment:
sliding arrow headers for each step
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/css/uploadWizard.css (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/images (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/images/black-angle.gif (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/images/grey-angle.gif (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/loader.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/loader.js
@@ -54,7 +54,9 @@
5555 '$j.ui.dialog',
5656 '$j.ui.draggable',
5757 '$j.ui.datepicker',
58 - '$j.fn.autocomplete'
 58+ '$j.effects.core',
 59+ '$j.effects.slide',
 60+ '$j.fn.autocomplete',
5961 ],
6062 [
6163 'mw.Language',
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/mw.UploadWizard.js
@@ -1,7 +1,7 @@
22 mw.addMessages( {
3 - "mwe-upwiz-tab-file": "Step 1",
4 - "mwe-upwiz-tab-details": "Step 2",
5 - "mwe-upwiz-tab-thanks": "Step 3",
 3+ "mwe-upwiz-tab-file": "1. Upload your files",
 4+ "mwe-upwiz-tab-details": "2. Add licenses and descriptions",
 5+ "mwe-upwiz-tab-thanks": "3. Use your files",
66 "mwe-upwiz-intro": "Introductory text (short)",
77 "mwe-upwiz-select-files": "Select files:",
88 "mwe-upwiz-add-file-n": "Add another file",
@@ -1598,7 +1598,8 @@
15991599 mw.UploadWizard.prototype = {
16001600 maxUploads: 10, // XXX get this from config
16011601 maxSimultaneousUploads: 2, // XXX get this from config
1602 - tabs: [ 'file', 'details', 'thanks' ],
 1602+ tabNames: [ 'file', 'details', 'thanks' ],
 1603+ currentTabName: undefined,
16031604
16041605 /*
16051606 // list possible upload handlers in order of preference
@@ -1645,11 +1646,12 @@
16461647
16471648 '<div id="mwe-upwiz-tabs">'
16481649 + '<ul>'
1649 - + '<li id="mwe-upwiz-tab-file">' + gM('mwe-upwiz-tab-file') + '</li>'
1650 - + '<li id="mwe-upwiz-tab-details">' + gM('mwe-upwiz-tab-details') + '</li>'
1651 - + '<li id="mwe-upwiz-tab-thanks">' + gM('mwe-upwiz-tab-thanks') + '</li>'
 1650+ + '<li id="mwe-upwiz-tab-file"><span class="mwe-arrow-text">' + gM('mwe-upwiz-tab-file') + '<span class="mwe-arrow"/></span></span></li>'
 1651+ + '<li id="mwe-upwiz-tab-details"><span class="mwe-arrow-text">' + gM('mwe-upwiz-tab-details') + '<span class="mwe-arrow"/></span></span></li>'
 1652+ + '<li id="mwe-upwiz-tab-thanks"><span class="mwe-arrow-text">' + gM('mwe-upwiz-tab-thanks') + '<span class="mwe-arrow"/></span></span></li>'
16521653 + '</ul>'
16531654 + '</div>'
 1655+ + '<div class="mwe-upwiz-clearing"></div>'
16541656
16551657
16561658 + '<div id="mwe-upwiz-content">'
@@ -1704,7 +1706,7 @@
17051707 + '</div>'
17061708 + '</div>'
17071709
1708 - + '<div id="mwe-upwiz-clearing"></div>';
 1710+ + '<div class="mwe-upwiz-clearing"></div>';
17091711
17101712 // within FILE tab div
17111713 // select files:
@@ -1746,22 +1748,34 @@
17471749
17481750 /**
17491751 * Advance one "step" in the wizard interface.
 1752+ * It is assumed that the previous tab to the current one was selected.
17501753 * @param selectedTabName
17511754 */
17521755 moveToTab: function( selectedTabName ) {
17531756 var _this = this;
1754 - for ( var i = 0; i < _this.tabs.length; i++ ) {
1755 - var tabName = _this.tabs[i];
 1757+ $j.each( _this.tabNames, function(i, tabName) {
 1758+
 1759+ // the tab indicator
 1760+ var tab = $j( '#mwe-upwiz-tab-' + tabName );
 1761+
 1762+ // the tab's contents
17561763 var tabDiv = $j( '#mwe-upwiz-tabdiv-' + tabName );
1757 - var tab = $j( '#mwe-upwiz-tab-' + tabName );
1758 - if ( selectedTabName == tabName ) {
 1764+
 1765+ if ( _this.currentTabName == tabName ) {
 1766+ tabDiv.hide();
 1767+ $j( tab ).hide( 1000 );
 1768+ } else if ( selectedTabName == tabName ) {
17591769 tabDiv.show();
17601770 tab.addClass( 'mwe-upwiz-tab-highlight' );
17611771 } else {
 1772+ // it's neither the formerly active nor the newly active one, so hide it.
 1773+ // (all are visible at init..)
17621774 tabDiv.hide();
1763 - tab.removeClass( 'mwe-upwiz-tab-highlight' );
17641775 }
1765 - }
 1776+ } );
 1777+
 1778+ _this.currentTabName = selectedTabName;
 1779+
17661780 // XXX possibly select appropriate form field to begin work
17671781 },
17681782
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/images/black-angle.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/images/black-angle.gif
___________________________________________________________________
Name: svn:mime-type
17691783 + application/octet-stream
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/images/grey-angle.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/images/grey-angle.gif
___________________________________________________________________
Name: svn:mime-type
17701784 + application/octet-stream
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/css/uploadWizard.css
@@ -13,15 +13,12 @@
1414 }
1515
1616 #mwe-upwiz-tabs {
17 - float: left;
18 - width: 100px;
1917 }
2018
2119 #mwe-upwiz-content {
22 - margin-left: 100px;
2320 }
2421
25 -#mwe-upwiz-clearing {
 22+.mwe-upwiz-clearing {
2623 clear: left;
2724 width: 100%;
2825 }
@@ -29,22 +26,53 @@
3027 #mwe-upwiz-tabs ul {
3128 list-style-type: none;
3229 list-style-image: none;
 30+ padding: 0px;
 31+ margin: 0px;
 32+ position: relative;
3333 }
3434
3535 #mwe-upwiz-tabs ul li {
36 - padding: 0.5em;
 36+ color: #999999;
 37+ float: left;
 38+ padding: 0px;
3739 margin: 0px;
38 - color: #999999;
 40+}
 41+
 42+#mwe-upwiz-tabs ul li span {
 43+ padding-top: 2px;
 44+ padding-bottom: 4px;
 45+}
 46+
 47+#mwe-upwiz-tabs ul li span.mwe-arrow-text {
3948 border-color: #e0e0e0;
40 - border-width: 1px 0px 1px 1px;
4149 border-style: solid;
 50+ border-width: 1px 0px 1px 0px;
 51+ padding-right: 10px;
 52+ padding-left: 24px;
 53+ z-index: 1;
4254 }
4355
 56+#mwe-upwiz-tabs ul li span.mwe-arrow {
 57+ position: relative;
 58+ left: 21px;
 59+ padding-right: 12px;
 60+ z-index: 2;
 61+ background: url('../images/grey-angle.gif') no-repeat right center;
 62+}
4463
45 -#mwe-upwiz-tabs ul li.mwe-upwiz-tab-highlight {
 64+#mwe-upwiz-tabs ul li.mwe-upwiz-tab-highlight span.mwe-arrow {
 65+ background: url('../images/black-angle.gif') no-repeat right center;
 66+}
 67+
 68+#mwe-upwiz-tabs ul li.mwe-upwiz-tab-highlight span.mwe-arrow-text {
 69+ border-color: #000000;
 70+}
 71+
 72+#mwe-upwiz-tabs ul li.mwe-upwiz-tab-highlight span.mwe-arrow-text {
 73+ padding-left: 12px;
4674 font-weight: bold;
4775 color: black;
48 - border-color: #999999;
 76+ border-left: 1px solid;
4977 }
5078
5179 #mwe-upwiz-content {

Status & tagging log