[cpif] r162 - trunk/frontend-web/skins/default

svn at argo.es svn at argo.es
Mon Jun 18 17:01:31 CEST 2007


Author: alvaro
Date: Mon Jun 18 17:01:30 2007
New Revision: 162

Log:
Cambiado el modo de respuesta en un hilo.
Pasado el doctipe strict.
Cambiados los id para que no sean solo numericos.


Modified:
   trunk/frontend-web/skins/default/body_show_thread.html
   trunk/frontend-web/skins/default/body_show_thread_entry.html
   trunk/frontend-web/skins/default/body_threadlist.html
   trunk/frontend-web/skins/default/header.html

Modified: trunk/frontend-web/skins/default/body_show_thread.html
==============================================================================
--- trunk/frontend-web/skins/default/body_show_thread.html	(original)
+++ trunk/frontend-web/skins/default/body_show_thread.html	Mon Jun 18 17:01:30 2007
@@ -11,8 +11,10 @@
     <ul class="nav">
       %(nav)s
     </ul>
-    <div class="form" id="form">
-      <form  action="%(link_form_new_post)s" method="post" enctype="multipart/form-data">
+    <div>
+    <a href="javascript:responder('hilos',2);">Escribir respuesta</a>
+    <div id="form">
+      <form id="fNewpost" action="%(link_form_new_post)s" method="post" enctype="multipart/form-data">
         Texto:<textarea name="texto" rows="10" cols="60"></textarea><br />
         <input class="form-element" type="submit" name="submit" value="Publicar nuevo mensaje"/>
       </form>
@@ -21,6 +23,28 @@
 </div>
 <script>
 
+function toggleBox(id,type) {
+  if(document.layers) {
+    if(type<2) 
+      document.layers[id].display = type ? "block" : "none";
+    else
+      document.layers[id].display = document.layers[id].display=="none" ? "block" : "none";
+  }
+  else if(document.getElementById) {
+    var obj = document.getElementById(id);
+    if(type<2) 
+      obj.style.display = type ? "block" : "none";
+    else
+      obj.style.display = obj.style.display == "none" ? "block" : "none";
+  }
+  else if(document.all) {
+    if(type<2) 
+      document.all[id].style.display = type ? "block" : "none";
+    else
+      document.all[id].style.display = document.all[id].style.display == "none" ? "block" : "none";
+  }
+}
+
 function responder(id) {
   var post = document.getElementById(id);
 /*   Descomentar si se desea que el formulario original de postear se conserve */
@@ -32,9 +56,13 @@
 /*     finline.id = "form-inline"; */
 /*   } */
 /*   post.appendChild(finline);  */
+
   post.appendChild(document.getElementById("form"));
+  toggleBox('form',1);
+
 }
 
+window.onload = toggleBox('form',0);
 
 </script>
 <div id="footer">

Modified: trunk/frontend-web/skins/default/body_show_thread_entry.html
==============================================================================
--- trunk/frontend-web/skins/default/body_show_thread_entry.html	(original)
+++ trunk/frontend-web/skins/default/body_show_thread_entry.html	Mon Jun 18 17:01:30 2007
@@ -1,10 +1,10 @@
-<div class="%(format)s" id="%(msg_num)s">
+<div class="%(format)s" id="c%(msg_num)s">
   <a name="%(msg_num)s"></a>
   <div class="autor">Autor: %(author)s</div>
   <div class="texto">
     <div class="fecha">Fecha: %(date)s</div>
     %(text)s
-    <div class="responder"><a href="javascript:responder(%(msg_num)s)">Responder</a></div>
+    <div id="rc%(msg_num)s" class="responder"><a href="javascript:responder('c%(msg_num)s')">Responder</a></div>
   </div>
   <p style="clear:both"></p>
 </div>

Modified: trunk/frontend-web/skins/default/body_threadlist.html
==============================================================================
--- trunk/frontend-web/skins/default/body_threadlist.html	(original)
+++ trunk/frontend-web/skins/default/body_threadlist.html	Mon Jun 18 17:01:30 2007
@@ -3,26 +3,26 @@
     %(body)s
   </div>
   <div id="form">
-    <a href="javascript:toggleBox('fNewpost');">Iniciar un nuevo hilo</a>
-    <form id="fNewpost" action="%(link_form_new_thread)s" method="post" enctype="multipart/form-data">
+    <a href="javascript:toggleBox('fNewthread');">Iniciar un nuevo hilo</a>
+    <form id="fNewthread" action="%(link_form_new_thread)s" method="post" enctype="multipart/form-data">
       <label for="titulo">T&iacute;tulo: <input type="text" name="titulo" size="60" value="" /></label><br />
       <label for="texto">Texto: <textarea name="texto" rows="10" cols="60"></textarea></label><br />
       <input class="form-element" type="submit" name="submit" value="Publicar nuevo hilo"/>
     </form>
     <script>
-      function toggleBox(szDivID) {
+      function toggleBox(id) {
         if(document.layers) {
-          document.layers[szDivID].display = document.layers[szDivID].display=="block" ? "none" : "block";
+          document.layers[id].display = document.layers[id].display=="block" ? "none" : "block";
         }
         else if(document.getElementById) {
-          var obj = document.getElementById(szDivID);
+          var obj = document.getElementById(id);
           obj.style.display = obj.style.display == "none" ? "block" : "none";
         }
         else if(document.all) {
-          document.all[szDivID].style.display = document.all[szDivID].style.display == "none" ? "block" : "none";
+          document.all[id].style.display = document.all[id].style.display == "none" ? "block" : "none";
         }
       }
-      window.onload = toggleBox('fNewpost');
+      window.onload = toggleBox('fNewthread');
     </script>
   </div>
   <div id="footer">

Modified: trunk/frontend-web/skins/default/header.html
==============================================================================
--- trunk/frontend-web/skins/default/header.html	(original)
+++ trunk/frontend-web/skins/default/header.html	Mon Jun 18 17:01:30 2007
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!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="es">
   <head>
     <title>%(page_title)s</title>



More information about the cpif mailing list