Hello,
I’m getting a strange errors when I’m trying to use them together.
scheduler.attachEvent("onContextMenu", function (id, ev){
if(id == null) return false;
rmenu(id);
return false;
});
function rmenu(id) {
event = scheduler.getEvent(id);
var opis = "...";
var win = dhxWins.createWindow("w_kal", 200, 10, 400, 400);
win.setText("Menu RQ");
win.attachHTMLString(opis);
var toolbar = dhxWins.window("w_kal").attachToolbar();
var i = 0;
if(upr("E",id)) toolbar.addButton("e", i++, "Edycja");
...
toolbar.attachEvent("onClick", function(a) {
if(a == "e") edytor(id);
...
toolbar.unload();
toolbar = null;
dhxWins.window("w_kal").close();
});
}
There is a problem with closing the “w_kal” window with “X” button: I receive a js error this.detachAllEvents() is not a function in dhtmlx.js line 2393.
I was trying many solutions and discovered that when I swap .js imports, then the closing would work, but I would get another error.
Instead of that:
<script src="/dhtmlx/dhtmlx.js"></script>
<script src="/dhtmlx/dhtmlxScheduler/codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
I wrote that:
<script src="/dhtmlx/dhtmlxScheduler/codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<script src="/dhtmlx/dhtmlx.js"></script>
Then, closing works without error. But I can’t add events on Scheduler - I click “save” and the Connector does nothing. I was looking at the logs and discovered that in this case there is no “editing=true” parameter given to the Connector.
I’m using a Professional 2.6 version of Suite, java Connector and trying 2.3 free Scheduler. Maybe should I import some .js files?