src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/App.controller.js
function () {
				var that = this;

				if (!this._oFeedbackDialog) {
					this._oFeedbackDialog = new sap.ui.xmlfragment("feedbackDialogFragment", "sap.ui.documentation.sdk.view.FeedbackDialog", this);
					this._oView.addDependent(this._oFeedbackDialog);

					this._oFeedbackDialog.textInput = Fragment.byId("feedbackDialogFragment", "feedbackInput");
					this._oFeedbackDialog.contextCheckBox = Fragment.byId("feedbackDialogFragment", "pageContext");
					this._oFeedbackDialog.contextData = Fragment.byId("feedbackDialogFragment", "contextData");
					this._oFeedbackDialog.ratingStatus = Fragment.byId("feedbackDialogFragment", "ratingStatus");
					this._oFeedbackDialog.ratingStatus.value = 0;
					this._oFeedbackDialog.sendButton = Fragment.byId("feedbackDialogFragment", "sendButton");
					this._oFeedbackDialog.ratingBar = [
						{
							button : Fragment.byId("feedbackDialogFragment", "excellent"),
							status : "Excellent"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "good"),
							status : "Good"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "average"),
							status : "Average"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "poor"),
							status : "Poor"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "veryPoor"),
							status : "Very Poor"
						}
					];
					this._oFeedbackDialog.reset = function () {
						this.sendButton.setEnabled(false);
						this.textInput.setValue("");
						this.contextCheckBox.setSelected(true);
						this.ratingStatus.setText("");
						this.ratingStatus.setState("None");
						this.ratingStatus.value = 0;
						this.contextData.setVisible(false);
						this.ratingBar.forEach(function(oRatingBarElement){
							if (oRatingBarElement.button.getPressed()) {
								oRatingBarElement.button.setPressed(false);
							}
						});
					};
					this._oFeedbackDialog.updateContextData = function() {
						var sVersion = that._getUI5Version(),
							sUI5Distribution = that._getUI5Distribution();

						if (this.contextCheckBox.getSelected()) {
							this.contextData.setValue("Location: " + that._getCurrentPageRelativeURL() + "\n" + sUI5Distribution + " Version: " + sVersion);
						} else {
							this.contextData.setValue(sUI5Distribution + " Version: " + sVersion);
						}
					};

					this._oFeedbackDialog.updateContextData();
				}
				this._oFeedbackDialog.updateContextData();
				if (!this._oFeedbackDialog.isOpen()) {
					syncStyleClass("sapUiSizeCompact", this.getView(), this._oFeedbackDialog);
					this._oFeedbackDialog.open();
				}
			}
function () {
				var that = this;

				if (!this._oFeedbackDialog) {
					this._oFeedbackDialog = new sap.ui.xmlfragment("feedbackDialogFragment", "sap.ui.documentation.sdk.view.FeedbackDialog", this);
					this._oView.addDependent(this._oFeedbackDialog);

					this._oFeedbackDialog.textInput = Fragment.byId("feedbackDialogFragment", "feedbackInput");
					this._oFeedbackDialog.contextCheckBox = Fragment.byId("feedbackDialogFragment", "pageContext");
					this._oFeedbackDialog.contextData = Fragment.byId("feedbackDialogFragment", "contextData");
					this._oFeedbackDialog.ratingStatus = Fragment.byId("feedbackDialogFragment", "ratingStatus");
					this._oFeedbackDialog.ratingStatus.value = 0;
					this._oFeedbackDialog.sendButton = Fragment.byId("feedbackDialogFragment", "sendButton");
					this._oFeedbackDialog.ratingBar = [
						{
							button : Fragment.byId("feedbackDialogFragment", "excellent"),
							status : "Excellent"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "good"),
							status : "Good"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "average"),
							status : "Average"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "poor"),
							status : "Poor"
						},
						{
							button : Fragment.byId("feedbackDialogFragment", "veryPoor"),
							status : "Very Poor"
						}
					];
					this._oFeedbackDialog.reset = function () {
						this.sendButton.setEnabled(false);
						this.textInput.setValue("");
						this.contextCheckBox.setSelected(true);
						this.ratingStatus.setText("");
						this.ratingStatus.setState("None");
						this.ratingStatus.value = 0;
						this.contextData.setVisible(false);
						this.ratingBar.forEach(function(oRatingBarElement){
							if (oRatingBarElement.button.getPressed()) {
								oRatingBarElement.button.setPressed(false);
							}
						});
					};
					this._oFeedbackDialog.updateContextData = function() {
						var sVersion = that._getUI5Version(),
							sUI5Distribution = that._getUI5Distribution();

						if (this.contextCheckBox.getSelected()) {
							this.contextData.setValue("Location: " + that._getCurrentPageRelativeURL() + "\n" + sUI5Distribution + " Version: " + sVersion);
						} else {
							this.contextData.setValue(sUI5Distribution + " Version: " + sVersion);
						}
					};

					this._oFeedbackDialog.updateContextData();
				}
				this._oFeedbackDialog.updateContextData();
				if (!this._oFeedbackDialog.isOpen()) {
					syncStyleClass("sapUiSizeCompact", this.getView(), this._oFeedbackDialog);
					this._oFeedbackDialog.open();
				}
			}
function ( ) { var that = this ; if ( ! this . _oFeedbackDialog ) { this . _oFeedbackDialog = new sap . ui . xmlfragment ( "feedbackDialogFragment" , "sap.ui.documentation.sdk.view.FeedbackDialog" , this ) ; this . _oView . addDependent ( this . _oFeedbackDialog ) ; this . _oFeedbackDialog . textInput = Fragment . byId ( "feedbackDialogFragment" , "feedbackInput" ) ; this . _oFeedbackDialog . contextCheckBox = Fragment . byId ( "feedbackDialogFragment" , "pageContext" ) ; this . _oFeedbackDialog . contextData = Fragment . byId ( "feedbackDialogFragment" , "contextData" ) ; this . _oFeedbackDialog . ratingStatus = Fragment . byId ( "feedbackDialogFragment" , "ratingStatus" ) ; this . _oFeedbackDialog . ratingStatus . value = 0 ; this . _oFeedbackDialog . sendButton = Fragment . byId ( "feedbackDialogFragment" , "sendButton" ) ; this . _oFeedbackDialog . ratingBar = [ { button : Fragment . byId ( "feedbackDialogFragment" , "excellent" ) , status : "Excellent" } , { button : Fragment . byId ( "feedbackDialogFragment" , "good" ) , status : "Good" } , { button : Fragment . byId ( "feedbackDialogFragment" , "average" ) , status : "Average" } , { button : Fragment . byId ( "feedbackDialogFragment" , "poor" ) , status : "Poor" } , { button : Fragment . byId ( "feedbackDialogFragment" , "veryPoor" ) , status : "Very Poor" } ] ; this . _oFeedbackDialog . reset = function ( ) { this . sendButton . setEnabled ( false ) ; this . textInput . setValue ( "" ) ; this . contextCheckBox . setSelected ( true ) ; this . ratingStatus . setText ( "" ) ; this . ratingStatus . setState ( "None" ) ; this . ratingStatus . value = 0 ; this . contextData . setVisible ( false ) ; this . ratingBar . forEach ( function ( oRatingBarElement ) { if ( oRatingBarElement . button . getPressed ( ) ) { oRatingBarElement . button . setPressed ( false ) ; } } ) ; } ; this . _oFeedbackDialog . updateContextData = function ( ) { var sVersion = that . _getUI5Version ( ) , sUI5Distribution = that . _getUI5Distribution ( ) ; if ( this . contextCheckBox . getSelected ( ) ) { this . contextData . setValue ( "Location: " + that . _getCurrentPageRelativeURL ( ) + "\n" + sUI5Distribution + " Version: " + sVersion ) ; } else { this . contextData . setValue ( sUI5Distribution + " Version: " + sVersion ) ; } } ; this . _oFeedbackDialog . updateContextData ( ) ; } this . _oFeedbackDialog . updateContextData ( ) ; if ( ! this . _oFeedbackDialog . isOpen ( ) ) { syncStyleClass ( "sapUiSizeCompact" , this . getView ( ) , this . _oFeedbackDialog ) ; this . _oFeedbackDialog . open ( ) ; } }
Opens a dialog to give feedback on the demo kit
Opens a dialog to give feedback on the demo kit