Skip to content

Commit e8bf5f2

Browse files
author
Zsolt Lattmann
committed
More style fixes.
1 parent ed562a7 commit e8bf5f2

File tree

17 files changed

+56
-51
lines changed

17 files changed

+56
-51
lines changed

src/client/js/Widgets/DiagramDesigner/SelectionManager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ define([
753753

754754
this._rotateAngle = deg;
755755

756-
this._rotationDegree.html((deg >= 0 ? '+' : '') + deg + '°');
756+
this._rotationDegree.html((deg >= 0 ? '+' : '') + deg + '°');
757757

758758
this._diagramDesigner.skinParts.$selectionOutline.css({
759759
'transform-origin': '50% 50%',

src/client/js/Widgets/GraphViz/GraphVizWidget.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ define([
115115
d.status = d.status || getOpenStatus(d);
116116
});
117117

118-
// Update the nodes
118+
// Update the nodes ...
119119
var node = this._svg.selectAll('g.node')
120120
.data(nodes, function (d) {
121121
return d.id || (d.id = ++i);
@@ -213,7 +213,7 @@ define([
213213
nodeExit.select('text')
214214
.style('fill-opacity', 1e-6);
215215

216-
// Update the links
216+
// Update the links ...
217217
var link = this._svg.selectAll('path.link')
218218
.data(links, function (d) {
219219
return d.target.id;

src/common/blob/BlobClient.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ define(['blob/Artifact', 'blob/BlobMetadata', 'superagent'], function (Artifact,
114114
req.set('webgmeclientsession', this.webgmeclientsession);
115115
}
116116
if (typeof data !== 'string' && !(data instanceof String)) {
117-
req.set('Content-Length', contentLength)
117+
req.set('Content-Length', contentLength);
118118
}
119119
req.set('Content-Type', 'application/octet-stream')
120120
.send(data)

src/common/core/coretree.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -444,11 +444,13 @@ define([
444444
};
445445

446446
var __isEmptyData = function (data) {
447-
// TODO: better way to check if object has keys?
448-
for (var keys in data) {
447+
if (typeof data === 'string') {
448+
return false;
449+
} else if (typeof data === 'object' && Object.keys(data).length === 0) {
450+
return true;
451+
} else {
449452
return false;
450453
}
451-
return true;
452454
};
453455

454456
var __areEquivalent = function (data1, data2) {

src/plugin/climanager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*globals requireJS*/
1+
/*globals*/
22
/*jshint node:true*/
33
/**
44
* @author pmeijer / https://github.com/pmeijer

src/plugin/coreplugins/MetaGMEParadigmImporter/MetaGMEParadigmImporter.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ define([
287287
i,
288288
j,
289289
type,
290-
types = ['atom', 'folder', 'model', 'set', 'connection', 'reference'],
291-
error;
290+
types = ['atom', 'folder', 'model', 'set', 'connection', 'reference'];
292291

293292
self.logger.debug('Creating nodes ...');
294293

src/server/middleware/ExampleRestRouter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function getUserId(req) {
1313
}
1414

1515
function initialize(middlewareOpts) {
16-
var gmeConfig = middlewareOpts.gmeConfig,
17-
logger = middlewareOpts.logger.fork('ExampleRestRouter'),
16+
var logger = middlewareOpts.logger.fork('ExampleRestRouter'),
17+
//gmeConfig = middlewareOpts.gmeConfig,
1818
ensureAuthenticated = middlewareOpts.ensureAuthenticated;
1919

2020
logger.debug('initializing ...');

src/server/middleware/blob/BlobError.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
/* globals module */
1+
/*jshint node:true*/
22

3+
'use strict';
34

45
module.exports = function BlobError(message, statusCode) {
56
Error.captureStackTrace(this, this.constructor);

src/server/middleware/executor/ExecutorServer.js

-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ function executorRESTWorkerAPI(req, res, next) {
156156
}
157157

158158
var url = require('url').parse(req.url);
159-
var pathParts = url.pathname.split('/');
160159

161160
var serverResponse = new WorkerInfo.ServerResponse({refreshPeriod: workerRefreshInterval});
162161
serverResponse.labelJobs = labelJobs;

src/server/middleware/executor/worker/rjs_build_node_worker.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
util: 'empty:',
1313
events: 'empty:',
1414
path: 'empty:',
15-
child_process: 'empty:',
15+
child_process: 'empty:', // jshint ignore:line
1616
minimatch: 'empty:',
1717
rimraf: 'empty:',
1818
url: 'empty:'
@@ -21,6 +21,6 @@
2121
include: ['./node_modules/requirejs/require'],
2222
wrap: {
2323
end: 'module.exports.require = require;\n' +
24-
'module.exports.requirejs = requirejs;\nmodule.exports.define = define;\n'
24+
'module.exports.requirejs = requirejs;\nmodule.exports.define = define;\n'
2525
}
26-
})
26+
});

src/server/standalone.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,8 @@ function StandAloneServer(gmeConfig) {
501501
__sessionStore,
502502
__workerManager,
503503
__users = {},
504-
__googleAuthenticationSet = false,
505-
__canCheckToken = true,
504+
//__googleAuthenticationSet = false,
505+
//__canCheckToken = true,
506506
__httpServer = null,
507507
__logoutUrl = gmeConfig.authentication.logOutUrl || '/',
508508
__baseDir = requireJS.s.contexts._.config.baseUrl,// TODO: this is ugly

src/server/util/ensureDir.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
* @author https://github.com/samxxu/ensureDir
77
*/
88

9+
'use strict';
10+
911
var path = require('path'),
1012
fs = require('fs');
1113

1214
function _ensureDir(dir, mode, callback) {
13-
'use strict';
1415
var existsFunction = fs.exists || path.exists;
1516

1617
existsFunction(dir, function (exists) {
@@ -53,13 +54,14 @@ function _ensureDir(dir, mode, callback) {
5354
*/
5455

5556
function ensureDir(dir, mode, callback) {
56-
//jshint bitwise: false
5757
if (mode && typeof mode === 'function') {
5858
callback = mode;
5959
mode = null;
6060
}
6161

62-
mode = mode || 0777 & (~process.umask());
62+
//jshint bitwise: false
63+
mode = mode || parseInt('0777', 8) & (~process.umask());
64+
//jshint bitwise: true
6365

6466
callback = callback || function () {
6567
};

src/server/worker/serverworkermanager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*globals requireJS*/
1+
/*globals*/
22
/*jshint node: true*/
33
/**
44
* @module Server:ServerWorkerManager

test-main.js

+26-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*globals require*/
1+
/*globals require, console*/
22
/*jshint browser: true*/
33

44
function done() {
@@ -12,7 +12,6 @@ function done() {
1212
};
1313

1414
Object.keys(window.__karma__.files).forEach(function (file) {
15-
'use strict';
1615
if (TEST_REGEXP.test(file)) {
1716
// Normalize paths to RequireJS module names.
1817
allTestFiles.push(pathToModule(file));
@@ -82,34 +81,36 @@ function done() {
8281
});
8382
}
8483

85-
function httpGet(theUrl, callback) {
86-
var xhr = new XMLHttpRequest();
87-
console.log(theUrl);
88-
xhr.open('GET', theUrl, true);
89-
xhr.onreadystatechange = function () {
90-
console.log('ready state changed');
91-
if (xhr.readyState === 4) {
92-
if (xhr.status === 200) {
93-
console.log(xhr.responseText);
94-
callback(xhr.status);
95-
} else {
96-
console.error(xhr.statusText);
97-
callback(xhr.status);
98-
}
99-
}
100-
};
101-
xhr.onerror = function (e) {
102-
console.error(xhr.statusText);
103-
callback(xhr.status);
104-
};
105-
xhr.send(null);
106-
return xhr;
107-
}
84+
//function httpGet(theUrl, callback) {
85+
// 'use strict';
86+
// var xhr = new XMLHttpRequest();
87+
// console.log(theUrl);
88+
// xhr.open('GET', theUrl, true);
89+
// xhr.onreadystatechange = function () {
90+
// console.log('ready state changed');
91+
// if (xhr.readyState === 4) {
92+
// if (xhr.status === 200) {
93+
// console.log(xhr.responseText);
94+
// callback(xhr.status);
95+
// } else {
96+
// console.error(xhr.statusText);
97+
// callback(xhr.status);
98+
// }
99+
// }
100+
// };
101+
// xhr.onerror = function (/*e*/) {
102+
// console.error(xhr.statusText);
103+
// callback(xhr.status);
104+
// };
105+
// xhr.send(null);
106+
// return xhr;
107+
//}
108108

109109

110110
// FIXME: we should try to load gmeConfig with HTTPXmlRequest, to see if the server is up and running
111111
// wait for 5 seconds for server start up
112112
setTimeout(function () {
113+
'use strict';
113114
done();
114115
}, 5000);
115116

teststorage/teststorage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*globals define, alert*/
1+
/*globals define*/
22
/*jshint browser: true*/
33
/**
44
* @author pmeijer / https://github.com/pmeijer

utils/build/empty/empty.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*globals define*/
12
define([], function () {
2-
return;
3+
'use strict';
34
});

utils/build/webgme.classes/cbuild.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
startFile: 'start.frag',
2323
endFile: 'end.frag'
2424
}
25-
})
25+
});

0 commit comments

Comments
 (0)