parent
62f64314c0
commit
001d76fd05
|
@ -49,7 +49,7 @@
|
|||
</md-menu-content>
|
||||
</md-menu>
|
||||
</md-menu-item>
|
||||
<md-menu-item ng-hide="::editor.component.isReadOnly">
|
||||
<md-menu-item ng-show="editor.component.isMovable()">
|
||||
<md-menu>
|
||||
<md-button label:aria-label="Move To" ng-click="$mdMenu.open($event)">
|
||||
<var:string label:value="Move To"/>
|
||||
|
|
|
@ -694,13 +694,25 @@
|
|||
/**
|
||||
* @function isInvitationOccurrence
|
||||
* @memberof Component.prototype
|
||||
* @desc Check if the component an invitation and an occurrence of a recurrent component
|
||||
* @desc Check if the component is an invitation and an occurrence of a recurrent component
|
||||
* @returns true or false
|
||||
*/
|
||||
Component.prototype.isInvitationOccurrence = function() {
|
||||
return (this.occurrenceId && this.userHasRSVP);
|
||||
};
|
||||
|
||||
/**
|
||||
* @function isMovable
|
||||
* @memberof Component.prototype
|
||||
* @desc Return true if the component can be moved to a different calendar which occurs in two cases:
|
||||
* - the component is editable, ie is owned by the current user;
|
||||
* - the component is an invitation and the current user is an attendee.
|
||||
* @returns true or false
|
||||
*/
|
||||
Component.prototype.isMovable = function() {
|
||||
return (!this.isReadOnly || this.userHasRSVP);
|
||||
};
|
||||
|
||||
/**
|
||||
* @function showPercentComplete
|
||||
* @memberof Component.prototype
|
||||
|
|
Loading…
Reference in New Issue