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