[New Edit Mode] #636 Removed edit concerns from DropGesture

This commit is contained in:
Henry
2016-05-13 13:45:14 -07:00
parent a11dba88b2
commit 54a0de4a08
4 changed files with 24 additions and 22 deletions

View File

@ -31,12 +31,12 @@ define(
* @memberof platform/commonUI/edit
* @implements {Action}
*/
function LinkAction(context) {
function EditAndComposeAction(context) {
this.domainObject = (context || {}).domainObject;
this.selectedObject = (context || {}).selectedObject;
}
LinkAction.prototype.perform = function () {
EditAndComposeAction.prototype.perform = function () {
var self = this;
// Persist changes to the domain object
@ -54,9 +54,13 @@ define(
.then(doPersist);
}
if (this.domainObject.getCapability('type').getKey() !== 'folder') {
this.domainObject.getCapability('action').perform('edit');
}
return this.selectedObject && doLink();
};
return LinkAction;
return EditAndComposeAction;
}
);