[MERGE] Latest trunk.
bzr revid: vta@openerp.com-20120806122324-scngm3qpi7qfblvm
This commit is contained in:
commit
22b25ce40b
|
@ -80,6 +80,14 @@
|
|||
* http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
|
||||
*/
|
||||
}
|
||||
.openerp :-moz-placeholder {
|
||||
color: #afafb6 !important;
|
||||
font-style: italic !important;
|
||||
}
|
||||
.openerp ::-webkit-input-placeholder {
|
||||
color: #afafb6 !important;
|
||||
font-style: italic !important;
|
||||
}
|
||||
.openerp a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -1808,15 +1816,29 @@
|
|||
margin: 0 0 0 4px;
|
||||
padding: 0;
|
||||
}
|
||||
.openerp .oe_view_nocontent > img {
|
||||
float: left;
|
||||
margin: 1.5em;
|
||||
}
|
||||
.openerp .oe_view_nocontent > div {
|
||||
overflow: hidden;
|
||||
padding: 35px 0px 0px 0px;
|
||||
max-width: 700px;
|
||||
.openerp .oe_view_nocontent {
|
||||
padding: 15px;
|
||||
margin-top: 0;
|
||||
color: #777777;
|
||||
font-size: 125%;
|
||||
max-width: 700px;
|
||||
}
|
||||
.openerp .oe_view_nocontent .oe_view_nocontent_create {
|
||||
background: transparent url(/web/static/src/img/view_empty_arrow.png) no-repeat 7px 0;
|
||||
margin-top: 0;
|
||||
padding-top: 35px;
|
||||
min-height: 28px;
|
||||
color: #4c4c4c;
|
||||
}
|
||||
.openerp .oe_view_nocontent > p {
|
||||
padding-left: 95px;
|
||||
}
|
||||
.openerp .oe_view_nocontent .oe_empty_custom_dashboard {
|
||||
background: transparent url(/web/static/src/img/graph_background.png) no-repeat 0 0;
|
||||
margin-top: -15px;
|
||||
padding: 100px 0 0 137px;
|
||||
min-height: 327px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
.openerp .oe_formview {
|
||||
background: white;
|
||||
|
@ -1908,6 +1930,16 @@
|
|||
max-width: 860px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.openerp .oe_form div.oe_form_configuration div.oe_horizontal_separator {
|
||||
margin: 25px 0 10px 0;
|
||||
}
|
||||
.openerp .oe_form div.oe_form_configuration p {
|
||||
color: #aaaaaa;
|
||||
max-width: 650px;
|
||||
}
|
||||
.openerp .oe_form div.oe_form_configuration label {
|
||||
min-width: 150px;
|
||||
}
|
||||
.openerp ul.oe_form_steps {
|
||||
height: 30px;
|
||||
padding: 0;
|
||||
|
@ -2001,7 +2033,7 @@
|
|||
}
|
||||
.openerp .oe_form td.oe_form_group_cell_label {
|
||||
border-right: 1px solid #dddddd;
|
||||
padding: 2px 0px 2px 0px;
|
||||
padding: 4px 0px 4px 0px;
|
||||
}
|
||||
.openerp .oe_form td.oe_form_group_cell_label label {
|
||||
line-height: 18px;
|
||||
|
@ -2013,7 +2045,7 @@
|
|||
}
|
||||
.openerp .oe_form .oe_form_group {
|
||||
width: 100%;
|
||||
margin: 6px 0 6px 0;
|
||||
margin: 9px 0 9px 0;
|
||||
}
|
||||
.openerp .oe_form .oe_form_group .oe_form_group_cell.oe_group_right {
|
||||
padding-left: 20px;
|
||||
|
@ -2038,7 +2070,7 @@
|
|||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
margin: 8px 0px 8px 0px;
|
||||
color: #aaaabb;
|
||||
color: #53637e;
|
||||
}
|
||||
.openerp .oe_horizontal_separator:empty {
|
||||
height: 5px;
|
||||
|
|
|
@ -140,6 +140,14 @@ $sheet-max-width: 860px
|
|||
font-size: 13px
|
||||
background: white
|
||||
// }}}
|
||||
//Placeholder style{{{
|
||||
\:-moz-placeholder
|
||||
color: $facets-border !important
|
||||
font-style: italic !important
|
||||
\::-webkit-input-placeholder
|
||||
color: $facets-border !important
|
||||
font-style: italic !important
|
||||
//}}}
|
||||
// Tag reset {{{
|
||||
a
|
||||
text-decoration: none
|
||||
|
@ -150,7 +158,7 @@ $sheet-max-width: 860px
|
|||
font-weight: bold
|
||||
background-color: #f0f0f0
|
||||
th
|
||||
border-right: 1px dotted #afafb6
|
||||
border-right: 1px dotted $facets-border
|
||||
&:last-child
|
||||
border-right: none
|
||||
th, td
|
||||
|
@ -524,7 +532,7 @@ $sheet-max-width: 860px
|
|||
top: 26px
|
||||
left: 0
|
||||
z-index: 1
|
||||
border: 1px solid #afafb6
|
||||
border: 1px solid $facets-border
|
||||
background: white
|
||||
padding: 4px 0
|
||||
min-width: 140px
|
||||
|
@ -804,7 +812,7 @@ $sheet-max-width: 860px
|
|||
display: none
|
||||
width: 220px
|
||||
background: #f0eeee
|
||||
border-right: 1px solid #afafb6
|
||||
border-right: 1px solid $facets-border
|
||||
text-shadow: 0 1px 1px white
|
||||
padding-bottom: 16px
|
||||
a.oe_logo
|
||||
|
@ -1245,7 +1253,7 @@ $sheet-max-width: 860px
|
|||
background-color: white
|
||||
min-width: 100%
|
||||
display: none
|
||||
border: 1px solid #afafb6
|
||||
border: 1px solid $facets-border
|
||||
text-align: left
|
||||
@include radius(4px)
|
||||
@include box-shadow(0 1px 4px rgba(0,0,0,0.3))
|
||||
|
@ -1400,15 +1408,26 @@ $sheet-max-width: 860px
|
|||
// }}}
|
||||
// Views Common {{{
|
||||
.oe_view_nocontent
|
||||
> img
|
||||
float: left
|
||||
margin: 1.5em
|
||||
> div
|
||||
// don't encroach on my arrow
|
||||
overflow: hidden
|
||||
padding: 35px 0px 0px 0px
|
||||
max-width: 700px
|
||||
font-size: 125%
|
||||
padding: 15px
|
||||
margin-top: 0
|
||||
color: #777777
|
||||
font-size: 125%
|
||||
max-width: 700px
|
||||
.oe_view_nocontent_create
|
||||
background: transparent url(/web/static/src/img/view_empty_arrow.png) no-repeat 7px 0
|
||||
margin-top: 0
|
||||
padding-top: 35px
|
||||
min-height: 28px
|
||||
color: #4c4c4c
|
||||
> p
|
||||
padding-left: 95px
|
||||
.oe_empty_custom_dashboard
|
||||
background: transparent url(/web/static/src/img/graph_background.png) no-repeat 0 0
|
||||
margin-top: -15px
|
||||
padding: 100px 0 0 137px
|
||||
min-height: 327px
|
||||
margin-left: -15px
|
||||
|
||||
// }}}
|
||||
// FormView.base and dynamic tags {{{
|
||||
.oe_formview
|
||||
|
@ -1462,6 +1481,14 @@ $sheet-max-width: 860px
|
|||
min-width: 650px
|
||||
max-width: $sheet-max-width
|
||||
margin: 0 auto
|
||||
div.oe_form_configuration
|
||||
div.oe_horizontal_separator
|
||||
margin: 25px 0 10px 0
|
||||
p
|
||||
color: #aaa
|
||||
max-width: 650px
|
||||
label
|
||||
min-width: 150px
|
||||
ul.oe_form_steps
|
||||
height: 30px
|
||||
padding: 0
|
||||
|
@ -1524,7 +1551,7 @@ $sheet-max-width: 860px
|
|||
background: white
|
||||
min-height: 330px
|
||||
padding: 16px
|
||||
border: 1px solid #afafb6
|
||||
border: 1px solid $facets-border
|
||||
@include box-shadow(0 0 10px rgba(0,0,0,0.3))
|
||||
.ui-tabs
|
||||
margin: 0 -16px
|
||||
|
@ -1537,7 +1564,7 @@ $sheet-max-width: 860px
|
|||
margin: 2px
|
||||
td.oe_form_group_cell_label
|
||||
border-right: 1px solid #ddd
|
||||
padding: 2px 0px 2px 0px
|
||||
padding: 4px 0px 4px 0px
|
||||
label
|
||||
line-height: 18px
|
||||
display: block
|
||||
|
@ -1546,7 +1573,7 @@ $sheet-max-width: 860px
|
|||
padding-left: 6px
|
||||
.oe_form_group
|
||||
width: 100%
|
||||
margin: 6px 0 6px 0
|
||||
margin: 9px 0 9px 0
|
||||
.oe_form_group_cell.oe_group_right
|
||||
padding-left: 20px
|
||||
// }}}
|
||||
|
@ -1571,7 +1598,7 @@ $sheet-max-width: 860px
|
|||
font-weight: bold
|
||||
font-size: 20px
|
||||
margin: 8px 0px 8px 0px
|
||||
color: #aab
|
||||
color: #53637e
|
||||
.oe_horizontal_separator:empty
|
||||
height: 5px
|
||||
.oe_vertical_separator
|
||||
|
@ -1905,7 +1932,7 @@ $sheet-max-width: 860px
|
|||
border-bottom: 2px solid #cacaca
|
||||
.treeview-tr, .treeview-td
|
||||
cursor: pointer
|
||||
border-right: 1px dotted #afafb6
|
||||
border-right: 1px dotted $facets-border
|
||||
vertical-align: top
|
||||
text-align: left
|
||||
border-bottom: 1px solid #cfcccc
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
@ -609,6 +609,55 @@ instance.web.Login = instance.web.Widget.extend({
|
|||
});
|
||||
instance.web.client_actions.add("login", "instance.web.Login");
|
||||
|
||||
/**
|
||||
* Client action to reload the whole interface.
|
||||
* If params has an entry 'menu_id', it opens the given menu entry.
|
||||
*/
|
||||
instance.web.Reload = instance.web.Widget.extend({
|
||||
init: function(parent, params) {
|
||||
this._super(parent);
|
||||
this.menu_id = (params && params.menu_id) || false;
|
||||
},
|
||||
start: function() {
|
||||
var l = window.location;
|
||||
var timestamp = new Date().getTime();
|
||||
var search = "?ts=" + timestamp;
|
||||
if (l.search) {
|
||||
search = l.search + "&ts=" + timestamp;
|
||||
}
|
||||
var hash = l.hash;
|
||||
if (this.menu_id) {
|
||||
hash = "#menu_id=" + this.menu_id;
|
||||
}
|
||||
var url = l.protocol + "//" + l.host + l.pathname + search + hash;
|
||||
window.location = url;
|
||||
}
|
||||
});
|
||||
instance.web.client_actions.add("reload", "instance.web.Reload");
|
||||
|
||||
/**
|
||||
* Client action to go back in breadcrumb history.
|
||||
* If can't go back in history stack, will go back to home.
|
||||
*/
|
||||
instance.web.HistoryBack = instance.web.Widget.extend({
|
||||
init: function(parent, params) {
|
||||
if (!parent.history_back()) {
|
||||
window.location = '/' + (window.location.search || '');
|
||||
}
|
||||
}
|
||||
});
|
||||
instance.web.client_actions.add("history_back", "instance.web.HistoryBack");
|
||||
|
||||
/**
|
||||
* Client action to go back home.
|
||||
*/
|
||||
instance.web.Home = instance.web.Widget.extend({
|
||||
init: function(parent, params) {
|
||||
window.location = '/' + (window.location.search || '');
|
||||
}
|
||||
});
|
||||
instance.web.client_actions.add("home", "instance.web.Home");
|
||||
|
||||
instance.web.Menu = instance.web.Widget.extend({
|
||||
template: 'Menu',
|
||||
init: function() {
|
||||
|
|
|
@ -672,32 +672,6 @@ instance.connection.on('module_loaded', this, function () {
|
|||
*/
|
||||
instance.web.client_actions = new instance.web.Registry();
|
||||
|
||||
/**
|
||||
* Client action to reload the whole interface.
|
||||
* If params has an entry 'menu_id', it opens the given menu entry.
|
||||
*/
|
||||
instance.web.Reload = instance.web.Widget.extend({
|
||||
init: function(parent, params) {
|
||||
this._super(parent);
|
||||
this.menu_id = (params && params.menu_id) || false;
|
||||
},
|
||||
start: function() {
|
||||
var l = window.location;
|
||||
var timestamp = new Date().getTime();
|
||||
var search = "?ts=" + timestamp;
|
||||
if (l.search) {
|
||||
search = l.search + "&ts=" + timestamp;
|
||||
}
|
||||
var hash = l.hash;
|
||||
if (this.menu_id) {
|
||||
hash = "#menu_id=" + this.menu_id;
|
||||
}
|
||||
var url = l.protocol + "//" + l.host + l.pathname + search + hash;
|
||||
window.location = url;
|
||||
}
|
||||
});
|
||||
instance.web.client_actions.add("reload", "instance.web.Reload");
|
||||
|
||||
};
|
||||
|
||||
// vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax:
|
||||
|
|
|
@ -151,7 +151,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
this.sidebar.add_items('other', [
|
||||
{ label: _t('Delete'), callback: self.on_button_delete },
|
||||
{ label: _t('Duplicate'), callback: self.on_button_duplicate },
|
||||
{ label: _t('Set Default'), callback: function (item) { self.open_defaults_dialog(); } },
|
||||
{ label: _t('Set Default'), callback: function (item) { self.open_defaults_dialog(); } }
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -686,8 +686,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
},
|
||||
on_button_cancel: function(event) {
|
||||
if (this.can_be_discarded()) {
|
||||
this.to_view_mode();
|
||||
this.on_record_loaded(this.datarecord);
|
||||
if (this.get('actual_mode') === 'create') {
|
||||
this.trigger('history_back');
|
||||
} else {
|
||||
this.to_view_mode();
|
||||
this.on_record_loaded(this.datarecord);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -3628,7 +3632,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
$("textarea", this.$element).focusout(function() {
|
||||
self.$text.trigger("setInputData", "");
|
||||
}).keydown(function(e) {
|
||||
if (event.keyCode === 9 && self._drop_shown) {
|
||||
if (e.which === $.ui.keyCode.TAB && self._drop_shown) {
|
||||
self.$text.textext()[0].autocomplete().selectFromDropdown();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -354,7 +354,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
this.sidebar.add_items('other', [
|
||||
{ label: _t("Import"), callback: this.on_sidebar_import },
|
||||
{ label: _t("Export"), callback: this.on_sidebar_export },
|
||||
{ label: _t('Delete'), callback: this.do_delete_selected },
|
||||
{ label: _t('Delete'), callback: this.do_delete_selected }
|
||||
]);
|
||||
this.sidebar.add_toolbar(this.fields_view.toolbar);
|
||||
this.sidebar.$element.hide();
|
||||
|
@ -444,10 +444,6 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
id: '_group', tag: '', string: _t("Group"), meta: true,
|
||||
modifiers_for: function () { return {}; },
|
||||
modifiers: {}
|
||||
}, {
|
||||
id: '_count', tag: '', string: '#', meta: true,
|
||||
modifiers_for: function () { return {}; },
|
||||
modifiers: {}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -880,9 +876,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
|||
}
|
||||
this.$element.find('table:first').hide();
|
||||
this.$element.prepend(
|
||||
$('<div class="oe_view_nocontent">')
|
||||
.append($('<img>', { src: '/web/static/src/img/view_empty_arrow.png' }))
|
||||
.append($('<div>').html(this.options.action.help))
|
||||
$('<div class="oe_view_nocontent">').html(this.options.action.help)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -1344,15 +1338,19 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
|
|||
_t("Grouping on field '%s' is not possible because that field does not appear in the list view."),
|
||||
group.grouped_on));
|
||||
}
|
||||
var group_label;
|
||||
try {
|
||||
$group_column.html(instance.web.format_cell(
|
||||
group_label = instance.web.format_cell(
|
||||
row_data, group_column, {
|
||||
value_if_empty: _t("Undefined"),
|
||||
process_modifiers: false
|
||||
}));
|
||||
});
|
||||
} catch (e) {
|
||||
$group_column.html(row_data[group_column.id].value);
|
||||
group_label = row_data[group_column.id].value;
|
||||
}
|
||||
$group_column.text(_.str.sprintf("%s (%d)",
|
||||
group_label, group.length));
|
||||
|
||||
if (group.length && group.openable) {
|
||||
// Make openable if not terminal group & group_by_no_leaf
|
||||
$group_column.prepend('<span class="ui-icon ui-icon-triangle-1-e" style="float: left;">');
|
||||
|
@ -1364,8 +1362,6 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
|
|||
}
|
||||
}
|
||||
self.indent($group_column, group.level);
|
||||
// count column
|
||||
$('<td>').text(group.length).appendTo($row);
|
||||
|
||||
if (self.options.selectable) {
|
||||
$row.append('<td>');
|
||||
|
|
|
@ -14,6 +14,9 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
this.dialog = null;
|
||||
this.dialog_widget = null;
|
||||
this.breadcrumbs = [];
|
||||
this.on('history_back', this, function() {
|
||||
return this.history_back();
|
||||
});
|
||||
},
|
||||
start: function() {
|
||||
this._super.apply(this, arguments);
|
||||
|
@ -65,21 +68,46 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
item.id = _.uniqueId('breadcrumb_');
|
||||
this.breadcrumbs.push(item);
|
||||
},
|
||||
history_back: function() {
|
||||
var last = this.breadcrumbs.slice(-1)[0];
|
||||
if (!last) {
|
||||
return false;
|
||||
}
|
||||
var title = last.get_title();
|
||||
if (_.isArray(title) && title.length > 1) {
|
||||
return this.select_breadcrumb(this.breadcrumbs.length - 1, title.length - 2);
|
||||
} else if (this.breadcrumbs.length === 1) {
|
||||
// Only one single titled item in breadcrumb, most of the time you want to trigger back to home
|
||||
return false;
|
||||
} else {
|
||||
var prev = this.breadcrumbs[this.breadcrumbs.length - 2];
|
||||
title = prev.get_title();
|
||||
return this.select_breadcrumb(this.breadcrumbs.length - 2, _.isArray(title) ? title.length - 1 : undefined);
|
||||
}
|
||||
},
|
||||
on_breadcrumb_clicked: function(ev) {
|
||||
var $e = $(ev.target);
|
||||
var id = $e.data('id');
|
||||
var item;
|
||||
var index;
|
||||
for (var i = this.breadcrumbs.length - 1; i >= 0; i--) {
|
||||
var it = this.breadcrumbs[i];
|
||||
if (it.id == id) {
|
||||
item = it;
|
||||
if (this.breadcrumbs[i].id == id) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
this.remove_breadcrumb(i);
|
||||
}
|
||||
var index = $e.parent().find('.oe_breadcrumb_item[data-id=' + $e.data('id') + ']').index($e);
|
||||
item.show(index, $e);
|
||||
var subindex = $e.parent().find('.oe_breadcrumb_item[data-id=' + $e.data('id') + ']').index($e);
|
||||
this.select_breadcrumb(index, subindex);
|
||||
},
|
||||
select_breadcrumb: function(index, subindex) {
|
||||
for (var i = this.breadcrumbs.length - 1; i >= 0; i--) {
|
||||
if (i > index) {
|
||||
this.remove_breadcrumb(i);
|
||||
}
|
||||
}
|
||||
var item = this.breadcrumbs[index];
|
||||
item.show(subindex);
|
||||
this.inner_widget = item.widget;
|
||||
return true;
|
||||
},
|
||||
clear_breadcrumbs: function() {
|
||||
while (this.breadcrumbs.length) {
|
||||
|
@ -166,6 +194,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
|||
var action = state.client_action;
|
||||
if(_.isString(action)) {
|
||||
action = {
|
||||
type: 'ir.actions.client',
|
||||
tag: action,
|
||||
params: state,
|
||||
};
|
||||
|
@ -462,6 +491,13 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
}
|
||||
var controller = new controllerclass(this, this.dataset, view.view_id, options);
|
||||
|
||||
controller.on('history_back', this, function() {
|
||||
var am = self.getParent();
|
||||
if (am && am.trigger) {
|
||||
return am.trigger('history_back');
|
||||
}
|
||||
});
|
||||
|
||||
controller.on("change:title", this, function() {
|
||||
if (self.active_view === view_type) {
|
||||
self.set_title(controller.get('title'));
|
||||
|
@ -505,7 +541,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
this.getParent().push_breadcrumb({
|
||||
widget: this,
|
||||
action: this.action,
|
||||
show: function(index, $e) {
|
||||
show: function(index) {
|
||||
var view_to_select = views[index];
|
||||
self.$element.show();
|
||||
if (self.active_view !== view_to_select) {
|
||||
|
|
|
@ -1447,7 +1447,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div t-name="SearchView.addtoreporting" class="oe_searchview_dashboard">
|
||||
<h4>Add to Reporting</h4>
|
||||
<h4>Add to Dashboard</h4>
|
||||
<form>
|
||||
<p><input placeholder="Title of new dashboard item"/></p>
|
||||
<button class="oe_apply" type="submit">Add</button>
|
||||
|
|
|
@ -251,7 +251,6 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
|||
if (this.view.options.action.help) {
|
||||
this.$element.append(
|
||||
$('<div class="oe_view_nocontent">')
|
||||
.append($('<img>', { src: '/web_dashboard/static/src/img/view_todo_arrow.png' }))
|
||||
.append($('<div>').html(this.view.options.action.help || " "))
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
@charset "utf-8";
|
||||
.openerp .oe_kanban_view {
|
||||
background: url(/web/static/src/img/form_sheetbg.png);
|
||||
height: inherit;
|
||||
}
|
||||
.openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_dummy_cell {
|
||||
background: url(/web/static/src/img/form_sheetbg.png);
|
||||
}
|
||||
.openerp .oe_kanban_view .ui-sortable-placeholder {
|
||||
border: 1px dotted black;
|
||||
visibility: visible !important;
|
||||
|
@ -72,8 +74,9 @@
|
|||
background: #f0eeee;
|
||||
border-left: 1px solid #f0f8f8;
|
||||
border-right: 1px solid #b9b9b9;
|
||||
min-width: 170px;
|
||||
max-width: 250px;
|
||||
}
|
||||
.openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_group_header {
|
||||
width: 1%;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_form .oe_kanban_column {
|
||||
padding: 0px;
|
||||
|
@ -331,7 +334,6 @@
|
|||
.openerp .oe_kanban_view .oe_kanban_card {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-height: 50px;
|
||||
background: white;
|
||||
border: 1px solid #d8d8d8;
|
||||
border-bottom-color: #b9b9b9;
|
||||
|
|
|
@ -31,8 +31,9 @@
|
|||
.openerp .oe_kanban_view
|
||||
// KanbanView {{{
|
||||
//background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==)
|
||||
background: url(/web/static/src/img/form_sheetbg.png)
|
||||
height: inherit
|
||||
&.oe_kanban_grouped .oe_kanban_dummy_cell
|
||||
background: url(/web/static/src/img/form_sheetbg.png)
|
||||
.ui-sortable-placeholder
|
||||
border: 1px dotted black
|
||||
visibility: visible !important
|
||||
|
@ -92,8 +93,9 @@
|
|||
background: #f0eeee
|
||||
border-left: 1px solid #f0f8f8
|
||||
border-right: 1px solid #b9b9b9
|
||||
min-width: 170px
|
||||
max-width: 250px
|
||||
&.oe_kanban_grouped
|
||||
.oe_kanban_group_header
|
||||
width: 1%
|
||||
|
||||
.oe_form
|
||||
.oe_kanban_column
|
||||
|
@ -297,7 +299,6 @@
|
|||
.oe_kanban_card
|
||||
position: relative
|
||||
display: block
|
||||
min-height: 50px
|
||||
background: white
|
||||
border: 1px solid #d8d8d8
|
||||
border-bottom-color: #b9b9b9
|
||||
|
|
|
@ -219,7 +219,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
group.destroy();
|
||||
});
|
||||
this.groups = [];
|
||||
this.$element.find('.oe_kanban_groups_headers, .oe_kanban_groups_records').empty();
|
||||
},
|
||||
do_add_groups: function(groups) {
|
||||
var self = this;
|
||||
|
@ -227,7 +226,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
self.groups[group.undefined_title ? 'unshift' : 'push'](group);
|
||||
});
|
||||
var groups_started = _.map(this.groups, function(group) {
|
||||
return group.appendTo(self.$element.find('.oe_kanban_groups_headers'));
|
||||
return group.prependTo(self.$element.find('.oe_kanban_groups_headers'));
|
||||
});
|
||||
return $.when.apply(null, groups_started).then(function () {
|
||||
self.on_groups_started();
|
||||
|
@ -294,11 +293,13 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
_.each(this.groups, function(group) {
|
||||
if (!group.state.folded) {
|
||||
if (182*unfolded>=self.$element.width()) {
|
||||
group.$element.css('width', "170px");
|
||||
group.$element.children(':first').css('width', "170px");
|
||||
} else if (262*unfolded<self.$element.width()) {
|
||||
group.$element.css('width', "250px");
|
||||
group.$element.children(':first').css('width', "250px");
|
||||
} else {
|
||||
group.$element.css('width', Math.floor(self.$element.width()/unfolded) + 'px');
|
||||
// -12 because of padding 6 between cards
|
||||
// -1 because of the border of the latest dummy column
|
||||
group.$element.children(':first').css('width', Math.floor((self.$element.width()-1)/unfolded)-12 + 'px');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -332,9 +333,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
}
|
||||
this.$element.find('.oe_view_nocontent').remove();
|
||||
this.$element.prepend(
|
||||
$('<div class="oe_view_nocontent">')
|
||||
.append($('<img>', { src: '/web/static/src/img/view_empty_arrow.png' }))
|
||||
.append($('<div>').html(this.options.action.help))
|
||||
$('<div class="oe_view_nocontent">').html(this.options.action.help)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -401,7 +400,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({
|
|||
self.quick.replace($(".oe_kanban_no_group_qc_placeholder"));
|
||||
}
|
||||
this.$records = $(QWeb.render('KanbanView.group_records_container', { widget : this}));
|
||||
this.$records.appendTo(this.view.$element.find('.oe_kanban_groups_records'));
|
||||
this.$records.prependTo(this.view.$element.find('.oe_kanban_groups_records'));
|
||||
this.$element.find(".oe_kanban_fold_icon").click(function() {
|
||||
self.do_toggle_fold();
|
||||
self.view.compute_groups_width();
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
<div class="oe_kanban_buttons"/>
|
||||
<table class="oe_kanban_groups">
|
||||
<tr class="oe_kanban_groups_headers">
|
||||
<td class="oe_kanban_dummy_cell"><div/></td>
|
||||
</tr>
|
||||
<tr class="oe_kanban_groups_records">
|
||||
<td class="oe_kanban_dummy_cell"><div/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue