Fixed linting issues

This commit is contained in:
Henry 2016-05-12 16:50:19 -07:00
parent ffacf6e1ae
commit d08cdfba49
7 changed files with 5 additions and 25 deletions

View File

@ -24,7 +24,6 @@
define(
['./TransactionalPersistenceCapability'],
function (TransactionalPersistenceCapability) {
'use strict';
/**
* Wraps the [PersistenceCapability]{@link PersistenceCapability} with

View File

@ -24,7 +24,6 @@
define(
[],
function () {
'use strict';
/**
* Wraps persistence capability to enable transactions. Transactions

View File

@ -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) {

View File

@ -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({

View File

@ -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 {

View File

@ -24,7 +24,6 @@
define(
["../../src/services/TransactionService"],
function (TransactionService) {
"use strict";
describe("The Transaction Service", function () {
var mockQ,

View File

@ -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) {