https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114090
Revision: 114090
Author: foxtrott
Date: 2012-03-17 23:52:30 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
bugfix (timepicker button does not toggle);
fix bug 34360 (Datetimepicker: Is not dimmed if user does not have edit right.)
Modified Paths:
--------------
trunk/extensions/SemanticFormsInputs/libs/datepicker.js
trunk/extensions/SemanticFormsInputs/libs/timepicker.js
Modified: trunk/extensions/SemanticFormsInputs/libs/datepicker.js
===================================================================
--- trunk/extensions/SemanticFormsInputs/libs/datepicker.js 2012-03-17
23:26:37 UTC (rev 114089)
+++ trunk/extensions/SemanticFormsInputs/libs/datepicker.js 2012-03-17
23:52:30 UTC (rev 114090)
@@ -157,6 +157,7 @@
}
});
}
+ inputShow.datepicker( 'widget' ).hide();
}
}
Modified: trunk/extensions/SemanticFormsInputs/libs/timepicker.js
===================================================================
--- trunk/extensions/SemanticFormsInputs/libs/timepicker.js 2012-03-17
23:26:37 UTC (rev 114089)
+++ trunk/extensions/SemanticFormsInputs/libs/timepicker.js 2012-03-17
23:52:30 UTC (rev 114090)
@@ -56,7 +56,9 @@
} else {
- button.click( function(){inputShow.focus();} );
+ button.click( function(){
+ jQuery( '#' + inputID + '_tree>ul' ).fadeToggle();
+ } );
}
@@ -126,7 +128,7 @@
else if ( interv > 60 ) interv = 60;
// build html structure
- var sp = jQuery( '<span class="SFI_timepicker" id="' + inputID +
'_tree" ></span>' ).insertBefore( '#' + inputIDshow );
+ var sp = jQuery( '<span class="SFI_timepicker" id="' + inputID +
'_tree" ></span>' ).insertBefore( inputShow );
var ulh = jQuery( '<ul class="SFI_timepicker_hours" >' ).appendTo( sp );
@@ -203,7 +205,7 @@
.mousedown(function(evt){
// set values and leave input
- jQuery( '#' + inputIDshow )
+ inputShow
.attr( 'value', jQuery( this ).data( 'show' ) )
.blur()
.change();
@@ -223,19 +225,19 @@
});
// show timepicker when input gets focus
- jQuery( '#' + inputIDshow )
+ inputShow
.focus(function() {
jQuery( '#' + inputID + '_tree>ul' ).fadeIn();
});
// hide timepicker when input loses focus
- jQuery( '#' + inputIDshow )
+ inputShow
.blur(function() {
jQuery( '#' + inputID + '_tree ul' ).fadeOut( 'normal',
function() {jQuery(this).hide();});
});
if ( ! params.partOfDTP ) {
- jQuery( '#' + inputIDshow )
+ inputShow
.change(function() {
jQuery( '#' + inputID ).val( jQuery(this).val() );
});
@@ -243,11 +245,11 @@
jQuery( '#' + inputID + '_show ~ button[name="button"]' )
.click( function() {
- jQuery( '#' + inputIDshow ).focus();
+ inputShow.focus();
});
jQuery( '#' + inputID + '_show ~ button[name="resetbutton"]' )
.click( function() {
- jQuery( '#' + inputIDshow ).val('');
+ inputShow.val('');
});
}
\ No newline at end of file
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs