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