table editing fix
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Wed, 5 Dec 2012 16:27:05 +0000 (17:27 +0100)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Wed, 5 Dec 2012 16:27:05 +0000 (17:27 +0100)
redakcja/static/css/html.css
redakcja/static/xsl/wl2html_client.xsl

index 5e9ac19..d7f2a7a 100644 (file)
@@ -604,6 +604,7 @@ div[x-node] > .uwaga {
     margin: 0px;
     padding: 0px;
     width: 100%;
+    min-width: 600px; /* for editing narrow elements */
     height: 100%;
     z-index: 0;
     font-size: 10pt;
@@ -731,7 +732,21 @@ div[x-node] > .uwaga {
     color: #990066;
 }
 
-.htmlview .kol div {
+.htmlview .tabela {
+    display: table;
+}
+
+.htmlview .wiersz {
+    display: table-row;
+}
+
+.htmlview .kol {
+    min-width: 200px;
+    display: table-cell;
+    padding: 5px;
+}
+
+.htmlview .kol span {
     position: relative;
 }
 
index 97f5de3..8be6e22 100644 (file)
     <!--
         Tabela
     -->
-    <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>
+      <span>
+        <xsl:call-template name="standard-attributes" />
+        <xsl:apply-templates select="child::node()">
+         <xsl:with-param name="mixed" select="true()" />
+        </xsl:apply-templates>
+      </span>
     </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 -->
+      <span>
             <xsl:call-template name="standard-attributes" />
+           <div x-editable="true" x-node="kol-inside" x-pass-thru="true">
               <xsl:apply-templates select="child::node()">
-                <xsl:with-param name="mixed" select="true()" />
+               <xsl:with-param name="mixed" select="true()" />
               </xsl:apply-templates>
            </div>
-      </td>
+      </span>
     </xsl:template>
 
+
     <!--
         Obraz
     -->
     <!--
         Semantyczne pudełka
     -->
-    <xsl:template match="pomoce|forma|czas|opis">
+    <xsl:template match="pomoce|forma|czas|opis|kol-inside">
       <span x-editable="true">
             <xsl:call-template name="standard-attributes" />
             <xsl:apply-templates select="child::node()">