Merge pull request #12628 from ambrusadrianz/master

angular-bootstrap-calendar: Added two new interface, errors fixed
This commit is contained in:
Nathan Shively-Sanders
2016-11-22 13:48:17 -08:00
committed by GitHub
+42 -2
View File
@@ -6,6 +6,34 @@
/// <reference path="../moment/moment.d.ts" />
declare namespace angular.bootstrap.calendar {
interface IEventAction {
/**
* The label of the action
*/
label: string;
/**
* CSS class to be added to the action element
*/
cssClass?: string;
/**
* The action that occurs when it's clicked
* @param args - the IEvent whose action was clicked
*/
onClick: (args: any) => void;
}
interface IEventColor {
/**
* The primary color of the event, should be darker than secondary
*/
primary: string;
/**
* The secondary color of the event, should be lighter than primary
*/
secondary: string;
}
interface IEvent {
/**
* The title of the event
@@ -14,7 +42,7 @@ declare namespace angular.bootstrap.calendar {
/**
* The type of the event (determines its color). Can be important, warning, info, inverse, success or special
*/
type: string;
type?: string;
/**
* A javascript date object for when the event starts
*/
@@ -23,6 +51,14 @@ declare namespace angular.bootstrap.calendar {
* Optional - a javascript date object for when the event ends
*/
endsAt?: Date;
/**
* Color of the Event
*/
color?: IEventColor;
/**
* Actions of the Event
*/
actions?: Array<IEventAction>;
/**
* If edit-event-html is set and this field is explicitly set to false then dont make it editable.
*/
@@ -51,6 +87,10 @@ declare namespace angular.bootstrap.calendar {
* A CSS class (or more, just separate with spaces) that will be added to the event when it is displayed on each view. Useful for marking an event as selected / active etc
*/
cssClass?: string;
/**
* If set the event will display as all-day event
*/
allDay?: boolean;
}
interface ICalendarConfig {
@@ -132,7 +172,7 @@ declare namespace angular.bootstrap.calendar {
}
interface IOnViewChangeClick {
(calendarDate: Date, calendarNextView: string): void;
(calendarDate: Date, calendarNextView: string): boolean;
}
}
}