ginebra/chrome/demochrome/snippets/TopSnippet.html
changeset 0 1450b09d0cfd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ginebra/chrome/demochrome/snippets/TopSnippet.html	Tue May 04 12:39:35 2010 +0300
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+  <head>
+    <link rel="stylesheet" id = "CSSLink" type="text/css" href="../css/chromeStyleBlack.css" />
+  </head>
+  <script type="text/javascript">
+
+      function loadToMainWindow(url){
+         window.parent.pageController.currentLoad(url);
+      }
+      window.parent.pageController.loadStarted.connect(
+        function() {
+        document.getElementById("PBar").style.width = "0%";
+        }
+      );
+      window.parent.pageController.loadProgress.connect(
+        function(percent) {
+         var parentWidth = document.getElementById("PBarWrapper").offsetWidth;
+         document.getElementById("PBar").style.width = (parentWidth * percent)/100 + "px";
+        }
+      );
+      window.parent.pageController.loadFinished.connect(
+        function(ok) {
+        document.getElementById("PBar").style.width = "0%";
+        }
+      );
+  </script>
+  <body>
+    <form name = "gotoUrlForm">
+      <span id="PBarWrapper" class="ProgressBarWrapper" style="width: 260px; position: absolute; top: 3px; left:4px; height:20px">
+        <span id="PBar" class="ProgressBar" style="position:absolute; left: 1px; height: 18px;">
+        </span>
+        <input type ="text"
+               class = "Text"
+               id = "urlBox"
+               name = "textBox"
+               style = "position: absolute; width: 260px; height: 18px"
+               value="http://www.google.com/webhp?hl=en&output=html"/>
+      </span>
+      <span style="position: absolute; left: 270px; display: inline">
+        <input type = "button" class="Button" value="Go" style="display: inline"
+               onclick="loadToMainWindow(document.gotoUrlForm.textBox.value)"/>
+        <input type = "button" class="Button" value="Min" style="display: inline"
+               onclick = "window.parent.chrome.topToggle();window.parent.chrome.bottomToggle()"/>
+      </span>
+    </form>
+  </body>
+</html>