http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95070
Revision: 95070
Author: salvatoreingala
Date: 2011-08-20 08:33:44 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
- Some fixes for IE7/8.
- Improved (un-)styling of dialog buttons.
Modified Paths:
--------------
branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.js
branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.css
Modified:
branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.js
===================================================================
--- branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.js
2011-08-20 07:54:21 UTC (rev 95069)
+++ branches/salvatoreingala/Gadgets/ui/resources/ext.gadgets.preferences.js
2011-08-20 08:33:44 UTC (rev 95070)
@@ -43,7 +43,19 @@
styleSheet.ownerNode : //not-IE or IE >= 9
styleSheet.owningElement; //IE < 9
owner.parentNode.removeChild( owner );
- }
+ }
+
+ //Function to set/remove "wait" cursor for all elements
+ var toggleWaitCursor = ( function() {
+ var waitCSS = null;
+ return function() {
+ if ( waitCSS === null ) {
+ waitCSS = mw.util.addCSS( '* { cursor: wait
!important; }' );
+ } else {
+ waitCSS.disabled = !waitCSS.disabled;
+ }
+ };
+ } )();
//Shows a message in the bottom of the dialog, with fading
function showMsg( msg ) {
@@ -63,13 +75,13 @@
//disable all dialog buttons
$( '#mw-gadgets-prefsDialog-close,
#mw-gadgets-prefsDialog-save' ).button( 'disable' );
- //Set cursor to "wait" for all elements; save the stylesheet so
it can be removed later
- var waitCSS = mw.util.addCSS( '* { cursor: wait !important; }'
);
+ //Set "wait" cursor
+ toggleWaitCursor();
//just to avoid code duplication
function error() {
//Remove "wait" cursor
- removeStylesheet( waitCSS );
+ toggleWaitCursor();
//Warn the user
showMsg( mw.msg( 'gadgets-save-failed' ) );
@@ -92,7 +104,7 @@
success: function( response ) {
if ( typeof response.error == 'undefined' ) {
//Remove "wait" cursor
- removeStylesheet( waitCSS );
+ toggleWaitCursor();
//Notify success to user
showMsg( mw.msg( 'gadgets-save-success'
) );
@@ -189,7 +201,10 @@
create:
function() {
//Remove styles to dialog buttons
$( this
).dialog( 'widget' ).find( '.ui-button' )
-
.removeClass().unbind( 'mouseover' ).unbind( 'mousedown' );
+
.removeClass().addClass( 'ui-button-text-only' )
+
.unbind( 'mouseover' )
+
.unbind( 'mousedown' )
+
.unbind( 'focus' );
},
close:
function() {
$( this
).remove();
Modified: branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.css
===================================================================
--- branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.css
2011-08-20 07:54:21 UTC (rev 95069)
+++ branches/salvatoreingala/Gadgets/ui/resources/jquery.formBuilder.css
2011-08-20 08:33:44 UTC (rev 95070)
@@ -10,6 +10,8 @@
margin-right: 2%;
width: 45%;
vertical-align: middle;
+ /* IE7 */
+ *width: 42%;
}
.formbuilder label.error {
@@ -30,6 +32,9 @@
vertical-align: middle;
display: inline-block;
width: 50%;
+ /* IE7 */
+ zoom: 1;
+ *display: inline;
}
.formBuilder-slider-tooltip {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs