diff options
| author | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-06-20 20:13:04 +0530 |
|---|---|---|
| committer | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2012-06-20 20:13:04 +0530 |
| commit | 235cca3aabd83d23cca0d93852bdaf55d9183667 (patch) | |
| tree | 057938018dd13626794be8b756de566a599b7cfe /addons/web/static/src/xml/base.xml | |
| parent | 596ebb826f981ab1077f192f6dd5aca1e2c72a22 (diff) | |
| parent | 590937d49a802f4565daa712f1e0d63c96b0bf6b (diff) | |
[MERGE]merge with trunk and remove conflicts.
bzr revid: vme@tinyerp.com-20120620144304-yr9zodv1skkrlccf
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 141 |
1 files changed, 55 insertions, 86 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 1e2318a426a..d880293a04a 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -117,7 +117,7 @@ <t t-name="DatabaseManager"> <div class="oe_database_manager"> <div class="oe_database_manager_menu"> - <ul class="oe_form_notebook"> + <ul class="oe_notebook"> <li><a href="#db_create">Create</a></li> <li><a href="#db_drop">Drop</a></li> <li><a href="#db_backup">Backup</a></li> @@ -404,7 +404,7 @@ <col width="33%"/> <col width="33%"/> <col width="34%"/> - <tr class="oe_header_row"> + <tr class="oe_header_row oe_header_row_top"> <td colspan="2"> <h2 class="oe_view_title" t-if="widget.flags.display_title !== false"> <span class="oe_view_title_text"><t t-esc="widget.display_title()"/></span> @@ -424,7 +424,7 @@ <td> <ul class="oe_view_manager_switch oe_button_group oe_right"> <t t-if="widget.views_src.length > 2" t-foreach="widget.views_src" t-as="view"> - <li t-if="view.view_type != 'form'" class="oe_e"><a t-attf-class="oe_vm_switch_#{view.view_type}" t-att-data-view-type="view.view_type" t-att-title="view.label || view.view_type"> + <li t-if="view.view_type != 'form'" class="oe_e"><a t-attf-class="oe_vm_switch_#{view.view_type}" t-att-data-view-type="view.view_type" t-att-title="_t('Switch to ') + (view.label || view.view_type)"> </a></li> </t> </ul> @@ -433,7 +433,6 @@ </tr> </table> - <div class="oe_view_manager_body"> <t t-foreach="widget.views_src" t-as="view"> <div t-attf-class="oe_view_manager_view_#{view.view_type}"/> @@ -517,49 +516,23 @@ <a class="oe_sidebar_action_a" t-att-title="item.title" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank"> <t t-raw="item.label"/> </a> + <a t-if="section.name == 'files'" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a> </li> - <li t-if="section.name == 'files'" class="oe_sidebar_add" style="display:none;"> - Input type file stuff + <li t-if="section.name == 'files'" class="oe_sidebar_add_attachment"> + <t t-call="HiddenInputFile"> + <t t-set="fileupload_id" t-value="widget.fileupload_id"/> + <t t-set="fileupload_action">/web/binary/upload_attachment</t> + <input type="hidden" name="model" t-att-value="widget.dataset and widget.dataset.model"/> + <input type="hidden" name="id" t-att-value="widget.model_id"/> + <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/> + <span>Add...</span> + </t> </li> </ul> </div> </t> </div> </t> -<t t-name="Sidebar.attachments"> - <div class="oe-sidebar-attachments-toolbar"> - <div class="oe-binary-file-set" style="float: right"> - <form class="oe-binary-form" t-attf-target="#{element_id}_iframe" - method="post" enctype="multipart/form-data" action="/web/binary/upload_attachment"> - <input type="hidden" name="session_id" t-att-value="session.session_id"/> - <input type="hidden" name="callback" t-attf-value="#{element_id}_iframe"/> - <input type="hidden" name="model" t-att-value="view.dataset.model"/> - <input type="hidden" name="id" t-att-value="view.datarecord.id"/> - <button class="oe_button" type="button"> - <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16" style="display: none"/> - <span>Add</span> - </button> - <input type="file" class="oe-binary-file" name="ufile" title="Add attachment" - t-att-onclick="view.datarecord.id ? null : 'alert(\'No record selected ! You can only attach to existing record.\'); return false;'"/> - </form> - <iframe t-attf-id="#{element_id}_iframe" t-attf-name="#{element_id}_iframe" style="display: none"/> - </div> - </div> - <br style="clear: both"/> - <ul class="oe-sidebar-attachments-items"> - <li t-foreach="attachments" t-as="attachment"> - <t t-if="attachment.type == 'binary'" t-set="attachment.url" t-value="_s + '/web/binary/saveas?session_id=' - + session.session_id + '&model=ir.attachment&id=' + attachment.id - + '&field=datas&filename_field=name&t=' + (new Date().getTime())"/> - <a class="oe-sidebar-attachments-link" t-att-href="attachment.url" target="_blank"> - <t t-esc="attachment.name"/> - </a> - <a href="#" class="oe-sidebar-attachment-delete" t-att-data-id="attachment.id" t-attf-title="Delete the attachment #{attachment.name}"> - <img t-att-src='_s + "/web/static/src/img/attachments-close.png"' width="15" height="15" border="0"/> - </a> - </li> - </ul> -</t> <t t-name="TreeView"> <select t-if="toolbar" style="width: 30%"> @@ -642,8 +615,8 @@ </tfoot> </table> <div t-name="ListView.buttons" class="oe_list_buttons"> - <t t-if="!widget.no_leaf and widget.options.action_buttons !== false"> - <button type="button" class="oe_button oe_list_add oe_form_button_hi" t-if="widget.options.addable"> + <t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable"> + <button type="button" class="oe_button oe_list_add oe_highlight"> <t t-esc="widget.options.addable"/> </button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_list_button_import">Import</a> @@ -791,11 +764,11 @@ </t> <t t-name="FormRenderingGroup"> <t t-if="string" t-call="FormRenderingSeparator"/> - <table border="0" cellpadding="0" cellspacing="0" width="100%" t-attf-class="oe_form_group #{classnames}"/> + <table border="0" cellpadding="0" cellspacing="0" t-attf-class="oe_form_group #{classnames}"/> </t> <t t-name="FormRenderingNotebook"> <div> - <ul t-attf-class="oe_form_notebook #{classnames}"> + <ul t-attf-class="oe_notebook #{classnames}"> <li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers"> <a t-attf-href="##{page.id}"> <t t-esc="page.string"/> @@ -805,7 +778,7 @@ </div> </t> <t t-name="FormRenderingNotebookPage"> - <div t-attf-class="oe_form_notebook_page #{classnames}" t-att-id="id"> + <div t-attf-class="oe_notebook_page #{classnames}" t-att-id="id"> </div> </t> <t t-name="FormRenderingSeparator"> @@ -903,9 +876,6 @@ <span class="oe_form_field oe_form_field_email oe_form_field_with_button"> <a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/> <t t-if="!widget.get('effective_readonly')"> - <button class="oe_button" tabindex="-1" type="button" title="Send an e-mail with your default e-mail client"> - <img t-att-src='_s + "/web/static/src/img/icons/terp-mail-message-new.png"'/> - </button> <div> <input type="text" t-att-id="widget.id_for_label" @@ -1009,7 +979,7 @@ </t> </t> <t t-name="FieldReference"> - <table class="oe_form_field oe_form_field_reference oe_form" border="0" cellpadding="0" cellspacing="0"> + <table class="oe_form_field oe_form_field_reference" border="0" cellpadding="0" cellspacing="0"> <tr> <td t-attf-class="oe_form_frame_cell oe_form_selection"> <span t-attf-class="oe_form_view_reference_selection"/> @@ -1049,21 +1019,13 @@ </t> <t t-name="FieldBinaryImage"> <span class="oe_form_field oe_form_field_image"> - <div class="oe_form_field_image_controls"> - <div class="oe-binary-file-set"> - <form class="oe-binary-form" t-att-target="widget.iframe" - method="post" enctype="multipart/form-data" action="/web/binary/upload"> - <input type="hidden" name="session_id" value=""/> - <input type="hidden" name="callback" t-att-value="widget.iframe"/> - <button class="oe_button" type="button" title="Set Image"> - <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/> - </button> - <input type="file" class="oe-binary-file" name="ufile" - t-att-tabindex="widget.node.attrs.tabindex" - t-att-autofocus="widget.node.attrs.autofocus" - /> - </form> - </div> + <div class="oe_form_field_image_controls oe_edit_only"> + <t t-call="HiddenInputFile"> + <t t-set="fileupload_id" t-value="widget.fileupload_id"/> + <button class="oe_button" type="button" title="Set Image"> + <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/> + </button> + </t> <button class="oe_button oe-binary-file-clear" type="button" title="Clear"> <img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/> </button> @@ -1071,7 +1033,6 @@ <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/> <b>Uploading ...</b> </div> - <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"/> </div> </span> </t> @@ -1099,24 +1060,22 @@ <table cellspacing="0" cellpadding="0" border="0"> <tr> <td> - <div class="oe-binary-file-set" style="width: 80px; height:22px;"> - <form class="oe-binary-form" t-att-target="widget.iframe" - method="post" enctype="multipart/form-data" action="/web/binary/upload"> - <input type="hidden" name="session_id" value=""/> - <input type="hidden" name="callback" t-att-value="widget.iframe"/> - <button class="oe_button oe_field_button" type="button" title="Set Image"> - <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/> - <span>Select</span> - </button> - <input type="file" class="oe-binary-file" name="ufile"/> - </form> - </div> + <t t-call="HiddenInputFile"> + <t t-set="fileupload_id" t-value="widget.fileupload_id"/> + <t t-set="fileupload_style">width: 83px;</t> + <button class="oe_button oe_field_button" type="button" title="Set Image"> + <img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/> + <span>Select</span> + </button> + </t> </td> <td> - <button class="oe_button oe-binary-file-save" type="button" title="Save As"> - <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/> - <span>Save As</span> - </button> + <a class="oe_binary_file_save_data"> + <button class="oe_button oe_binary_file_save" type="button" title="Save As"> + <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/> + <span>Save As</span> + </button> + </a> </td> <td> <button class="oe_button oe-binary-file-clear" type="button" title="Clear"> @@ -1130,7 +1089,6 @@ <td class="oe-binary-progress" style="display: none" nowrap="true"> <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/> <b>Uploading ...</b> - <iframe t-att-id="widget.iframe" t-att-name="widget.iframe" style="display: none"/> </td> </tr> </table> @@ -1141,6 +1099,18 @@ </span> </t> </t> +<t t-name="HiddenInputFile"> + <div t-attf-class="oe_hidden_input_file #{fileupload_class or ''}" t-att-style="fileupload_style"> + <form class="oe-binary-form" t-att-target="fileupload_id" + method="post" enctype="multipart/form-data" t-att-action="fileupload_action || '/web/binary/upload'"> + <input type="hidden" name="session_id" value=""/> + <input type="hidden" name="callback" t-att-value="fileupload_id"/> + <t t-raw="__content__"/> + <input type="file" class="oe-binary-file" name="ufile"/> + </form> + <iframe t-att-id="fileupload_id" t-att-name="fileupload_id" style="display: none"/> + </div> +</t> <t t-name="WidgetButton"> <button type="button" class="oe_button oe_form_button" t-att-tabindex="widget.node.attrs.tabindex" @@ -1204,8 +1174,6 @@ </t> <t t-name="One2Many.viewmanager" t-extend="ViewManager"> - <t t-jquery="span.oe_view_title_text" t-operation="replace"/> - <t t-jquery=".oe-view-manager-header"> this.attr('t-if', 'views.length != 1'); </t> @@ -1280,6 +1248,7 @@ <p>(Any existing filter with the same name will be replaced)</p> </div> </t> + <t t-name="SearchView.render_lines"> <table class="oe-searchview-render-line" border="0" cellspacing="0" cellpadding="0" t-foreach="lines" t-as="line"> @@ -1398,10 +1367,10 @@ </t> </t> </t> -<div t-name="SearchView.Filters" class="oe_searchview_section"> +<div t-name="SearchView.Filters" class="oe_searchview_filters oe_searchview_section"> </div> -<div t-name="SearchView.CustomFilters" class="oe_searchview_section"> +<div t-name="SearchView.CustomFilters" class="oe_searchview_custom oe_searchview_section"> <div> <h3><span class="oe_i">M</span> Custom Filters</h3> <ul class="oe_searchview_custom_list"/> |
