[IMP] kanban view :- add image of next and previsous buttons, show and hide based on no of groups.
bzr revid: ysa@tinyerp.com-20110919061827-vwo7bmn4co2xqq0p
This commit is contained in:
parent
7decdaa74d
commit
6dea3b1523
|
@ -157,12 +157,20 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
|
|||
this.$element.find(".oe_column").disableSelection()
|
||||
this.$element.find('button.oe_kanban_button_new').click(this.do_add_record);
|
||||
var row_width = 100, column_width = 100;
|
||||
if ((this.all_display_data).length > 1){
|
||||
if ((this.all_display_data).length >= this.NO_OF_COLUMNS) {
|
||||
row_width = (100 / this.NO_OF_COLUMNS) * (this.all_display_data).length;
|
||||
column_width = 100 / (this.all_display_data).length
|
||||
}
|
||||
self.$element.find(".oe_table_column" ).css("width", column_width +"%");
|
||||
self.$element.find(".oe_kanban_row" ).css("width", row_width +"%");
|
||||
column_width = 100 / (this.all_display_data).length
|
||||
if ((this.all_display_data).length <= this.NO_OF_COLUMNS) {
|
||||
this.$element.find('#next-column').hide();
|
||||
this.$element.find('#previous-column').hide();
|
||||
}
|
||||
else{
|
||||
this.$element.find('#next-column').show();
|
||||
this.$element.find('#previous-column').show();
|
||||
}
|
||||
this.$element.find(".oe_table_column" ).css("width", column_width +"%");
|
||||
this.$element.find(".oe_kanban_row" ).css("width", row_width +"%");
|
||||
this.$element.find('#next-column').click(function(event) {
|
||||
event.preventDefault();
|
||||
self.$element.find('.oe_kanban_view').animate({"scrollLeft" : "+=" + self.$element.find('.oe_column').width()}, 'slow');
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<div>
|
||||
<div>
|
||||
<div class="oe_form_header">
|
||||
<img id="previous-column" src="/web/static/src/img/icons/STOCK_GO_BACK.png"/>
|
||||
<button type="button" class="oe_kanban_button_new">New</button>
|
||||
<a id="previous-column" href="#">Previous</a>
|
||||
<a id="next-column" href="#">Next</a>
|
||||
<img id="next-column" src="/web/static/src/img/icons/STOCK_GO_FORWARD.png" align="right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue