[FIX] Change Click to DblClick Event - Change in core lib.
This commit is contained in:
parent
4c53003dfe
commit
223e481cbf
@ -18,7 +18,7 @@ behavior: {
|
|||||||
clickable: boolean,
|
clickable: boolean,
|
||||||
draggable: boolean,
|
draggable: boolean,
|
||||||
resizable: boolean,
|
resizable: boolean,
|
||||||
onClick: function,
|
onDblClick: function, // Modify by Flectra - Click becomes DblClick
|
||||||
onDrag: function,
|
onDrag: function,
|
||||||
onResize: function
|
onResize: function
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ behavior: {
|
|||||||
function apply() {
|
function apply() {
|
||||||
|
|
||||||
if (opts.behavior.clickable) {
|
if (opts.behavior.clickable) {
|
||||||
bindBlockClick(div, opts.behavior.onClick);
|
bindBlockClick(div, opts.behavior.onDblClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts.behavior.resizable) {
|
if (opts.behavior.resizable) {
|
||||||
@ -287,7 +287,7 @@ behavior: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function bindBlockClick(div, callback) {
|
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")); }
|
if (callback) { callback(jQuery(this).data("block-data")); }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ return AbstractRenderer.extend({
|
|||||||
slideWidth: 'auto',
|
slideWidth: 'auto',
|
||||||
cellWidth: 20,
|
cellWidth: 20,
|
||||||
behavior: {
|
behavior: {
|
||||||
onClick: function (data) {
|
onDblClick: function (data) {
|
||||||
var dialog = new Dialog(self, {
|
var dialog = new Dialog(self, {
|
||||||
title: _t(data.name),
|
title: _t(data.name),
|
||||||
$content: $(QWeb.render('GanttViewWizard')),
|
$content: $(QWeb.render('GanttViewWizard')),
|
||||||
|
Loading…
Reference in New Issue
Block a user