Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var heightWindow = $wnd.$($wnd).height();
  2.         var navbar = $wnd.$('.js-navbar');
  3.         if (navbar) {
  4.             var heightNavbar = navbar.height();
  5.             var heightMainArea = heightWindow - heightNavbar;
  6.             $wnd.$('.js-height-no-header') && $wnd.$('.js-height-no-header').height(heightMainArea + 'px');
  7.  
  8.             var title = $wnd.$('.js-sidebar-title');
  9.             if (title) {
  10.                 var heightPageTitle = title.height();
  11.                 $wnd.$('.js-list-master-contour') && $wnd.$('.js-list-master-contour').height((heightMainArea - heightPageTitle) + 'px');
  12.             }
  13.  
  14.             var popupHeader = $wnd.$('.js-sidebar-popup-header');
  15.             var popupBottom = $wnd.$('.js-sidebar-popup-bottom');
  16.             if (popupHeader && popupBottom) {
  17.                 var sidebarPopupHeader = popupHeader.height();
  18.                 var sidebarPopupBottom = popupBottom.height();
  19.                 $wnd.$('.js-list-master-contour-with-bottom') && $wnd.$('.js-list-master-contour-with-bottom').height
  20.                 ((heightMainArea - sidebarPopupHeader - sidebarPopupBottom) + 'px');
  21.             }
  22.  
  23.             var header = $wnd.$('.js-content-full-header');
  24.             if (header) {
  25.                 var heightContentFullHeader = header.height();
  26.                 $wnd.$('.js-content-full-body') && $wnd.$('.js-content-full-body').height((heightMainArea -
  27.                     heightContentFullHeader) + "px");
  28.                 $wnd.$('.js-users-table') && $wnd.$('.js-users-table').css("max-height",
  29.                         (heightMainArea - heightContentFullHeader) + "px");
  30.                 $wnd.$('.js-object-detail') && $wnd.$('.js-object-detail').height((heightMainArea -
  31.                     heightContentFullHeader) + "px");
  32.                 $wnd.$('.js-sidebar-object-list') && $wnd.$('.js-sidebar-object-list').height((heightMainArea -
  33.                     heightContentFullHeader) + "px");
  34.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement