Home | History | Annotate | Download | only in resources
      1 <!DOCTYPE html>
      2 <html id="template_root" i18n-values="dir:textdirection">
      3 <head>
      4 <title i18n-content="title">
      5 </title>
      6 <style>
      7 html {
      8   height: 100%;
      9 }
     10 body {
     11   color: #000;
     12   font-family: arial, sans-serif;
     13   background-image: -webkit-linear-gradient(white 50%, rgb(236, 244, 255));
     14   width: 100%;
     15   height: 100%;
     16   padding: 0;
     17   margin: 0;
     18   display: -webkit-box;
     19   -webkit-box-orient: vertical;
     20   -webkit-box-align: stretch;
     21   visibility: hidden;
     22   -webkit-user-select: none;
     23 }
     24 
     25 .upper {
     26   position: relative;
     27   width: 100%;
     28   -webkit-box-flex: 0.8;
     29 }
     30 
     31 #lower {
     32   position: relative;
     33   margin-top: 0;
     34   width: 100%;
     35   -webkit-box-flex: 1;
     36   background-image: -webkit-gradient(radial, 50% -20%, 700, 50% -70%, 0, from(#FFF), color-stop(.7, #EEE), to(#EEE));
     37 }
     38 
     39 .icon {
     40   float: left;
     41   margin: 15px;
     42   overflow: visible;
     43 }
     44 
     45 .h3 {
     46   float: left;
     47   height: 10%;
     48   width: 80%;
     49   font-family: Sans-serif;
     50   font-size: 120%;
     51   font-weight: bold;
     52   padding: 3px;
     53 }
     54 
     55 .message {
     56   float: left;
     57   margin-top: 10px;
     58 }
     59 
     60 .link {
     61   float: left;
     62   clear: both;
     63   padding: 3px;
     64   font-weight: bold;
     65 }
     66 
     67 .offline_message {
     68   position: absolute;
     69   width: 600px;
     70   height: 49%;
     71   top: 50%;
     72   left: 50%;
     73   margin-left: -300px;
     74   margin-top: -20%;
     75 }
     76 
     77 .activation_message {
     78   position: absolute;
     79   width: 500px;
     80   top: 0;
     81   margin-top: 0;
     82   left: 50%;
     83   margin-left: -250px;
     84   min-height: 380px;
     85 }
     86 
     87 #carrierPage {
     88   padding-top: 10px;
     89   width: 500px;
     90   height: 380px;
     91   overflow-x: none;
     92   overflow-y: none;
     93 }
     94 
     95 .hidden {
     96   display: none;
     97 }
     98 
     99 .splitter {
    100   border-top: 1px solid #DDD;
    101   height: 1px;
    102 }
    103 </style>
    104 <script src="shared/js/local_strings.js"></script>
    105 
    106 <script>
    107 var localStrings = new LocalStrings();
    108 
    109 function sendCommand(cmd) {
    110   window.domAutomationController.setAutomationId(1);
    111   window.domAutomationController.send(cmd);
    112 }
    113 
    114 // Show the offline page.
    115 function showPage() {
    116   document.body.style.visibility = 'visible';
    117 }
    118 
    119 document.addEventListener('DOMContentLoaded', function() {
    120   var time_to_wait = localStrings.getString('time_to_wait');
    121   var show_activation = localStrings.getString('show_activation') == 'true';
    122   window.setTimeout(showPage, time_to_wait);
    123   var lower = document.getElementById('lower');
    124   if (show_activation)
    125     lower.style.display = 'block';
    126 });
    127 </script>
    128 
    129 <body oncontextmenu="return false;">
    130   <div class="upper" i18n-values=".title:url">
    131     <div class="offline_message">
    132       <div class="icon" i18n-values=".src:icon;.style.display:display_icon"></div>
    133       <h3 i18n-content="heading"></h3>
    134       <div class="message" i18n-values=".innerHTML:msg"></div>
    135       <div class="link"><a href="chrome://settings/internet"
    136            onclick="sendCommand('proceed')"
    137            i18n-content="try_loading"></a> 
    138       </div>
    139       <div class="link"><a href="chrome://settings/internet"
    140            onclick="sendCommand('open_network_settings')"
    141            i18n-content="network_settings"></a>
    142       </div>
    143     </div>
    144   </div>
    145   <div id="lower" class="hidden">
    146     <div class="activation_message">
    147       <div class="splitter"></div>
    148       <iframe src="chrome-extension://iadeocfgjdjdmpenejdbfeaocpbikmab/activation_in_offline.html"
    149               id="carrierPage" frameborder="0"></iframe>
    150     </div>
    151   </div>
    152 </body>
    153 </html>
    154