
package views.html

import play.templates._
import play.templates.TemplateMagic._

import play.api.templates._
import play.api.templates.PlayMagic._
import models._
import controllers._
import play.api.i18n._
import play.api.mvc._
import play.api.data._
import views.html._
/**/
object table extends BaseScalaTemplate[play.api.templates.Html,Format[play.api.templates.Html]](play.api.templates.HtmlFormat) with play.api.templates.Template3[String,String,RequestHeader,play.api.templates.Html] {

    /**/
    def apply/*1.2*/(turnier: String, ipAddr: String)(implicit request: RequestHeader):play.api.templates.Html = {
        _display_ {

Seq[Any](format.raw/*1.68*/("""

<!DOCTYPE html>  

<meta charset="utf-8" /> 

<head>
    <title>TTC Turnierserver</title> 

    <link rel="shortcut icon" type="image/png" href=""""),_display_(Seq[Any](/*10.55*/routes/*10.61*/.Assets.at("images/favicon.png"))),format.raw/*10.93*/("""">
    <link rel="stylesheet" type="text/css" media="screen" href=""""),_display_(Seq[Any](/*11.66*/routes/*11.72*/.Assets.at("stylesheets/main.css"))),format.raw/*11.106*/("""">
    <script type="text/javascript" src=""""),_display_(Seq[Any](/*12.42*/routes/*12.48*/.Assets.at("javascripts/jquery-1.7.1.js"))),format.raw/*12.89*/(""""></script>
    <script type="text/javascript" src=""""),_display_(Seq[Any](/*13.42*/routes/*13.48*/.Assets.at("javascripts/jquery-play-1.7.1.js"))),format.raw/*13.94*/(""""></script>
    <script type="text/javascript" src=""""),_display_(Seq[Any](/*14.42*/routes/*14.48*/.Assets.at("javascripts/underscore-min.js"))),format.raw/*14.91*/(""""></script>
    <script type="text/javascript" src=""""),_display_(Seq[Any](/*15.42*/routes/*15.48*/.Assets.at("javascripts/backbone-min.js"))),format.raw/*15.89*/(""""></script>
    <script type="text/javascript" src=""""),_display_(Seq[Any](/*16.42*/routes/*16.48*/.Assets.at("javascripts/main.js"))),format.raw/*16.81*/(""""></script>
 
 <script language="javascript" type="text/javascript"> 
   var output;  
  
   function init() 
   """),format.raw("""{"""),format.raw/*22.5*/("""     
	 var WS = window['MozWebSocket'] ? MozWebSocket : WebSocket;
	 var wslocUri = """"),_display_(Seq[Any](/*24.20*/routes/*24.26*/.Application.index().webSocketURL())),format.raw/*24.61*/("""";
	 var wsUri = wslocUri.replace("localhost",""""),_display_(Seq[Any](/*25.46*/ipAddr)),format.raw/*25.52*/("""");
     
     websocket = new WS(wsUri); 
     websocket.onopen = function(evt)    """),format.raw("""{"""),format.raw/*28.43*/(""" onOpen(evt) """),format.raw("""}"""),format.raw/*28.57*/("""; 
     websocket.onclose = function(evt)   """),format.raw("""{"""),format.raw/*29.43*/(""" onClose(evt) """),format.raw("""}"""),format.raw/*29.58*/("""; 
     websocket.onmessage = function(evt) """),format.raw("""{"""),format.raw/*30.43*/(""" onMessage(evt) """),format.raw("""}"""),format.raw/*30.60*/("""; 
     websocket.onerror = function(evt)   """),format.raw("""{"""),format.raw/*31.43*/(""" onError(evt) """),format.raw("""}"""),format.raw/*31.58*/(""";   
     
     // zum Testen
     output = document.getElementById("output"); 
     writeDebug("INIT websocket");
   """),format.raw("""}"""),format.raw/*36.5*/("""  
   
   function onOpen(evt) 
   """),format.raw("""{"""),format.raw/*39.5*/(""" 
     doSend("WebSocket message from ROLI ;-)"); 
   """),format.raw("""}"""),format.raw/*41.5*/("""  
  
   function onClose(evt) 
   """),format.raw("""{"""),format.raw/*44.5*/(""" 
	   setLogo("Verbindung zum Server unterbrochen!");
	   writeDebug("DISCONNECTED");  
   """),format.raw("""}"""),format.raw/*47.5*/("""  
  
   function onMessage(evt) 
   """),format.raw("""{"""),format.raw/*50.5*/(""" 
	  var data = JSON.parse(evt.data);
	  
	  // Handle errors
      if(data.error) """),format.raw("""{"""),format.raw/*54.23*/("""
    	setLogo("Verbindung zum Server unterbrochen!");

    	writeDebug("ERROR: onMessage");
        return
      """),format.raw("""}"""),format.raw/*59.8*/(""" else """),format.raw("""{"""),format.raw/*59.15*/("""
    	writeDebug("GET(cmd): " + data.cmd);
  	    // cmd - 1 Tischinfo setzen
    	if (data.cmd == 1) """),format.raw("""{"""),format.raw/*62.26*/(""" 
  	      setRow(data.pos, data.klasse, data.player1, data.player2, data.club1, data.club2, data.tisch, data.info);
	    """),format.raw("""}"""),format.raw/*64.7*/("""
  	    // cmd - 2 Anzahl der Zeilen der Tabelle setzen
  	    if (data.cmd == 2) """),format.raw("""{"""),format.raw/*66.28*/(""" 
  	      setRowAnzahl(data.valInt);
  	    """),format.raw("""}"""),format.raw/*68.9*/("""    	
  	    // cmd - 2 Anzahl der Zeilen der Tabelle setzen
  	    if (data.cmd == 3) """),format.raw("""{"""),format.raw/*70.28*/(""" 
  	      setTitle(data.valStr, 'TTCtable');
  	    """),format.raw("""}"""),format.raw/*72.9*/("""
  	    if (data.cmd == 4) """),format.raw("""{"""),format.raw/*73.28*/(""" 
    	      setLogo(data.valStr);
    	"""),format.raw("""}"""),format.raw/*75.7*/("""    
      """),format.raw("""}"""),format.raw/*76.8*/("""
   """),format.raw("""}"""),format.raw/*77.5*/("""  
  
   function onError(evt) 
   """),format.raw("""{"""),format.raw/*80.5*/(""" 
	  writeDebug("ERROR: " + evt.data);  
   """),format.raw("""}"""),format.raw/*82.5*/("""  
  
   function doSend(message) 
   """),format.raw("""{"""),format.raw/*85.5*/(""" 
	  writeDebug("SENT: " + message);  
      websocket.send(message); 
   """),format.raw("""}"""),format.raw/*88.5*/("""  
 
  
   function writeDebug(message) 
   """),format.raw("""{"""),format.raw/*92.5*/(""" 
      //msg = document.getElementById('trace').value;   
      //if (msg != "") """),format.raw("""{"""),format.raw/*94.25*/("""
      //	  msg = msg + "\n" + message;
      //"""),format.raw("""}"""),format.raw/*96.10*/(""" else """),format.raw("""{"""),format.raw/*96.17*/("""
      //	 msg = message;
       //"""),format.raw("""}"""),format.raw/*98.11*/("""
      //$("#trace").val(msg); 
   """),format.raw("""}"""),format.raw/*100.5*/("""  
  
   function setRow(pos, klasse, nameA, nameB, vereinA, vereinB, tisch, info)"""),format.raw("""{"""),format.raw/*102.78*/("""
	  var x=document.getElementById('TTCtable').rows;
	  var z=x[pos+1].cells;
		writeDebug("setRow");
		z[0].innerHTML = klasse;
		z[1].innerHTML = nameA + "&nbsp;" + "<span class=TT_Club>(" + vereinA   + ")</span>";
		z[3].innerHTML = nameB + "&nbsp;" + "<span class=TT_Club>(" + vereinB   + ")</span>";
		z[4].innerHTML = tisch;
		z[5].innerHTML = info;
   """),format.raw("""}"""),format.raw/*111.5*/("""
   
   function setRowAnzahl(nr) 
   """),format.raw("""{"""),format.raw/*114.5*/("""
	   var rowCount=document.getElementById('TTCtable').rows.length; 
	   if (rowCount > nr) """),format.raw("""{"""),format.raw/*116.25*/("""
		   for (i=1;i<=rowCount-nr;i++) """),format.raw("""{"""),format.raw/*117.36*/("""
		   	   deleteRow('TTCtable');
		   """),format.raw("""}"""),format.raw/*119.7*/("""
	   """),format.raw("""}"""),format.raw/*120.6*/("""   
	   if (rowCount < nr) """),format.raw("""{"""),format.raw/*121.25*/("""
		   for (i=1;i<=nr-rowCount;i++) """),format.raw("""{"""),format.raw/*122.36*/("""
		   	  addRow('TTCtable');
		   """),format.raw("""}"""),format.raw/*124.7*/("""
	   """),format.raw("""}"""),format.raw/*125.6*/("""
   """),format.raw("""}"""),format.raw/*126.5*/("""
	   
   function deleteRow(tabId) """),format.raw("""{"""),format.raw/*128.31*/("""
	   try """),format.raw("""{"""),format.raw/*129.10*/("""
		   var table = document.getElementById(tabId);
		   var rCount = table.rows.length;
		   
		   table.deleteRow(rCount-1);
	   """),format.raw("""}"""),format.raw/*134.6*/(""" catch(e) """),format.raw("""{"""),format.raw/*134.17*/("""
		   writeDebug("Error deleteRow")
	   """),format.raw("""}"""),format.raw/*136.6*/("""
   """),format.raw("""}"""),format.raw/*137.5*/("""
   
   function addRow(tabId)"""),format.raw("""{"""),format.raw/*139.27*/("""
	   var table = document.getElementById(tabId);
	   var rCount = table.rows.length;
	   var row = table.insertRow(rCount);
	   row.className ='TT_Row';
	   var cell0 = row.insertCell(0);
	   cell0.innerHTML = "KlasseX";
	   cell0.className = 'TT_Class';
	   var cell1 = row.insertCell(1);
	   cell1.innerHTML = "SpielerA";
	   cell1.className = 'TT_Player1';
	   var cell2 = row.insertCell(2);
	   cell2.innerHTML = "-";
	   cell2.className = 'TT_TableDash';
	   var cell3 = row.insertCell(3);
	   cell3.innerHTML = "SpielerB";
	   cell3.className = 'TT_Player2';	   
	   var cell4 = row.insertCell(4);
	   cell4.innerHTML = "99";
	   cell4.className = 'TT_TableNo';
	   var cell5 = row.insertCell(5);
	   cell5.innerHTML = "23:49";
	   cell5.className = 'TT_Info';		   
   """),format.raw("""}"""),format.raw/*162.5*/("""
  
   function setLogo(text)"""),format.raw("""{"""),format.raw/*164.27*/("""
       var x=document.getElementById('TTlogo');
	   x.innerHTML = text;
	   x.className ='TTClogoRed';
   """),format.raw("""}"""),format.raw/*168.5*/("""   
   
   function setTitle (title, tabId)"""),format.raw("""{"""),format.raw/*170.37*/("""
       var x=document.getElementById('TTCtable').rows;
	   var z=x[0].cells;
	   writeDebug("setTitle");
	   z[0].innerHTML = title;
   """),format.raw("""}"""),format.raw/*175.5*/("""     
   
   window.addEventListener("load", init, false);   
 </script>  
  
  
 <style type="text/css">
    #TTCtable """),format.raw("""{"""),format.raw/*182.16*/("""
        border-collapse: collapse;
    """),format.raw("""}"""),format.raw/*184.6*/("""
    #TTCbar """),format.raw("""{"""),format.raw/*185.14*/("""
        border-bottom: 1px solid red;
    """),format.raw("""}"""),format.raw/*187.6*/("""
 </style>  
</head>
      
<body>
  <header>
     <a href="http://www.ttcfreising.de" id="TTlogo" class="TTClogo"><span>TTC&nbsp;</span>Turnierprogramm</a>
     <a href="http://www.ttcfreising.de" id="user"><img width="52" height="60" alt="TTC Freising" src=""""),_display_(Seq[Any](/*194.105*/routes/*194.111*/.Assets.at("images/TTCFreising.gif"))),format.raw/*194.147*/(""""></a>
     <!--
     <dl id="user">
        <dt>Robert<span>robttc</span></dt>
           <dd>
                <a href="http://www.ttcfreising.de">TTCLogout</a>
            </dd>
        </dl> ---->   
  </header>
        
  <section id="main">
    <table id="TTCtable" class="Tischanzeige" style="width: 95%">
       <colgroup>
         <col width="16%">
         <col align="right" width="33%">
         <col width="2%">
         <col width="33%">
         <col width="6%">
         <col width="10%">
      </colgroup>
    <tbody>
      <tr>
         <td colspan="6" class="TT_Title">Tischtennis Turnier</td>
      </tr>
    
      <tr class="TT_Row"  >
        <td class="TT_ClassHeader">Klasse</td>
        <td class="TT_PlayerHeader"colspan="3">Spielpaarung</td>
        <td class="TT_TableNoHeader">Tisch</td>
        <td class="TT_InfoHeader">Info</td>
      </tr>

      """),_display_(Seq[Any](/*226.8*/for(i <- 1 to 0) yield /*226.24*/ {_display_(Seq[Any](format.raw/*226.26*/("""
        <tr class="TT_Row">
          <td class="TT_Class">Klasse</td>
          <td class="TT_Player1">SpielerA<span class="TT_Club">VereinA</span></td>
          <td class="TT_TableDash">-</td>
          <td class="TT_Player2">SpielerB<span class="TT_Club">VereinB</span></td>
          <td class="TT_TableNo">99</td>
          <td class="TT_Info">Info</td>
        </tr>
      """)))})),format.raw/*235.8*/("""    
    </tbody>
   </table>
            
   <!-- Textarea zur Ausgabe von WebSocket Debug-Informationen   
   <div align=center>
        <p>&nbsp;</p>
        <p><span style="font-size:150%">Debug Fenster</span></p>
        <textarea id="trace"  cols="80" rows="10"></textarea>
        <p>&nbsp;</p>
   </div>
    END Textarea    ------------------------------------------>     
          
  </section>
</body>
</html>"""))}
    }
    
