Rev 145 | Rev 147 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 145 | Rev 146 | ||
---|---|---|---|
Line 365... | Line 365... | ||
365 | <table> |
365 | <table> |
366 | <tr> |
366 | <tr> |
367 | <th><?php echo _('Display'); ?>:</th> |
367 | <th><?php echo _('Display'); ?>:</th> |
368 | <td><script type="text/javascript"> |
368 | <td><script type="text/javascript"> |
369 | var runAsync = jsx.dom.timeout.runAsync; |
369 | var runAsync = jsx.dom.timeout.runAsync; |
- | 370 | var ID_SCREEN_DIM = 'screenDim'; |
|
- | 371 | var ID_AVAIL_DIM = 'availDim'; |
|
- | 372 | var ID_INNER_DIM = 'innerDim'; |
|
370 | 373 | ||
371 | (function () { |
374 | var dim = (function () { |
372 | var screenInfo = jsx.dom.window.screenInfo; |
375 | var screenInfo = jsx.dom.window.screenInfo; |
373 | 376 | ||
374 | var dim = { |
377 | return { |
375 | getScreenText: function () { |
378 | getScreenText: function () { |
376 | var screenDim = screenInfo.getDim(); |
379 | var screenDim = screenInfo.getDim(); |
377 | return screenDim.width + "×" + screenDim.height; |
380 | return screenDim.width + "×" + screenDim.height; |
378 | }, |
381 | }, |
379 | 382 | ||
380 | getAvailText: function () { |
383 | getAvailText: function () { |
381 | var availDim = screenInfo.getAvailDim(); |
384 | var availDim = screenInfo.getAvailDim(); |
382 | return availDim.width + "×" + availDim.height + " <?php echo _('available'); ?>"; |
385 | return availDim.width + "×" + availDim.height + " <?php echo _('available'); ?>"; |
383 | }, |
386 | }, |
384 | 387 | ||
385 | getInnerText: function () { |
388 | getInnerText: function () { |
386 | var innerDim = screenInfo.getInnerDim(); |
389 | var innerDim = screenInfo.getInnerDim(); |
387 | return ", " + innerDim.width + "×" + innerDim.height + " <?php echo _('used'); ?>"; |
390 | return ", " + innerDim.width + "×" + innerDim.height + " <?php echo _('used'); ?>"; |
388 | }, |
391 | }, |
389 | 392 | ||
390 | getColorDepthText: function () { |
393 | getColorDepthText: function () { |
391 | var colorDepth = screenInfo.getColorDepth(); |
394 | var colorDepth = screenInfo.getColorDepth(); |
392 | return colorDepth |
395 | return colorDepth |
393 | ? '2<sup>' + colorDepth + "<\/sup> <?php echo _('colors'); ?>" |
396 | ? '2<sup>' + colorDepth + "<\/sup> <?php echo _('colors'); ?>" |
394 | : ""; |
397 | : ""; |
395 | } |
398 | } |
396 | }; |
399 | }; |
- | 400 | }()); |
|
- | 401 | ||
- | 402 | (function () { |
|
397 | 403 | ||
398 | var screenDimText = dim.getScreenText(); |
404 | var screenDimText = dim.getScreenText(); |
399 | var availDimText = dim.getAvailText(); |
405 | var availDimText = dim.getAvailText(); |
400 | var innerDimText = dim.getInnerText(); |
406 | var innerDimText = dim.getInnerText(); |
401 | var colorDepthText = dim.getColorDepthText(); |
407 | var colorDepthText = dim.getColorDepthText(); |
402 | var displayInfo = (screenDimText || availDimText || innerDimText || colorDepthText) |
408 | var displayInfo = (screenDimText || availDimText || innerDimText || colorDepthText) |
403 | ? (screenDimText ? '<span id="screenDim">' + screenDimText + '<\/span> <?php echo _('pixels'); ?>' : "") |
409 | ? (screenDimText ? '<span id="' + ID_SCREEN_DIM + '">' + screenDimText + '<\/span> <?php echo _('pixels'); ?>' : "") |
404 | + (availDimText ? ' (<span id="availDim">' + availDimText + "<\/span>" : "") |
410 | + (availDimText ? ' (<span id="' + ID_AVAIL_DIM + '">' + availDimText + "<\/span>" : "") |
405 | + (innerDimText ? '<span id="innerDim">' + innerDimText + "<\/span>)" : "") |
411 | + (innerDimText ? '<span id="' + ID_INNER_DIM + '">' + innerDimText + "<\/span>)" : "") |
406 | + (colorDepthText ? ' × <span id="colorDepth">' + colorDepthText + "<\/span>" : "") |
412 | + (colorDepthText ? ' × <span id="colorDepth">' + colorDepthText + "<\/span>" : "") |
407 | : "<?php echo _('N/A'); ?>"; |
413 | : "<?php echo _('N/A'); ?>"; |
408 | 414 | ||
409 | /* FIXME: Convert HTML to text, update whole title text */ |
415 | /* FIXME: Convert HTML to text, update whole title text */ |
410 | document.write('<span>' + displayInfo + '<\/span>'); |
416 | document.write('<span>' + displayInfo + '<\/span>'); |
411 | 417 | ||
412 | var oScreenDim; |
- | |
413 | var oAvailDim; |
- | |
414 | var oInnerDim; |
- | |
415 | var _gEBI = jsx.dom.getElementById; |
- | |
416 | jsx.dom.addEventListener(window, "resize", function () { |
- | |
417 | /* FIXME: Also update title attribute value */ |
- | |
418 | if (typeof oScreenDim == "undefined") oScreenDim = _gEBI("screenDim"); |
- | |
419 | if (oScreenDim) oScreenDim.innerHTML = dim.getScreenText(); |
- | |
420 | - | ||
421 | if (typeof oAvailDim == "undefined") oAvailDim = _gEBI("availDim"); |
- | |
422 | if (oAvailDim) oAvailDim.innerHTML = dim.getAvailText(); |
- | |
423 | - | ||
424 | if (typeof oInnerDim == "undefined") oInnerDim = _gEBI("innerDim"); |
- | |
425 | if (oInnerDim) oInnerDim.innerHTML = dim.getInnerText(); |
- | |
426 | }); |
- | |
427 | - | ||
428 | var oColorDepth; |
418 | var oColorDepth; |
429 | runAsync(function () { |
419 | runAsync(function () { |
430 | if (typeof oColorDepth == "undefined") |
420 | if (typeof oColorDepth == "undefined") |
431 | { |
421 | { |
432 | oColorDepth = document.getElementById("colorDepth"); |
422 | oColorDepth = document.getElementById("colorDepth"); |
Line 631... | Line 621... | ||
631 | onfocus="return this.onmouseover()" |
621 | onfocus="return this.onmouseover()" |
632 | onblur="return this.onmouseout()" |
622 | onblur="return this.onmouseout()" |
633 | ><span class="text"><?php echo _("Printable"); ?></span></a></li> |
623 | ><span class="text"><?php echo _("Printable"); ?></span></a></li> |
634 | <li id="cmd3"><div class="button left right" |
624 | <li id="cmd3"><div class="button left right" |
635 | style="cursor: not-allowed !important" |
625 | style="cursor: not-allowed !important" |
636 | onclick="fullscreen.requestOn(document.documentElement, this, this.firstChild, windowText)" |
626 | onclick="fullscreen.requestOn(document.documentElement, this)" |
637 | onkeyup="if (event.keyCode == 13) { this.onclick(); }" |
627 | onkeyup="if (event.keyCode == 13) { this.onclick(); }" |
638 | ><span class="text"><script type="text/javascript"> |
628 | ><span class="text"><script type="text/javascript"> |
- | 629 | var cmd3; |
|
639 | if (fullscreen.isSupportedBy(document.documentElement)) |
630 | if (fullscreen.isSupportedBy(document.documentElement)) |
640 | { |
631 | { |
- | 632 | jsx.dom.addEventListener(window, "load", function () { |
|
- | 633 | if (typeof cmd3 == "undefined") |
|
- | 634 | { |
|
- | 635 | cmd3 = jsx.dom.getElementById("cmd3"); |
|
- | 636 | } |
|
- | 637 | ||
- | 638 | if (cmd3) |
|
- | 639 | { |
|
- | 640 | cmd3.firstChild.tabIndex = "1"; |
|
- | 641 | } |
|
- | 642 | }); |
|
641 | <?php /* |
643 | } |
- | 644 | ||
- | 645 | var oScreenDim; |
|
- | 646 | var oAvailDim; |
|
- | 647 | var oInnerDim; |
|
- | 648 | var _gEBI = jsx.dom.getElementById; |
|
642 | var previousIsFullscreen = fullscreen.isFullscreen();
|
649 | var previousIsFullscreen; |
643 | var oldHandler;
|
650 | var oldHandler; |
- | 651 | ||
644 | window.onresize = function () {
|
652 | jsx.dom.addEventListener(window, "resize", function () { |
- | 653 | /* FIXME: Also update title attribute value */ |
|
- | 654 | if (typeof oScreenDim == "undefined") oScreenDim = _gEBI(ID_SCREEN_DIM); |
|
- | 655 | if (oScreenDim) oScreenDim.innerHTML = dim.getScreenText(); |
|
- | 656 | ||
- | 657 | if (typeof oAvailDim == "undefined") oAvailDim = _gEBI(ID_AVAIL_DIM); |
|
- | 658 | if (oAvailDim) oAvailDim.innerHTML = dim.getAvailText(); |
|
- | 659 | ||
- | 660 | if (typeof oInnerDim == "undefined") oInnerDim = _gEBI(ID_INNER_DIM); |
|
- | 661 | if (oInnerDim) oInnerDim.innerHTML = dim.getInnerText(); |
|
- | 662 | ||
- | 663 | if (fullscreen.isSupportedBy(document.documentElement)) |
|
- | 664 | { |
|
645 | var nowIsFullscreen = fullscreen.isFullscreen();
|
665 | var nowIsFullscreen = fullscreen.isFullscreen(); |
646 | if (nowIsFullscreen != previousIsFullscreen)
|
666 | if (nowIsFullscreen != previousIsFullscreen) |
647 | {
|
667 | { |
- | 668 | if (typeof cmd3 == "undefined") |
|
- | 669 | { |
|
648 | var cmd3 = document.getElementById("cmd3");
|
670 | cmd3 = document.getElementById("cmd3"); |
- | 671 | } |
|
- | 672 | ||
649 | var target = cmd3.firstChild;
|
673 | var target = cmd3.firstChild; |
650 | var textTarget = target.firstChild;
|
674 | var textTarget = target.firstChild; |
651 | if (nowIsFullscreen)
|
675 | if (nowIsFullscreen) |
652 | {
|
676 | { |
653 | oldHandler = target.onclick;
|
677 | oldHandler = target.onclick; |
- | 678 | target.onclick = function () { |
|
- | 679 | fullscreen.cancel(); |
|
- | 680 | }; |
|
654 | // fullscreen.requestOn(document.documentElement, cmd3.firstElementChild, cmd3.firstElementChild.firstElementChild, windowText);
|
681 | textTarget.textContent = "<?php echo _("Window"); ?>"; |
655 | }
|
682 | } |
656 | else
|
683 | else |
657 | {
|
684 | { |
- | 685 | target.onclick = oldHandler; |
|
658 | fullscreen.cancel(target, oldHandler, textTarget, "<?php echo _("Fullscreen"); ?>");
|
686 | textTarget.textContent = "<?php echo _("Fullscreen"); ?>"; |
659 | }
|
687 | } |
660 |
|
688 | |
661 | previousIsFullscreen = nowIsFullscreen;
|
689 | previousIsFullscreen = nowIsFullscreen; |
662 | }
|
690 | } |
663 | };
|
691 | } |
664 |
|
- | |
665 | */ ?> |
- | |
666 | jsx.dom.addEventListener(window, "load", function () { |
- | |
667 | var cmd3 = jsx.dom.getElementById("cmd3"); |
- | |
668 | if (cmd3) |
- | |
669 | { |
- | |
670 | cmd3.firstChild.tabIndex = "1"; |
- | |
671 | } |
- | |
672 | }); |
692 | }); |
673 | 693 | ||
674 | document.write("<?php echo _("Fullscreen"); ?>"); |
694 | document.write("<?php echo _("Fullscreen"); ?>"); |
675 | } |
- | |
676 | </script></span></div></li> |
695 | </script></span></div></li> |
677 | <li id="cmd4"><div class="button left right" style="cursor: not-allowed !important"> </div></li> |
696 | <li id="cmd4"><div class="button left right" style="cursor: not-allowed !important"> </div></li> |
678 | </ul> |
697 | </ul> |
679 | </div> |
698 | </div> |
680 | <div class="elbo-button"> |
699 | <div class="elbo-button"> |