Index: trunk/extensions/UploadWizard/styles/jquery.tipsy.help.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/UploadWizard/styles/jquery.tipsy.help.gif |
___________________________________________________________________ |
Name: svn:mime-type |
1 | 1 | + application/octet-stream |
Index: trunk/extensions/UploadWizard/styles/jquery.tipsy.error.gif |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/UploadWizard/styles/jquery.tipsy.error.gif |
___________________________________________________________________ |
Name: svn:mime-type |
2 | 2 | + application/octet-stream |
Index: trunk/extensions/UploadWizard/styles/jquery.tipsy.css |
— | — | @@ -10,3 +10,21 @@ |
11 | 11 | .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; } |
12 | 12 | .tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; } |
13 | 13 | .tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; } |
| 14 | + |
| 15 | + |
| 16 | +.tipsy-help .tipsy-inner { background-color: #96d8d9; color: black; } |
| 17 | +.tipsy-help .tipsy-arrow { background: url('jquery.tipsy.help.gif') } |
| 18 | + |
| 19 | +.tipsy-error .tipsy-inner { background-color: #f89c90; color: black; } |
| 20 | +.tipsy-error .tipsy-arrow { background: url('jquery.tipsy.error.gif') } |
| 21 | + |
| 22 | +.shadow { |
| 23 | + /* offset left, top, thickness, color with alpha */ |
| 24 | + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); |
| 25 | + -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); |
| 26 | + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); |
| 27 | + /* IE */ |
| 28 | + filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color='gray'); |
| 29 | + /* slightly different syntax for IE8 */ |
| 30 | + -ms-filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color='gray')"; |
| 31 | +} |
Index: trunk/extensions/UploadWizard/js/jquery/plugins/jquery.tipsy.js |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | if (title && this.enabled) { |
26 | 26 | var $tip = this.tip(); |
27 | 27 | $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); |
28 | | - $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity |
| 28 | + // $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity |
29 | 29 | // the remove strips events |
30 | 30 | //$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); |
31 | 31 | $tip.css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); |
— | — | @@ -97,8 +97,11 @@ |
98 | 98 | }, |
99 | 99 | |
100 | 100 | tip: function() { |
| 101 | + var type = 'tipsy-' + this.options.type; |
| 102 | + var shadow = this.options.shadow ? 'shadow' : ''; |
101 | 103 | if (!this.$tip) { |
102 | | - this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"/></div>'); |
| 104 | + this.$tip = $('<div class="tipsy ' + type + '"></div>') |
| 105 | + .html('<div class="tipsy-arrow"></div><div class="tipsy-inner ' + shadow + '"/></div>'); |
103 | 106 | } |
104 | 107 | return this.$tip; |
105 | 108 | }, |
— | — | @@ -173,9 +176,10 @@ |
174 | 177 | html: false, |
175 | 178 | live: false, |
176 | 179 | offset: 0, |
177 | | - opacity: 0.8, |
| 180 | + opacity: 1.0, |
178 | 181 | title: 'title', |
179 | | - trigger: 'hover' |
| 182 | + trigger: 'hover', |
| 183 | + type: 'help', |
180 | 184 | }; |
181 | 185 | |
182 | 186 | // Overwrite this method to provide options on a per-element basis. |
Index: trunk/extensions/UploadWizard/js/mw.UploadWizard.js |
— | — | @@ -1,4 +1,3 @@ |
2 | | - |
3 | 2 | /** |
4 | 3 | * Include all the uploadWizard msgs |
5 | 4 | */ |
— | — | @@ -48,7 +47,6 @@ |
49 | 48 | mw.ProgressBar = function( selector, text ) { |
50 | 49 | var _this = this; |
51 | 50 | // XXX need to figure out a way to put text inside bar |
52 | | - |
53 | 51 | _this.$selector = $j( selector ); |
54 | 52 | _this.$selector.html( |
55 | 53 | '<div class="mwe-upwiz-progress">' |
— | — | @@ -369,6 +367,7 @@ |
370 | 368 | _this.transportProgress = 1; |
371 | 369 | $j( _this ).trigger( 'transportedEvent' ); |
372 | 370 | |
| 371 | + debugger; |
373 | 372 | if ( result.upload && result.upload.imageinfo && result.upload.imageinfo.descriptionurl ) { |
374 | 373 | // success |
375 | 374 | _this.extractUploadInfo( result ); |
— | — | @@ -383,7 +382,8 @@ |
384 | 383 | } |
385 | 384 | |
386 | 385 | // and other errors that result in a stash |
387 | | - } else if ( 0 /* actual failure */ ) { |
| 386 | + } else { |
| 387 | + alert("failure!"); |
388 | 388 | // we may want to tag or otherwise queue it as an upload to retry |
389 | 389 | } |
390 | 390 | |
— | — | @@ -967,7 +967,7 @@ |
968 | 968 | // descriptions |
969 | 969 | _this.descriptionsDiv = $j( '<div class="mwe-upwiz-details-descriptions mwe-upwiz-details-input"></div>' ); |
970 | 970 | |
971 | | - |
| 971 | + // XXX use plurals |
972 | 972 | _this.descriptionAdder = $j( '<a class="mwe-upwiz-desc-add"/>' ) |
973 | 973 | .attr( 'href', '#' ) |
974 | 974 | .html( gM( 'mwe-upwiz-desc-add-0' ) ) |
— | — | @@ -985,7 +985,7 @@ |
986 | 986 | // XXX make sure they can't use ctrl characters or returns or any other bad stuff. |
987 | 987 | _this.titleInput = $j( '<textarea type="text" rows="1" class="mwe-title mwe-long-textarea"></textarea>' ) |
988 | 988 | .attr( 'title', gM( 'mwe-upwiz-tooltip-title' ) ) |
989 | | - .tipsy( { gravity: 'w', trigger: 'focus' } ) |
| 989 | + .tipsyPlus() |
990 | 990 | .keyup( function() { |
991 | 991 | _this.setFilenameFromTitle(); |
992 | 992 | } ) |
— | — | @@ -1055,7 +1055,7 @@ |
1056 | 1056 | _this.otherInformationInput = $j( '<textarea class="mwe-upwiz-other-textarea"></textarea>' ) |
1057 | 1057 | .growTextArea() |
1058 | 1058 | .attr( 'title', gM( 'mwe-upwiz-tooltip-other' ) ) |
1059 | | - .tipsy( { gravity: 'w', trigger: 'focus' } ); |
| 1059 | + .tipsyPlus(); |
1060 | 1060 | |
1061 | 1061 | var otherInformationDiv = $j('<div></div>') |
1062 | 1062 | .append( $j( '<div class="mwe-upwiz-details-more-label">' ).append( gM( 'mwe-upwiz-other' ) ) ) |
— | — | @@ -1243,6 +1243,7 @@ |
1244 | 1244 | recountDescriptions: function() { |
1245 | 1245 | var _this = this; |
1246 | 1246 | // if there is some maximum number of descriptions, deal with that here |
| 1247 | + // XXX use mediawiki PLURAL, not -0 -n |
1247 | 1248 | $j( _this.descriptionAdder ).html( gM( 'mwe-upwiz-desc-add-' + ( _this.descriptions.length == 0 ? '0' : 'n' ) ) ); |
1248 | 1249 | }, |
1249 | 1250 | |
— | — | @@ -1827,7 +1828,7 @@ |
1828 | 1829 | + '<div id="mwe-upwiz-macro">' |
1829 | 1830 | + '<div id="mwe-upwiz-macro-progress" class="ui-helper-clearfix"></div>' |
1830 | 1831 | + '<div id="mwe-upwiz-macro-choice">' |
1831 | | - + '<div>' + gM( 'mwe-upwiz-details-intro' ) + '</div>' |
| 1832 | + + '<div>' + gM( 'mwe-upwiz-details-intro' ) + '</div>' // XXX PLURAL |
1832 | 1833 | + '</div>' |
1833 | 1834 | + '<div id="mwe-upwiz-macro-files"></div>' |
1834 | 1835 | + '</div>' |
— | — | @@ -1909,6 +1910,7 @@ |
1910 | 1911 | } |
1911 | 1912 | } ); |
1912 | 1913 | |
| 1914 | + // XXX mediawiki PLURAL |
1913 | 1915 | $j( '#mwe-upwiz-deeds-intro' ).html( gM( 'mwe-upwiz-deeds-intro' ) ); |
1914 | 1916 | |
1915 | 1917 | $j( '#mwe-upwiz-stepdiv-deeds .mwe-upwiz-button-next').click( function() { |
— | — | @@ -2245,12 +2247,14 @@ |
2246 | 2248 | if ( _this.uploads.length ) { |
2247 | 2249 | $j( '#mwe-upwiz-upload-ctrl' ).removeAttr( 'disabled' ); |
2248 | 2250 | $j( '#proceed' ).show(); |
| 2251 | + // XXX should use PLURAL |
2249 | 2252 | $j( '#mwe-upwiz-add-file' ).html( gM( 'mwe-upwiz-add-file-n' ) ); |
2250 | 2253 | $j( '#mwe-upwiz-add-file-container' ).removeClass('mwe-upwiz-add-files-0'); |
2251 | 2254 | $j( '#mwe-upwiz-add-file-container' ).addClass('mwe-upwiz-add-files-n'); |
2252 | 2255 | } else { |
2253 | 2256 | $j( '#mwe-upwiz-upload-ctrl' ).attr( 'disabled', 'disabled' ); |
2254 | 2257 | $j( '#proceed' ).hide(); |
| 2258 | + // XXX should use PLURAL |
2255 | 2259 | $j( '#mwe-upwiz-add-file' ).html( gM( 'mwe-upwiz-add-file-0' ) ); |
2256 | 2260 | $j( '#mwe-upwiz-add-file-container' ).addClass('mwe-upwiz-add-files-0'); |
2257 | 2261 | $j( '#mwe-upwiz-add-file-container' ).removeClass('mwe-upwiz-add-files-n'); |
— | — | @@ -2467,6 +2471,7 @@ |
2468 | 2472 | }, |
2469 | 2473 | |
2470 | 2474 | // modify various interface strings depending on singular, multiple deeds |
| 2475 | + // XXX use PLURAL when possible |
2471 | 2476 | setQuantity: function() { |
2472 | 2477 | var _this = this; |
2473 | 2478 | mw.log( "setting quantity of deed to " + _this.count ); |
— | — | @@ -2678,7 +2683,7 @@ |
2679 | 2684 | title: gM( 'mwe-upwiz-tooltip-sign' ), |
2680 | 2685 | value: mw.getConfig( 'userName' ) |
2681 | 2686 | } ) |
2682 | | - .tipsy( { trigger: 'focus', gravity: 'w' } ) |
| 2687 | + .tipsyPlus() |
2683 | 2688 | .keyup( function() { |
2684 | 2689 | var thisInput = this; |
2685 | 2690 | var thisVal = $j( thisInput ).val(); |
— | — | @@ -2710,11 +2715,11 @@ |
2711 | 2716 | var sourceInput = $j('<textarea class="mwe-source mwe-long-textarea" name="source" rows="1" cols="40"></textarea>' ) |
2712 | 2717 | .growTextArea() |
2713 | 2718 | .attr( 'title', gM( 'mwe-upwiz-tooltip-source' ) ) |
2714 | | - .tipsy( { trigger: 'focus', gravity: 'w' } ); |
| 2719 | + .tipsyPlus(); |
2715 | 2720 | var authorInput = $j('<textarea class="mwe-author mwe-long-textarea" name="author" rows="1" cols="40"></textarea>' ) |
2716 | 2721 | .growTextArea() |
2717 | 2722 | .attr( 'title', gM( 'mwe-upwiz-tooltip-author' ) ) |
2718 | | - .tipsy( { trigger: 'focus', gravity: 'w' } ); |
| 2723 | + .tipsyPlus(); |
2719 | 2724 | licenseInputDiv = $j( '<div class="mwe-upwiz-deed-license"></div>' ); |
2720 | 2725 | licenseInput = new mw.UploadWizardLicenseInput( licenseInputDiv ); |
2721 | 2726 | licenseInput.setDefaultValues(); |
— | — | @@ -3071,8 +3076,15 @@ |
3072 | 3077 | ( function( $j ) { |
3073 | 3078 | |
3074 | 3079 | $j.fn.tipsyPlus = function( options ) { |
| 3080 | + // use extend! |
3075 | 3081 | var titleOption = 'title'; |
3076 | 3082 | var htmlOption = false; |
| 3083 | + |
| 3084 | + var options = $j.extend( |
| 3085 | + { type: 'help', shadow: true }, |
| 3086 | + options |
| 3087 | + ); |
| 3088 | + |
3077 | 3089 | var el = this; |
3078 | 3090 | |
3079 | 3091 | if (options.plus) { |
— | — | @@ -3104,7 +3116,9 @@ |
3105 | 3117 | gravity: 'w', |
3106 | 3118 | trigger: 'focus', |
3107 | 3119 | title: titleOption, |
3108 | | - html: htmlOption |
| 3120 | + html: htmlOption, |
| 3121 | + type: options.type, |
| 3122 | + shadow: options.shadow |
3109 | 3123 | } ); |
3110 | 3124 | |
3111 | 3125 | } |