Skip to content

Commit

Permalink
Sorted out the resizing bug by redoing the logic in the function. close
Browse files Browse the repository at this point in the history
  • Loading branch information
wilpig committed Feb 17, 2014
1 parent 27959ec commit 2195a0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions css/inventory.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@
.table.patchpanel > div:first-child > div select,
.table.switch > div:first-child > div select { position: absolute; top: -3px; right: 0px; }

.device div[id^="controls"] { border: 0 none; white-space: nowrap; }

.device .table.patchpanel div[id^="pp"] { border-left: 2px solid black; min-width: 10px;}
.device .table.patchpanel > div:first-child div[id^="pp"],
.device .table.patchpanel > div:first-child div[id^="mt"] {border-top: 1px solid black; }
Expand Down
10 changes: 5 additions & 5 deletions sidebar.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ function subresize(){
main;
widesttab+=58;
// find widths
maindiv=(maindiv>mw)?maindiv:mw;
main=(maindiv>pnw)?maindiv:pnw; // find largest possible value for maindiv
main=(maindiv>widesttab)?maindiv:widesttab; // find largest possible value for maindiv
width=((sbw+main)>hw)?sbw+main:hw; // which is bigger sidebar + main or the header
main=(mw>pnw)?mw:pnw; // Find the largest width of possible content in maindiv
main+=16; // add in padding and borders
width=((main+sbw)>hw)?main+sbw:hw; // find the widest point of the page

// The math just isn't adding up across browsers and FUCK IE
if((maindiv+sbw)<width){ // page is larger than content expand main to fit
if((main+sbw)<width){ // page is larger than content expand main to fit
$('div.main').width(width-sbw-16);
}else{ // page is smaller than content expand the page to fit
$('div.main').width(width-sbw-12);
$('#header').width(width+4);
$('div.page').width(width+6);
}
Expand Down

0 comments on commit 2195a0e

Please sign in to comment.