summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-14 13:29:44 +0545
committerRenato Botelho <renato@netgate.com>2017-02-14 09:22:27 -0200
commit5952db66888fbeb74a8180560001e128bf9d132f (patch)
tree5de4b572660355c3117534c86ca78c7903b04f40
parent5371504f3f078307d57e5ba04943ecc43436ad63 (diff)
downloadpfsense-5952db66888fbeb74a8180560001e128bf9d132f.zip
pfsense-5952db66888fbeb74a8180560001e128bf9d132f.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. (cherry picked from commit d86cff7f61af51ee2bd9df9df309576b11d7ecc6)
-rw-r--r--src/usr/local/www/index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index caae6a4..da80249 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -396,7 +396,7 @@ foreach ($widgets as $widgetname => $widgetconfig) {
<div class="row">
<?php
- $columnWidth = 12 / $numColumns;
+ $columnWidth = (int) (12 / $numColumns);
for ($currentColumnNumber = 1; $currentColumnNumber <= $numColumns; $currentColumnNumber++) {
OpenPOWER on IntegriCloud