Mauvais nom de propriété
This commit is contained in:
parent
d8eb327bab
commit
6859df7acc
@ -37,7 +37,7 @@ function fodsContent() {
|
|||||||
<h1>Exemple pour le développement</h1>
|
<h1>Exemple pour le développement</h1>
|
||||||
<p>Le contenu du fichier .fods est affiché après la table</p>
|
<p>Le contenu du fichier .fods est affiché après la table</p>
|
||||||
<div>
|
<div>
|
||||||
<p><a href="blob:" download="test1.fods" id="link" onclick="fodsLink()" id="link">Version ODS</a></p>
|
<p><a href="blob:" download="test1.fods" id="link" onclick="fodsLink()">Version ODS</a></p>
|
||||||
<table id="table"
|
<table id="table"
|
||||||
data-od-sheetname="Tableau de suivi"
|
data-od-sheetname="Tableau de suivi"
|
||||||
data-od-currency="EUR"
|
data-od-currency="EUR"
|
||||||
@ -84,6 +84,10 @@ function fodsContent() {
|
|||||||
<td data-od-type="currency" data-od-text="1250">1100 €</td>
|
<td data-od-type="currency" data-od-text="1250">1100 €</td>
|
||||||
<td data-od-type="currency" data-od-currency="USD" data-text="-1315" class="essai">-$2500</td>
|
<td data-od-type="currency" data-od-currency="USD" data-text="-1315" class="essai">-$2500</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td data-od-type="date" data-od-text="2020-12-01">01/12/2020</td>
|
||||||
|
<td data-od-type="date" data-od-text="2021-01-11">11/01/2021</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<pre id="text"></pre>
|
<pre id="text"></pre>
|
||||||
|
@ -1,12 +1,22 @@
|
|||||||
/* global OpenDocument */
|
/* global OpenDocument */
|
||||||
|
|
||||||
var Html2Ods = {};
|
var Html2Ods = function (output, table, options) {
|
||||||
|
//compile target
|
||||||
|
|
||||||
|
switch(output) {
|
||||||
|
case "blob":
|
||||||
|
return OpenDocument.OdsConverter.convertToBlob(table, options);
|
||||||
|
case "xml":
|
||||||
|
return OpenDocument.OdsConverter.convertToXml(table, options);
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Html2Ods.blob = function (table, options) {
|
Html2Ods.blob = function (table, options) {
|
||||||
return OpenDocument.OdsConverter.convertToBlob(table, options);
|
return Html2Ods("blob", table, options);
|
||||||
};
|
};
|
||||||
|
|
||||||
Html2Ods.xml = function (table, options) {
|
Html2Ods.xml = function (table, options) {
|
||||||
return OpenDocument.OdsConverter.convertToXml(table, options);
|
return Html2Ods("xml", table, options);
|
||||||
};
|
};
|
||||||
|
@ -75,7 +75,7 @@ OpenDocument.StyleManager.prototype.getAutomaticCellStyleName = function (type,
|
|||||||
}
|
}
|
||||||
styleKey += parentStyleName;
|
styleKey += parentStyleName;
|
||||||
if (this.hasStyle("cell-automatic", styleKey)) {
|
if (this.hasStyle("cell-automatic", styleKey)) {
|
||||||
return this.getStyle("cell-automatic", styleKey).name;
|
return this.getStyle("cell-automatic", styleKey).styleName;
|
||||||
}
|
}
|
||||||
var name = OpenDocument.CELLSTYLE_PREFIX + this.automaticStyleNumber;
|
var name = OpenDocument.CELLSTYLE_PREFIX + this.automaticStyleNumber;
|
||||||
this.automaticStyleNumber++;
|
this.automaticStyleNumber++;
|
||||||
|
Loading…
Reference in New Issue
Block a user