Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

New typing

  • Loading branch information...
commit 34e375fdd49e312647deb77e20696dfc2b0c7d04 1 parent 65aef25
@taboca authored
View
1  apps/base/grade-grid/gradeDynamic.js
@@ -6,6 +6,7 @@
*/
var dias = [10,11,12];
var espacos = ['brasil','paraguai','uruguai','bolivia','chile','peru','equador'];
+var espacos = ['brasil','paraguai','uruguai','bolivia','chile'];
var titleEspacos = ['Espaço Brasil','Espaco Paraguai','Espaço Uruguai','Espaço Bolívia','Espaço Chile','Espaço Peru','Espaço Equador'];
var horarios = [10,11,12,13,14,15,16,17,18,19,20];
View
2  apps/base/index-1080-1920.js
@@ -6,7 +6,7 @@ $(document).ready(function() {
/* The exercise here is that we want to load the sub elements and internal
iframe pages are ready. */
- register("/main/footer", "cabecalho", "./header/index.html", iframeTemplate);
+ register("/main/footer", "cabecalho", "./typing/index.html", iframeTemplate);
register("/main/lado", "sidebar", "./twitter/index-340-900.html", iframeTemplate);
register("/main/middle", "meio", "./abas/index.html", iframeTemplate);
register("/main/topmiddle", "mid", "./destaques/index.html", iframeTemplate);
View
13 apps/base/typing/typing.js.google → apps/base/typing/app.js
@@ -21,8 +21,8 @@ var typing = {
},
init : function () {
- this.feed = new google.feeds.Feed(this.feedURL);
- this.feed.setResultFormat(google.feeds.Feed.XML_FORMAT);
+ this.feed = new t8l.feeds.Feed(this.feedURL);
+ this.feed.setResultFormat(t8l.feeds.Feed.XML_FORMAT);
this.feed.setNumEntries(10);
} ,
@@ -92,10 +92,13 @@ var typing = {
setTimeout( function(){self.updateFeed()},1000);
},
- __feedUpdated : function(xml) {
+ __feedUpdated : function(result) {
+
var self = this;
-
- $(xml.xmlDocument).find('item').each(function(){
+ if (result.error) {
+ return;
+ }
+ $(result.xmlDocument).find('item').each(function(){
var title = $(this).find('title').text();
self.tweetQueue.push( { title: title });
});
View
35 apps/base/typing/index.html
@@ -1,8 +1,24 @@
<html>
<head>
<link media="screen, projection" type="text/css" href="../base.css" rel="stylesheet">
- <script src="../const.js" type="text/javascript"></script>
- <script src="../lib/proxy.js" type="text/javascript"></script>
+
+ <script src="../lib/proxy.js" type="text/javascript"></script>
+ <script src="../config/proxy.js" type="text/javascript"></script>
+
+ <script src="../const.js" type="text/javascript"></script>
+ <script src="app.js" type="text/javascript"></script>
+
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <script src="typing.js" type="text/javascript"></script>
+ <script src="../vendor/jquery-min.js" type="text/javascript"></script>
+
+ <!-- maybe this can be moved to afterProxyRun... -->
+ <script type="text/javascript">
+ t8l.loaded(function () {
+ app.init();
+ app.start();
+ });
+ </script>
<style>
.typingPanel {
font-size:40px;
@@ -10,21 +26,6 @@
color:darkred;
}
</style>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <script src="typing.js" type="text/javascript"></script>
- <script src="../vendor/jquery-min.js" type="text/javascript"></script>
- <script type="text/javascript">
-
- google.load("feeds", "1");
-
- function loaded() {
- typing.init();
- typing.start();
- }
-
- google.setOnLoadCallback(loaded);
-
- </script>
</head>
<body id="main">
View
14 apps/base/typing/typing.js
@@ -21,11 +21,6 @@ var typing = {
},
init : function () {
-/*
- this.feed = new google.feeds.Feed(this.feedURL);
- this.feed.setResultFormat(google.feeds.Feed.XML_FORMAT);
- this.feed.setNumEntries(10);
-*/
this.feed = new t8l.feeds.Feed(this.feedURL);
this.feed.setResultFormat(t8l.feeds.Feed.XML_FORMAT);
this.feed.setNumEntries(10);
@@ -97,10 +92,13 @@ var typing = {
setTimeout( function(){self.updateFeed()},1000);
},
- __feedUpdated : function(xml) {
+ __feedUpdated : function(result) {
+
var self = this;
-
- $(xml.xmlDocument).find('item').each(function(){
+ if (result.error) {
+ return;
+ }
+ $(result.xmlDocument).find('item').each(function(){
var title = $(this).find('title').text();
self.tweetQueue.push( { title: title });
});
Please sign in to comment.
Something went wrong with that request. Please try again.