r114090 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114089‎ | r114090 | r114091 >
Date:23:52, 17 March 2012
Author:foxtrott
Status:new
Tags:
Comment:
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 (modified) (history)
  • /trunk/extensions/SemanticFormsInputs/libs/timepicker.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticFormsInputs/libs/datepicker.js
@@ -157,6 +157,7 @@
158158 }
159159 });
160160 }
 161+ inputShow.datepicker( 'widget' ).hide();
161162 }
162163 }
163164
Index: trunk/extensions/SemanticFormsInputs/libs/timepicker.js
@@ -56,7 +56,9 @@
5757
5858 } else {
5959
60 - button.click( function(){inputShow.focus();} );
 60+ button.click( function(){
 61+ jQuery( '#' + inputID + '_tree>ul' ).fadeToggle();
 62+ } );
6163
6264 }
6365
@@ -126,7 +128,7 @@
127129 else if ( interv > 60 ) interv = 60;
128130
129131 // build html structure
130 - var sp = jQuery( '<span class="SFI_timepicker" id="' + inputID + '_tree" ></span>' ).insertBefore( '#' + inputIDshow );
 132+ var sp = jQuery( '<span class="SFI_timepicker" id="' + inputID + '_tree" ></span>' ).insertBefore( inputShow );
131133
132134 var ulh = jQuery( '<ul class="SFI_timepicker_hours" >' ).appendTo( sp );
133135
@@ -203,7 +205,7 @@
204206 .mousedown(function(evt){
205207
206208 // set values and leave input
207 - jQuery( '#' + inputIDshow )
 209+ inputShow
208210 .attr( 'value', jQuery( this ).data( 'show' ) )
209211 .blur()
210212 .change();
@@ -223,19 +225,19 @@
224226 });
225227
226228 // show timepicker when input gets focus
227 - jQuery( '#' + inputIDshow )
 229+ inputShow
228230 .focus(function() {
229231 jQuery( '#' + inputID + '_tree>ul' ).fadeIn();
230232 });
231233
232234 // hide timepicker when input loses focus
233 - jQuery( '#' + inputIDshow )
 235+ inputShow
234236 .blur(function() {
235237 jQuery( '#' + inputID + '_tree ul' ).fadeOut( 'normal', function() {jQuery(this).hide();});
236238 });
237239
238240 if ( ! params.partOfDTP ) {
239 - jQuery( '#' + inputIDshow )
 241+ inputShow
240242 .change(function() {
241243 jQuery( '#' + inputID ).val( jQuery(this).val() );
242244 });
@@ -243,11 +245,11 @@
244246
245247 jQuery( '#' + inputID + '_show ~ button[name="button"]' )
246248 .click( function() {
247 - jQuery( '#' + inputIDshow ).focus();
 249+ inputShow.focus();
248250 });
249251
250252 jQuery( '#' + inputID + '_show ~ button[name="resetbutton"]' )
251253 .click( function() {
252 - jQuery( '#' + inputIDshow ).val('');
 254+ inputShow.val('');
253255 });
254256 }
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r114975followup r114090: fix bug 34360 (Datetimepicker: Is not dimmed if user does n...foxtrott19:38, 19 April 2012

Status & tagging log