[IMP] iconify delete buttons for advanced filters and custom filters

bzr revid: xmo@openerp.com-20120515061212-b0jeuludzh4jstob
This commit is contained in:
Xavier Morel 2012-05-15 08:12:12 +02:00
parent 865f022aa5
commit 80363141d7
3 changed files with 31 additions and 10 deletions

View File

@ -1264,6 +1264,17 @@
.openerp .oe_searchview .oe_searchview_drawer .oe_opened form {
display: block;
}
.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete, .openerp .oe_searchview .oe_searchview_drawer .searchview_extended_delete_prop {
font-size: 1px;
letter-spacing: -1px;
color: transparent;
}
.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_custom_delete:before, .openerp .oe_searchview .oe_searchview_drawer .searchview_extended_delete_prop:before {
font-family: "mnmliconsRegular";
content: "d";
font-size: 20px;
color: #404040;
}
.openerp .oe_view_topbar {
border-bottom: 1px solid #cacaca;
background-color: #fcfcfc;

View File

@ -64,6 +64,18 @@ $colour4: #8a89ba
-webkit-box-sizing: border-box
box-sizing: border-box
// Transforms the (readable) text of an inline element into an mmlicons icon,
// allows for actual readable text in-code (and in readers?) with iconic looks
@mixin text-to-icon($icon-name, $color: #404040)
font-size: 1px
letter-spacing: -1px
color: transparent
&:before
font-family: "mnmliconsRegular"
content: $icon-name
font-size: 20px
color: $color
// }}}
.openerp.openerp-web-client-container
@ -986,14 +998,7 @@ $colour4: #8a89ba
display: none
button
font-size: 1px
letter-spacing: -1px
color: transparent
&:before
font-family: "mnmliconsRegular"
content: "S"
font-size: 20px
color: #404040
@include text-to-icon("S")
.oe_searchview_advanced
form
@ -1016,6 +1021,10 @@ $colour4: #8a89ba
content: ""
form
display: block
// delete buttons
.oe_searchview_custom_delete, .searchview_extended_delete_prop
@include text-to-icon("d")
// }}}
// View.topbar {{{
.oe_view_topbar

View File

@ -1516,14 +1516,15 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
: 'oe_searchview_custom_public')
.text(filter.name);
$('<button type="button">').appendTo($filter)
$('<button type="button" class="oe_searchview_custom_delete">')
.text(_t("Delete"))
.click(function (e) {
e.stopPropagation();
self.model.call('unlink', [id]).then(function () {
$filter.remove();
});
});
})
.appendTo($filter);
}
$filter.unbind('click').click(function () {