mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 19:26:10 +08:00
udate (#1575)
This commit is contained in:
parent
f3afebfaff
commit
a7b27924f1
|
@ -142,7 +142,7 @@ sap.ui.define(["sap/ui/core/Control", "sap/ui/core/Fragment", "sap/ui/model/json
|
|||
async close(){
|
||||
if (this.oDialog){
|
||||
this.oDialog.close();
|
||||
this.oDialog.destry();
|
||||
this.oDialog.destroy();
|
||||
}
|
||||
},
|
||||
renderer(){
|
||||
|
|
|
@ -185,6 +185,7 @@ sap.ui.define("z2ui5/History", ["sap/ui/core/Control"], (Control) => {
|
|||
});
|
||||
}
|
||||
);
|
||||
|
||||
sap.ui.define("z2ui5/Scrolling", ["sap/ui/core/Control"], (Control) => {
|
||||
"use strict";
|
||||
|
||||
|
@ -207,12 +208,12 @@ sap.ui.define("z2ui5/Scrolling", ["sap/ui/core/Control"], (Control) => {
|
|||
if (items) {
|
||||
items.forEach(item => {
|
||||
try {
|
||||
const scrollDelegate = z2ui5.oView.byId(item.ID).getScrollDelegate();
|
||||
item.SCROLLTO = scrollDelegate ? scrollDelegate.getScrollTop() : 0;
|
||||
const scrollDelegate = z2ui5.oView.byId(item.N).getScrollDelegate();
|
||||
item.V = scrollDelegate ? scrollDelegate.getScrollTop() : 0;
|
||||
} catch {
|
||||
try {
|
||||
const element = document.getElementById(`${z2ui5.oView.byId(item.ID).getId()}-inner`);
|
||||
item.SCROLLTO = element ? element.scrollTop : 0;
|
||||
item.V = element ? element.scrollTop : 0;
|
||||
} catch {}
|
||||
}
|
||||
});
|
||||
|
@ -233,14 +234,14 @@ sap.ui.define("z2ui5/Scrolling", ["sap/ui/core/Control"], (Control) => {
|
|||
setTimeout(() => {
|
||||
items.forEach(item => {
|
||||
try {
|
||||
z2ui5.oView.byId(item.ID).scrollTo(item.SCROLLTO);
|
||||
z2ui5.oView.byId(item.N).scrollTo(item.V);
|
||||
} catch {
|
||||
try {
|
||||
const element = document.getElementById(`${z2ui5.oView.byId(item.ID).getId()}-inner`);
|
||||
if (element) element.scrollTop = item.SCROLLTO;
|
||||
if (element) element.scrollTop = item.V;
|
||||
} catch {
|
||||
setTimeout(() => {
|
||||
z2ui5.oView.byId(item.ID).scrollTo(item.SCROLLTO);
|
||||
z2ui5.oView.byId(item.N).scrollTo(item.V);
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
@ -250,8 +251,6 @@ sap.ui.define("z2ui5/Scrolling", ["sap/ui/core/Control"], (Control) => {
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
sap.ui.define("z2ui5/Info", ["sap/ui/core/Control", "sap/ui/VersionInfo", "sap/ui/Device"], (Control) => {
|
||||
"use strict";
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
sap.ui.define(["sap/ui/core/mvc/Controller", "sap/ui/core/mvc/XMLView", "sap/ui/model/json/JSONModel",
|
||||
"sap/ui/core/BusyIndicator", "sap/m/MessageBox", "sap/m/MessageToast", "sap/ui/core/Fragment", "sap/m/BusyDialog",
|
||||
"sap/ui/VersionInfo", "z2ui5/cc/Server",
|
||||
"sap/ui/VersionInfo", "z2ui5/cc/Server", "z2ui5/cc/DebugTool",
|
||||
],
|
||||
function (Controller, XMLView, JSONModel, BusyIndicator, MessageBox, MessageToast, Fragment, mBusyDialog, VersionInfo,
|
||||
Server) {
|
||||
Server, DebugTool) {
|
||||
"use strict";
|
||||
return Controller.extend("z2ui5.controller.View1", {
|
||||
|
||||
|
|
|
@ -205,6 +205,7 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
` });` && |\n| &&
|
||||
`}` && |\n| &&
|
||||
`);` && |\n| &&
|
||||
`` && |\n| &&
|
||||
`sap.ui.define("z2ui5/Scrolling", ["sap/ui/core/Control"], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
`` && |\n| &&
|
||||
|
@ -227,12 +228,12 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
` if (items) {` && |\n| &&
|
||||
` items.forEach(item => {` && |\n| &&
|
||||
` try {` && |\n| &&
|
||||
` const scrollDelegate = z2ui5.oView.byId(item.ID).getScrollDelegate();` && |\n| &&
|
||||
` item.SCROLLTO = scrollDelegate ? scrollDelegate.getScrollTop() : 0;` && |\n| &&
|
||||
` const scrollDelegate = z2ui5.oView.byId(item.N).getScrollDelegate();` && |\n| &&
|
||||
` item.V = scrollDelegate ? scrollDelegate.getScrollTop() : 0;` && |\n| &&
|
||||
` } catch {` && |\n| &&
|
||||
` try {` && |\n| &&
|
||||
` const element = document.getElementById(``${z2ui5.oView.byId(item.ID).getId()}-inner``);` && |\n| &&
|
||||
` item.SCROLLTO = element ? element.scrollTop : 0;` && |\n| &&
|
||||
` item.V = element ? element.scrollTop : 0;` && |\n| &&
|
||||
` } catch {}` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` });` && |\n| &&
|
||||
|
@ -253,14 +254,14 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
` setTimeout(() => {` && |\n| &&
|
||||
` items.forEach(item => {` && |\n| &&
|
||||
` try {` && |\n| &&
|
||||
` z2ui5.oView.byId(item.ID).scrollTo(item.SCROLLTO);` && |\n| &&
|
||||
` z2ui5.oView.byId(item.N).scrollTo(item.V);` && |\n| &&
|
||||
` } catch {` && |\n| &&
|
||||
` try {` && |\n| &&
|
||||
` const element = document.getElementById(``${z2ui5.oView.byId(item.ID).getId()}-inner``);` && |\n| &&
|
||||
` if (element) element.scrollTop = item.SCROLLTO;` && |\n| &&
|
||||
` if (element) element.scrollTop = item.V;` && |\n| &&
|
||||
` } catch {` && |\n| &&
|
||||
` setTimeout(() => {` && |\n| &&
|
||||
` z2ui5.oView.byId(item.ID).scrollTo(item.SCROLLTO);` && |\n| &&
|
||||
` z2ui5.oView.byId(item.N).scrollTo(item.V);` && |\n| &&
|
||||
` }, 1);` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
|
@ -270,8 +271,6 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
` });` && |\n| &&
|
||||
`});` && |\n| &&
|
||||
`` && |\n| &&
|
||||
`` && |\n| &&
|
||||
`` && |\n| &&
|
||||
`sap.ui.define("z2ui5/Info", ["sap/ui/core/Control", "sap/ui/VersionInfo", "sap/ui/Device"], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
`` && |\n| &&
|
||||
|
@ -518,9 +517,9 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
` var file = z2ui5.oUpload.oFileUpload.files[0];` && |\n| &&
|
||||
` var reader = new FileReader();` && |\n| &&
|
||||
`` && |\n| &&
|
||||
` reader.onload = function (evt) {` && |\n| &&
|
||||
|\n|.
|
||||
result = result &&
|
||||
` reader.onload = function (evt) {` && |\n| &&
|
||||
` var vContent = evt.currentTarget.result;` && |\n| &&
|
||||
` this.setProperty("value", vContent);` && |\n| &&
|
||||
` this.fireUpload();` && |\n| &&
|
||||
|
|
|
@ -162,7 +162,7 @@ CLASS z2ui5_cl_app_debugtool_js IMPLEMENTATION.
|
|||
` async close(){` && |\n| &&
|
||||
` if (this.oDialog){` && |\n| &&
|
||||
` this.oDialog.close();` && |\n| &&
|
||||
` this.oDialog.destry();` && |\n| &&
|
||||
` this.oDialog.destroy();` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` renderer(){` && |\n| &&
|
||||
|
|
|
@ -32,15 +32,15 @@ CLASS z2ui5_cl_app_index_html IMPLEMENTATION.
|
|||
` </style>` &&
|
||||
` <script` &&
|
||||
` id="sap-ui-bootstrap"` &&
|
||||
` src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"` &&
|
||||
` src="resources/sap-ui-core.js"` &&
|
||||
` data-sap-ui-theme="sap_horizon"` &&
|
||||
` data-sap-ui-resource-roots='{` &&
|
||||
` data-sap-ui-resourceroots='{` &&
|
||||
` "z2ui5": "./"` &&
|
||||
` }'` &&
|
||||
` data-sap-ui-on-init="module:sap/ui/core/ComponentSupport"` &&
|
||||
` data-sap-ui-compat-version="edge"` &&
|
||||
` data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"` &&
|
||||
` data-sap-ui-compatVersion="edge"` &&
|
||||
` data-sap-ui-async="true"` &&
|
||||
` data-sap-ui-frame-options="trusted"` &&
|
||||
` data-sap-ui-frameOptions="trusted"` &&
|
||||
` ></script>` &&
|
||||
`</head>` &&
|
||||
`<body class="sapUiBody sapUiSizeCompact" id="content">` &&
|
||||
|
@ -53,6 +53,7 @@ CLASS z2ui5_cl_app_index_html IMPLEMENTATION.
|
|||
` ></div>` &&
|
||||
`</body>` &&
|
||||
`</html>` &&
|
||||
`` &&
|
||||
``.
|
||||
|
||||
ENDMETHOD.
|
||||
|
|
|
@ -20,10 +20,10 @@ CLASS z2ui5_cl_app_view1_js IMPLEMENTATION.
|
|||
|
||||
result = `sap.ui.define(["sap/ui/core/mvc/Controller", "sap/ui/core/mvc/XMLView", "sap/ui/model/json/JSONModel",` && |\n| &&
|
||||
` "sap/ui/core/BusyIndicator", "sap/m/MessageBox", "sap/m/MessageToast", "sap/ui/core/Fragment", "sap/m/BusyDialog",` && |\n| &&
|
||||
` "sap/ui/VersionInfo", "z2ui5/cc/Server",` && |\n| &&
|
||||
` "sap/ui/VersionInfo", "z2ui5/cc/Server", "z2ui5/cc/DebugTool",` && |\n| &&
|
||||
`],` && |\n| &&
|
||||
` function (Controller, XMLView, JSONModel, BusyIndicator, MessageBox, MessageToast, Fragment, mBusyDialog, VersionInfo,` && |\n| &&
|
||||
` Server) {` && |\n| &&
|
||||
` Server, DebugTool) {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
` return Controller.extend("z2ui5.controller.View1", {` && |\n| &&
|
||||
`` && |\n| &&
|
||||
|
|
Loading…
Reference in New Issue
Block a user