diff options
author | Phil Davis <phil.davis@inf.org> | 2017-02-14 13:29:44 +0545 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-14 09:22:23 -0200 |
commit | 63c0e334f2f943a692d13c63d1de1264075e81af (patch) | |
tree | 6db23664deb37c07fbc86fdb7aaf1f59c4eb343e /src/usr | |
parent | 3b07c2b73d83962da851807868083a6860b92b7f (diff) | |
download | pfsense-63c0e334f2f943a692d13c63d1de1264075e81af.zip pfsense-63c0e334f2f943a692d13c63d1de1264075e81af.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)
Diffstat (limited to 'src/usr')
-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 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++) { |