[IMP]improvements.
bzr revid: vme@tinyerp.com-20120607113147-7lly2zl317b8n88v
This commit is contained in:
parent
ff00c0f635
commit
abc6141826
|
@ -1145,6 +1145,18 @@ $colour4: #8a89ba
|
|||
position: absolute
|
||||
top: 0
|
||||
right: 5px
|
||||
.oe_searchview_dashboard
|
||||
form
|
||||
display: none
|
||||
margin-top: 2px
|
||||
ul
|
||||
list-style: none
|
||||
padding: 0
|
||||
li
|
||||
position: relative
|
||||
list-style: none
|
||||
margin: 0
|
||||
white-space: nowrap
|
||||
.oe_searchview_advanced
|
||||
form
|
||||
display: none
|
||||
|
|
|
@ -1644,7 +1644,7 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({
|
|||
add_dashboard:function(){
|
||||
var self = this,getParent = this.getParent(),view_parent = this.view.getParent();
|
||||
if(!view_parent.action || !this.$element.find("select").val())
|
||||
return this.do_warn("Can't add dashboard item");
|
||||
return this.do_warn("Can't find dashboard action");
|
||||
data = getParent.build_search_data(),
|
||||
context = new instance.web.CompoundContext(getParent.dataset.get_context() || []),
|
||||
domain = new instance.web.CompoundDomain(getParent.dataset.get_domain() || []);
|
||||
|
@ -1652,19 +1652,19 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({
|
|||
_.each(data.contexts, function(x) {context.add(x);});
|
||||
_.each(data.domains, function(x) {domain.add(x);});
|
||||
this.rpc('/web/searchview/add_to_dashboard', {
|
||||
menu_id: this.$element.find("select").val(),
|
||||
action_id: view_parent.action.id,
|
||||
context_to_save: context,
|
||||
domain: domain,
|
||||
view_mode: view_parent.active_view,
|
||||
name: this.$element.find("input").val()
|
||||
}, function(r) {
|
||||
if (r === false) {
|
||||
self.do_warn("Could not add filter to dashboard");
|
||||
} else {
|
||||
self.do_notify("Filter added to dashboard", '');
|
||||
}
|
||||
});
|
||||
menu_id: this.$element.find("select").val(),
|
||||
action_id: view_parent.action.id,
|
||||
context_to_save: context,
|
||||
domain: domain,
|
||||
view_mode: view_parent.active_view,
|
||||
name: this.$element.find("input").val()
|
||||
}, function(r) {
|
||||
if (r === false) {
|
||||
self.do_warn("Could not add filter to dashboard");
|
||||
} else {
|
||||
self.do_notify("Filter added to dashboard", '');
|
||||
}
|
||||
});
|
||||
},
|
||||
show_option:function(){
|
||||
this.$element.toggleClass('oe_opened');
|
||||
|
@ -1672,7 +1672,7 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({
|
|||
return;
|
||||
this.$element.find("input").val(this.getParent().fields_view.name || "" );
|
||||
}
|
||||
})
|
||||
});
|
||||
instance.web.search.Advanced = instance.web.search.Input.extend({
|
||||
template: 'SearchView.advanced',
|
||||
_in_drawer: true,
|
||||
|
|
|
@ -1412,12 +1412,12 @@
|
|||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<div t-name="SearchView.addtodashboard" class="oe_searchview_advanced">
|
||||
<div t-name="SearchView.addtodashboard" class="oe_searchview_dashboard">
|
||||
<h4>Add to Dashboard</h4>
|
||||
<form>
|
||||
<ul>
|
||||
<li>
|
||||
<input placeholder ="Title of new Dashboard item" title = "Title of new Dashboard item" type="text" style="width: 30%; margin-right: 1em;"/>
|
||||
<input placeholder ="Title of new Dashboard item" title = "Title of new Dashboard item" type="text"/>
|
||||
<button class="oe_apply" type="submit">save</button>
|
||||
<a style="width: 30%;" class="searchview_extended_delete_prop button">x</a>
|
||||
</li>
|
||||
|
@ -1425,7 +1425,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<t t-name="SearchView.addtodashboard.selection">
|
||||
<select title = "Select Dashboard to add this filter to" style="width: 40%; margin-right: 1em;">
|
||||
<select title = "Select Dashboard to add this filter to">
|
||||
<t t-foreach="selections" t-as="element">
|
||||
<option t-att-value="element.res_id"><t t-esc="element.name"/></option>
|
||||
</t>
|
||||
|
|
Loading…
Reference in New Issue