Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/loader.js |
— | — | @@ -54,7 +54,9 @@ |
55 | 55 | '$j.ui.dialog', |
56 | 56 | '$j.ui.draggable', |
57 | 57 | '$j.ui.datepicker', |
58 | | - '$j.fn.autocomplete' |
| 58 | + '$j.effects.core', |
| 59 | + '$j.effects.slide', |
| 60 | + '$j.fn.autocomplete', |
59 | 61 | ], |
60 | 62 | [ |
61 | 63 | 'mw.Language', |
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/mw.UploadWizard.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | 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", |
6 | 6 | "mwe-upwiz-intro": "Introductory text (short)", |
7 | 7 | "mwe-upwiz-select-files": "Select files:", |
8 | 8 | "mwe-upwiz-add-file-n": "Add another file", |
— | — | @@ -1598,7 +1598,8 @@ |
1599 | 1599 | mw.UploadWizard.prototype = { |
1600 | 1600 | maxUploads: 10, // XXX get this from config |
1601 | 1601 | maxSimultaneousUploads: 2, // XXX get this from config |
1602 | | - tabs: [ 'file', 'details', 'thanks' ], |
| 1602 | + tabNames: [ 'file', 'details', 'thanks' ], |
| 1603 | + currentTabName: undefined, |
1603 | 1604 | |
1604 | 1605 | /* |
1605 | 1606 | // list possible upload handlers in order of preference |
— | — | @@ -1645,11 +1646,12 @@ |
1646 | 1647 | |
1647 | 1648 | '<div id="mwe-upwiz-tabs">' |
1648 | 1649 | + '<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>' |
1652 | 1653 | + '</ul>' |
1653 | 1654 | + '</div>' |
| 1655 | + + '<div class="mwe-upwiz-clearing"></div>' |
1654 | 1656 | |
1655 | 1657 | |
1656 | 1658 | + '<div id="mwe-upwiz-content">' |
— | — | @@ -1704,7 +1706,7 @@ |
1705 | 1707 | + '</div>' |
1706 | 1708 | + '</div>' |
1707 | 1709 | |
1708 | | - + '<div id="mwe-upwiz-clearing"></div>'; |
| 1710 | + + '<div class="mwe-upwiz-clearing"></div>'; |
1709 | 1711 | |
1710 | 1712 | // within FILE tab div |
1711 | 1713 | // select files: |
— | — | @@ -1746,22 +1748,34 @@ |
1747 | 1749 | |
1748 | 1750 | /** |
1749 | 1751 | * Advance one "step" in the wizard interface. |
| 1752 | + * It is assumed that the previous tab to the current one was selected. |
1750 | 1753 | * @param selectedTabName |
1751 | 1754 | */ |
1752 | 1755 | moveToTab: function( selectedTabName ) { |
1753 | 1756 | 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 |
1756 | 1763 | 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 ) { |
1759 | 1769 | tabDiv.show(); |
1760 | 1770 | tab.addClass( 'mwe-upwiz-tab-highlight' ); |
1761 | 1771 | } else { |
| 1772 | + // it's neither the formerly active nor the newly active one, so hide it. |
| 1773 | + // (all are visible at init..) |
1762 | 1774 | tabDiv.hide(); |
1763 | | - tab.removeClass( 'mwe-upwiz-tab-highlight' ); |
1764 | 1775 | } |
1765 | | - } |
| 1776 | + } ); |
| 1777 | + |
| 1778 | + _this.currentTabName = selectedTabName; |
| 1779 | + |
1766 | 1780 | // XXX possibly select appropriate form field to begin work |
1767 | 1781 | }, |
1768 | 1782 | |
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 |
1769 | 1783 | + 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 |
1770 | 1784 | + application/octet-stream |
Index: branches/js2-work/phase3/js/mwEmbed/modules/UploadWizard/css/uploadWizard.css |
— | — | @@ -13,15 +13,12 @@ |
14 | 14 | } |
15 | 15 | |
16 | 16 | #mwe-upwiz-tabs { |
17 | | - float: left; |
18 | | - width: 100px; |
19 | 17 | } |
20 | 18 | |
21 | 19 | #mwe-upwiz-content { |
22 | | - margin-left: 100px; |
23 | 20 | } |
24 | 21 | |
25 | | -#mwe-upwiz-clearing { |
| 22 | +.mwe-upwiz-clearing { |
26 | 23 | clear: left; |
27 | 24 | width: 100%; |
28 | 25 | } |
— | — | @@ -29,22 +26,53 @@ |
30 | 27 | #mwe-upwiz-tabs ul { |
31 | 28 | list-style-type: none; |
32 | 29 | list-style-image: none; |
| 30 | + padding: 0px; |
| 31 | + margin: 0px; |
| 32 | + position: relative; |
33 | 33 | } |
34 | 34 | |
35 | 35 | #mwe-upwiz-tabs ul li { |
36 | | - padding: 0.5em; |
| 36 | + color: #999999; |
| 37 | + float: left; |
| 38 | + padding: 0px; |
37 | 39 | 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 { |
39 | 48 | border-color: #e0e0e0; |
40 | | - border-width: 1px 0px 1px 1px; |
41 | 49 | border-style: solid; |
| 50 | + border-width: 1px 0px 1px 0px; |
| 51 | + padding-right: 10px; |
| 52 | + padding-left: 24px; |
| 53 | + z-index: 1; |
42 | 54 | } |
43 | 55 | |
| 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 | +} |
44 | 63 | |
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; |
46 | 74 | font-weight: bold; |
47 | 75 | color: black; |
48 | | - border-color: #999999; |
| 76 | + border-left: 1px solid; |
49 | 77 | } |
50 | 78 | |
51 | 79 | #mwe-upwiz-content { |