mirror of
https://github.com/nasa/openmct.git
synced 2025-04-15 15:06:47 +00:00
Fixed linting issues
This commit is contained in:
parent
ffacf6e1ae
commit
d08cdfba49
@ -24,7 +24,6 @@
|
||||
define(
|
||||
['./TransactionalPersistenceCapability'],
|
||||
function (TransactionalPersistenceCapability) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Wraps the [PersistenceCapability]{@link PersistenceCapability} with
|
||||
|
@ -24,7 +24,6 @@
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Wraps persistence capability to enable transactions. Transactions
|
||||
|
@ -72,9 +72,9 @@ define(
|
||||
*/
|
||||
function isEditing(context) {
|
||||
var domainObject = (context || {}).domainObject;
|
||||
return domainObject
|
||||
&& domainObject.hasCapability('editor')
|
||||
&& domainObject.getCapability('editor').isEditContextRoot();
|
||||
return domainObject &&
|
||||
domainObject.hasCapability('editor') &&
|
||||
domainObject.getCapability('editor').isEditContextRoot();
|
||||
}
|
||||
|
||||
EditActionPolicy.prototype.allow = function (action, context) {
|
||||
|
@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,describe,it,expect,beforeEach,waitsFor,runs,jasmine,xit,xdescribe*/
|
||||
|
||||
define(
|
||||
[
|
||||
@ -27,7 +26,6 @@ define(
|
||||
"../../src/capabilities/TransactionCapabilityDecorator"
|
||||
],
|
||||
function (TransactionalPersistenceCapability, TransactionCapabilityDecorator) {
|
||||
"use strict";
|
||||
|
||||
describe("The transaction capability decorator", function () {
|
||||
var mockQ,
|
||||
@ -36,10 +34,7 @@ define(
|
||||
provider;
|
||||
|
||||
beforeEach(function() {
|
||||
//mockQ = jasmine.createSpyObj("$q", []);
|
||||
mockQ = {};
|
||||
//mockTransactionService =
|
||||
// jasmine.createSpyObj("transactionService", []);
|
||||
mockTransactionService = {};
|
||||
mockCapabilityService = jasmine.createSpyObj("capabilityService", ["getCapabilities"]);
|
||||
mockCapabilityService.getCapabilities.andReturn({
|
||||
|
@ -19,14 +19,13 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define,describe,it,expect,beforeEach,waitsFor,runs,jasmine,xit,xdescribe*/
|
||||
/*global define,describe,it,expect,beforeEach,jasmine*/
|
||||
|
||||
define(
|
||||
[
|
||||
"../../src/capabilities/TransactionalPersistenceCapability"
|
||||
],
|
||||
function (TransactionalPersistenceCapability) {
|
||||
"use strict";
|
||||
|
||||
function fastPromise(val) {
|
||||
return {
|
||||
|
@ -24,7 +24,6 @@
|
||||
define(
|
||||
["../../src/services/TransactionService"],
|
||||
function (TransactionService) {
|
||||
"use strict";
|
||||
|
||||
describe("The Transaction Service", function () {
|
||||
var mockQ,
|
||||
|
@ -60,16 +60,6 @@ define(
|
||||
this.$q = $q;
|
||||
}
|
||||
|
||||
// Utility function for creating promise-like objects which
|
||||
// resolve synchronously when possible
|
||||
function fastPromise(value) {
|
||||
return (value || {}).then ? value : {
|
||||
then: function (callback) {
|
||||
return fastPromise(callback(value));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function getKey(id) {
|
||||
var parts = id.split(":");
|
||||
return parts.length > 1 ? parts.slice(1).join(":") : id;
|
||||
@ -157,8 +147,7 @@ define(
|
||||
* when the update is complete
|
||||
*/
|
||||
PersistenceCapability.prototype.refresh = function () {
|
||||
var domainObject = this.domainObject,
|
||||
model = domainObject.getModel();
|
||||
var domainObject = this.domainObject;
|
||||
|
||||
// Update a domain object's model upon refresh
|
||||
function updateModel(model) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user