Tables show up in visual editor, and cells are editable
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Fri, 30 Nov 2012 10:25:43 +0000 (11:25 +0100)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Fri, 30 Nov 2012 10:25:43 +0000 (11:25 +0100)
redakcja/static/css/html.css
redakcja/static/xsl/wl2html_client.xsl

index 56b4bdd..8c38106 100644 (file)
@@ -724,3 +724,7 @@ div[x-node] > .uwaga {
 .htmlview .link {
     color: #990066;
 }
 .htmlview .link {
     color: #990066;
 }
+
+.htmlview .kol div {
+    position: relative;
+}
index afb3366..a476c70 100644 (file)
       </dd>
     </xsl:template>
 
       </dd>
     </xsl:template>
 
+
+    <xsl:template match="tabela">
+      <table x-node="tabela" class="tabela">
+        <xsl:call-template name="standard-attributes" />
+       <tbody x-pass-thru="true">
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+       </tbody>
+      </table>
+    </xsl:template>
+
+    <xsl:template match="wiersz">
+      <tr x-node="wiersz" class="wiersz">
+            <xsl:call-template name="standard-attributes" />
+            <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+            </xsl:apply-templates>
+      </tr>
+    </xsl:template>
+
+
+    <xsl:template match="kol">
+      <td x-pass-thru="true">
+           <div x-editable="true" x-node="kol" class="kol">
+             <!-- this wrapper div is necessary for 
+                  relative element to appear correctly
+                  here it's a 'edit' button -->
+            <xsl:call-template name="standard-attributes" />
+              <xsl:apply-templates select="child::node()">
+                <xsl:with-param name="mixed" select="true()" />
+              </xsl:apply-templates>
+           </div>
+      </td>
+    </xsl:template>
+
+
+
+
     <!--
         ****************
          TEKST WŁAŚCIWY
     <!--
         ****************
          TEKST WŁAŚCIWY