@@ 465-495 (lines=31) @@ | ||
462 | } |
|
463 | } |
|
464 | /* redistrib sublevel selection: select id and deselect other, added in version 0.3 */ |
|
465 | this._redistribSubLevelSelection = function(id, parentId) { |
|
466 | // clear previosly selected items |
|
467 | while (this._openedPolygons.length > 0) this._openedPolygons.pop(); |
|
468 | // this._openedPolygons = new Array(); |
|
469 | var i = this._getSubItemToDeselectByPolygon(parentId); |
|
470 | this._removeSubItemFromSelected(-1, -1); |
|
471 | for (var q=0; q<i.length; q++) { if ((this.idPull[i[q]] != null) && (i[q] != id)) { if (this.itemPull[i[q]]["state"] == "enabled") { this.idPull[i[q]].className = "sub_item"; } } } |
|
472 | // hide polygons |
|
473 | for (var q=0; q<this._openedPolygons.length; q++) { if (this._openedPolygons[q] != parentId) { this._hidePolygon(this._openedPolygons[q]); } } |
|
474 | // add new selection into list new |
|
475 | if (this.itemPull[id]["state"] == "enabled") { |
|
476 | this.idPull[id].className = "sub_item_selected"; |
|
477 | if (this.itemPull[id]["complex"] && this.dLoad && (this.itemPull[id]["loaded"]=="no")) { |
|
478 | if (this.loaderIcon == true) { this._updateLoaderIcon(id, true); } |
|
479 | var xmlLoader = new dtmlXMLLoaderObject(this._xmlParser, window); |
|
480 | this.itemPull[id]["loaded"] = "get"; |
|
481 | this.callEvent("onXLS", []); |
|
482 | xmlLoader.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&parentId="+id.replace(this.idPrefix,"")+"&etc="+new Date().getTime()); |
|
483 | } |
|
484 | // show |
|
485 | if (this.itemPull[id]["complex"] || (this.dLoad && (this.itemPull[id]["loaded"] == "yes"))) { |
|
486 | // make arrow over |
|
487 | if ((this.itemPull[id]["complex"]) && (this.idPull["polygon_" + id] != null)) { |
|
488 | this._updateItemComplexState(id, true, true); |
|
489 | this._showPolygon(id, this.dirSubLevel); |
|
490 | } |
|
491 | } |
|
492 | this._addSubItemToSelected(id, parentId); |
|
493 | this.menuSelected = id; |
|
494 | } |
|
495 | } |
|
496 | /* onClickMenu action (click on any end item to perform some actions) |
|
497 | optimized in version 0.3 added type feature (click on disabled items, click on complex nodes) |
|
498 | attachEvent feature from 0.4 */ |
@@ 441-471 (lines=31) @@ | ||
438 | } |
|
439 | } |
|
440 | /* redistrib sublevel selection: select id and deselect other, added in version 0.3 */ |
|
441 | this._redistribSubLevelSelection = function(id, parentId) { |
|
442 | // clear previosly selected items |
|
443 | while (this._openedPolygons.length > 0) this._openedPolygons.pop(); |
|
444 | // this._openedPolygons = new Array(); |
|
445 | var i = this._getSubItemToDeselectByPolygon(parentId); |
|
446 | this._removeSubItemFromSelected(-1, -1); |
|
447 | for (var q=0; q<i.length; q++) { if ((this.idPull[i[q]] != null) && (i[q] != id)) { if (this.itemPull[i[q]]["state"] == "enabled") { this.idPull[i[q]].className = "sub_item"; } } } |
|
448 | // hide polygons |
|
449 | for (var q=0; q<this._openedPolygons.length; q++) { if (this._openedPolygons[q] != parentId) { this._hidePolygon(this._openedPolygons[q]); } } |
|
450 | // add new selection into list new |
|
451 | if (this.itemPull[id]["state"] == "enabled") { |
|
452 | this.idPull[id].className = "sub_item_selected"; |
|
453 | if (this.itemPull[id]["complex"] && this.dLoad && (this.itemPull[id]["loaded"]=="no")) { |
|
454 | if (this.loaderIcon == true) { this._updateLoaderIcon(id, true); } |
|
455 | var xmlLoader = new dtmlXMLLoaderObject(this._xmlParser, window); |
|
456 | this.itemPull[id]["loaded"] = "get"; |
|
457 | this.callEvent("onXLS", []); |
|
458 | xmlLoader.loadXML(this.dLoadUrl+this.dLoadSign+"action=loadMenu&parentId="+id.replace(this.idPrefix,"")+"&etc="+new Date().getTime()); |
|
459 | } |
|
460 | // show |
|
461 | if (this.itemPull[id]["complex"] || (this.dLoad && (this.itemPull[id]["loaded"] == "yes"))) { |
|
462 | // make arrow over |
|
463 | if ((this.itemPull[id]["complex"]) && (this.idPull["polygon_" + id] != null)) { |
|
464 | this._updateItemComplexState(id, true, true); |
|
465 | this._showPolygon(id, this.dirSubLevel); |
|
466 | } |
|
467 | } |
|
468 | this._addSubItemToSelected(id, parentId); |
|
469 | this.menuSelected = id; |
|
470 | } |
|
471 | } |
|
472 | /* onClickMenu action (click on any end item to perform some actions) |
|
473 | optimized in version 0.3 added type feature (click on disabled items, click on complex nodes) |
|
474 | attachEvent feature from 0.4 */ |