Skip to content

Commit 5ba5736

Browse files
1 parent ffbb8bf commit 5ba5736

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

app/webapp/controller/View1.controller.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
sap.ui.define(["sap/ui/core/mvc/Controller", "sap/ui/core/mvc/XMLView", "sap/ui/model/json/JSONModel",
22
"sap/ui/core/BusyIndicator", "sap/m/MessageBox", "sap/m/MessageToast", "sap/ui/core/Fragment", "sap/m/BusyDialog",
3-
"sap/ui/VersionInfo", "z2ui5/cc/Server", "sap/ui/model/odata/v2/ODataModel",
3+
"sap/ui/VersionInfo", "z2ui5/cc/Server", "sap/ui/model/odata/v2/ODataModel", "sap/m/library"
44
],
55
function (Controller, XMLView, JSONModel, BusyIndicator, MessageBox, MessageToast, Fragment, mBusyDialog, VersionInfo,
6-
Server, ODataModel) {
6+
Server, ODataModel, mobileLibrary) {
77
"use strict";
88
return Controller.extend("z2ui5.controller.View1", {
99

@@ -323,6 +323,24 @@ sap.ui.define(["sap/ui/core/mvc/Controller", "sap/ui/core/mvc/XMLView", "sap/ui/
323323
navConTo = Fragment.byId("popupId", args[2]);
324324
navCon.to(navConTo);
325325
break;
326+
case 'URLHELPER':
327+
var URLHelper = mobileLibrary.URLHelper;
328+
var obj = JSON.parse(JSON.stringify(args[2]));
329+
switch (args[1]) {
330+
case 'REDIRECT':
331+
URLHelper.redirect(obj.url, obj.newWindow);
332+
break;
333+
case 'TRIGGER_EMAIL':
334+
URLHelper.triggerEmail(obj.email, obj.subject, obj.body, obj.cc, obj.bcc, obj.newWindow);
335+
break;
336+
case 'TRIGGER_SMS':
337+
URLHelper.triggerSms(obj.tel);
338+
break;
339+
case 'TRIGGER_TEL':
340+
URLHelper.triggerTel(obj.tel);
341+
break;
342+
}
343+
break;
326344
}
327345
},
328346
eB(...args) {
@@ -483,4 +501,4 @@ sap.ui.define(["sap/ui/core/mvc/Controller", "sap/ui/core/mvc/XMLView", "sap/ui/
483501
z2ui5.oApp.insertPage(z2ui5.oView);
484502
},
485503
})
486-
});
504+
});

0 commit comments

Comments
 (0)