Loading ...
Sorry, an error occurred while loading the content.

Very slow / incomplete resizing.

Expand Messages
  • Nathan Moschkin
    I have a bevy of controls and tabs on a system administration panel, and I m using the DataTable for the e-mail log. Well, the entire page resizes a bit
    Message 1 of 1 , Dec 11, 2009
    View Source
    • 0 Attachment
      I have a bevy of controls and tabs on a system administration panel, and
      I'm using the DataTable for the e-mail log.

      Well, the entire page resizes a bit slowly, but it's absolutely terrible
      when the e-mail log is loaded up, the log won't resize, and nothing else
      seems to want to catch on to resize, either... I don't know why the log
      table would be re-requesting data, I'm not destroying it, I'm just
      setting its dimensions ... but it seems to drag on the whole screen ...
      the panel displays in a popup and so it's convenient to stretch the
      screen to view the e-mail log ... is there anyway to do this right so
      that it's not slow and it actually finishes the resize?

      Here's an example of my resize code ... I couldn't think of any other
      way to do this, perhaps I've still many things left to learn about
      working with your controls...

      Thanks in advance!

      function layoutAdjust() {
      var el;
      var w, h;

      var cx, cy;

      if(!window.innerWidth)
      {

      //strict mode
      if(!(document.documentElement.clientWidth == 0))
      {
      w = document.documentElement.clientWidth;
      h = document.documentElement.clientHeight;
      }
      //quirks mode
      else
      {
      w = document.body.clientWidth;
      h = document.body.clientHeight;
      }

      // h -= 36;

      }
      //w3c
      else
      {
      w = window.innerWidth;
      h = window.innerHeight;
      }

      if (!centerLayout) return;

      if (emailLogTable) {
      emailLogTable.hide();

      }

      centerLayout.setStyle("height", h + "px");

      centerLayout.render();

      cy = centerLayout.getUnitByPosition('center').get('height');
      cx = centerLayout.getUnitByPosition('center').get('width');


      el = document.getElementById("config_area");
      el.style.height = (cy - 31) + "px";
      el.style.width = (cx - 10) + "px";

      //emailLogTable.render();


      el = document.getElementById("tools_area");
      el.style.height =
      centerLayout.getUnitByPosition('left').get('height') - 31;
      el.style.width =
      centerLayout.getUnitByPosition('left').get('width') - 10;

      el = document.getElementById("view_title");
      el.style.width = (cx - 2) + "px";

      el = document.getElementById("groupsContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";

      el = document.getElementById("usersContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";

      el = document.getElementById("foldersContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";

      el = document.getElementById("companyContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";

      <?php
      if ($_SESSION['generalaccess'] == "su") {
      ?>
      el = document.getElementById("superContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";
      <?php
      }
      ?>

      el = document.getElementById("usageContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";

      el = document.getElementById("emailContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";

      el = document.getElementById("personalContainer");
      el.style.height = (cy - 71) + "px";
      el.style.width = (cx - 70) + "px";


      el = document.getElementById("groupeditor3");
      el.style.width = (cx - 100) + "px";

      el = document.getElementById("groupeditor2");
      el.style.width = (cx - 100) + "px";

      el = document.getElementById("groupeditor");
      el.style.width = (cx - 100) + "px";

      el = document.getElementById("useradd");
      el.style.width = (cx - 100) + "px";

      el = document.getElementById("usereditor1");
      el.style.width = (cx - 100) + "px";

      el = document.getElementById("usereditor1_buttons");
      el.style.width = (cx - 100) + "px";

      if (emailLogTable) {

      emailLogTable.set("height", cy - 96);
      emailLogTable.set("width", cx - 64);
      // emailLogTable.render();
      emailLogTable.show();

      }
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.