first commit

This commit is contained in:
2025-04-25 22:19:01 +02:00
commit 777a29d3bc
35 changed files with 14665 additions and 0 deletions

View File

@ -0,0 +1,10 @@
sap.ui.define([
"sap/ui/core/mvc/Controller"
], (BaseController) => {
"use strict";
return BaseController.extend("mvcapp00124.controller.App", {
onInit() {
}
});
});

View File

@ -0,0 +1,30 @@
sap.ui.define(
["sap/ui/core/mvc/Controller", "sap/ui/core/routing/History"],
/**
* @param {typeof sap.ui.core.mvc.Controller} Controller
*/
function (Controller, History) {
"use strict";
return Controller.extend("mvcapp00124.controller.BaseController", {
/**
* @override
*/
onInit: function () { },
getRouter: function() {
return sap.ui.core.UIComponent.getRouterFor(this);
},
onNavBack: function(oEvent) {
var oHistory, sPreviousHash;
oHistory = History.getInstance();
sPreviousHash = oHistory.getPreviousHash();
if(sPreviousHash !== undefined) {
window.history.go(-1);
}else {
this.getRouter().navTo("home", {}, {}, true);
}
}
});
},
);

View File

@ -0,0 +1,25 @@
sap.ui.define(
["mvcapp00124/controller/BaseController"],
/**
* @param {typeof sap.ui.core.mvc.Controller} Controller
*/
function (Controller) {
"use strict";
return Controller.extend("mvcapp00124.controller.Enter", {
/**
* @override
*/
onInit: function () { },
onPressNavTo: function(oEvent) {
this.getRouter().navTo("flightList", {}, {}, false);
},
onPressTargets: function(oEvent) {
this.getRouter().getTargets().display("flightList");
}
});
}
);

View File

@ -0,0 +1,25 @@
sap.ui.define(
["mvcapp00124/controller/BaseController"],
/**
* @param {typeof sap.ui.core.mvc.Controller} Controller
*/
function (Controller) {
"use strict";
return Controller.extend("mvcapp00124.controller.Main", {
onInit: function () {
// var oRootPath = jQuery.sap.getModulePath("mvcapp00124");
// var oModel = new sap.ui.model.json.JSONModel(
// oRootPath + "/model/flights.json"
// );
// this.getView().setModel(oModel);
},
handleLineItemPress: function () {
alert("Line item passed.");
},
});
}
);