home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / AvantBrowser / asetup.exe / _data / webkit / chrome.dll / 0 / BINDATA / 519 < prev    next >
Encoding:
Text File  |  2013-04-03  |  2.0 KB  |  67 lines

  1. <!DOCTYPE HTML>
  2. <html i18n-values="dir:textdirection;">
  3. <head>
  4. <title></title>
  5. <script src="chrome://resources/js/cr.js"></script>
  6. <script src="chrome://resources/js/util.js"></script>
  7. <script type="text/javascript">// Copyright (c) 2012 The Chromium Authors. All rights reserved.
  8. // Use of this source code is governed by a BSD-style license that can be
  9. // found in the LICENSE file.
  10.  
  11. cr.define('cloudprint', function() {
  12.   function hideAllPages() {
  13.     var pages = ['cloudprintsetup', 'setupdone'];
  14.     for (var i = 0; i < pages.length; ++i) {
  15.       $(pages[i]).style.display = 'none';
  16.       $(pages[i]).tabIndex = -1;
  17.     }
  18.   }
  19.  
  20.   function showPage(page) {
  21.     hideAllPages();
  22.     $(page).style.display = 'block';
  23.     $(page).tabIndex = 0;
  24.   }
  25.  
  26.   function showInitialPage() {
  27.     var args = JSON.parse(chrome.getVariableValue('dialogArguments'));
  28.     showPage(args.pageToShow);
  29.   }
  30.  
  31.   function showSetupLogin() {
  32.     showPage('cloudprintsetup');
  33.   }
  34.  
  35.   function showSetupDone(width, height) {
  36.     hideAllPages();
  37.     var moveByX = (window.innerWidth - width) / 2;
  38.     var moveByY = (window.innerHeight - height) / 2;
  39.     var sizeByX = width - window.innerWidth;
  40.     var sizeByY = height - window.innerHeight;
  41.     window.moveBy(moveByX, moveByY);
  42.     window.resizeBy(sizeByX, sizeByY);
  43.     showPage('setupdone');
  44.   }
  45.  
  46.   return {
  47.     hideAllPages: hideAllPages,
  48.     showPage: showPage,
  49.     showInitialPage: showInitialPage,
  50.     showSetupLogin: showSetupLogin,
  51.     showSetupDone: showSetupDone
  52.   };
  53. });
  54. </script>
  55. </head>
  56. <body style="margin:0; border:0;" onload="cloudprint.showInitialPage();">
  57.   <iframe id="cloudprintsetup"
  58.           src="chrome://cloudprintsetup/cloudprintsetup"
  59.           frameborder="0" width="100%" scrolling="no" height="100%"
  60.           style="display:none" tabindex="-1"></iframe>
  61.   <iframe id="setupdone"
  62.           src="chrome://cloudprintsetup/setupdone"
  63.           frameborder="0" width="100%" scrolling="no" height="100%"
  64.           style="display:none" tabindex="-1"></iframe>
  65. </body>
  66. </html>
  67.