parent
c811ff3af5
commit
36a433ddcd
|
@ -21,7 +21,7 @@ openerp.project = function(openerp) {
|
|||
});
|
||||
});
|
||||
|
||||
//if task is true , then open the task when clickd on the anywhere in the box.
|
||||
//if task is true , then open the task when click on the anywhere in the box.
|
||||
if(this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks');
|
||||
if(!this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy');
|
||||
};
|
||||
|
|
|
@ -3,7 +3,6 @@ openerp.project_issue = function(openerp) {
|
|||
bind_events: function() {
|
||||
self = this;
|
||||
self._super();
|
||||
console.log(self);
|
||||
if(this.view.dataset.model == 'project.project') {
|
||||
if(this.record.task.raw_value && this.record.issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks');
|
||||
if(!this.record.task.raw_value && this.record.issues.raw_value)$(this.$element).find('.click_button').attr('data-name','open_issues');
|
||||
|
|
|
@ -4,10 +4,18 @@ openerp.project_timesheet = function(openerp) {
|
|||
self = this;
|
||||
self._super();
|
||||
if(this.view.dataset.model == 'project.project') {
|
||||
if(this.record.task.raw_value && this.record.issues.raw_value && this.record.timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks');
|
||||
function include(arr, obj) {
|
||||
for(var i=0; i<arr.length; i++) {
|
||||
if (arr[i] == obj) return true;
|
||||
}
|
||||
}
|
||||
if(include(this.view.fields_keys,"issues"))
|
||||
{
|
||||
if(!this.record.task.raw_value && !this.record.issues.raw_value && this.record.timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_timesheets');
|
||||
//if(!this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy');
|
||||
};
|
||||
if(this.record.task.raw_value && this.record.timesheets.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks');
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue