[FIX] Change Click to DblClick Event - Change in core lib.

This commit is contained in:
Siddharth Bhalgami 2017-12-01 15:30:46 +05:30
parent 4c53003dfe
commit 223e481cbf
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ behavior: {
clickable: boolean,
draggable: boolean,
resizable: boolean,
onClick: function,
onDblClick: function, // Modify by Flectra - Click becomes DblClick
onDrag: function,
onResize: function
}
@ -274,7 +274,7 @@ behavior: {
function apply() {
if (opts.behavior.clickable) {
bindBlockClick(div, opts.behavior.onClick);
bindBlockClick(div, opts.behavior.onDblClick);
}
if (opts.behavior.resizable) {
@ -287,7 +287,7 @@ behavior: {
}
function bindBlockClick(div, callback) {
jQuery("div.ganttview-block", div).on("click", function () {
jQuery("div.ganttview-block", div).on("dblclick", function () {
if (callback) { callback(jQuery(this).data("block-data")); }
});
}

View File

@ -53,7 +53,7 @@ return AbstractRenderer.extend({
slideWidth: 'auto',
cellWidth: 20,
behavior: {
onClick: function (data) {
onDblClick: function (data) {
var dialog = new Dialog(self, {
title: _t(data.name),
$content: $(QWeb.render('GanttViewWizard')),