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) { action.getActions = function(domainObject) {
return actionCapability.getActions(domainObject).filter(function(action){ 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; model.type = typeKey;
newPanel = new EditableDomainObject(instantiate(model, id), $q); newPanel = new EditableDomainObject(instantiate(model, id), $q);
if (!canCompose(newPanel, selectedObject)) if (!canCompose(newPanel, selectedObject)) {
return undefined; return undefined;
}
[base.getId(), selectedObject.getId()].forEach(function(id){ [base.getId(), selectedObject.getId()].forEach(function(id){
newPanel.getCapability('composition').add(id); newPanel.getCapability('composition').add(id);
@@ -151,19 +152,15 @@ define(
domainObjectType = editableDomainObject.getModel().type, domainObjectType = editableDomainObject.getModel().type,
selectedObject = dndService.getData( selectedObject = dndService.getData(
GestureConstants.MCT_EXTENDED_DRAG_TYPE 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 // Handle the drop; add the dropped identifier to the
// destination domain object's composition, and persist // destination domain object's composition, and persist
// the change. // the change.
if (id) { if (id) {
if (shouldCreateVirtualPanel(domainObject, selectedObject)){ if (shouldCreateVirtualPanel(domainObject, selectedObject)){
if (editableDomainObject = createVirtualPanel(domainObject, selectedObject)) { editableDomainObject = createVirtualPanel(domainObject, selectedObject);
if (editableDomainObject) {
navigationService.setNavigation(editableDomainObject); navigationService.setNavigation(editableDomainObject);
broadcastDrop(id, event); broadcastDrop(id, event);
editableDomainObject.getCapability('status').set('editing', true); editableDomainObject.getCapability('status').set('editing', true);
@@ -179,7 +176,6 @@ define(
}); });
} }
} }
//}
// TODO: Alert user if drag and drop is not allowed // TODO: Alert user if drag and drop is not allowed
} }