| 367,26 → 367,29 |
| <th><?php echo _('Display'); ?>:</th> |
| <td><script type="text/javascript"> |
| var runAsync = jsx.dom.timeout.runAsync; |
| |
| (function () { |
| var ID_SCREEN_DIM = 'screenDim'; |
| var ID_AVAIL_DIM = 'availDim'; |
| var ID_INNER_DIM = 'innerDim'; |
| |
| var dim = (function () { |
| var screenInfo = jsx.dom.window.screenInfo; |
| |
| var dim = { |
| |
| return { |
| getScreenText: function () { |
| var screenDim = screenInfo.getDim(); |
| return screenDim.width + "×" + screenDim.height; |
| }, |
| |
| |
| getAvailText: function () { |
| var availDim = screenInfo.getAvailDim(); |
| return availDim.width + "×" + availDim.height + " <?php echo _('available'); ?>"; |
| }, |
| |
| |
| getInnerText: function () { |
| var innerDim = screenInfo.getInnerDim(); |
| return ", " + innerDim.width + "×" + innerDim.height + " <?php echo _('used'); ?>"; |
| }, |
| |
| |
| getColorDepthText: function () { |
| var colorDepth = screenInfo.getColorDepth(); |
| return colorDepth |
| 394,6 → 397,9 |
| : ""; |
| } |
| }; |
| }()); |
| |
| (function () { |
| |
| var screenDimText = dim.getScreenText(); |
| var availDimText = dim.getAvailText(); |
| 400,9 → 406,9 |
| var innerDimText = dim.getInnerText(); |
| var colorDepthText = dim.getColorDepthText(); |
| var displayInfo = (screenDimText || availDimText || innerDimText || colorDepthText) |
| ? (screenDimText ? '<span id="screenDim">' + screenDimText + '<\/span> <?php echo _('pixels'); ?>' : "") |
| + (availDimText ? ' (<span id="availDim">' + availDimText + "<\/span>" : "") |
| + (innerDimText ? '<span id="innerDim">' + innerDimText + "<\/span>)" : "") |
| ? (screenDimText ? '<span id="' + ID_SCREEN_DIM + '">' + screenDimText + '<\/span> <?php echo _('pixels'); ?>' : "") |
| + (availDimText ? ' (<span id="' + ID_AVAIL_DIM + '">' + availDimText + "<\/span>" : "") |
| + (innerDimText ? '<span id="' + ID_INNER_DIM + '">' + innerDimText + "<\/span>)" : "") |
| + (colorDepthText ? ' × <span id="colorDepth">' + colorDepthText + "<\/span>" : "") |
| : "<?php echo _('N/A'); ?>"; |
| |
| 409,22 → 415,6 |
| /* FIXME: Convert HTML to text, update whole title text */ |
| document.write('<span>' + displayInfo + '<\/span>'); |
| |
| var oScreenDim; |
| var oAvailDim; |
| var oInnerDim; |
| var _gEBI = jsx.dom.getElementById; |
| jsx.dom.addEventListener(window, "resize", function () { |
| /* FIXME: Also update title attribute value */ |
| if (typeof oScreenDim == "undefined") oScreenDim = _gEBI("screenDim"); |
| if (oScreenDim) oScreenDim.innerHTML = dim.getScreenText(); |
| |
| if (typeof oAvailDim == "undefined") oAvailDim = _gEBI("availDim"); |
| if (oAvailDim) oAvailDim.innerHTML = dim.getAvailText(); |
| |
| if (typeof oInnerDim == "undefined") oInnerDim = _gEBI("innerDim"); |
| if (oInnerDim) oInnerDim.innerHTML = dim.getInnerText(); |
| }); |
| |
| var oColorDepth; |
| runAsync(function () { |
| if (typeof oColorDepth == "undefined") |
| 633,46 → 623,75 |
| ><span class="text"><?php echo _("Printable"); ?></span></a></li> |
| <li id="cmd3"><div class="button left right" |
| style="cursor: not-allowed !important" |
| onclick="fullscreen.requestOn(document.documentElement, this, this.firstChild, windowText)" |
| onclick="fullscreen.requestOn(document.documentElement, this)" |
| onkeyup="if (event.keyCode == 13) { this.onclick(); }" |
| ><span class="text"><script type="text/javascript"> |
| var cmd3; |
| if (fullscreen.isSupportedBy(document.documentElement)) |
| { |
| <?php /* |
| var previousIsFullscreen = fullscreen.isFullscreen(); |
| var oldHandler; |
| window.onresize = function () { |
| jsx.dom.addEventListener(window, "load", function () { |
| if (typeof cmd3 == "undefined") |
| { |
| cmd3 = jsx.dom.getElementById("cmd3"); |
| } |
| |
| if (cmd3) |
| { |
| cmd3.firstChild.tabIndex = "1"; |
| } |
| }); |
| } |
| |
| var oScreenDim; |
| var oAvailDim; |
| var oInnerDim; |
| var _gEBI = jsx.dom.getElementById; |
| var previousIsFullscreen; |
| var oldHandler; |
| |
| jsx.dom.addEventListener(window, "resize", function () { |
| /* FIXME: Also update title attribute value */ |
| if (typeof oScreenDim == "undefined") oScreenDim = _gEBI(ID_SCREEN_DIM); |
| if (oScreenDim) oScreenDim.innerHTML = dim.getScreenText(); |
| |
| if (typeof oAvailDim == "undefined") oAvailDim = _gEBI(ID_AVAIL_DIM); |
| if (oAvailDim) oAvailDim.innerHTML = dim.getAvailText(); |
| |
| if (typeof oInnerDim == "undefined") oInnerDim = _gEBI(ID_INNER_DIM); |
| if (oInnerDim) oInnerDim.innerHTML = dim.getInnerText(); |
| |
| if (fullscreen.isSupportedBy(document.documentElement)) |
| { |
| var nowIsFullscreen = fullscreen.isFullscreen(); |
| if (nowIsFullscreen != previousIsFullscreen) |
| { |
| var cmd3 = document.getElementById("cmd3"); |
| if (typeof cmd3 == "undefined") |
| { |
| cmd3 = document.getElementById("cmd3"); |
| } |
| |
| var target = cmd3.firstChild; |
| var textTarget = target.firstChild; |
| if (nowIsFullscreen) |
| { |
| oldHandler = target.onclick; |
| // fullscreen.requestOn(document.documentElement, cmd3.firstElementChild, cmd3.firstElementChild.firstElementChild, windowText); |
| target.onclick = function () { |
| fullscreen.cancel(); |
| }; |
| textTarget.textContent = "<?php echo _("Window"); ?>"; |
| } |
| else |
| { |
| fullscreen.cancel(target, oldHandler, textTarget, "<?php echo _("Fullscreen"); ?>"); |
| target.onclick = oldHandler; |
| textTarget.textContent = "<?php echo _("Fullscreen"); ?>"; |
| } |
| |
| previousIsFullscreen = nowIsFullscreen; |
| } |
| }; |
| |
| */ ?> |
| jsx.dom.addEventListener(window, "load", function () { |
| var cmd3 = jsx.dom.getElementById("cmd3"); |
| if (cmd3) |
| { |
| cmd3.firstChild.tabIndex = "1"; |
| } |
| }); |
| |
| document.write("<?php echo _("Fullscreen"); ?>"); |
| } |
| } |
| }); |
| |
| document.write("<?php echo _("Fullscreen"); ?>"); |
| </script></span></div></li> |
| <li id="cmd4"><div class="button left right" style="cursor: not-allowed !important"> </div></li> |
| </ul> |