Merge "Fixed jshint gating errors"
This commit is contained in:
commit
b2996b25c7
@ -419,7 +419,7 @@ horizon.d3_line_chart = {
|
|||||||
*/
|
*/
|
||||||
self.render = function(){
|
self.render = function(){
|
||||||
var self = this;
|
var self = this;
|
||||||
var last_point = undefined, last_point_color = undefined;
|
var last_point, last_point_color;
|
||||||
|
|
||||||
$.map(self.series, function (serie) {
|
$.map(self.series, function (serie) {
|
||||||
serie.color = last_point_color = self.color(serie.name);
|
serie.color = last_point_color = self.color(serie.name);
|
||||||
|
@ -141,9 +141,10 @@ horizon.d3_pie_chart_distribution = {
|
|||||||
self.keys = [];
|
self.keys = [];
|
||||||
for (var j = 0; j < parts.length; j++) {
|
for (var j = 0; j < parts.length; j++) {
|
||||||
var key_value = parts[j].split("=");
|
var key_value = parts[j].split("=");
|
||||||
var d = {};
|
var d = {
|
||||||
d["key"] = key_value[0];
|
key: key_value[0],
|
||||||
d["value"] = key_value[1];
|
value: key_value[1]
|
||||||
|
};
|
||||||
self.data.push(d);
|
self.data.push(d);
|
||||||
self.keys.push(key_value[0]);
|
self.keys.push(key_value[0]);
|
||||||
}
|
}
|
||||||
@ -159,7 +160,7 @@ horizon.d3_pie_chart_distribution = {
|
|||||||
|
|
||||||
var total = 0;
|
var total = 0;
|
||||||
for (var j = 0; j < self.data.length; j++) {
|
for (var j = 0; j < self.data.length; j++) {
|
||||||
total = total + parseInt(self.data[j]["value"]);
|
total = total + parseInt(self.data[j].value);
|
||||||
}
|
}
|
||||||
|
|
||||||
var initial_data = [];
|
var initial_data = [];
|
||||||
@ -233,8 +234,8 @@ horizon.d3_pie_chart_distribution = {
|
|||||||
}
|
}
|
||||||
var value = 0;
|
var value = 0;
|
||||||
for (var j = 0; j < self.data.length; j++) {
|
for (var j = 0; j < self.data.length; j++) {
|
||||||
if (self.data[j]["key"] == d) {
|
if (self.data[j].key == d) {
|
||||||
value = self.data[j]["value"];
|
value = self.data[j].value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ horizon.forms = {
|
|||||||
var $option = $(this).find("option:selected");
|
var $option = $(this).find("option:selected");
|
||||||
var $form = $(this).closest('form');
|
var $form = $(this).closest('form');
|
||||||
var $volName = $form.find('input#id_name');
|
var $volName = $form.find('input#id_name');
|
||||||
if ($volName.val() == "") {
|
if ($volName.val() === "") {
|
||||||
$volName.val($option.data("name"));
|
$volName.val($option.data("name"));
|
||||||
}
|
}
|
||||||
var $volSize = $form.find('input#id_size');
|
var $volSize = $form.find('input#id_size');
|
||||||
@ -22,7 +22,7 @@ horizon.forms = {
|
|||||||
var $option = $(this).find("option:selected");
|
var $option = $(this).find("option:selected");
|
||||||
var $form = $(this).closest('form');
|
var $form = $(this).closest('form');
|
||||||
var $volName = $form.find('input#id_name');
|
var $volName = $form.find('input#id_name');
|
||||||
if ($volName.val() == "") {
|
if ($volName.val() === "") {
|
||||||
$volName.val($option.data("name"));
|
$volName.val($option.data("name"));
|
||||||
}
|
}
|
||||||
var $volSize = $form.find('input#id_size');
|
var $volSize = $form.find('input#id_size');
|
||||||
@ -39,7 +39,7 @@ horizon.forms = {
|
|||||||
var $option = $(this).find("option:selected");
|
var $option = $(this).find("option:selected");
|
||||||
var $form = $(this).closest('form');
|
var $form = $(this).closest('form');
|
||||||
var $volName = $form.find('input#id_name');
|
var $volName = $form.find('input#id_name');
|
||||||
if ($volName.val() == "") {
|
if ($volName.val() === "") {
|
||||||
$volName.val($option.data("name"));
|
$volName.val($option.data("name"));
|
||||||
}
|
}
|
||||||
var $volSize = $form.find('input#id_size');
|
var $volSize = $form.find('input#id_size');
|
||||||
@ -64,7 +64,7 @@ horizon.forms = {
|
|||||||
*/
|
*/
|
||||||
handle_object_upload_source: function() {
|
handle_object_upload_source: function() {
|
||||||
$("div.table_wrapper, #modal_wrapper").on("change", "input#id_object_file", function(evt) {
|
$("div.table_wrapper, #modal_wrapper").on("change", "input#id_object_file", function(evt) {
|
||||||
if (typeof($(this).attr("filename")) == 'undefined') {
|
if (typeof($(this).attr("filename")) === 'undefined') {
|
||||||
$(this).attr("filename", "");
|
$(this).attr("filename", "");
|
||||||
}
|
}
|
||||||
var $form = $(this).closest("form");
|
var $form = $(this).closest("form");
|
||||||
@ -77,7 +77,7 @@ horizon.forms = {
|
|||||||
$filename = $filename.substring(1);
|
$filename = $filename.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof($obj_name.val()) == 'undefined' || $(this).attr("filename").localeCompare($obj_name.val()) == 0) {
|
if (typeof($obj_name.val()) === 'undefined' || $(this).attr("filename").localeCompare($obj_name.val()) === 0) {
|
||||||
$obj_name.val($filename);
|
$obj_name.val($filename);
|
||||||
$(this).attr("filename", $filename);
|
$(this).attr("filename", $filename);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user