mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-30 07:35:39 +00:00
(js) Make events clickable in month view
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
},
|
||||
replace: true,
|
||||
template: [
|
||||
'<div class="event draggable">',
|
||||
'<div class="sg-event sg-draggable">',
|
||||
' <div class="eventInside" ng-click="clickBlock({clickEvent: $event, clickComponent: block.component})">',
|
||||
' <div class="gradient">',
|
||||
' </div>',
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
clickBlock: '&sgClick'
|
||||
},
|
||||
template: [
|
||||
'<sg-calendar-day-block class="event draggable"',
|
||||
' ng-repeat="block in blocks[day]"',
|
||||
' sg-block="block"',
|
||||
' sg-click="clickBlock({event: clickEvent, component: clickComponent})"/>'
|
||||
'<sg-calendar-day-block class="sg-event draggable"',
|
||||
' ng-repeat="block in blocks[day]"',
|
||||
' sg-block="block"',
|
||||
' sg-click="clickBlock({event: clickEvent, component: clickComponent})"/>'
|
||||
].join('')
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,20 +14,22 @@
|
||||
|
||||
<sg-calendar-monh-day
|
||||
sg-blocks="calendar.blocks"
|
||||
sg-day="20150408" />
|
||||
sg-day="20150408"
|
||||
sg-click="open({ event: clickEvent, component: clickComponent })"/>
|
||||
*/
|
||||
function sgCalendarMonthDay() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
blocks: '=sgBlocks',
|
||||
day: '@sgDay'
|
||||
day: '@sgDay',
|
||||
clickBlock: '&sgClick'
|
||||
},
|
||||
replace: true,
|
||||
template: [
|
||||
'<sg-calendar-month-event',
|
||||
' ng-repeat="block in blocks[day]"',
|
||||
' sg-block="block"/>'
|
||||
' sg-block="block"',
|
||||
' sg-click="clickBlock({event: clickEvent, component: clickComponent})"/>'
|
||||
].join('')
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,21 +19,21 @@
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
block: '=sgBlock'
|
||||
block: '=sgBlock',
|
||||
clickBlock: '&sgClick'
|
||||
},
|
||||
replace: true,
|
||||
template: [
|
||||
'<div class="sg-event">',
|
||||
' <span ng-if="!block.component.c_isallday">{{ block.starthour }} - </span>',
|
||||
' {{ block.component.c_title }}',
|
||||
' <span class="icons">',
|
||||
' <i ng-if="block.component.c_nextalarm" class="md-icon-alarm"></i>',
|
||||
' <i ng-if="block.component.c_classification == 1" class="md-icon-visibility-off"></i>',
|
||||
' <i ng-if="block.component.c_classification == 2" class="md-icon-vpn-key"></i>',
|
||||
' </span>',
|
||||
'<div class="sg-event sg-draggable" ng-click="clickBlock({clickEvent: $event, clickComponent: block.component})">',
|
||||
' <span ng-if="!block.component.c_isallday">{{ block.starthour }} - </span>',
|
||||
' {{ block.component.c_title }}',
|
||||
' <span class="icons">',
|
||||
' <i ng-if="block.component.c_nextalarm" class="md-icon-alarm"></i>',
|
||||
' <i ng-if="block.component.c_classification == 1" class="md-icon-visibility-off"></i>',
|
||||
' <i ng-if="block.component.c_classification == 2" class="md-icon-vpn-key"></i>',
|
||||
' </span>',
|
||||
' <div class="leftDragGrip"></div>',
|
||||
' <div class="rightDragGrip"></div>',
|
||||
' </div>',
|
||||
'</div>'
|
||||
].join(''),
|
||||
link: link
|
||||
|
||||
Reference in New Issue
Block a user