1 /** @fileoverview <pre>Arquivo de mapping para os widgets do Janelasvirtuais/Telasical. 2 * 3 * Para alterar os widgets altere a região indicada neste arquivo com o loader dos arquivos. 4 * formato: 5 * register(posicao,nome,arquivo,padraoIframe); 6 * posicao: Div onde sera carregado o widget. 7 * nome: Pseudo nome para o widget. 8 * arquivo: caminho relativo para o arquivo principal do widget 9 * padraoIframe: definido pelo TelaSocial base em ./lib/coreographer.js. 10 * </pre> 11 */ 12 13 /* Grids On The Fly */ 14 15 $(document).ready(function() { 16 /* altere aqui para alterar os widgets ou posições 17 formato: 18 register(posicao,nome,arquivo,padraoIframa); 19 posicao: Div onde sera carregado o widget. 20 nome: Pseudo nome para o widget. 21 arquivo: caminho relativo para o arquivo principal do widget 22 padraoIframe: definido pelo TelaSocial base em ./lib/coreographer.js. 23 */ 24 register("#main #topright", "clock", "./clock/widget.svg", iframeTemplate); 25 register("#main #topmiddle", "typing", "./join-us/index.html", iframeTemplate); 26 //register("#main #middle-tabs", "abas", "./abas/barraAbasTop.html", iframeTemplate); 27 register("#main #middle", "abas-meio", "./abas/barraAbas.html", iframeTemplate); 28 register("#main #bottom", "mid", "./highlights/index.html", iframeTemplate); 29 30 compile(); // this can be based in events in time too or scoped rules events. So, when something happens 31 // in the live store, it happens. one use case is that insertion of a IFRAME mutation 32 // should generate a residual event in the store DOM, so you know, via selection rules 33 // when the store event ( iframe ) was loaded. So, for example is let's you start animation 34 // when all the iframes are in the DOM 35 36 // case "#main #topright[loaded=true] & #main #middle & #mai bottom { event -> clockstart } 37 // clockstart is reality in the live DOM. So #engine #clockstart and this will start ticking inside of it 38 // where ticking is a tag #tick 39 40 }); 41 /** 42 Inicia o TelaSocial e seus ciclio de transição. 43 @public 44 @function 45 */ 46 function startEngine() { 47 48 s1(); 49 setTimeout("cicleMidia()",TEMPO_INICIO_MIDIA); 50 51 } 52 53 /** 54 Faz o ciclo entre as abas 55 @private 56 @function 57 */ 58 function cicleMidia() { 59 setTimeout( function () { 60 var doc = $("#main #middle #abas").get(); 61 doc = document.getElementById("abas-meio").contentDocument; 62 cc.send( doc.getElementById("midia").contentDocument, "container", "rotate"); 63 cicleMidia(); 64 }, TEMPO_REFRESH_MIDIA); 65 } 66 67 function s1() { 68 if(document.location.toString().indexOf("mode")>-1) { 69 var param = document.location.toString().split("mode="); 70 if(param[1]=="tv") { 71 document.getElementById("viewport").style.width="1080"; 72 document.getElementById("viewport").style.height="1920"; 73 tv.add($('#animation li')); 74 animate(); 75 } 76 } 77 } 78 function animate() { 79 tv.play(); 80 setTimeout("animate()",TEMPO_REFRESH_ABAS); 81 } 82 83 84