forked from extern/egroupware
reapplied r41681: fixed event handling in tree, added tree specific onSelect and onCheck events, implemented !multiple mode and fixed dhtmlxtree to not trigger onSelect if selection is change via set_value (according to their documentation)
This commit is contained in:
parent
85c5468013
commit
d9c9e06aad
@ -1230,17 +1230,19 @@ SELECTION
|
||||
/**
|
||||
* @desc: visual select item in tree
|
||||
* @type: private
|
||||
* @param: node - tree item object
|
||||
* @param: node - tree item object
|
||||
* @param: mode - true suppress onSelect
|
||||
* @edition: Professional
|
||||
* @topic: 0
|
||||
*/
|
||||
dhtmlXTreeObject.prototype._selectItem=function(node,e){
|
||||
if (this.checkEvent("onSelect")) this._onSSCFold=this.getSelectedItemId();
|
||||
dhtmlXTreeObject.prototype._selectItem=function(node,e,mode){
|
||||
if (typeof mode == 'undefined') mode=false;
|
||||
if (!mode && this.checkEvent("onSelect")) this._onSSCFold=this.getSelectedItemId();
|
||||
|
||||
this._unselectItems();
|
||||
|
||||
this._markItem(node);
|
||||
if (this.checkEvent("onSelect")) {
|
||||
if (!mode && this.checkEvent("onSelect")) {
|
||||
var z=this.getSelectedItemId();
|
||||
if (z!=this._onSSCFold)
|
||||
this.callEvent("onSelect",[z]);
|
||||
@ -1332,7 +1334,7 @@ SELECTION
|
||||
|
||||
var lastId=that.getSelectedItemId();
|
||||
if ((!e)||(!e.skipUnSel))
|
||||
that._selectItem(obj,e);
|
||||
that._selectItem(obj,e,mode);
|
||||
|
||||
if (!mode) {
|
||||
if (obj.actionHandler) obj.actionHandler(obj.id,lastId);
|
||||
|
Loading…
Reference in New Issue
Block a user