Use JSDoc comments.

This commit is contained in:
Daniel Rosenwasser
2015-08-06 15:28:38 -07:00
parent 71738c9b95
commit 23d1273719
+36 -36
View File
@@ -7,57 +7,57 @@
/// <reference path="../jqueryui/jqueryui.d.ts"/>
interface TimePickerHour {
starts?: number; // first displayed hour
ends?: number; // last displayed hour
/** first displayed hour */ starts?: number;
/** last displayed hour */ ends?: number;
}
interface TimePickerMinutes {
starts?: number; // first displayed minute
ends?: number; // last displayed minute
interval?: number; // interval of displayed minutes
/** first displayed minute */ starts?: number;
/** last displayed minute */ ends?: number;
/** interval of displayed minutes */ interval?: number;
}
interface TimePickerOptions {
showOn?: string; // 'focus' for popup on focus,
// 'button' for trigger button, or 'both' for either (not yet implemented)
button?: string; // 'button' element that will trigger the timepicker
showAnim?: string; // Name of jQuery animation for popup
showOptions?: any; // Options for enhanced animations
appendText?: string; // Display text following the input box, e.g. showing the format
/** 'focus' for popup on focus, */ showOn?: string;
/**␍ * 'button' element that will trigger the timepicker.␍ *␍ * "button" for trigger button, or "both" for either (not yet implemented).␍ */ button?: string;
/** Name of jQuery animation for popup */ showAnim?: string;
/** Options for enhanced animations */ showOptions?: any;
/** Display text following the input box, e.g. showing the format */ appendText?: string;
beforeShow?: () => any; // Define a callback function executed before the timepicker is shown
onSelect?: (timeText: string, inst: any) => any; // Define a callback function when a hour / minutes is selected
onClose?: (timeText: string, inst: any) => any; // Define a callback function when the timepicker is closed
/** Define a callback function executed before the timepicker is shown */ beforeShow?: () => any;
/** Define a callback function when a hour / minutes is selected */ onSelect?: (timeText: string, inst: any) => any;
/** Define a callback function when the timepicker is closed */ onClose?: (timeText: string, inst: any) => any;
/** The character to use to separate hours and minutes. */ timeSeparator?: string;
/** The character to use to separate the time from the time period. */ periodSeparator?: string;
/** Define whether or not to show AM/PM with selected time */ showPeriod?: boolean;
/** Show the AM/PM labels on the left of the time picker */ showPeriodLabels?: boolean;
/** Define whether or not to show a leading zero for hours < 10. [true/false] */ showLeadingZero?: boolean;
/** Define whether or not to show a leading zero for minutes < 10. */ showMinutesLeadingZero?: boolean;
/** Selector for an alternate field to store selected time into */ altField?: string;
/**␍ * Used as default time when input field is empty or for inline timePicker␍ * (set to 'now' for the current time, '' for no highlighted time)␍ **/ defaultTime?: string;
/**␍ * Position of the dialog relative to the input.␍ *␍ * See the position utility for more info : http://jqueryui.com/demos/position/␍ */ myPosition?: string;
/**␍ * Position of the input element to match␍ *␍ * Note : if the position utility is not loaded, the timepicker will attach left top to left bottom␍ * See the position utility for more info : http://jqueryui.com/demos/position/␍ */ atPosition?: string;
timeSeparator?: string; // The character to use to separate hours and minutes.
periodSeparator?: string; // The character to use to separate the time from the time period.
showPeriod?: boolean; // Define whether or not to show AM/PM with selected time
showPeriodLabels?: boolean; // Show the AM/PM labels on the left of the time picker
showLeadingZero?: boolean; // Define whether or not to show a leading zero for hours < 10. [true/false]
showMinutesLeadingZero?: boolean; // Define whether or not to show a leading zero for minutes < 10.
altField?: string; // Selector for an alternate field to store selected time into
defaultTime?: string; // Used as default time when input field is empty or for inline timePicker
// (set to 'now' for the current time, '' for no highlighted time)
myPosition?: string; // Position of the dialog relative to the input.
// see the position utility for more info : http://jqueryui.com/demos/position/
atPosition?: string; // Position of the input element to match
// Note : if the position utility is not loaded, the timepicker will attach left top to left bottom
//NEW: 2011-02-03
onHourShow?: () => any; // callback for enabling / disabling on selectable hours ex : function(hour) { return true; }
onMinuteShow?: () => any; // callback for enabling / disabling on time selection ex : function(hour,minute) { return true; }
/** callback for enabling / disabling on selectable hours ex : function(hour) { return true; } */ onHourShow?: () => any;
/** callback for enabling / disabling on time selection ex : function(hour,minute) { return true; } */ onMinuteShow?: () => any;
hours?: TimePickerHour;
minutes?: TimePickerMinutes;
rows?: number; // number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2
/** number of rows for the input tables, minimum 2, makes more sense if you use multiple of 2 */ rows?: number;
// 2011-08-05 0.2.4
showHours?: boolean; // display the hours section of the dialog
showMinutes?: boolean; // display the minute section of the dialog
optionalMinutes?: boolean; // optionally parse inputs of whole hours with minutes omitted
/** display the hours section of the dialog */ showHours?: boolean;
/** display the minute section of the dialog */ showMinutes?: boolean;
/** optionally parse inputs of whole hours with minutes omitted */ optionalMinutes?: boolean;
// buttons
showCloseButton?: boolean; // shows an OK button to confirm the edit
showNowButton?: boolean; // Shows the 'now' button
showDeselectButton?: boolean; // Shows the deselect time button
/** shows an OK button to confirm the edit */ showCloseButton?: boolean;
/** Shows the 'now' button */ showNowButton?: boolean;
/** Shows the deselect time button */ showDeselectButton?: boolean;
}