Changeset 13903 for trunk


Ignore:
Timestamp:
05/26/12 10:56:52 (13 years ago)
Author:
tbretz
Message:
Do not load pages during sliding; check for validity of table in isSliding
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/smartfact/index.js

    r13895 r13903  
    164164function trim(str) { return str.replace("/^\s\s*/", '').replace("/\s\s*$/", ''); }
    165165function valid(str) { if (str==undefined) return false; if (str.length==0) return false; return true;}
    166 function isSliding() { var z = $("body").getAttribute("data-visible"); return $("table"+z).offsetLeft!=0; }
     166function isSliding() { var z = $("body").getAttribute("data-visible"); return $("table"+z) ? $("table"+z).offsetLeft!=0 : false; }
    167167function htmlDecode(input) { var e = $new('div'); e.innerHTML = input; return e.firstChild==undefined ? input : e.firstChild.nodeValue; }
    168168function setUTC(el, time) { var str = time.toUTCString(); var utc = str.substr(str.length-12, 8); el.innerHTML = "• "+utc+" UTC •"; }
     
    196196    catch(e)
    197197    {
     198        // FIXME: Add a message to the body.
    198199        alert("Your browser doesn't support dynamic reload.");
    199200        return;
     
    248249function loadPage(name, z, dz)
    249250{
     251    if (isSliding())
     252        return;
     253
    250254    var xmlPage = new XMLHttpRequest();
    251255    xmlPage.open('POST', "struct/"+name+'.page', true);
Note: See TracChangeset for help on using the changeset viewer.