Changeset 17759 for extensions/GrumPluginClasses/js/ui.inputDate.js
- Timestamp:
- Sep 5, 2012, 5:13:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/js/ui.inputDate.js
r16012 r17759 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputDate.js 4 * file version: 1.0. 05 * date: 2012-0 6-174 * file version: 1.0.1 5 * date: 2012-09-05 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 23 23 * | 1.0.0 | 2012/06/17 | * first release 24 24 * | | | 25 * | | |25 * | 1.0.1 | 2012/09/05 | * add possibility for time to be optional in datetime mode 26 26 * | | | 27 27 * | | | … … 54 54 { 55 55 dateType:'date', // date, datetime 56 timeMandatory:false, // used for datetime type only 56 57 timepicker:{ 57 58 timeFormat:'hh:mm', // hh:mm, hh:mm:ss … … 268 269 }, // timeValue 269 270 271 timeMandatory: function (value) 272 { 273 if(value!=null) 274 { 275 var options=this.data('options'); 276 277 // set selected value 278 return( 279 this.each( 280 function() 281 { 282 privateMethods.setTimeMandatory($(this), value, true); 283 } 284 ) 285 ); 286 } 287 else 288 { 289 // return the selected tags 290 var properties=this.data('properties'); 291 return(properties.timeMandatory); 292 } 293 }, // timeMandatory 294 270 295 isValid: function (value) 271 296 { … … 350 375 hms=[]; 351 376 377 if(value=='' && !options.timeMandatory) return(true); 378 352 379 if(re.test(value)) 353 380 { … … 387 414 properties.initialized=false; 388 415 416 privateMethods.setTimeMandatory(object, (value.timeMandatory!=null)?value.timeMandatory:options.timeMandatory); 389 417 privateMethods.setDateType(object, (value.dateType!=null)?value.dateType:options.dateType); 390 418 privateMethods.setTimePicker(object, (value.timepicker!=null)?value.timepicker:options.timepicker); … … 494 522 return(options.disabled); 495 523 }, //setDateType 524 525 setTimeMandatory : function (object, value) 526 { 527 var options=object.data('options'), 528 objects=object.data('objects'), 529 properties=object.data('properties'); 530 531 if((!properties.initialized || options.timeMandatory!=value) && (value==true || value==false)) 532 { 533 options.timeMandatory=value; 534 } 535 return(options.timeMandatory); 536 }, //setTimeMandatory 496 537 497 538 setDatePicker : function (object, value)
Note: See TracChangeset
for help on using the changeset viewer.