mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-15 02:18:00 +00:00
(feat) Open events from day and week views
This commit is contained in:
@@ -9,24 +9,30 @@
|
||||
* @restrict element
|
||||
* @param {object} sgBlocks - the events blocks definitions for the current view
|
||||
* @param {string} sgDay - the day of the events to display
|
||||
* @ngInject
|
||||
* @param {function} sgClick - the function to call when clicking on a block.
|
||||
* Two variables are available: event (the event that triggered the mouse click),
|
||||
* and component (a Component object)
|
||||
*
|
||||
* @example:
|
||||
|
||||
<sg-calendar-day-table
|
||||
sg-blocks="calendar.blocks"
|
||||
sg-day="20150330" />
|
||||
sg-day="20150330"
|
||||
sg-click="open({ event: clickEvent, component: clickComponent })"/>
|
||||
*/
|
||||
function sgCalendarDayTable() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
blocks: '=sgBlocks',
|
||||
day: '@sgDay'
|
||||
day: '@sgDay',
|
||||
clickBlock: '&sgClick'
|
||||
},
|
||||
template: [
|
||||
'<sg-calendar-day-block class="event draggable"',
|
||||
' ng-repeat="block in blocks[day]"',
|
||||
' sg-block="block"/>'
|
||||
' sg-block="block"',
|
||||
' sg-click="clickBlock({event: clickEvent, component: clickComponent})"/>'
|
||||
].join('')
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user