[REM] table of no use whatsoever

bzr revid: xmo@openerp.com-20110922155751-rkch0vpmhpolihxa
This commit is contained in:
Xavier Morel 2011-09-22 17:57:51 +02:00
parent 5b7ecef331
commit 6bd754060e
2 changed files with 41 additions and 71 deletions

View File

@ -64,10 +64,6 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
}, this.on_import_results);
},
on_autodetect_data: function() {
if(this.$element.find("#res td")){
this.$element.find("#res td").remove();
this.$element.find("#imported_success").css('display','none');
}
if(!this.$element.find('#csvfile').val()) { return; }
jsonp(this.$element.find('#import_data'), {
url: '/web/import/detect_data'

View File

@ -1390,73 +1390,47 @@
<form name="import_data" id="import_data" action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="session_id" t-att-value="session.session_id"/>
<input type="hidden" name="model" t-att-value="widget_parent.model"/>
<table cellspacing="5" border="0" width="100%">
<tr>
<td width="100%" valign="middle" colspan="4">
<h2 class="separator horizontal">1. Import a .CSV file</h2>
</td>
</tr>
<tr>
<td width="100%" valign="middle" colspan="4">
Select a .CSV file to import. If you need a sample of file to import,
you should use the export tool with the "Import Compatible" option.
</td>
</tr>
<tr>
<td>
<label>CSV File:</label>
<input type="file" id="csvfile" size="50" name="csvfile"/>
</td>
</tr>
<tr>
<td height="10px"></td>
</tr>
<tr>
<td width="100%" valign="middle" colspan="4">
<h2 class="separator horizontal">2. Check your file format</h2>
</td>
</tr>
<tr>
<td width="100%" colspan="4">
<div id="result"></div>
</td>
</tr>
<tr>
<td width="100%" colspan="4">
<fieldset>
<legend style="cursor:pointer;">Import Options</legend>
<table style="display:none">
<tr>
<td colspan="4">
<label for="file_has_headers">Does your file have titles?</label>
<input type="checkbox" checked="checked"
id="file_has_headers"
name="file_has_headers"/>
</td>
</tr>
<tr>
<td><label for="csv_separator">Separator:</label></td>
<td><input type="text" name="csvsep" id="csv_separator" value=","/></td>
<td><label for="csv_delimiter">Delimiter:</label></td>
<td><input type="text" name="csvdel" id="csv_delimiter" value='"'/></td>
</tr>
<tr>
<td><label for="csv_encoding">Encoding:</label></td>
<td>
<select name="csvcode" id="csv_encoding">
<option value="utf-8">UTF-8</option>
<option value="latin1">Latin 1</option>
</select>
</td>
<td><label for="csv_skip" title="For use if CSV files have titles on multiple lines, skips more than a single line during import">
Lines to skip<sup>?</sup>:</label></td>
<td><input type="text" name="csvskip" id="csv_skip" value="0"/></td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<h2 class="separator horizontal">1. Import a .CSV file</h2>
<p>Select a .CSV file to import. If you need a sample of file to import,
you should use the export tool with the "Import Compatible" option.
</p>
<p>
<label for="csvfile">CSV File:</label>
<input type="file" id="csvfile" size="50" name="csvfile"/>
</p>
<h2 class="separator horizontal">2. Check your file format</h2>
<div id="result"></div>
<fieldset>
<legend style="cursor:pointer;">Import Options</legend>
<table style="display:none">
<tr>
<td colspan="4">
<label for="file_has_headers">Does your file have titles?</label>
<input type="checkbox" checked="checked"
id="file_has_headers"
name="file_has_headers"/>
</td>
</tr>
<tr>
<td><label for="csv_separator">Separator:</label></td>
<td><input type="text" name="csvsep" id="csv_separator" value=","/></td>
<td><label for="csv_delimiter">Delimiter:</label></td>
<td><input type="text" name="csvdel" id="csv_delimiter" value='"'/></td>
</tr>
<tr>
<td><label for="csv_encoding">Encoding:</label></td>
<td>
<select name="csvcode" id="csv_encoding">
<option value="utf-8">UTF-8</option>
<option value="latin1">Latin 1</option>
</select>
</td>
<td><label for="csv_skip" title="For use if CSV files have titles on multiple lines, skips more than a single line during import">
Lines to skip<sup>?</sup>:</label></td>
<td><input type="text" name="csvskip" id="csv_skip" value="0"/></td>
</tr>
</table>
</fieldset>
</form>
</t>
<t t-name="ImportView-result">