Commits

Federico Silva Armas  committed c7338a1

Load scripts from CDN if possible.

  • Participants
  • Parent commits f5a417b

Comments (0)

Files changed (1)

File dashboard.html

     <link rel="stylesheet" type="text/css" href="dashboard.css" />
 </head>
 <body>
-  <div id="dashboardContainer"></div>
+    <div id="dashboardContainer"></div>
 
-  <script type="text/javascript" src="lib/jquery-1.8.3.min.js"></script>  
-  <script type="text/javascript" src="lib/knockout-2.2.0.js"></script>  
-  <script type="text/javascript" src="lib/jquery.xml2json.js"></script>
-  <script type="text/javascript" src="dashboard.js"></script>
-  <script>
-      var dashboard;
-      $(function() {
-          dashboard = new Farmas.Dashboard({
-              selector: "#dashboardContainer",
-              server: new Farmas.TestServer(),
-              enableAnimation: true
-          });
+    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js"></script>
+    <script src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-2.1.0.js"></script>
+    <script>
+        window.jQuery || document.write('<script src="lib/jquery-1.8.3.min.js")><\/script>');
+        window.ko || document.write('<script src="lib/knockout-2.2.0.js")><\/script>');
+    </script>
 
-          window.setInterval(function() {
-              dashboard.update();
-          }, 5000);
-      });
-  </script>
+    <script type="text/javascript" src="lib/jquery.xml2json.js"></script>
+    <script type="text/javascript" src="dashboard.js"></script>
+    <script>
+        var dashboard;
+        $(function() {
+            dashboard = new Farmas.Dashboard({
+                selector: "#dashboardContainer",
+                server: new Farmas.TestServer(),
+                enableAnimation: true
+            });
+
+            window.setInterval(function() {
+                dashboard.update();
+            }, 5000);
+        });
+    </script>
 </body>
-</html>
+</html>