diff options
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 184 |
1 files changed, 103 insertions, 81 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index fdf5a5a7b5f..3a24bebf924 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -275,7 +275,10 @@ </tr> <tr> <td class="oe_leftbar" valign="top"> - <a href="#" class="oe_logo"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a> + <t t-js="d"> + d.url = '/' + (window.location.search || ''); + </t> + <a t-att-href="url" class="oe_logo"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a> <div class="oe_secondary_menus_container"/> <div class="oe_footer"> Powered by <a href="http://www.openerp.com"><span>Open</span>ERP</a> @@ -324,7 +327,7 @@ </ul> </t> <t t-name="Menu.secondary.link"> - <a href="#" + <a t-attf-href="#menu_id=#{menu.id}&action_id=#{menu.action ? menu.action.split(',')[1] : ''}" t-att-class="menu.children.length ? 'oe_menu_toggler' : 'oe_menu_leaf'" t-att-data-menu="menu.id" t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''" @@ -342,7 +345,7 @@ <ul class="oe_user_menu oe_topbar_item"> <li class="oe_dropdown"> <a href="#" class="oe_dropdown_toggle"> - <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/topbar-avatar.png'"/> + <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/user_menu_avatar.png'"/> <span class="oe_topbar_name"/> </a> <ul class="oe_dropdown_options"> @@ -515,15 +518,52 @@ <button class="oe_dropdown_toggle"><t t-esc="section.label"/></button> <ul class="oe_dropdown_menu"> <li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname"> - <a class="oe_sidebar_action_a" t-att-title="item.title" href="#" t-att-data-section="section.name" t-att-data-index="item_index"> + <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> </li> + <li t-if="section.name == 'files'" class="oe_sidebar_add" style="display:none;"> + Input type file stuff + </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%"> @@ -633,7 +673,7 @@ </t> <tr t-name="ListView.row" t-att-class="row_parity" t-att-data-id="record.get('id')" - t-att-style="view.color_for(record)"> + t-att-style="view.style_for(record)"> <t t-foreach="columns" t-as="column"> <td t-if="column.meta"> @@ -678,8 +718,8 @@ <button type="button" class="oe_button oe_form_button_delete">Delete</button> </span> <span class="oe_form_buttons_edit"> - <button type="button" class="oe_button oe_form_button_save">Save</button> - <button type="button" class="oe_button oe_form_button_cancel">Cancel</button> + <button type="button" class="oe_button oe_form_button_save">Save</button> or + <a href="#" class="oe_form_button_cancel">Discard</a> </span> </t> </div> @@ -690,40 +730,6 @@ </t> </div> </t> -<t t-name="FormView.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> <form t-name="FormView.set_default" class="oe_forms oe_frame"> <t t-set="args" t-value="widget.dialog_options.args"/> <table style="width: 100%"> @@ -787,10 +793,12 @@ <t t-name="FormRenderingForm"> <div class="oe_form_sheetbg"> <div t-attf-class="oe_form_sheet oe_form_sheet_width #{classnames}"> - <group col="4"/> + <group t-if="layout === 'auto'" col="4"/> </div> </div> </t> +<t t-name="FormRenderingSheet" t-extend="FormRenderingForm"> +</t> <t t-name="FormRenderingGroup"> <t t-set="table"> <table border="0" cellpadding="0" cellspacing="0" width="100%" t-att-class="classnames"/> @@ -808,7 +816,7 @@ <t t-name="FormRenderingNotebook"> <div> <ul t-attf-class="oe_form_notebook #{classnames}"> - <li t-foreach="pages" t-as="page"> + <li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers"> <a t-attf-href="##{page.id}"> <t t-esc="page.string"/> </a> @@ -832,7 +840,6 @@ t-attf-class="#{classnames} oe_form_label#{help ? '_help' : ''} oe_align_#{align}"> <t t-esc="string"/> <span t-if="help">?</span> - : </label> </t> @@ -844,7 +851,7 @@ <div class="oe_tooltip_string" t-if="widget.string"> <t t-esc="widget.node.attrs.string"/> <t t-if="debug and widget.nolabel">(nolabel)</t> </div> - <p t-if="widget.help" class="oe_tooltip_help"><t t-esc="widget.help"/></p> + <p t-if="widget.node.attrs.help or (widget.field and widget.field.help)" class="oe_tooltip_help"><t t-esc="widget.node.attrs.help || widget.field.help"/></p> <ul t-if="debug" class="oe_tooltip_technical"> <li data-item="field" t-if="widget.name"> <span class="oe_tooltip_technical_title">Field:</span> @@ -910,12 +917,12 @@ t-att-tabindex="widget.node.attrs.tabindex" t-att-autofocus="widget.node.attrs.autofocus" t-attf-class="field_char #{widget.is_field_number ? 'oe-number' : ''}" + t-att-placeholder="widget.node.attrs.placeholder" /><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/> </div> </t> <t t-if="widget.get('effective_readonly')"> - <div t-attf-class="oe_form_field_char #{widget.is_field_number ? 'oe-number' : ''}"> - </div> + <span t-attf-class="oe_form_field_char #{widget.is_field_number ? 'oe-number' : ''}"/> </t> </t> <t t-name="FieldEmail"> @@ -927,6 +934,7 @@ t-att-id="widget.id_for_label" t-att-tabindex="widget.node.attrs.tabindex" t-att-autofocus="widget.node.attrs.autofocus" + t-att-placeholder="widget.node.attrs.placeholder" /> </td> <td width="16"> @@ -938,9 +946,9 @@ </table> </t> <t t-if="widget.get('effective_readonly')"> - <div> + <span> <a href="#" class="oe_form_uri"/> - </div> + </span> </t> </t> <t t-name="FieldUrl"> @@ -952,6 +960,7 @@ t-att-id="widget.id_for_label" t-att-tabindex="widget.node.attrs.tabindex" t-att-autofocus="widget.node.attrs.autofocus" + t-att-placeholder="widget.node.attrs.placeholder" /> </td> <td width="16"> @@ -963,29 +972,31 @@ </table> </t> <t t-if="widget.get('effective_readonly')"> - <div> + <span> <a href="#" class="oe_form_uri"/> - </div> + </span> </t> </t> <t t-name="FieldText"> - <t t-if="!widget.get('effective_readonly')"> - <div class="oe_form_field_text"> - <textarea rows="6" - t-att-name="widget.name" - class="field_text" - t-att-tabindex="widget.node.attrs.tabindex" - t-att-autofocus="widget.node.attrs.autofocus" - ></textarea><img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/> - </div> - </t> + <div class="oe_form_field_text"> + <textarea rows="6" + t-att-name="widget.name" + class="field_text" + t-att-tabindex="widget.node.attrs.tabindex" + t-att-autofocus="widget.node.attrs.autofocus" + t-att-placeholder="widget.node.attrs.placeholder" + ></textarea> + <img class="oe_field_translate oe_input_icon" t-if="widget.field.translate" + t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/> + </div> </t> <t t-name="web.datetimepicker"> <div class="oe_datepicker_root oe_form_field_datetime"> <input type="text" class="oe_datepicker_container" disabled="disabled" style="display: none;"/> <input type="text" t-att-name="widget.name" - t-attf-class="oe_datepicker_master field_#{widget.type_of_date}" + t-att-placeholder="widget.getParent().node.attrs.placeholder" + t-attf-class="oe_datepicker_master field_#{widget.type_of_date} oe_form_field_#{widget.type_of_date}" /><img class="oe_input_icon oe_datepicker_trigger" t-att-src='_s + "/web/static/src/img/ui/field_calendar.png"' title="Select date" width="16" height="16" border="0"/> </div> @@ -1005,8 +1016,7 @@ </div> </t> <t t-if="widget.get('effective_readonly')"> - <div class="field_selection"> - </div> + <span class="field_selection"/> </t> </t> <t t-name="FieldMany2One"> @@ -1018,6 +1028,7 @@ t-att-id="widget.id_for_label" t-att-tabindex="widget.node.attrs.tabindex" t-att-autofocus="widget.node.attrs.autofocus" + t-att-placeholder="widget.node.attrs.placeholder" /> <span class="oe-m2o-drop-down-button"> <img t-att-src='_s + "/web/static/src/img/down-arrow.png"' /></span> @@ -1031,26 +1042,37 @@ </table> </t> <t t-if="widget.get('effective_readonly')"> - <div> + <span> <a href="#" class="oe_form_uri"/> - </div> + </span> </t> </t> -<t t-name="FieldReference"> - <t t-if="!widget.get('effective_readonly')"> - <table class="oe_form_field_reference oe_frame oe_forms" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td t-attf-class="oe_form_frame_cell oe_form_selection oe_form_view_reference_selection"> - </td> - <td t-attf-class="oe_form_frame_cell oe_form_many2one oe_form_view_reference_m2o" nowrap="true" style="display: none"> - </td> - </tr> - </table> - </t> - <t t-if="widget.get('effective_readonly')"> - <a href="#" class="oe_form_uri"/> +<t t-name="FieldMany2ManyTags"> + <div class="oe_form_field_many2manytags"> + <t t-if="! widget.get('effective_readonly')"> + <textarea rows="1" style="width: 100%"></textarea> + </t> + </div> +</t> +<t t-name="FieldMany2ManyTags.box"> + <t t-set="i" t-value="0"/> + <t t-foreach="elements" t-as="el"> + <span class="oe_form_field_many2manytags_box" t-att-data-index="i"> + <t t-esc="el[1]"/> + </span> + <t t-set="i" t-value="i + 1"/> </t> </t> +<t t-name="FieldReference"> + <table class="oe_form_field_reference oe_frame oe_forms" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td t-attf-class="oe_form_frame_cell oe_form_selection oe_form_view_reference_selection"> + </td> + <td t-attf-class="oe_form_frame_cell oe_form_many2one oe_form_view_reference_m2o" nowrap="true" style="display: none"> + </td> + </tr> + </table> +</t> <t t-name="FieldBoolean"> <span class="oe_form_field_boolean"> <input type="checkbox" @@ -1194,9 +1216,9 @@ </table> </t> <t t-if="widget.get('effective_readonly')"> - <div> + <span> <a href="javascript:void(0)" class="oe_form_uri"/> - </div> + </span> </t> </t> <t t-name="WidgetButton"> |
