function() {
				var data = {};

				if (this._oFeedbackDialog.contextCheckBox.getSelected()) {
					data = {
						"texts": {
							"t1": this._oFeedbackDialog.textInput.getValue()
						},
						"ratings":{
							"r1": {"value" : this._oFeedbackDialog.ratingStatus.value}
						},
						"context": {"page": this._getCurrentPageRelativeURL(), "attr1": this._getUI5Distribution() + ":" + sap.ui.version}
					};
				} else {
					data = {
						"texts": {
							"t1": this._oFeedbackDialog.textInput.getValue()
						},
						"ratings":{
							"r1": {"value" : this._oFeedbackDialog.ratingStatus.value}
						},
						"context": {"attr1": this._getUI5Distribution() + ":" + sap.ui.version}
					};
				}

				// send feedback
				this._oFeedbackDialog.setBusyIndicatorDelay(0);
				this._oFeedbackDialog.setBusy(true);

				jQuery.ajax({
					url: this.FEEDBACK_SERVICE_URL,
					type: "POST",
					contentType: "application/json",
					data: JSON.stringify(data)
				}).
				done(
					function () {
						MessageBox.success("Your feedback has been sent.", {title: "Thank you!"});
						this._oFeedbackDialog.reset();
						this._oFeedbackDialog.close();
						this._oFeedbackDialog.setBusy(false);
					}.bind(this)
				).
				fail(
					function (oRequest, sStatus, sError) {
						var sErrorDetails = sError; // + "\n" + oRequest.responseText;
						MessageBox.error("An error occurred sending your feedback:\n" + sErrorDetails, {title: "Sorry!"});
						this._oFeedbackDialog.setBusy(false);
					}.bind(this)
				);

			}
function() {
				var data = {};

				if (this._oFeedbackDialog.contextCheckBox.getSelected()) {
					data = {
						"texts": {
							"t1": this._oFeedbackDialog.textInput.getValue()
						},
						"ratings":{
							"r1": {"value" : this._oFeedbackDialog.ratingStatus.value}
						},
						"context": {"page": this._getCurrentPageRelativeURL(), "attr1": this._getUI5Distribution() + ":" + sap.ui.version}
					};
				} else {
					data = {
						"texts": {
							"t1": this._oFeedbackDialog.textInput.getValue()
						},
						"ratings":{
							"r1": {"value" : this._oFeedbackDialog.ratingStatus.value}
						},
						"context": {"attr1": this._getUI5Distribution() + ":" + sap.ui.version}
					};
				}

				// send feedback
				this._oFeedbackDialog.setBusyIndicatorDelay(0);
				this._oFeedbackDialog.setBusy(true);

				jQuery.ajax({
					url: this.FEEDBACK_SERVICE_URL,
					type: "POST",
					contentType: "application/json",
					data: JSON.stringify(data)
				}).
				done(
					function () {
						MessageBox.success("Your feedback has been sent.", {title: "Thank you!"});
						this._oFeedbackDialog.reset();
						this._oFeedbackDialog.close();
						this._oFeedbackDialog.setBusy(false);
					}.bind(this)
				).
				fail(
					function (oRequest, sStatus, sError) {
						var sErrorDetails = sError; // + "\n" + oRequest.responseText;
						MessageBox.error("An error occurred sending your feedback:\n" + sErrorDetails, {title: "Sorry!"});
						this._oFeedbackDialog.setBusy(false);
					}.bind(this)
				);

			}
function ( ) { var data = { } ; if ( this . _oFeedbackDialog . contextCheckBox . getSelected ( ) ) { data = { "texts" : { "t1" : this . _oFeedbackDialog . textInput . getValue ( ) } , "ratings" : { "r1" : { "value" : this . _oFeedbackDialog . ratingStatus . value } } , "context" : { "page" : this . _getCurrentPageRelativeURL ( ) , "attr1" : this . _getUI5Distribution ( ) + ":" + sap . ui . version } } ; } else { data = { "texts" : { "t1" : this . _oFeedbackDialog . textInput . getValue ( ) } , "ratings" : { "r1" : { "value" : this . _oFeedbackDialog . ratingStatus . value } } , "context" : { "attr1" : this . _getUI5Distribution ( ) + ":" + sap . ui . version } } ; } // send feedback this . _oFeedbackDialog . setBusyIndicatorDelay ( 0 ) ; this . _oFeedbackDialog . setBusy ( true ) ; jQuery . ajax ( { url : this . FEEDBACK_SERVICE_URL , type : "POST" , contentType : "application/json" , data : JSON . stringify ( data ) } ) . done ( function ( ) { MessageBox . success ( "Your feedback has been sent." , { title : "Thank you!" } ) ; this . _oFeedbackDialog . reset ( ) ; this . _oFeedbackDialog . close ( ) ; this . _oFeedbackDialog . setBusy ( false ) ; } . bind ( this ) ) . fail ( function ( oRequest , sStatus , sError ) { var sErrorDetails = sError ; // + "\n" + oRequest.responseText; MessageBox . error ( "An error occurred sending your feedback:\n" + sErrorDetails , { title : "Sorry!" } ) ; this . _oFeedbackDialog . setBusy ( false ) ; } . bind ( this ) ) ; }
Event handler for the send feedback button
Event handler for the send feedback button
Send the feedback