[IMP] Improved custom filters design.
bzr revid: nicolas.vanhoren@openerp.com-20110412162703-op0kbnqhhgikygej
This commit is contained in:
parent
4eeaca9e6d
commit
f3ef034ac2
|
@ -443,6 +443,26 @@ body.openerp {
|
|||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.openerp .oe-searchview-render-line {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_group {
|
||||
border: #696969 solid 1px;
|
||||
padding: 3px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_add_proposition, .openerp .searchview_extended_add_group {
|
||||
background: url(../img/icons/gtk-add.png) repeat-y;
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
.openerp .searchview_extended_delete_group, .openerp .searchview_extended_delete_prop {
|
||||
background: url(../img/icons/gtk-remove.png) repeat-y;
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
/* Notebook */
|
||||
.openerp .oe_form_notebook {
|
||||
padding: 0px;
|
||||
|
@ -673,6 +693,14 @@ body.openerp {
|
|||
}
|
||||
|
||||
.openerp .kitten-mode-activated {
|
||||
background: url(http://placekitten.com/g/214/99) repeat;
|
||||
background: url(http://placekitten.com/g/1500/800) repeat;
|
||||
}
|
||||
|
||||
.openerp .kitten-mode-activated .header {
|
||||
background: url(http://placekitten.com/g/211/65) repeat;
|
||||
}
|
||||
|
||||
.openerp .kitten-mode-activated .secondary_menu {
|
||||
background: url(http://placekitten.com/g/212/100) repeat;
|
||||
}
|
||||
|
||||
|
|
|
@ -817,24 +817,27 @@ openerp.base.search.ExtendedSearchProposition = openerp.base.BaseWidget.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
var type = field.type;
|
||||
try {
|
||||
this.value = new (openerp.base.search.custom_filters.get_object(field.type))
|
||||
(this);
|
||||
_.each(this.value.operators, function(operator) {
|
||||
var option = jQuery('<option>', {value: operator.value})
|
||||
.text(operator.text)
|
||||
.appendTo(_this.$element.find('.searchview_extended_prop_op'));
|
||||
});
|
||||
this.$element.find('.searchview_extended_prop_value').html(
|
||||
this.value.render({}));
|
||||
this.value.start();
|
||||
openerp.base.search.custom_filters.get_object(type);
|
||||
} catch (e) {
|
||||
if (! e instanceof openerp.base.KeyNotFound) {
|
||||
throw e;
|
||||
}
|
||||
this.attrs.selected = null;
|
||||
var type = "char";
|
||||
this.log('Unknow field type ' + e.key);
|
||||
}
|
||||
this.value = new (openerp.base.search.custom_filters.get_object(type))
|
||||
(this);
|
||||
_.each(this.value.operators, function(operator) {
|
||||
var option = jQuery('<option>', {value: operator.value})
|
||||
.text(operator.text)
|
||||
.appendTo(_this.$element.find('.searchview_extended_prop_op'));
|
||||
});
|
||||
this.$element.find('.searchview_extended_prop_value').html(
|
||||
this.value.render({}));
|
||||
this.value.start();
|
||||
|
||||
},
|
||||
get_proposition: function() {
|
||||
if ( this.attrs.selected == null)
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<t t-name="Header">
|
||||
<a href="/" class="company_logo_link">
|
||||
<img t-att-src="typeof kitten == 'undefined' ? '/base/static/src/img/logo.png' :
|
||||
'http://placekitten.com/180/46'" border="0" class="company_logo"/>
|
||||
'http://placekitten.com/g/179/46'" border="0" class="company_logo"/>
|
||||
</a>
|
||||
<h1 class="header_title" t-if="session.session_is_valid()">
|
||||
<span class="company">$company</span> - (<span class="database">$database</span>)<br/>
|
||||
|
@ -385,7 +385,7 @@
|
|||
</form>
|
||||
</t>
|
||||
<t t-name="SearchView.render_lines">
|
||||
<table border="0" cellspacing="0" cellpadding="0"
|
||||
<table class="oe-searchview-render-line" border="0" cellspacing="0" cellpadding="0"
|
||||
t-foreach="lines" t-as="line">
|
||||
<tr>
|
||||
<td t-foreach="line" t-as="widget">
|
||||
|
@ -484,7 +484,7 @@
|
|||
<t t-name="SearchView.extended_search">
|
||||
<t t-call="SearchView.util.expand">
|
||||
<t t-set="expand" t-value="false"/>
|
||||
<t t-set="label" t-value="'Extended Filters'"/>
|
||||
<t t-set="label" t-value="'Custom Filters'"/>
|
||||
<t t-set="content">
|
||||
<div class="searchview_extended_groups_list"/>
|
||||
<button class="searchview_extended_add_group"
|
||||
|
@ -493,18 +493,17 @@
|
|||
</t>
|
||||
</t>
|
||||
<t t-name="SearchView.extended_search.group">
|
||||
<div t-att-id="element_id">
|
||||
<div t-att-id="element_id" class="searchview_extended_group">
|
||||
<select class="searchview_extended_group_choice">
|
||||
<option value="all">All</option>
|
||||
<option value="any">Any</option>
|
||||
<option value="none">None</option>
|
||||
<option value="all">All the following conditions must match</option>
|
||||
<option value="any">Any of the following conditions must match</option>
|
||||
<option value="none">None of the following conditions must match</option>
|
||||
</select>
|
||||
<button class="searchview_extended_delete_group"
|
||||
type="button">Delete this group of conditions</button>
|
||||
<div class="searchview_extended_propositions_list">
|
||||
</div>
|
||||
<button class="searchview_extended_add_proposition"
|
||||
type="button">Add condition</button>
|
||||
<button class="searchview_extended_delete_group"
|
||||
type="button">Delete this group</button>
|
||||
<button class="searchview_extended_add_proposition" type="button">Add condition</button>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="SearchView.extended_search.proposition">
|
||||
|
|
Loading…
Reference in New Issue