    def render(turnier:String,ipAddr:String,request:RequestHeader) = apply(turnier,ipAddr)(request)
    
    def f:((String,String) => (RequestHeader) => play.api.templates.Html) = (turnier,ipAddr) => (request) => apply(turnier,ipAddr)(request)
    
    def ref = this

}
                /*
                    -- GENERATED --
                    DATE: Sat Nov 10 11:58:04 CET 2012
                    SOURCE: /Users/Robert/Development/play/ttcturnierserver/app/views/table.scala.html
                    HASH: a90d73fe4d4f6fd8da442aae2b04ed64865b7da8
                    MATRIX: 526->1|669->67|853->215|868->221|922->253|1026->321|1041->327|1098->361|1178->405|1193->411|1256->452|1345->505|1360->511|1428->557|1517->610|1532->616|1597->659|1686->712|1701->718|1764->759|1853->812|1868->818|1923->851|2083->965|2206->1052|2221->1058|2278->1093|2362->1141|2390->1147|2522->1232|2583->1246|2675->1291|2737->1306|2829->1351|2893->1368|2985->1413|3047->1428|3212->1547|3294->1583|3395->1638|3477->1674|3615->1766|3699->1804|3830->1888|3990->2002|4044->2009|4194->2112|4363->2235|4493->2318|4585->2364|4720->2452|4820->2506|4895->2534|4982->2575|5040->2587|5091->2592|5173->2628|5264->2673|5349->2712|5470->2787|5561->2832|5691->2915|5787->2964|5841->2971|5924->3007|6007->3043|6138->3126|6544->3485|6630->3524|6770->3616|6854->3652|6940->3691|6993->3697|7069->3725|7153->3761|7235->3796|7288->3802|7340->3807|7424->3843|7482->3853|7659->3983|7718->3994|7806->4035|7858->4040|7937->4071|8760->4847|8838->4877|8993->4985|9085->5029|9270->5167|9439->5288|9527->5329|9589->5343|9680->5387|9979->5648|9996->5654|10056->5690|10973->6571|11006->6587|11047->6589|11461->6971
                    LINES: 19->1|22->1|31->10|31->10|31->10|32->11|32->11|32->11|33->12|33->12|33->12|34->13|34->13|34->13|35->14|35->14|35->14|36->15|36->15|36->15|37->16|37->16|37->16|43->22|45->24|45->24|45->24|46->25|46->25|49->28|49->28|50->29|50->29|51->30|51->30|52->31|52->31|57->36|60->39|62->41|65->44|68->47|71->50|75->54|80->59|80->59|83->62|85->64|87->66|89->68|91->70|93->72|94->73|96->75|97->76|98->77|101->80|103->82|106->85|109->88|113->92|115->94|117->96|117->96|119->98|121->100|123->102|132->111|135->114|137->116|138->117|140->119|141->120|142->121|143->122|145->124|146->125|147->126|149->128|150->129|155->134|155->134|157->136|158->137|160->139|183->162|185->164|189->168|191->170|196->175|203->182|205->184|206->185|208->187|215->194|215->194|215->194|247->226|247->226|247->226|256->235
                    -- GENERATED --
                */
            