Changeset 13703 for trunk/FACT++
- Timestamp:
- 05/13/12 22:38:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/smartfact/index.js
r13698 r13703 198 198 var name = location.hash.length==0 ? "fact" : location.hash.substr(1); 199 199 200 var args = location.search.substr(1).split('&'); 201 202 for (var i=0; i<args.length; i++) 203 { 204 var entry = args[i].split('='); 205 if (entry.length!=2) 206 continue; 207 208 switch (entry[0]) 209 { 210 case "w": $("body").setAttribute("data-width", entry[1]); break; 211 case "h": $("body").setAttribute("data-height", entry[1]); break; 212 } 213 } 214 215 200 216 /* 201 217 alert("0 -- "+navigator.appCodeName+"\n"+ … … 325 341 table.cellSpacing = 0; 326 342 table.cellPadding = "0px"; 327 table.width = "100%";343 /*table.width = "100%";*/ 328 344 table.setAttribute("style", "overflow:hidden;position:fixed;top:0px;left:"+window.innerWidth+"px;"); 329 345 … … 497 513 498 514 var img = document.createElement("img"); 499 img.src = " dummy.png";//needed in firefox515 img.src = "img/dummy.png";//needed in firefox 500 516 img.id = "image"+z; 501 517 img.setAttribute("style", "width:1px;height:1px;display:none;"); … … 515 531 var td0 = document.createElement("td"); 516 532 td0.setAttribute("class", "tcol0"); 533 tr.appendChild(td0); 534 535 if (check.length>0 && check[0]=="image") 536 { 537 var img = document.createElement("img"); 538 img.style.width="100%"; 539 img.src = check[1]; 540 td0.style.paddingLeft=0; 541 td0.style.border=0; 542 td0.colSpan=3; 543 td0.appendChild(img); 544 545 tbody.appendChild(tr); 546 continue; 547 } 548 517 549 if (valid(cols[0])) 518 550 { … … 522 554 td0.appendChild(sp); 523 555 } 524 tr.appendChild(td0);525 556 526 557 var td1 = document.createElement("td"); … … 649 680 return; 650 681 651 var W = window.innerWidth; 652 var H = window.innerHeight; 682 var fixedw = $("body").getAttribute("data-width"); 683 var fixedh = $("body").getAttribute("data-height"); 684 685 var W = fixedw>0 ? fixedw : window.innerWidth; 686 var H = fixedh>0 ? fixedh : window.innerHeight; 687 688 $("table"+z).style.width = W+"px"; 653 689 654 690 /* … … 683 719 684 720 if ($("table"+z).offsetHeight == H || cnt==2) 685 { 686 // ------ debug ----- 687 if (debug == true) 688 { 689 $('debug'+z).innerHTML = ""; 690 $('debug'+z).innerHTML += "|W="+W +"/"+H; 691 $('debug'+z).innerHTML += "|H="+h+"/"+$("table"+z).offsetHeight+"/"+img.offsetHeight; 692 $('debug'+z).innerHTML += "|I="+img.style.height+"+"+H+"-"+h; 693 } 694 return; 695 } 721 return; 696 722 697 723 resizeimpl(z, ++cnt);
Note:
See TracChangeset
for help on using the changeset viewer.