Commit 8b5d0953 authored by Boris Kocherov's avatar Boris Kocherov

[erp5_only_office] jslint fix

parent 38410e04
/*jslint nomen: true, maxlen: 200, indent: 2*/ /*jslint nomen: true, maxlen: 200, indent: 2*/
/*global rJS, console, window, document, RSVP*/ /*global rJS, console, window, document, RSVP, URL*/
(function (window, rJS) { (function (window, rJS) {
"use strict"; "use strict";
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
if (!dimensions.hasOwnProperty(uname) && if (!dimensions.hasOwnProperty(uname) &&
used_hierarchies.indexOf(row.HIERARCHY_UNIQUE_NAME) < 0 && used_hierarchies.indexOf(row.HIERARCHY_UNIQUE_NAME) < 0 &&
row.DIMENSION_TYPE !== 2 // !measure row.DIMENSION_TYPE !== 2 // !measure
) { ) {
dimensions[uname] = true; dimensions[uname] = true;
} }
} }
} }
for (i in dimensions) { for (i in dimensions) {
if (dimensions.hasOwnProperty(i)) { if (dimensions.hasOwnProperty(i)) {
tasks.push(g.getDimension(connection_name, i)) tasks.push(g.getDimension(connection_name, i));
} }
} }
return RSVP.all(tasks); return RSVP.all(tasks);
...@@ -118,13 +118,12 @@ ...@@ -118,13 +118,12 @@
row; row;
for (i = 0; i < response.length; i += 1) { for (i = 0; i < response.length; i += 1) {
row = response[i]; row = response[i];
if ( if (row.LEVEL_CARDINALITY < 600 &&
row["LEVEL_CARDINALITY"] < 600 && row.LEVEL_TYPE !== 1 // exclude all level type
row["LEVEL_TYPE"] !== 1 // exclude all level type ) {
) {
arr.push({ arr.push({
const: row["LEVEL_UNIQUE_NAME"] || undefined, const: row.LEVEL_UNIQUE_NAME || undefined,
title: row["LEVEL_NAME"] || undefined title: row.LEVEL_NAME || undefined
}); });
} }
} }
...@@ -391,13 +390,13 @@ ...@@ -391,13 +390,13 @@
g.getContent(path) g.getContent(path)
]); ]);
}) })
.push(function (arr) { .push(function (ret_arr) {
var choice_settings; var choice_settings;
if (path !== "/columns/" && path !== "/rows/") { if (path !== "/columns/" && path !== "/rows/") {
choice_settings = arr[2]; choice_settings = ret_arr[2];
} }
return generateChoiceSchema(g, arr[0], arr[1], choice_settings); return generateChoiceSchema(g, ret_arr[0], ret_arr[1], choice_settings);
}); });
} }
throw new Error("urn: '" + url + "' not supported"); throw new Error("urn: '" + url + "' not supported");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment