Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
2.9 kB
0
Indexable
Never
_openDetail = function (oNode, oButton) {

            var sTeamSize = this._getCustomDataValue(oNode, "team");



            if (!this._oQuickView) {

                Fragment.load({

                    // name: "sap.suite.ui.commons.sample.NetworkGraphOrgChart.TooltipFragment",

                    name: "com.sap.ui5.chart.orgchart.TooltipFragment",

                    type: "XML"

                }).then(function (oFragment) {

                    this._oQuickView = oFragment;

                    this._oQuickView.setModel(new JSONModel({

                        icon: oNode.getImage() && oNode.getImage().getProperty("src"),

                        title: oNode.getDescription(),

                        description: this._getCustomDataValue(oNode, "position"),

                        location: this._getCustomDataValue(oNode, "location"),

                        showTeam: !!sTeamSize,

                        teamSize: sTeamSize,

                        email: this._getCustomDataValue(oNode, "email"),

                        phone: this._getCustomDataValue(oNode, "phone")

                    }));



                    setTimeout(function () {

                        this._oQuickView.openBy(oButton);

                    }.bind(this), 0);

                }.bind(this));

            } else {

                this._oQuickView.setModel(new JSONModel({

                    icon: oNode.getImage() && oNode.getImage().getProperty("src"),

                    title: oNode.getDescription(),

                    description: this._getCustomDataValue(oNode, "position"),

                    location: this._getCustomDataValue(oNode, "location"),

                    showTeam: !!sTeamSize,

                    teamSize: sTeamSize,

                    email: this._getCustomDataValue(oNode, "email"),

                    phone: this._getCustomDataValue(oNode, "phone")

                }));



                setTimeout(function () {

                    this._oQuickView.openBy(oButton);

                }.bind(this), 0);

            }

        };