Fixed jshint gating errors
Change-Id: If065b47bc42312918cb65b1f677f6bdfcfb4f709 Closes-Bug: #1359395
This commit is contained in:
parent
9047fa5132
commit
308af741db
@ -419,7 +419,7 @@ horizon.d3_line_chart = {
|
||||
*/
|
||||
self.render = function(){
|
||||
var self = this;
|
||||
var last_point = undefined, last_point_color = undefined;
|
||||
var last_point, last_point_color;
|
||||
|
||||
$.map(self.series, function (serie) {
|
||||
serie.color = last_point_color = self.color(serie.name);
|
||||
|
@ -141,9 +141,10 @@ horizon.d3_pie_chart_distribution = {
|
||||
self.keys = [];
|
||||
for (var j = 0; j < parts.length; j++) {
|
||||
var key_value = parts[j].split("=");
|
||||
var d = {};
|
||||
d["key"] = key_value[0];
|
||||
d["value"] = key_value[1];
|
||||
var d = {
|
||||
key: key_value[0],
|
||||
value: key_value[1]
|
||||
};
|
||||
self.data.push(d);
|
||||
self.keys.push(key_value[0]);
|
||||
}
|
||||
@ -159,7 +160,7 @@ horizon.d3_pie_chart_distribution = {
|
||||
|
||||
var total = 0;
|
||||
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 = [];
|
||||
@ -233,8 +234,8 @@ horizon.d3_pie_chart_distribution = {
|
||||
}
|
||||
var value = 0;
|
||||
for (var j = 0; j < self.data.length; j++) {
|
||||
if (self.data[j]["key"] == d) {
|
||||
value = self.data[j]["value"];
|
||||
if (self.data[j].key == d) {
|
||||
value = self.data[j].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ horizon.forms = {
|
||||
var $option = $(this).find("option:selected");
|
||||
var $form = $(this).closest('form');
|
||||
var $volName = $form.find('input#id_name');
|
||||
if ($volName.val() == "") {
|
||||
if ($volName.val() === "") {
|
||||
$volName.val($option.data("name"));
|
||||
}
|
||||
var $volSize = $form.find('input#id_size');
|
||||
@ -22,7 +22,7 @@ horizon.forms = {
|
||||
var $option = $(this).find("option:selected");
|
||||
var $form = $(this).closest('form');
|
||||
var $volName = $form.find('input#id_name');
|
||||
if ($volName.val() == "") {
|
||||
if ($volName.val() === "") {
|
||||
$volName.val($option.data("name"));
|
||||
}
|
||||
var $volSize = $form.find('input#id_size');
|
||||
@ -39,7 +39,7 @@ horizon.forms = {
|
||||
var $option = $(this).find("option:selected");
|
||||
var $form = $(this).closest('form');
|
||||
var $volName = $form.find('input#id_name');
|
||||
if ($volName.val() == "") {
|
||||
if ($volName.val() === "") {
|
||||
$volName.val($option.data("name"));
|
||||
}
|
||||
var $volSize = $form.find('input#id_size');
|
||||
@ -64,7 +64,7 @@ horizon.forms = {
|
||||
*/
|
||||
handle_object_upload_source: function() {
|
||||
$("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", "");
|
||||
}
|
||||
var $form = $(this).closest("form");
|
||||
@ -77,7 +77,7 @@ horizon.forms = {
|
||||
$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);
|
||||
$(this).attr("filename", $filename);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user