[IMP] edi: improve EDI preview sidebar (wip)

bzr revid: odo@openerp.com-20111026175542-dh5ma5be3bt25n2h
This commit is contained in:
Olivier Dony 2011-10-26 19:55:42 +02:00
parent f868c902d3
commit 000f3cad33
2 changed files with 39 additions and 14 deletions

View File

@ -33,6 +33,7 @@ button.oe_edi_action_print img {
.oe_edi_nested_block {
margin-left: 25px;
padding: 0px;
display: none; /* made visible by click on parent input/label */
}
.oe_edi_right_top .oe_edi_nested_block label {
float: left;
@ -42,6 +43,16 @@ button.oe_edi_action_print img {
font-weight: bold;
min-width: 5em;
}
.oe_edi_option {
padding-left: 5px;
line-height: 2em;
}
.oe_edi_option:hover {
background: #e8e8e8;
}
.oe_edi_import_button {
margin: 1em 2em;
}
/** Paperbox, from http://www.sitepoint.com/pure-css3-paper-curl/ **/
body {
@ -50,7 +61,8 @@ body {
.oe_edi_paperbox {
position: relative;
width: 700px;
padding: 5%;
padding: 30px;
padding-bottom: 50px;
margin: 0 auto;
background-color: #fff;
-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.1);

View File

@ -25,29 +25,42 @@
<p class="oe_edi_sidebar_title">
Import this document
</p>
<input type="radio" id="oe_edi_import_openerp" name="oe_edi_import"/>
<label for="oe_edi_import_openerp">Import it into an existing OpenERP instance</label>
<p class="oe_edi_nested_block">
<label for="oe_edi_txt_saas_url">OpenERP instance address:</label>
<div class="oe_edi_option">
<input type="radio" id="oe_edi_import_openerp" name="oe_edi_import" class="oe_edi_import_choice"/>
<label for="oe_edi_import_openerp" id="oe_edi_import_openerp" class="oe_edi_import_choice_label">Import it into an existing OpenERP instance</label>
</div>
<p class="oe_edi_nested_block" id="oe_edi_import_openerp_nested">
<label for="oe_edi_txt_server_url">OpenERP instance address:</label>
<br/>
http://<input type="text" id="oe_edi_txt_server_url"/>
</p>
<input type="radio" id="oe_edi_import_saas" name="oe_edi_import"/>
<label for="oe_edi_import_saas">Import it into a new OpenERP Online instance:</label>
<br/>
<br/>
<input type="radio" id="oe_edi_import_download" name="oe_edi_import"/>
<label for="oe_edi_import_download">Import into another application</label>
<br/>
<br/>
<div class="oe_edi_option">
<input type="radio" id="oe_edi_import_saas" name="oe_edi_import" class="oe_edi_import_choice"/>
<label for="oe_edi_import_saas" id="oe_edi_import_saas" class="oe_edi_import_choice_label">Import it into a new OpenERP Online instance:</label>
</div>
<div class="oe_edi_option">
<input type="radio" id="oe_edi_import_download" name="oe_edi_import" class="oe_edi_import_choice"/>
<label for="oe_edi_import_download" id="oe_edi_import_download" class="oe_edi_import_choice_label">Import into another application</label>
</div>
<button type="button" class="oe_edi_import_button">Continue</button>
<div class="oe_edi_right_bottom">
<t t-raw="widget.sidebar"/>
</div>
<script type="text/javascript">
$(document).ready(function() {
console.log('installing');
$('.oe_edi_import_choice, .oe_edi_import_choice_label').click(function($event) {
$('.oe_edi_nested_block').hide();
$('#'+$event.target.id+'_nested').show();
return true;
});
});
</script>
</td>
</tr>
</table>