[TASK] Use strict

This commit is contained in:
Xaver Maierhofer 2016-05-27 23:59:01 +02:00
parent 04f141782f
commit ae62bbf8a0
36 changed files with 74 additions and 6 deletions

View File

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.loadTasks("tasks");
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "inline"]);

2
app.js
View File

@ -1,3 +1,5 @@
"use strict";
require.config({
baseUrl: "lib",
paths: {

View File

@ -18,7 +18,7 @@
"es6-shim": "~0.35.1",
"almond": "~0.3.2",
"d3": "~3.5.17",
"roboto-fontface": "~0.3.0",
"roboto-fontface": "~0.4.5",
"virtual-dom": "~2.1.1",
"leaflet-providers": "~1.1.10",
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"

View File

@ -1,4 +1,6 @@
define(function () {
"use strict";
return function () {
this.render = function (d) {
var el = document.createElement("div");

View File

@ -1,4 +1,6 @@
define([], function () {
"use strict";
return function (tag) {
if (!tag) {
tag = "div";

View File

@ -1,4 +1,6 @@
define(["filters/nodefilter"], function (NodeFilter) {
"use strict";
return function () {
var targets = [];
var filterObservers = [];

View File

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function (distributor) {
var container = document.createElement("ul");
container.classList.add("filters");

View File

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
return function (name, key, value, f) {
var negate = false;
var refresh;

View File

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function (filter) {
return function (data) {
var n = Object.create(data);

View File

@ -1,4 +1,6 @@
define(["d3", "helper"], function (d3, helper) {
"use strict";
var margin = 200;
var NODE_RADIUS = 15;
var LINE_RADIUS = 12;

View File

@ -5,6 +5,8 @@ define(["chroma-js", "map", "sidebar", "tabs", "container", "meshstats",
function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Legend, Linklist,
Nodelist, SimpleNodelist, Infobox, Proportions, ForceGraph,
Title, About, DataDistributor, FilterGUI) {
"use strict";
return function (config, router) {
var self = this;
var content;

View File

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
function showStatImg(o, source, target) {
var subst = {};
subst["{SOURCE}"] = source;

View File

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
return function (config, el, router, d) {
var sidebarTitle = document.createElement("h2");
sidebarTitle.textContent = "Location: " + d.toString();

View File

@ -1,4 +1,6 @@
define(["infobox/link", "infobox/node", "infobox/location"], function (Link, Node, Location) {
"use strict";
return function (config, sidebar, router) {
var self = this;
var el;

View File

@ -1,5 +1,7 @@
define(["moment", "tablesort", "helper", "moment.de"],
function (moment, Tablesort, helper) {
"use strict";
function showGeoURI(d) {
function showLatitude(d) {
var suffix = Math.sign(d) > -1 ? "'N" : "'S";

View File

@ -1,4 +1,6 @@
define(function () {
"use strict";
return function () {
var self = this;

View File

@ -1,4 +1,6 @@
define(["sorttable", "virtual-dom", "helper"], function (SortTable, V, helper) {
"use strict";
function linkName(d) {
return (d.source.node ? d.source.node.nodeinfo.hostname : d.source.id) + " " + d.target.node.nodeinfo.hostname;
}

View File

@ -1,4 +1,6 @@
define(["leaflet"], function (L) {
"use strict";
return L.CircleMarker.extend({
outerCircle: {
stroke: false,

View File

@ -1,5 +1,7 @@
define(["moment", "router", "leaflet", "gui", "helper", "moment.de"],
function (moment, Router, L, GUI, helper) {
"use strict";
return function (config) {
function handleData(data) {
var dataNodes = {};

View File

@ -2,6 +2,8 @@ define(["map/clientlayer", "map/labelslayer",
"leaflet", "moment", "locationmarker", "rbush", "helper",
"leaflet.label", "leaflet.providers", "moment.de"],
function (ClientLayer, LabelsLayer, L, moment, LocationMarker, rbush, helper) {
"use strict";
var options = {
worldCopyJump: true,
zoomControl: false

View File

@ -1,5 +1,6 @@
define(["leaflet"],
function (L) {
"use strict";
return L.TileLayer.Canvas.extend({
setData: function (d) {

View File

@ -1,5 +1,7 @@
define(["leaflet", "rbush"],
function (L, rbush) {
"use strict";
var labelLocations = [["left", "middle", 0 / 8],
["center", "top", 6 / 8],
["right", "middle", 4 / 8],

View File

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
return function (config) {
var self = this;
var stats, timestamp;

View File

@ -1,4 +1,6 @@
define(["sorttable", "virtual-dom", "helper"], function (SortTable, V, helper) {
"use strict";
function getUptime(now, d) {
if (d.flags.online && "uptime" in d.statistics) {
return Math.round(d.statistics.uptime);

View File

@ -1,5 +1,6 @@
define(["chroma-js", "virtual-dom", "filters/genericnode", "helper"],
function (Chroma, V, Filter, helper) {
"use strict";
return function (config, filterManager) {
var self = this;

View File

@ -1,4 +1,6 @@
define(["helper"], function (helper) {
"use strict";
return function () {
var self = this;
var objects = {nodes: {}, links: {}};

View File

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function (el) {
var self = this;

View File

@ -1,4 +1,6 @@
define(["moment", "virtual-dom", "helper", "moment.de"], function (moment, V, helper) {
"use strict";
return function (nodes, field, router, title) {
var self = this;
var el, tbody;

View File

@ -1,4 +1,6 @@
define(["virtual-dom"], function (V) {
"use strict";
return function (headings, sortIndex, renderRow) {
var data;
var sortReverse = false;

View File

@ -1,4 +1,6 @@
define([], function () {
define(function () {
"use strict";
return function () {
var self = this;

View File

@ -1,4 +1,6 @@
define(function () {
"use strict";
return function (config) {
function setTitle(d) {
var title = [config.siteName];

View File

@ -1,3 +1,5 @@
"use strict";
define({
get: function (url) {
return new Promise(function (resolve, reject) {
@ -77,7 +79,7 @@ define({
},
listReplace: function (s, subst) {
for (key in subst) {
for (var key in subst) {
var re = new RegExp(key, "g");
s = s.replace(re, subst[key]);
}

View File

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
bowerdir: "bower_components",
copy: {

View File

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
clean: {
build: ["build/**/*", "node_modules/grunt-newer/.cache"]

View File

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
connect: {
server: {

View File

@ -1,4 +1,6 @@
module.exports = function (grunt) {
"use strict";
grunt.config.merge({
checkDependencies: {
options: {