diff options
author | Phil Davis <phil.davis@inf.org> | 2017-02-14 13:29:44 +0545 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 13:29:44 +0545 |
commit | d86cff7f61af51ee2bd9df9df309576b11d7ecc6 (patch) | |
tree | ccbc1e443fd8e9dc6be6615973902ee4cce30739 | |
parent | 6a951c867546c9f63e6f211b5f4b0e44990eccbc (diff) | |
download | pfsense-d86cff7f61af51ee2bd9df9df309576b11d7ecc6.zip pfsense-d86cff7f61af51ee2bd9df9df309576b11d7ecc6.tar.gz |
Allow 5 dashboard columns to work
Selecting 1,2,3,4 or 6 dashboards columns results in an exact integer result here and all is good. But 5 columns results in "2.4" and "col-sm-2.4" is not a thing in bootstrap.
We need just the best int we can choose here, which is one that is just the int part of the division. That ensures that the 5 columns extend over less than the standard bootstrap total of 12 "units" wide.
-rw-r--r-- | src/usr/local/www/index.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index ab41a4b..c751af4 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -359,7 +359,7 @@ foreach ($widgets as $widgetname => $widgetconfig) { <div class="row"> <?php - $columnWidth = 12 / $numColumns; + $columnWidth = (int) (12 / $numColumns); for ($currentColumnNumber = 1; $currentColumnNumber <= $numColumns; $currentColumnNumber++) { |