This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18599 from gaye/calendar-visual-refresh
Bug 951069 - Month view visual refresh r=millermedeiros
- Loading branch information
Showing
16 changed files
with
837 additions
and
934 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
(function(window) { | ||
'use strict'; | ||
|
||
var MonthsDay = Calendar.Template.create({ | ||
event: function() { | ||
var calendarId = this.h('calendarId'); | ||
|
||
var sectionClassList = [ | ||
'event', | ||
'calendar-id-' + calendarId, | ||
'calendar-display', | ||
this.h('classes') | ||
].join(' '); | ||
|
||
var containerClassList = [ | ||
'container', | ||
'calendar-id-' + calendarId, | ||
'calendar-color' | ||
].join(' '); | ||
|
||
this.eventTime = function() { | ||
return this.h('isAllDay') ? | ||
'<div class="all-day">All Day</div>' : | ||
('<div class="start-time">' + this.h('startTime') + '</div>' + | ||
'<div class="end-time">' + this.h('endTime') + '</div>'); | ||
}; | ||
|
||
this.eventDetails = function() { | ||
var result = '<h5>' + this.h('title') + '</h5>'; | ||
var location = this.h('location'); | ||
if (location && location.length > 0) { | ||
result += '<span class="details">'; | ||
result += '<span class="location">'; | ||
result += location; | ||
result += '</span>'; | ||
result += '</span>'; | ||
} | ||
|
||
return result; | ||
}; | ||
|
||
return '<section class="' + sectionClassList + '" ' + | ||
'data-id="' + this.h('busytimeId') + '">' + | ||
'<div class="' + containerClassList + '">' + | ||
'<div class="icon-dot"></div>' + | ||
'<div class="event-time">' + this.eventTime() + '</div>' + | ||
'<div class="event-details">' + this.eventDetails() + '</div>' + | ||
'<div class="icon-alarm"></div>' + | ||
'</div>' + | ||
'</section>'; | ||
} | ||
}); | ||
|
||
MonthsDay.eventSelector = '.event'; | ||
MonthsDay.hourEventsSelector = '.events'; | ||
|
||
Calendar.ns('Templates').MonthsDay = MonthsDay; | ||
}(this)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.