summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2011-12-20 12:55:00 +0100
committerFabien Meghazi <fme@openerp.com>2011-12-20 12:55:00 +0100
commit8ba259b3f68ef8e834d0f1dc8019589bf5b1eab2 (patch)
tree4e2cb5d9d5c74c137c3de81d12e9204a184cc40a /addons/web/static/src
parent3daf6b30b941c5b53e36c98996baf587a06e6c62 (diff)
[IMP] Improved buttons
bzr revid: fme@openerp.com-20111220115500-aulwnoj6ciks8jxm
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css36
-rw-r--r--addons/web/static/src/xml/base.xml79
2 files changed, 58 insertions, 57 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 04ce2fa3ed2..80ac570ea1f 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -1210,7 +1210,9 @@ label.error {
color: #1f1f1f;
}
-.openerp input[type="text"].field_email, .openerp input[type="text"].field_url {
+.openerp input[type="text"].field_binary,
+.openerp input[type="text"].field_email,
+.openerp input[type="text"].field_url {
border-right:none;
-webkit-border-top-right-radius: 0px;
-webkit-border-bottom-right-radius: 0px;
@@ -1219,7 +1221,7 @@ label.error {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
-.openerp .mail_button, .openerp .url_button {
+.openerp .oe_button.oe_field_button {
-webkit-border-top-left-radius: 0px;
-webkit-border-bottom-left-radius: 0px;
-moz-border-radius-topleft: 0px;
@@ -1227,10 +1229,12 @@ label.error {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
margin-right:-1px;
+ height: 22px;
}
-.openerp .mail_button img, .openerp .url_button img {
- vertical-align:top;
+.openerp .oe_form_field_email button img,
+.openerp .oe_form_field_url button img {
+ vertical-align: top;
}
/* vertically recentering filter management select tag */
.openerp select.oe_search-view-filters-management {
@@ -1255,7 +1259,7 @@ label.error {
.openerp .oe_forms input.field_datetime {
min-width: 11em;
}
-.openerp .oe_forms .oe_button {
+.openerp .oe_forms .oe_form_button .oe_button {
color: #4c4c4c;
white-space: nowrap;
min-width: 100%;
@@ -2015,9 +2019,9 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
}
/* Buttons */
-.openerp a.button:link,
-.openerp a.button:visited,
-.openerp button {
+.openerp .oe_button:link,
+.openerp .oe_button:visited,
+.openerp .oe_button {
display: inline-block;
border: 1px solid #ababab;
color: #404040;
@@ -2048,8 +2052,7 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
outline: none;
}
-.openerp a.button:hover,
-.openerp button:hover {
+.openerp .oe_button:hover {
-o-background-size: 100% 100%;
-moz-background-size: 100% 100%;
-webkit-background-size: auto auto !important;
@@ -2063,8 +2066,7 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
cursor: pointer;
}
-.openerp a.button:focus,
-.openerp button:focus {
+.openerp .oe_button:focus {
border: 1px solid #80bfff;
-o-background-size: 100% 100%;
-moz-background-size: 100% 100%;
@@ -2082,10 +2084,8 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
}
-.openerp a.button:active,
-.openerp a.button.active,
-.openerp button:active,
-.openerp button.active {
+.openerp .oe_button:active,
+.openerp .oe_button.active {
background: #e3e3e3;
background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f;
background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f;
@@ -2096,8 +2096,8 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
box-shadow: none, 0 0 0 transparent;
}
-.openerp a.button.disabled,
-.openerp button:disabled {
+.openerp .oe_button.disabled,
+.openerp .oe_button:disabled {
background: #efefef !important;
border: 1px solid #d1d1d1 !important;
font-size: 12px;
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index e425d701a5b..260a8e20308 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -119,7 +119,7 @@
equalTo="input[name=create_admin_pwd]"/></td>
</tr>
<tr>
- <td colspan="2" align="right"><button>Create</button></td>
+ <td colspan="2" align="right"><button class="oe_button">Create</button></td>
</tr>
</table>
</form>
@@ -149,7 +149,7 @@
<td><input type="password" name="drop_pwd" class="required"/></td>
</tr>
<tr>
- <td colspan="2" align="right"><button>Drop</button></td>
+ <td colspan="2" align="right"><button class="oe_button">Drop</button></td>
</tr>
</table>
</form>
@@ -181,7 +181,7 @@
<td><input type="password" name="backup_pwd" class="required"/></td>
</tr>
<tr>
- <td colspan="2" align="right"><button>Backup</button></td>
+ <td colspan="2" align="right"><button class="oe_button">Backup</button></td>
</tr>
</table>
</form>
@@ -210,7 +210,7 @@
<td><input type="text" name="new_db" class="required"/></td>
</tr>
<tr>
- <td colspan="2" align="right"><button>Restore</button></td>
+ <td colspan="2" align="right"><button class="oe_button">Restore</button></td>
</tr>
</table>
</form>
@@ -241,7 +241,7 @@
equalTo="input[name=new_pwd]" minlength="1"/></td>
</tr>
<tr>
- <td colspan="2" align="right"><button>Change Password</button></td>
+ <td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
</tr>
</table>
</form>
@@ -289,8 +289,8 @@
<tr>
<td></td>
<td>
- <button type="button" id="oe-db-config">Database</button>
- <button name="submit">Login</button>
+ <button class="oe_button" type="button" id="oe-db-config">Database</button>
+ <button class="oe_button" name="submit">Login</button>
</td>
</tr>
</table>
@@ -575,11 +575,11 @@
<table>
<tr>
<td t-if="!no_leaf and options.action_buttons !== false" class="oe-actions">
- <button type="button" class="oe-list-add"
+ <button type="button" class="oe_button oe-list-add"
t-if="options.addable">
<t t-esc="options.addable"/>
</button>
- <button type="button" class="oe-list-delete"
+ <button type="button" class="oe_button oe-list-delete"
t-if="options.selectable and options.deletable">
Delete
</button>
@@ -692,8 +692,8 @@
<t t-name="FormView">
<div class="oe_form_header">
<div class="oe_form_buttons" t-if="widget.options.action_buttons !== false">
- <button type="button" class="oe_form_button_save">Save</button>
- <button type="button" class="oe_form_button_cancel">Cancel</button>
+ <button type="button" class="oe_button oe_form_button_save">Save</button>
+ <button type="button" class="oe_button oe_form_button_cancel">Cancel</button>
</div>
<div class="oe_form_pager" t-if="widget.options.pager !== false">
<button type="button" data-pager-action="first"></button>
@@ -709,10 +709,10 @@
</t>
<t t-name="PageView" t-extend="FormView">
<t t-jquery=".oe_form_buttons" t-operation="inner">
- <button type="button" class="oe_form_button_edit">Edit</button>
- <button type="button" class="oe_form_button_create">Create</button>
- <button type="button" class="oe_form_button_duplicate">Duplicate</button>
- <button type="button" class="oe_form_button_delete">Delete</button>
+ <button type="button" class="oe_button oe_form_button_edit">Edit</button>
+ <button type="button" class="oe_button oe_form_button_create">Create</button>
+ <button type="button" class="oe_button oe_form_button_duplicate">Duplicate</button>
+ <button type="button" class="oe_button oe_form_button_delete">Delete</button>
</t>
</t>
<t t-name="FormView.sidebar.attachments">
@@ -724,7 +724,7 @@
<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="button" type="button">
+ <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>
@@ -916,7 +916,7 @@
<t t-call="FieldChar"/>
</td>
<td width="16">
- <button type="button" class="button mail_button" title="Send an e-mail with your default e-mail client">
+ <button class="oe_button oe_field_button" 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>
</td>
@@ -930,7 +930,7 @@
<t t-call="FieldChar"/>
</td>
<td width="16">
- <button type="button" class="button url_button" title="Open this resource">
+ <button class="oe_button oe_field_button" type="button" title="Open this resource">
<img t-att-src='_s + "/web/static/src/img/icons/gtk-ok.png"'/>
</button>
</td>
@@ -1044,7 +1044,7 @@
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="button" type="button" title="Set Image">
+ <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"/>
@@ -1052,7 +1052,7 @@
</div>
</td>
<td>
- <button class="button oe-binary-file-clear" type="button" title="Clear">
+ <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>
</td>
@@ -1087,7 +1087,7 @@
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="button" type="button" title="Set Image">
+ <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>
@@ -1096,13 +1096,13 @@
</div>
</td>
<td>
- <button class="button oe-binary-file-save" type="button" title="Save As">
+ <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>
</td>
<td>
- <button class="button oe-binary-file-clear" type="button" title="Clear">
+ <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"'/>
<span>Clear</span>
</button>
@@ -1160,8 +1160,8 @@
<form class="oe_forms">
<t t-call="SearchView.render_lines"/>
<div class="oe_search-view-buttons">
- <button>Search</button>
- <button type="reset">Clear</button>
+ <button class="oe_button">Search</button>
+ <button class="oe_button" type="reset">Clear</button>
<select class="oe_search-view-filters-management">
</select>
</div>
@@ -1401,18 +1401,18 @@
</div>
</t>
<t t-name="SelectCreatePopup.search.buttons">
- <button type="button" class="oe_selectcreatepopup-search-select" disabled="disabled">Select</button>
- <button type="button" class="oe_selectcreatepopup-search-close">Cancel</button>
+ <button type="button" class="oe_button oe_selectcreatepopup-search-select" disabled="disabled">Select</button>
+ <button type="button" class="oe_button oe_selectcreatepopup-search-close">Cancel</button>
</t>
<t t-name="SelectCreatePopup.form.buttons">
<t t-if="widget.options.disable_multiple_selection">
- <button type="button" class="oe_selectcreatepopup-form-save">Save</button>
+ <button type="button" class="oe_button oe_selectcreatepopup-form-save">Save</button>
</t>
<t t-if="! widget.options.disable_multiple_selection">
- <button type="button" class="oe_selectcreatepopup-form-save-new">Save &amp; New</button>
- <button type="button" class="oe_selectcreatepopup-form-save">Save &amp; Close</button>
+ <button type="button" class="oe_button oe_selectcreatepopup-form-save-new">Save &amp; New</button>
+ <button type="button" class="oe_button oe_selectcreatepopup-form-save">Save &amp; Close</button>
</t>
- <button type="button" class="oe_selectcreatepopup-form-close">Cancel</button>
+ <button type="button" class="oe_button oe_selectcreatepopup-form-close">Cancel</button>
</t>
<t t-name="FormOpenPopup">
<div t-att-id="element_id">
@@ -1420,8 +1420,8 @@
</div>
</t>
<t t-name="FormOpenPopup.form.buttons">
- <button type="button" class="oe_formopenpopup-form-save">Save</button>
- <button type="button" class="oe_formopenpopup-form-close">Cancel</button>
+ <button type="button" class="oe_button oe_formopenpopup-form-save">Save</button>
+ <button type="button" class="oe_button oe_formopenpopup-form-close">Cancel</button>
</t>
<t t-extend="ListView.row">
<!-- adds front & back padding to row being rendered after edition, if
@@ -1561,9 +1561,10 @@
</div>
</td>
<td class="oe_export_fields_selector_center">
- <button id="add_field">Add</button>
- <button id="remove_field">Remove</button>
- <button id="remove_all_field">Remove All</button>
+ <!-- TODO: replace ids by 'oe_*' classes -->
+ <button class="oe_button" id="add_field">Add</button>
+ <button class="oe_button" id="remove_field">Remove</button>
+ <button class="oe_button" id="remove_all_field">Remove All</button>
</td>
<td class="oe_export_fields_selector_right">
<select name="fields_list" id="fields_list"
@@ -1610,7 +1611,7 @@
<tr>
<th><label>Save as:</label></th>
<td><input size="10" type="text" id="savelist_name"/></td>
- <td><button class="oe_export_button_export" id="add_export_list">Ok</button></td>
+ <td><button class="oe_button oe_export_button_export" id="add_export_list">Ok</button></td>
</tr>
</t>
@@ -1623,7 +1624,7 @@
<option t-att-value="export.id"><t t-esc="export.name"/></option>
</t>
</select>
- <button class="oe_export_button_export" id="delete_export_list" type="button">Delete</button>
+ <button class="oe_button oe_export_button_export" id="delete_export_list" type="button">Delete</button>
</t>
<t t-name="Change_Pwd">
<form name="change_password_form" class="oe_forms" method="POST">
@@ -1644,7 +1645,7 @@
minlength="1"/></td>
</tr>
<tr>
- <td colspan="2" align="right"><button>Change Password</button></td>
+ <td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
</tr>
</table>
</form>