File tree Expand file tree Collapse file tree 4 files changed +35
-22
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +35
-22
lines changed
Original file line number Diff line number Diff line change 1
1
2
2
# version number
3
- tools = 1.2.0
4
- jquery = 1.3.2
5
- sizzle = 0.9.3
3
+ tools = 1.2.1
Original file line number Diff line number Diff line change 206
206
}
207
207
input . addClass ( css . input ) ;
208
208
209
- var fire = input . add ( this ) ;
209
+ var fire = input . add ( self ) ;
210
210
211
211
// construct layout
212
212
if ( ! root . length ) {
270
270
currMonth = date . getMonth ( ) ;
271
271
currDay = date . getDate ( ) ;
272
272
273
+
273
274
// change
274
275
e = e || $ . Event ( "api" ) ;
275
276
e . type = "change" ;
276
- fire . trigger ( e , [ date ] ) ;
277
+
278
+ fire . trigger ( e , [ date ] ) ;
277
279
if ( e . isDefaultPrevented ( ) ) { return ; }
278
280
279
281
// formatting
346
348
// enter
347
349
if ( key == 13 ) {
348
350
if ( ! $ ( e . target ) . is ( "select" ) ) {
349
- select ( $ ( "." + css . focus ) . data ( "date" ) , conf , e ) ;
351
+ $ ( "." + css . focus ) . click ( ) ;
350
352
}
351
353
}
352
354
558
560
559
561
// date picking
560
562
a . click ( function ( e ) {
561
- if ( ! $ ( this ) . hasClass ( css . disabled ) ) {
562
- select ( $ ( this ) . data ( "date" ) , conf , e ) ;
563
+ var el = $ ( this ) ;
564
+ if ( ! el . hasClass ( css . disabled ) ) {
565
+ $ ( "#" + css . current ) . removeAttr ( "id" ) ;
566
+ el . attr ( "id" , css . current ) ;
567
+ select ( el . data ( "date" ) , conf , e ) ;
563
568
}
564
569
return false ;
565
570
} ) ;
607
612
608
613
hide : function ( e ) {
609
614
610
- if ( opened ) {
611
- root . hide ( ) ;
612
- $ ( document ) . unbind ( "click.d" ) . unbind ( "keydown.d" ) ;
615
+ if ( opened ) {
613
616
614
- // onHide
615
- opened = false ;
617
+ // onHide
616
618
e = e || $ . Event ( ) ;
617
619
e . type = "onHide" ;
618
620
fire . trigger ( e ) ;
621
+
622
+ $ ( document ) . unbind ( "click.d" ) . unbind ( "keydown.d" ) ;
623
+
624
+ // cancelled ?
625
+ if ( e . isDefaultPrevented ( ) ) { return ; }
626
+
627
+ // do the hide
628
+ root . hide ( ) ;
629
+ opened = false ;
619
630
}
620
631
621
632
return self ;
676
687
} ) ;
677
688
678
689
// initial value
690
+
679
691
if ( parseDate ( input . val ( ) ) ) {
680
692
select ( value , conf ) ;
681
693
}
Original file line number Diff line number Diff line change 168
168
// tip not initialized yet
169
169
if ( ! tip ) {
170
170
171
- // find a "manual" tooltip
171
+ // autogenerated tooltip
172
172
if ( title ) {
173
- tip = $ ( conf . layout ) . addClass ( conf . tipClass ) . appendTo ( document . body ) . hide ( ) ;
173
+ tip = $ ( conf . layout ) . addClass ( conf . tipClass ) . appendTo ( document . body )
174
+ . hide ( ) . append ( title ) ;
175
+
176
+ // single tip element for all
174
177
} else if ( conf . tip ) {
175
178
tip = $ ( conf . tip ) . eq ( 0 ) ;
176
179
180
+ // manual tooltip
177
181
} else {
178
182
tip = trigger . next ( ) ;
179
183
if ( ! tip . length ) { tip = trigger . parent ( ) . next ( ) ; }
185
189
if ( self . isShown ( ) ) { return self ; }
186
190
187
191
// stop previous animation
188
- tip . stop ( true , true ) ;
189
-
192
+ tip . stop ( true , true ) ;
190
193
191
194
// get position
192
195
var pos = getPosition ( trigger , tip , conf ) ;
193
-
194
- // title attribute
195
- if ( title ) { tip . html ( title ) ; }
196
+
196
197
197
198
// onBeforeShow
198
199
e = e || $ . Event ( ) ;
Original file line number Diff line number Diff line change 211
211
212
212
/******* built-in HTML5 standard validators *********/
213
213
214
- v . fn ( ":email" , "Plase enter a valid email address" , function ( el , v ) {
214
+ v . fn ( ":email" , "Please enter a valid email address" , function ( el , v ) {
215
215
return ! v || emailRe . test ( v ) ;
216
216
} ) ;
217
217
467
467
// disable browser's default validation mechanism
468
468
if ( inputs . get ( 0 ) . validity ) {
469
469
inputs . each ( function ( ) {
470
- this . oninvalid = function ( ) { return false ; }
470
+ this . oninvalid = function ( ) {
471
+ return false ;
472
+ } ;
471
473
} ) ;
472
474
}
473
475
You can’t perform that action at this time.
0 commit comments