Fixed JSLint errors

This commit is contained in:
Henry
2015-12-09 18:39:57 -08:00
parent 39b3e6c4a9
commit a399b78d2c
2 changed files with 24 additions and 28 deletions

View File

@@ -48,7 +48,7 @@ define(
action.getActions = function(domainObject) {
return actionCapability.getActions(domainObject).filter(function(action){
return !(DISALLOWED_ACTIONS.indexOf(action.getMetadata().key) >= 0);
return DISALLOWED_ACTIONS.indexOf(action.getMetadata().key) >= 0 ? false : true;
});
};

View File

@@ -128,8 +128,9 @@ define(
model.type = typeKey;
newPanel = new EditableDomainObject(instantiate(model, id), $q);
if (!canCompose(newPanel, selectedObject))
if (!canCompose(newPanel, selectedObject)) {
return undefined;
}
[base.getId(), selectedObject.getId()].forEach(function(id){
newPanel.getCapability('composition').add(id);
@@ -151,19 +152,15 @@ define(
domainObjectType = editableDomainObject.getModel().type,
selectedObject = dndService.getData(
GestureConstants.MCT_EXTENDED_DRAG_TYPE
);;
// If currently in edit mode allow drag and drop gestures to the
// domain object. An exception to this is folders which have drop
// gestures in browse mode.
//if (domainObjectType === 'folder' || domainObject.hasCapability('editor')) {
);
// Handle the drop; add the dropped identifier to the
// destination domain object's composition, and persist
// the change.
if (id) {
if (shouldCreateVirtualPanel(domainObject, selectedObject)){
if (editableDomainObject = createVirtualPanel(domainObject, selectedObject)) {
editableDomainObject = createVirtualPanel(domainObject, selectedObject);
if (editableDomainObject) {
navigationService.setNavigation(editableDomainObject);
broadcastDrop(id, event);
editableDomainObject.getCapability('status').set('editing', true);
@@ -179,7 +176,6 @@ define(
});
}
}
//}
// TODO: Alert user if drag and drop is not allowed
}