From c77b35d9f21f09a780c1e5a16635d47b7c7f6843 Mon Sep 17 00:00:00 2001 From: John Glover Date: Mon, 15 Apr 2013 17:36:09 +0200 Subject: [PATCH] [#340] jshint cleanup of view.grid.js --- src/view.grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view.grid.js b/src/view.grid.js index c13a8c21..2a6a2b55 100644 --- a/src/view.grid.js +++ b/src/view.grid.js @@ -103,12 +103,12 @@ my.Grid = Backbone.View.extend({ var numFields = this.fields.length; // compute field widths (-20 for first menu col + 10px for padding on each col and finally 16px for the scrollbar) var fullWidth = self.el.width() - 20 - 10 * numFields - this.scrollbarDimensions.width; - var width = parseInt(Math.max(50, fullWidth / numFields)); + var width = parseInt(Math.max(50, fullWidth / numFields), 10); // if columns extend outside viewport then remainder is 0 var remainder = Math.max(fullWidth - numFields * width,0); _.each(this.fields, function(field, idx) { // add the remainder to the first field width so we make up full col - if (idx == 0) { + if (idx === 0) { field.set({width: width+remainder}); } else { field.set({width: width});