@openui5/sap.ui.documentation 1.114.0 → 1.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/.reuse/dep5 +0 -5
  2. package/THIRDPARTY.txt +0 -6
  3. package/package.json +7 -7
  4. package/src/sap/ui/documentation/.library +1 -1
  5. package/src/sap/ui/documentation/library.js +11 -11
  6. package/src/sap/ui/documentation/messagebundle.properties +3 -3
  7. package/src/sap/ui/documentation/messagebundle_ar.properties +4 -3
  8. package/src/sap/ui/documentation/messagebundle_bg.properties +4 -3
  9. package/src/sap/ui/documentation/messagebundle_ca.properties +4 -3
  10. package/src/sap/ui/documentation/messagebundle_cs.properties +4 -3
  11. package/src/sap/ui/documentation/messagebundle_cy.properties +4 -3
  12. package/src/sap/ui/documentation/messagebundle_da.properties +4 -3
  13. package/src/sap/ui/documentation/messagebundle_de.properties +5 -4
  14. package/src/sap/ui/documentation/messagebundle_el.properties +4 -3
  15. package/src/sap/ui/documentation/messagebundle_en.properties +6 -3
  16. package/src/sap/ui/documentation/messagebundle_en_GB.properties +6 -3
  17. package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +6 -3
  18. package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +4 -3
  19. package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +6 -3
  20. package/src/sap/ui/documentation/messagebundle_es.properties +4 -3
  21. package/src/sap/ui/documentation/messagebundle_es_MX.properties +4 -3
  22. package/src/sap/ui/documentation/messagebundle_et.properties +4 -3
  23. package/src/sap/ui/documentation/messagebundle_fi.properties +4 -3
  24. package/src/sap/ui/documentation/messagebundle_fr.properties +4 -3
  25. package/src/sap/ui/documentation/messagebundle_fr_CA.properties +4 -3
  26. package/src/sap/ui/documentation/messagebundle_hi.properties +4 -3
  27. package/src/sap/ui/documentation/messagebundle_hr.properties +4 -3
  28. package/src/sap/ui/documentation/messagebundle_hu.properties +4 -3
  29. package/src/sap/ui/documentation/messagebundle_id.properties +4 -3
  30. package/src/sap/ui/documentation/messagebundle_it.properties +4 -3
  31. package/src/sap/ui/documentation/messagebundle_iw.properties +4 -3
  32. package/src/sap/ui/documentation/messagebundle_ja.properties +4 -3
  33. package/src/sap/ui/documentation/messagebundle_kk.properties +4 -3
  34. package/src/sap/ui/documentation/messagebundle_ko.properties +4 -3
  35. package/src/sap/ui/documentation/messagebundle_lt.properties +4 -3
  36. package/src/sap/ui/documentation/messagebundle_lv.properties +4 -3
  37. package/src/sap/ui/documentation/messagebundle_ms.properties +4 -3
  38. package/src/sap/ui/documentation/messagebundle_nl.properties +4 -3
  39. package/src/sap/ui/documentation/messagebundle_no.properties +4 -3
  40. package/src/sap/ui/documentation/messagebundle_pl.properties +4 -3
  41. package/src/sap/ui/documentation/messagebundle_pt.properties +4 -3
  42. package/src/sap/ui/documentation/messagebundle_pt_PT.properties +4 -3
  43. package/src/sap/ui/documentation/messagebundle_ro.properties +4 -3
  44. package/src/sap/ui/documentation/messagebundle_ru.properties +4 -3
  45. package/src/sap/ui/documentation/messagebundle_sh.properties +4 -3
  46. package/src/sap/ui/documentation/messagebundle_sk.properties +4 -3
  47. package/src/sap/ui/documentation/messagebundle_sl.properties +4 -3
  48. package/src/sap/ui/documentation/messagebundle_sv.properties +4 -3
  49. package/src/sap/ui/documentation/messagebundle_th.properties +8 -7
  50. package/src/sap/ui/documentation/messagebundle_tr.properties +4 -3
  51. package/src/sap/ui/documentation/messagebundle_uk.properties +4 -3
  52. package/src/sap/ui/documentation/messagebundle_vi.properties +4 -3
  53. package/src/sap/ui/documentation/messagebundle_zh_CN.properties +4 -3
  54. package/src/sap/ui/documentation/messagebundle_zh_TW.properties +4 -3
  55. package/src/sap/ui/documentation/sdk/controller/App.controller.js +313 -172
  56. package/src/sap/ui/documentation/sdk/controller/BaseController.js +3 -2
  57. package/src/sap/ui/documentation/sdk/controller/ControlsMaster.controller.js +30 -17
  58. package/src/sap/ui/documentation/sdk/controller/DemoApps.controller.js +147 -28
  59. package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +38 -18
  60. package/src/sap/ui/documentation/sdk/controller/SearchPage.controller.js +14 -2
  61. package/src/sap/ui/documentation/sdk/controller/VersionNotFound.controller.js +3 -1
  62. package/src/sap/ui/documentation/sdk/controller/util/IndexWorker.js +4 -3
  63. package/src/sap/ui/documentation/sdk/css/style.css +0 -5
  64. package/src/sap/ui/documentation/sdk/index.js +9 -9
  65. package/src/sap/ui/documentation/sdk/model/libraryData.js +18 -12
  66. package/src/sap/ui/documentation/sdk/tmpl/index.js.tmpl +4 -3
  67. package/src/sap/ui/documentation/sdk/view/ControlsMaster.view.xml +2 -2
  68. package/src/sap/ui/documentation/sdk/view/DemoApps.view.xml +1 -1
  69. package/src/sap/ui/documentation/sdk/view/FeedbackDialog.fragment.xml +1 -1
  70. package/src/sap/ui/documentation/sdk/view/GlobalSearchPicker.fragment.xml +8 -1
  71. package/src/sap/ui/documentation/sdk/view/ReleaseNotesView.fragment.xml +7 -0
  72. package/src/sap/ui/documentation/sdk/view/SearchPage.view.xml +8 -4
  73. package/src/sap/ui/documentation/themes/base/Documentation.less +9 -1
  74. package/src/sap/ui/documentation/themes/sap_horizon_dark/Documentation.less +17 -12
  75. package/src/sap/ui/documentation/sdk/view/ReleaseNotesView.view.tmpl +0 -11
@@ -25,6 +25,7 @@ sap.ui.define([
25
25
  "sap/base/util/Version",
26
26
  "sap/ui/core/syncStyleClass",
27
27
  "sap/ui/core/Core",
28
+ "sap/ui/util/openWindow",
28
29
  "sap/ui/documentation/sdk/model/formatter",
29
30
  "sap/m/ResponsivePopover",
30
31
  "sap/ui/documentation/sdk/controller/util/Highlighter",
@@ -54,6 +55,7 @@ sap.ui.define([
54
55
  Version,
55
56
  syncStyleClass,
56
57
  Core,
58
+ openWindow,
57
59
  globalFormatter,
58
60
  ResponsivePopover,
59
61
  Highlighter,
@@ -678,6 +680,14 @@ sap.ui.define([
678
680
  return sTitle;
679
681
  },
680
682
 
683
+ formatSuggestionTitle: function(sTitle, sSummary) {
684
+ var sFormatted = sTitle || "";
685
+ if (sSummary) {
686
+ sFormatted += ": " + sSummary;
687
+ }
688
+ return sFormatted;
689
+ },
690
+
681
691
  onSearchResultsSummaryPress: function(oEvent) {
682
692
  var sCategory = oEvent.oSource.data("category");
683
693
  this.navToSearchResults(sCategory);
@@ -686,7 +696,11 @@ sap.ui.define([
686
696
  onSearchPickerItemPress: function(oEvent) {
687
697
  var contextPath = oEvent.oSource.getBindingContextPath(),
688
698
  oDataItem = this.getModel("searchData").getProperty(contextPath);
689
- this.getRouter().parsePath(oDataItem.path);
699
+ if (oDataItem.external) {
700
+ openWindow(new URL(oDataItem.path, document.baseURI).href);
701
+ } else {
702
+ this.getRouter().parsePath(oDataItem.path);
703
+ }
690
704
  this.oPicker.close();
691
705
  },
692
706
 
@@ -901,18 +915,35 @@ sap.ui.define([
901
915
  this._setSelectedLanguage(sLanguage);
902
916
  },
903
917
 
918
+ getAboutDialog: function () {
919
+ return new Promise(function (resolve, reject) {
920
+ if (!this._oAboutDialog) {
921
+ Fragment.load({
922
+ id: "aboutDialogFragment",
923
+ name: "sap.ui.documentation.sdk.view.AboutDialog",
924
+ controller: this
925
+ }).then(function (oDialog) {
926
+ this._oAboutDialog = oDialog;
927
+ this._oView.addDependent(this._oAboutDialog);
928
+ resolve(this._oAboutDialog);
929
+ }.bind(this));
930
+ } else {
931
+ resolve(this._oAboutDialog);
932
+ }
933
+ }.bind(this));
934
+ },
935
+
904
936
  aboutDialogOpen: function () {
905
- if (!this._oAboutDialog) {
906
- this._oAboutDialog = new sap.ui.xmlfragment("aboutDialogFragment", "sap.ui.documentation.sdk.view.AboutDialog", this);
907
- this._oView.addDependent(this._oAboutDialog);
908
- } else {
909
- this._oAboutDialog.getContent()[0].backToTop(); // reset the nav container to the first page
910
- }
911
- this._oAboutDialog.open();
937
+ this.getAboutDialog().then(function (oDialog) {
938
+ oDialog.getContent()[0].backToTop(); // reset the nav container to the first page
939
+ oDialog.open();
940
+ });
912
941
  },
913
942
 
914
943
  aboutDialogClose: function (oEvent) {
915
- this._oAboutDialog.close();
944
+ this.getAboutDialog().then(function (oDialog) {
945
+ oDialog.close();
946
+ });
916
947
  },
917
948
 
918
949
  onAboutVersionDetails: function (oEvent) {
@@ -983,44 +1014,80 @@ sap.ui.define([
983
1014
  oNavCon.to(oDetailPage);
984
1015
  },
985
1016
 
1017
+ _getReleaseDialog: function () {
1018
+ return new Promise(function (resolve) {
1019
+ if (!this._oReleaseDialog) {
1020
+ Fragment.load({
1021
+ id: "releaseDialogFragment",
1022
+ name: "sap.ui.documentation.sdk.view.ReleaseDialog",
1023
+ controller: this
1024
+ }).then(function (oDialog) {
1025
+ this._oReleaseDialog = oDialog;
1026
+ this._oView.addDependent(this._oReleaseDialog);
1027
+ resolve(this._oReleaseDialog);
1028
+ }
1029
+ .bind(this));
1030
+ } else {
1031
+ resolve(this._oReleaseDialog);
1032
+ }
1033
+ }.bind(this));
1034
+ },
1035
+
1036
+ _getNotesView: function () {
1037
+ var oNotesModel;
1038
+ return new Promise(function (resolve) {
1039
+ if (!this._oNotesView) {
1040
+ oNotesModel = new JSONModel();
1041
+ Fragment.load({
1042
+ id: "notesView",
1043
+ name: "sap.ui.documentation.sdk.view.ReleaseNotesView",
1044
+ controller: this
1045
+ }).then(function (oView) {
1046
+ this._oNotesView = oView;
1047
+ this._oNotesView.setModel(oNotesModel);
1048
+ resolve(this._oNotesView);
1049
+ }.bind(this));
1050
+ } else {
1051
+ resolve(this._oNotesView);
1052
+ }
1053
+ }.bind(this));
1054
+ },
1055
+
986
1056
  onReleaseDialogOpen: function (oEvent) {
987
1057
  var oLibInfo = library._getLibraryInfoSingleton(),
988
1058
  sVersion = oEvent.getSource().data("version"),
989
1059
  sLibrary = oEvent.getSource().data("library"),
990
- oNotesModel = new JSONModel(),
991
- oDialogModel = new JSONModel(),
992
- that = this;
1060
+ oDialogModel = new JSONModel();
993
1061
 
994
- if (!this._oReleaseDialog) {
995
- this._oReleaseDialog = new sap.ui.xmlfragment("releaseDialogFragment", "sap.ui.documentation.sdk.view.ReleaseDialog", this);
996
- this._oView.addDependent(this._oReleaseDialog);
997
- }
1062
+ Promise.all([this._getReleaseDialog(), this._getNotesView()]).then(function (aResult) {
1063
+ var oReleaseDialog = aResult[0],
1064
+ oNotesView = aResult[1],
1065
+ oNotesViewData = {};
998
1066
 
999
- if (!this._oNotesView) {
1000
- this._oNotesView = sap.ui.view({id:"notesView", viewName:"sap.ui.documentation.sdk.view.ReleaseNotesView", type:"Template"});
1001
- this._oNotesView.setModel(oNotesModel);
1002
- }
1067
+ oLibInfo._getReleaseNotes(sLibrary, sVersion, function(oRelNotes, sVersion) {
1068
+ var oDialogData = {};
1003
1069
 
1004
- oLibInfo._getReleaseNotes(sLibrary, sVersion, function(oRelNotes, sVersion) {
1005
- var oDialogData = {};
1070
+ if (oRelNotes && oRelNotes[sVersion] && oRelNotes[sVersion].notes && oRelNotes[sVersion].notes.length > 0) {
1071
+ oNotesViewData = oRelNotes[sVersion];
1072
+ } else {
1073
+ oDialogData.noData = true;
1074
+ }
1075
+ oNotesView.getModel().setData(oNotesViewData);
1076
+ oDialogData.library = sLibrary;
1077
+ oDialogModel.setData(oDialogData);
1078
+ });
1006
1079
 
1007
- if (oRelNotes && oRelNotes[sVersion] && oRelNotes[sVersion].notes && oRelNotes[sVersion].notes.length > 0) {
1008
- that._oNotesView.getModel().setData(oRelNotes);
1009
- that._oNotesView.bindObject("/" + sVersion);
1010
- } else {
1011
- oDialogData.noData = true;
1012
- }
1013
- oDialogData.library = sLibrary;
1014
- oDialogModel.setData(oDialogData);
1080
+ oReleaseDialog.setModel(oDialogModel);
1081
+ oReleaseDialog.addContent(oNotesView);
1082
+ oReleaseDialog.open();
1015
1083
  });
1016
1084
 
1017
- this._oReleaseDialog.setModel(oDialogModel);
1018
- this._oReleaseDialog.addContent(this._oNotesView);
1019
- this._oReleaseDialog.open();
1020
1085
  },
1021
1086
 
1022
1087
  onReleaseDialogClose: function (oEvent) {
1023
- this._oReleaseDialog.close();
1088
+ this._getReleaseDialog().then(function (oDialog) {
1089
+ oDialog.close();
1090
+ });
1024
1091
  },
1025
1092
 
1026
1093
  onAboutNavBack: function (oEvent) {
@@ -1029,11 +1096,15 @@ sap.ui.define([
1029
1096
  },
1030
1097
 
1031
1098
  onChangeVersionButtonPress: function () {
1032
- this.getVersionSwitchDialog().open();
1099
+ this.getVersionSwitchDialog().then(function (oDialog) {
1100
+ oDialog.open();
1101
+ });
1033
1102
  },
1034
1103
 
1035
1104
  onCloseVersionDialog: function () {
1036
- this.getVersionSwitchDialog().close();
1105
+ this.getVersionSwitchDialog().then(function (oDialog) {
1106
+ oDialog.close();
1107
+ });
1037
1108
  },
1038
1109
 
1039
1110
  onChangeVersionDialogSearch: function (oEvent) {
@@ -1072,7 +1143,7 @@ sap.ui.define([
1072
1143
  },
1073
1144
 
1074
1145
  onVersionItemPress: function (oEvent) {
1075
- var oSelectedItem = sap.ui.getCore().byId("versionList").getSelectedItem(),
1146
+ var oSelectedItem = Core.byId("versionList").getSelectedItem(),
1076
1147
  oCustomData = oSelectedItem.getCustomData()[0];
1077
1148
 
1078
1149
  if (oCustomData && oCustomData.getKey() === "path") {
@@ -1087,11 +1158,21 @@ sap.ui.define([
1087
1158
  },
1088
1159
 
1089
1160
  getVersionSwitchDialog: function () {
1090
- if (!this._oChangeVersionDialog) {
1091
- this._createVersionDialog();
1092
- }
1093
-
1094
- return this._oChangeVersionDialog;
1161
+ return new Promise(function (resolve) {
1162
+ if (!this._oChangeVersionDialog) {
1163
+ Fragment.load({
1164
+ name: "sap.ui.documentation.sdk.view.ChangeVersionDialog",
1165
+ controller: this
1166
+ }).then(function (oDialog) {
1167
+ this._oChangeVersionDialog = oDialog;
1168
+ this._oChangeVersionDialog.setModel(this._buildVersionDialogModel());
1169
+ this._oView.addDependent(this._oChangeVersionDialog);
1170
+ resolve(this._oChangeVersionDialog);
1171
+ }.bind(this));
1172
+ } else {
1173
+ resolve(this._oChangeVersionDialog);
1174
+ }
1175
+ }.bind(this));
1095
1176
  },
1096
1177
 
1097
1178
  /**
@@ -1119,11 +1200,6 @@ sap.ui.define([
1119
1200
  oViewModel.setProperty("/bShowVersionSwitchInMenu", bPhoneSize && !!this._aNeoAppVersions.length);
1120
1201
  },
1121
1202
 
1122
- _createVersionDialog: function () {
1123
- this._oChangeVersionDialog = new sap.ui.xmlfragment("sap.ui.documentation.sdk.view.ChangeVersionDialog", this);
1124
- this._oChangeVersionDialog.setModel(this._buildVersionDialogModel());
1125
- this._oView.addDependent(this._oChangeVersionDialog);
1126
- },
1127
1203
 
1128
1204
  _buildVersionDialogModel: function() {
1129
1205
  var oChangeVersionDialogModel = new JSONModel();
@@ -1136,84 +1212,104 @@ sap.ui.define([
1136
1212
  return oChangeVersionDialogModel;
1137
1213
  },
1138
1214
 
1139
- /**
1140
- * Opens a dialog to give feedback on the demo kit
1141
- */
1142
- feedbackDialogOpen: function () {
1143
- var that = this;
1144
- var oResourceBundle;
1215
+ getFeedbackDialog: function () {
1216
+ return new Promise(function (resolve) {
1217
+ if (!this._oFeedbackDialog) {
1218
+ Fragment.load({
1219
+ id: "feedbackDialogFragment",
1220
+ name: "sap.ui.documentation.sdk.view.FeedbackDialog",
1221
+ controller: this
1222
+ })
1223
+ .then(this.extendFeedbackDialog.bind(this))
1224
+ .then(function (oDialog) {
1225
+ this._oFeedbackDialog = oDialog;
1226
+ this._oView.addDependent(this._oFeedbackDialog);
1227
+ resolve(this._oFeedbackDialog);
1228
+ }.bind(this));
1229
+ } else {
1230
+ resolve(this._oFeedbackDialog);
1231
+ }
1232
+ }.bind(this));
1233
+ },
1145
1234
 
1146
- if (!this._oFeedbackDialog) {
1235
+ extendFeedbackDialog: function (oFeedbackDialog) {
1236
+ var that = this,
1147
1237
  oResourceBundle = this.getModel("i18n").getResourceBundle();
1148
1238
 
1149
- this._oFeedbackDialog = new sap.ui.xmlfragment("feedbackDialogFragment", "sap.ui.documentation.sdk.view.FeedbackDialog", this);
1150
- this._oView.addDependent(this._oFeedbackDialog);
1151
-
1152
- this._oFeedbackDialog.textInput = Fragment.byId("feedbackDialogFragment", "feedbackInput");
1153
- this._oFeedbackDialog.contextCheckBox = Fragment.byId("feedbackDialogFragment", "pageContext");
1154
- this._oFeedbackDialog.contextData = Fragment.byId("feedbackDialogFragment", "contextData");
1155
- this._oFeedbackDialog.ratingStatus = Fragment.byId("feedbackDialogFragment", "ratingStatus");
1156
- this._oFeedbackDialog.ratingStatus.value = 0;
1157
- this._oFeedbackDialog.sendButton = Fragment.byId("feedbackDialogFragment", "sendButton");
1158
- this._oFeedbackDialog.ratingBar = [
1159
- {
1160
- button : Fragment.byId("feedbackDialogFragment", "excellent"),
1161
- status : "Excellent",
1162
- displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_EXCELLENT")
1163
- },
1164
- {
1165
- button : Fragment.byId("feedbackDialogFragment", "good"),
1166
- status : "Good",
1167
- displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_GOOD")
1168
- },
1169
- {
1170
- button : Fragment.byId("feedbackDialogFragment", "average"),
1171
- status : "Average",
1172
- displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_AVERAGE")
1173
- },
1174
- {
1175
- button : Fragment.byId("feedbackDialogFragment", "poor"),
1176
- status : "Poor",
1177
- displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_POOR")
1178
- },
1179
- {
1180
- button : Fragment.byId("feedbackDialogFragment", "veryPoor"),
1181
- status : "Very Poor",
1182
- displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_VERY_POOR")
1239
+ oFeedbackDialog.textInput = Fragment.byId("feedbackDialogFragment", "feedbackInput");
1240
+ oFeedbackDialog.contextCheckBox = Fragment.byId("feedbackDialogFragment", "pageContext");
1241
+ oFeedbackDialog.contextData = Fragment.byId("feedbackDialogFragment", "contextData");
1242
+ oFeedbackDialog.ratingStatus = Fragment.byId("feedbackDialogFragment", "ratingStatus");
1243
+ oFeedbackDialog.ratingStatus.value = 0;
1244
+ oFeedbackDialog.sendButton = Fragment.byId("feedbackDialogFragment", "sendButton");
1245
+ oFeedbackDialog.ratingBar = [
1246
+ {
1247
+ button : Fragment.byId("feedbackDialogFragment", "excellent"),
1248
+ status : "Excellent",
1249
+ displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_EXCELLENT")
1250
+ },
1251
+ {
1252
+ button : Fragment.byId("feedbackDialogFragment", "good"),
1253
+ status : "Good",
1254
+ displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_GOOD")
1255
+ },
1256
+ {
1257
+ button : Fragment.byId("feedbackDialogFragment", "average"),
1258
+ status : "Average",
1259
+ displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_AVERAGE")
1260
+ },
1261
+ {
1262
+ button : Fragment.byId("feedbackDialogFragment", "poor"),
1263
+ status : "Poor",
1264
+ displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_POOR")
1265
+ },
1266
+ {
1267
+ button : Fragment.byId("feedbackDialogFragment", "veryPoor"),
1268
+ status : "Very Poor",
1269
+ displayStatus: oResourceBundle.getText("FEEDBACK_DIALOG_STATUS_VERY_POOR")
1270
+ }
1271
+ ];
1272
+ oFeedbackDialog.reset = function () {
1273
+ this.sendButton.setEnabled(false);
1274
+ this.textInput.setValue("");
1275
+ this.contextCheckBox.setSelected(true);
1276
+ this.ratingStatus.setText("");
1277
+ this.ratingStatus.setState("None");
1278
+ this.ratingStatus.value = 0;
1279
+ this.contextData.setVisible(false);
1280
+ this.ratingBar.forEach(function(oRatingBarElement){
1281
+ if (oRatingBarElement.button.getPressed()) {
1282
+ oRatingBarElement.button.setPressed(false);
1183
1283
  }
1184
- ];
1185
- this._oFeedbackDialog.reset = function () {
1186
- this.sendButton.setEnabled(false);
1187
- this.textInput.setValue("");
1188
- this.contextCheckBox.setSelected(true);
1189
- this.ratingStatus.setText("");
1190
- this.ratingStatus.setState("None");
1191
- this.ratingStatus.value = 0;
1192
- this.contextData.setVisible(false);
1193
- this.ratingBar.forEach(function(oRatingBarElement){
1194
- if (oRatingBarElement.button.getPressed()) {
1195
- oRatingBarElement.button.setPressed(false);
1196
- }
1197
- });
1198
- };
1199
- this._oFeedbackDialog.updateContextData = function() {
1200
- var sVersion = that._getUI5Version(),
1201
- sUI5Distribution = that._getUI5Distribution();
1284
+ });
1285
+ };
1286
+ oFeedbackDialog.updateContextData = function() {
1287
+ var sVersion = that._getUI5Version(),
1288
+ sUI5Distribution = that._getUI5Distribution();
1202
1289
 
1203
- if (this.contextCheckBox.getSelected()) {
1204
- this.contextData.setValue("Location: " + that._getCurrentPageRelativeURL() + "\n" + sUI5Distribution + " Version: " + sVersion);
1205
- } else {
1206
- this.contextData.setValue(sUI5Distribution + " Version: " + sVersion);
1207
- }
1208
- };
1290
+ if (this.contextCheckBox.getSelected()) {
1291
+ this.contextData.setValue("Location: " + that._getCurrentPageRelativeURL() + "\n" + sUI5Distribution + " Version: " + sVersion);
1292
+ } else {
1293
+ this.contextData.setValue(sUI5Distribution + " Version: " + sVersion);
1294
+ }
1295
+ };
1209
1296
 
1210
- this._oFeedbackDialog.updateContextData();
1211
- }
1212
- this._oFeedbackDialog.updateContextData();
1213
- if (!this._oFeedbackDialog.isOpen()) {
1214
- syncStyleClass("sapUiSizeCompact", this.getView(), this._oFeedbackDialog);
1215
- this._oFeedbackDialog.open();
1216
- }
1297
+ oFeedbackDialog.updateContextData();
1298
+
1299
+ return oFeedbackDialog;
1300
+ },
1301
+
1302
+ /**
1303
+ * Opens a dialog to give feedback on the demo kit
1304
+ */
1305
+ feedbackDialogOpen: function () {
1306
+ this.getFeedbackDialog().then(function (oFeedbackDialog) {
1307
+ oFeedbackDialog.updateContextData();
1308
+ if (!oFeedbackDialog.isOpen()) {
1309
+ syncStyleClass("sapUiSizeCompact", this.getView(), oFeedbackDialog);
1310
+ oFeedbackDialog.open();
1311
+ }
1312
+ }.bind(this));
1217
1313
  },
1218
1314
 
1219
1315
  /**
@@ -1263,9 +1359,16 @@ sap.ui.define([
1263
1359
  },
1264
1360
 
1265
1361
  shortSurveyRedirect: function () {
1266
- var sQueryParams = "?product=SAPUI5%2FOpenUI5&product_filter=UI5&cluster=BTP&page=" + encodeURIComponent(document.location.href),
1267
- sProdURL = "https://sapinsights.eu.qualtrics.com/jfe/form/SV_2gcfdw3EYYOIz5A" + sQueryParams,
1268
- sDevURL = "https://sapinsights.eu.qualtrics.com/jfe/form/SV_d3UPNymSgUHAb9Y" + sQueryParams,
1362
+ var sQueryParams = "?Release_version=" + this._getUI5Version()
1363
+ + "&Source=" + this._getUI5Distribution()
1364
+ + "&Type=" + this._getUI5VersionType()
1365
+ + "&product=SAPUI5%2FOpenUI5"
1366
+ + "&product_filter=UI5"
1367
+ + "&cluster=BTP"
1368
+ + "&page=" + encodeURIComponent(document.location.href);
1369
+
1370
+ var sProdURL = "https://sapinsights.eu.qualtrics.com/jfe/form/SV_byI4QeS7Ic2Psyi" + sQueryParams,
1371
+ sDevURL = "https://sapinsights.eu.qualtrics.com/jfe/form/SV_3Epqk1MLAUQVrwy" + sQueryParams,
1269
1372
  bProd = !this.getModel("versionData").getProperty("/isDevEnv");
1270
1373
 
1271
1374
  // This survey could be displayed in a Qualtrics intercept
@@ -1328,11 +1431,17 @@ sap.ui.define([
1328
1431
  /**
1329
1432
  * Event handler for the send feedback button
1330
1433
  */
1331
- onFeedbackDialogSend: function() {
1332
- var oVersionInfo = Version(sap.ui.version),
1333
- data = {
1334
- "text": this._oFeedbackDialog.textInput.getValue(),
1335
- "rating": this._oFeedbackDialog.ratingStatus.value,
1434
+ onFeedbackDialogSendPress: function () {
1435
+ this.getFeedbackDialog().then(this.onFeedbackDialogSend.bind(this));
1436
+ },
1437
+
1438
+ onFeedbackDialogSend: function(oFeedbackDialog) {
1439
+ var sVersion = this._getFullVersion(),
1440
+ oVersionInfo = Version(sVersion),
1441
+ oResourceBundle = this.getModel("i18n").getResourceBundle(),
1442
+ data = {
1443
+ "text": oFeedbackDialog.textInput.getValue(),
1444
+ "rating": oFeedbackDialog.ratingStatus.value,
1336
1445
  "major": oVersionInfo.getMajor(),
1337
1446
  "minor": oVersionInfo.getMinor(),
1338
1447
  "patch": oVersionInfo.getPatch(),
@@ -1340,13 +1449,12 @@ sap.ui.define([
1340
1449
  "snapshot": oVersionInfo.getSuffix().indexOf("SNAPSHOT") > -1,
1341
1450
  "url": this._getCurrentURL(),
1342
1451
  "page": this._getCurrentPageRelativeURL(),
1343
- "pageContext": this._oFeedbackDialog.contextCheckBox.getSelected()
1344
- },
1345
- oResourceBundle = this.getModel("i18n").getResourceBundle();
1452
+ "pageContext": oFeedbackDialog.contextCheckBox.getSelected()
1453
+ };
1346
1454
 
1347
1455
  // send feedback
1348
- this._oFeedbackDialog.setBusyIndicatorDelay(0);
1349
- this._oFeedbackDialog.setBusy(true);
1456
+ oFeedbackDialog.setBusyIndicatorDelay(0);
1457
+ oFeedbackDialog.setBusy(true);
1350
1458
 
1351
1459
  jQuery.ajax({
1352
1460
  url: FEEDBACK_URL,
@@ -1359,10 +1467,10 @@ sap.ui.define([
1359
1467
  MessageBox.success(oResourceBundle.getText("FEEDBACK_DIALOG_TEXT_SUCCESS"), {
1360
1468
  title: oResourceBundle.getText("FEEDBACK_DIALOG_TITLE_SUCCESS")
1361
1469
  });
1362
- this._oFeedbackDialog.reset();
1363
- this._oFeedbackDialog.close();
1364
- this._oFeedbackDialog.setBusy(false);
1365
- }.bind(this)
1470
+ oFeedbackDialog.reset();
1471
+ oFeedbackDialog.close();
1472
+ oFeedbackDialog.setBusy(false);
1473
+ }
1366
1474
  ).
1367
1475
  fail(
1368
1476
  function (oRequest, sStatus, sError) {
@@ -1370,32 +1478,37 @@ sap.ui.define([
1370
1478
  MessageBox.error(oResourceBundle.getText("FEEDBACK_DIALOG_TEXT_ERROR") + sErrorDetails, {
1371
1479
  title: oResourceBundle.getText("FEEDBACK_DIALOG_TITLE_ERROR")
1372
1480
  });
1373
- this._oFeedbackDialog.setBusy(false);
1374
- }.bind(this)
1481
+ oFeedbackDialog.setBusy(false);
1482
+ }
1375
1483
  );
1376
-
1377
1484
  },
1378
1485
 
1379
1486
  /**
1380
1487
  * Event handler for the cancel feedback button
1381
1488
  */
1382
1489
  onFeedbackDialogCancel: function () {
1383
- this._oFeedbackDialog.reset();
1384
- this._oFeedbackDialog.close();
1490
+ this.getFeedbackDialog().then(function(oFeedbackDialog) {
1491
+ oFeedbackDialog.reset();
1492
+ oFeedbackDialog.close();
1493
+ });
1385
1494
  },
1386
1495
 
1387
1496
  /**
1388
1497
  * Event handler for the toggle context link
1389
1498
  */
1390
1499
  onShowHideContextData: function () {
1391
- this._oFeedbackDialog.contextData.setVisible(!this._oFeedbackDialog.contextData.getVisible());
1500
+ this.getFeedbackDialog().then(function(oFeedbackDialog) {
1501
+ oFeedbackDialog.contextData.setVisible(!oFeedbackDialog.contextData.getVisible());
1502
+ });
1392
1503
  },
1393
1504
 
1394
1505
  /**
1395
1506
  * Event handler for the context selection checkbox
1396
1507
  */
1397
1508
  onContextSelect: function() {
1398
- this._oFeedbackDialog.updateContextData();
1509
+ this.getFeedbackDialog().then(function(oFeedbackDialog) {
1510
+ oFeedbackDialog.updateContextData();
1511
+ });
1399
1512
  },
1400
1513
 
1401
1514
  /**
@@ -1403,44 +1516,45 @@ sap.ui.define([
1403
1516
  * @param {sap.ui.base.Event} oEvent
1404
1517
  */
1405
1518
  onPressRatingButton: function(oEvent) {
1406
- var that = this;
1407
1519
  var oPressedButton = oEvent.getSource();
1408
1520
 
1409
- that._oFeedbackDialog.ratingBar.forEach(function(oRatingBarElement) {
1410
- if (oPressedButton !== oRatingBarElement.button) {
1411
- oRatingBarElement.button.setPressed(false);
1412
- } else {
1413
- if (!oRatingBarElement.button.getPressed()) {
1414
- setRatingStatus("None", "", 0);
1521
+ this.getFeedbackDialog().then(function(oFeedbackDialog) {
1522
+ oFeedbackDialog.ratingBar.forEach(function(oRatingBarElement) {
1523
+ if (oPressedButton !== oRatingBarElement.button) {
1524
+ oRatingBarElement.button.setPressed(false);
1415
1525
  } else {
1416
- switch (oRatingBarElement.status) {
1417
- case "Excellent":
1418
- setRatingStatus("Success", oRatingBarElement.displayStatus, 5);
1419
- break;
1420
- case "Good":
1421
- setRatingStatus("Success", oRatingBarElement.displayStatus, 4);
1422
- break;
1423
- case "Average":
1424
- setRatingStatus("None", oRatingBarElement.displayStatus, 3);
1425
- break;
1426
- case "Poor":
1427
- setRatingStatus("Warning", oRatingBarElement.displayStatus, 2);
1428
- break;
1429
- case "Very Poor":
1430
- setRatingStatus("Error", oRatingBarElement.displayStatus, 1);
1526
+ if (!oRatingBarElement.button.getPressed()) {
1527
+ setRatingStatus(oFeedbackDialog, "None", "", 0);
1528
+ } else {
1529
+ switch (oRatingBarElement.status) {
1530
+ case "Excellent":
1531
+ setRatingStatus(oFeedbackDialog, "Success", oRatingBarElement.displayStatus, 5);
1532
+ break;
1533
+ case "Good":
1534
+ setRatingStatus(oFeedbackDialog, "Success", oRatingBarElement.displayStatus, 4);
1535
+ break;
1536
+ case "Average":
1537
+ setRatingStatus(oFeedbackDialog, "None", oRatingBarElement.displayStatus, 3);
1538
+ break;
1539
+ case "Poor":
1540
+ setRatingStatus(oFeedbackDialog, "Warning", oRatingBarElement.displayStatus, 2);
1541
+ break;
1542
+ case "Very Poor":
1543
+ setRatingStatus(oFeedbackDialog, "Error", oRatingBarElement.displayStatus, 1);
1544
+ }
1431
1545
  }
1432
1546
  }
1433
- }
1547
+ });
1434
1548
  });
1435
1549
 
1436
- function setRatingStatus(sState, sText, iValue) {
1437
- that._oFeedbackDialog.ratingStatus.setState(sState);
1438
- that._oFeedbackDialog.ratingStatus.setText(sText);
1439
- that._oFeedbackDialog.ratingStatus.value = iValue;
1550
+ function setRatingStatus(oFeedbackDialog, sState, sText, iValue) {
1551
+ oFeedbackDialog.ratingStatus.setState(sState);
1552
+ oFeedbackDialog.ratingStatus.setText(sText);
1553
+ oFeedbackDialog.ratingStatus.value = iValue;
1440
1554
  if (iValue) {
1441
- that._oFeedbackDialog.sendButton.setEnabled(true);
1555
+ oFeedbackDialog.sendButton.setEnabled(true);
1442
1556
  } else {
1443
- that._oFeedbackDialog.sendButton.setEnabled(false);
1557
+ oFeedbackDialog.sendButton.setEnabled(false);
1444
1558
  }
1445
1559
  }
1446
1560
  },
@@ -1713,6 +1827,10 @@ sap.ui.define([
1713
1827
  );
1714
1828
  },
1715
1829
 
1830
+ _getFullVersion: function () {
1831
+ return this.getModel("versionData").getProperty("/fullVersion");
1832
+ },
1833
+
1716
1834
  _getUI5Version: function () {
1717
1835
  return ResourcesUtil.getResourcesVersion() ?
1718
1836
  window.sessionStorage.getItem("versionPrefixPath") : this.getModel("versionData").getProperty("/version");
@@ -1731,6 +1849,29 @@ sap.ui.define([
1731
1849
  return sUI5Distribution;
1732
1850
  },
1733
1851
 
1852
+ _getUI5VersionType: function() {
1853
+ var oVersionModel = this.getModel("versionData"),
1854
+ bIsInternal = oVersionModel.getProperty("/isInternal"),
1855
+ bIsSnapshotVersion = oVersionModel.getProperty("/isSnapshotVersion"),
1856
+ sVersionType;
1857
+
1858
+ switch (true) {
1859
+ case bIsSnapshotVersion && bIsInternal:
1860
+ sVersionType = "InternalSnapshot";
1861
+ break;
1862
+ case bIsInternal:
1863
+ sVersionType = "Internal";
1864
+ break;
1865
+ case bIsSnapshotVersion:
1866
+ sVersionType = "Snapshot";
1867
+ break;
1868
+ default:
1869
+ sVersionType = "Release";
1870
+ }
1871
+
1872
+ return sVersionType;
1873
+ },
1874
+
1734
1875
  _getCurrentPageRelativeURL: function () {
1735
1876
  var currentLocation = window.location;
1736
1877
  return currentLocation.pathname + currentLocation.hash + currentLocation.search;