mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 23:06:30 +08:00
parent
506c38dd8c
commit
1a2b0c8e18
|
@ -69,43 +69,8 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS z2ui5_cl_cc_factory IMPLEMENTATION.
|
||||
CLASS Z2UI5_CL_CC_FACTORY IMPLEMENTATION.
|
||||
|
||||
METHOD scroll.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD messaging.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD focus.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD info.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD timer.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD title.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD bwip_js.
|
||||
|
||||
|
@ -128,7 +93,7 @@ CLASS z2ui5_cl_cc_factory IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD gui_demo_output.
|
||||
METHOD focus.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
|
@ -142,6 +107,55 @@ CLASS z2ui5_cl_cc_factory IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD geolocation.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD gui_demo_output.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD info.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD messaging.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD scroll.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD timer.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD title.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD ui5_file_uploader.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
@ -154,11 +168,4 @@ CLASS z2ui5_cl_cc_factory IMPLEMENTATION.
|
|||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD geolocation.
|
||||
|
||||
result = NEW #( mo_view ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<VSEOCLASS>
|
||||
<CLSNAME>Z2UI5_CL_CC_FACTORY</CLSNAME>
|
||||
<LANGU>E</LANGU>
|
||||
<DESCRIPT>abap2UI5 - cc factory</DESCRIPT>
|
||||
<DESCRIPT>cc - xml view factory</DESCRIPT>
|
||||
<STATE>1</STATE>
|
||||
<CLSCCINCL>X</CLSCCINCL>
|
||||
<FIXPT>X</FIXPT>
|
||||
|
|
|
@ -27,6 +27,9 @@ CLASS z2ui5_cl_cc_geolocation DEFINITION
|
|||
METHODS load_cc
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
CLASS-METHODS get_js
|
||||
RETURNING
|
||||
VALUE(r_js) TYPE string.
|
||||
|
||||
PROTECTED SECTION.
|
||||
DATA mo_view TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
@ -66,99 +69,105 @@ CLASS z2ui5_cl_cc_geolocation IMPLEMENTATION.
|
|||
|
||||
METHOD load_cc.
|
||||
|
||||
DATA(js) = ` jQuery.sap.declare("z2ui5.CCGeolocation");` && |\n| &&
|
||||
`sap.ui.require([` && |\n| &&
|
||||
` "sap/ui/core/Control"` && |\n| &&
|
||||
`], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
|\n| &&
|
||||
` return Control.extend("z2ui5.CCGeolocation", {` && |\n| &&
|
||||
` metadata : {` && |\n| &&
|
||||
` properties: {` && |\n| &&
|
||||
` longitude: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` latitude: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` altitude: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` accuracy: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` altitudeAccuracy: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` speed: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: false` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` heading: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: false` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` enableHighAccuracy: {` && |\n| &&
|
||||
` type: "boolean",` && |\n| &&
|
||||
` defaultValue: false` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` timeout: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: "5000"` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` events: {` && |\n| &&
|
||||
` "finished": { ` && |\n| &&
|
||||
` allowPreventDefault: true,` && |\n| &&
|
||||
` parameters: {},` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` callbackPosition(position){` && |\n| &&
|
||||
|\n| &&
|
||||
` var test = position.coords.longitude` && |\n| &&
|
||||
` this.setProperty("longitude", position.coords.longitude , true);` && |\n| &&
|
||||
` this.setProperty("latitude", position.coords.latitude , true);` && |\n| &&
|
||||
` this.setProperty("altitude", position.coords.altitude , true);` && |\n| &&
|
||||
` this.setProperty("accuracy", position.coords.accuracy , true);` && |\n| &&
|
||||
` this.setProperty("altitudeAccuracy", position.coords.altitudeAccuracy , true);` && |\n| &&
|
||||
` this.setProperty("speed", position.coords.speed , true);` && |\n| &&
|
||||
` this.setProperty("heading", position.coords.heading , true);` && |\n| &&
|
||||
` this.fireFinished();` && |\n| &&
|
||||
` //this.getParent().getParent().getModel().refresh();` && |\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` async init(){` && |\n| &&
|
||||
|\n| &&
|
||||
` navigator.geolocation.getCurrentPosition(this.callbackPosition.bind(this));` && |\n| &&
|
||||
` //navigator.geolocation.watchPosition(this.callbackPosition.bind(this));` && |\n| &&
|
||||
` ` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` exit () {` && |\n| &&
|
||||
` //clearWatch` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` onAfterRendering() {` && |\n| &&
|
||||
|\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` renderer(oRm, oControl) {` && |\n| &&
|
||||
|\n| &&
|
||||
` }` && |\n| &&
|
||||
` });` && |\n| &&
|
||||
`});`.
|
||||
|
||||
* result = mo_view->_cc_plain_xml( `<html:script>` && js && `</html:script>` ).
|
||||
data(js) = get_js( ).
|
||||
result = mo_view->_generic( ns = `html` name = `script` )->_cc_plain_xml( js )->get_parent( ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD get_js.
|
||||
|
||||
r_js = ` jQuery.sap.declare("z2ui5.CCGeolocation");` && |\n| &&
|
||||
`sap.ui.require([` && |\n| &&
|
||||
` "sap/ui/core/Control"` && |\n| &&
|
||||
`], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
|\n| &&
|
||||
` return Control.extend("z2ui5.CCGeolocation", {` && |\n| &&
|
||||
` metadata : {` && |\n| &&
|
||||
` properties: {` && |\n| &&
|
||||
` longitude: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` latitude: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` altitude: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` accuracy: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` altitudeAccuracy: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: ""` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` speed: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: false` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` heading: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: false` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` enableHighAccuracy: {` && |\n| &&
|
||||
` type: "boolean",` && |\n| &&
|
||||
` defaultValue: false` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` timeout: {` && |\n| &&
|
||||
` type: "string",` && |\n| &&
|
||||
` defaultValue: "5000"` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` events: {` && |\n| &&
|
||||
` "finished": { ` && |\n| &&
|
||||
` allowPreventDefault: true,` && |\n| &&
|
||||
` parameters: {},` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` callbackPosition(position){` && |\n| &&
|
||||
|\n| &&
|
||||
` var test = position.coords.longitude` && |\n| &&
|
||||
` this.setProperty("longitude", position.coords.longitude , true);` && |\n| &&
|
||||
` this.setProperty("latitude", position.coords.latitude , true);` && |\n| &&
|
||||
` this.setProperty("altitude", position.coords.altitude , true);` && |\n| &&
|
||||
` this.setProperty("accuracy", position.coords.accuracy , true);` && |\n| &&
|
||||
` this.setProperty("altitudeAccuracy", position.coords.altitudeAccuracy , true);` && |\n| &&
|
||||
` this.setProperty("speed", position.coords.speed , true);` && |\n| &&
|
||||
` this.setProperty("heading", position.coords.heading , true);` && |\n| &&
|
||||
` this.fireFinished();` && |\n| &&
|
||||
` //this.getParent().getParent().getModel().refresh();` && |\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` async init(){` && |\n| &&
|
||||
|\n| &&
|
||||
` navigator.geolocation.getCurrentPosition(this.callbackPosition.bind(this));` && |\n| &&
|
||||
` //navigator.geolocation.watchPosition(this.callbackPosition.bind(this));` && |\n| &&
|
||||
` ` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` exit () {` && |\n| &&
|
||||
` //clearWatch` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` onAfterRendering() {` && |\n| &&
|
||||
|\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` renderer(oRm, oControl) {` && |\n| &&
|
||||
|\n| &&
|
||||
` }` && |\n| &&
|
||||
` });` && |\n| &&
|
||||
`});`.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
|
@ -25,6 +25,9 @@ CLASS z2ui5_cl_cc_info DEFINITION
|
|||
METHODS load_cc
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
CLASS-METHODS get_js
|
||||
RETURNING
|
||||
VALUE(r_js) TYPE string.
|
||||
|
||||
PROTECTED SECTION.
|
||||
DATA mo_view TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
@ -60,65 +63,71 @@ ENDMETHOD.
|
|||
|
||||
METHOD load_cc.
|
||||
|
||||
DATA(js) = ` jQuery.sap.declare("z2ui5.CCInfo");` && |\n| &&
|
||||
`sap.ui.require([` && |\n| &&
|
||||
` "sap/ui/core/Control"` && |\n| &&
|
||||
`], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
|\n| &&
|
||||
` return Control.extend("z2ui5.CCInfo", {` && |\n| &&
|
||||
` metadata : {` && |\n| &&
|
||||
` properties: {` && |\n| &&
|
||||
` ui5_version: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` ui5_gav: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` ui5_theme: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` device_os: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` device_systemtype: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` device_browser: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` events: {` && |\n| &&
|
||||
` "finished": { ` && |\n| &&
|
||||
` allowPreventDefault: true,` && |\n| &&
|
||||
` parameters: {},` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` init () {` && |\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` onAfterRendering() {` && |\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
` ` && |\n| &&
|
||||
` renderer(oRm, oControl) {` && |\n| &&
|
||||
|\n| &&
|
||||
` oControl.setProperty( "ui5_version" , sap.ui.version );` && |\n| &&
|
||||
` oControl.setProperty( "ui5_gav" , sap.ui.getVersionInfo().gav );` && |\n| &&
|
||||
` oControl.setProperty( "device_os" , sap.ui.Device.os.name );` && |\n| &&
|
||||
` // this.setProperty( "device_systemtype" , sap.ui.getVersionInfo().gav );` && |\n| &&
|
||||
` oControl.setProperty( "device_browser" , sap.ui.Device.browser.name );` && |\n| &&
|
||||
` oControl.fireFinished();` && |\n| &&
|
||||
` ` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` });` && |\n| &&
|
||||
`});`.
|
||||
|
||||
* result = mo_view->_cc_plain_xml( `<html:script>` && js && `</html:script>` ).
|
||||
data(js) = get_js( ).
|
||||
result = mo_view->_generic( ns = `html` name = `script` )->_cc_plain_xml( js )->get_parent( ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD get_js.
|
||||
|
||||
r_js = ` jQuery.sap.declare("z2ui5.CCInfo");` && |\n| &&
|
||||
`sap.ui.require([` && |\n| &&
|
||||
` "sap/ui/core/Control"` && |\n| &&
|
||||
`], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
|\n| &&
|
||||
` return Control.extend("z2ui5.CCInfo", {` && |\n| &&
|
||||
` metadata : {` && |\n| &&
|
||||
` properties: {` && |\n| &&
|
||||
` ui5_version: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` ui5_gav: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` ui5_theme: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` device_os: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` device_systemtype: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` device_browser: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` events: {` && |\n| &&
|
||||
` "finished": { ` && |\n| &&
|
||||
` allowPreventDefault: true,` && |\n| &&
|
||||
` parameters: {},` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` init () {` && |\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
|\n| &&
|
||||
` onAfterRendering() {` && |\n| &&
|
||||
|\n| &&
|
||||
` },` && |\n| &&
|
||||
` ` && |\n| &&
|
||||
` renderer(oRm, oControl) {` && |\n| &&
|
||||
|\n| &&
|
||||
` oControl.setProperty( "ui5_version" , sap.ui.version );` && |\n| &&
|
||||
` oControl.setProperty( "ui5_gav" , sap.ui.getVersionInfo().gav );` && |\n| &&
|
||||
` oControl.setProperty( "device_os" , sap.ui.Device.os.name );` && |\n| &&
|
||||
` // this.setProperty( "device_systemtype" , sap.ui.getVersionInfo().gav );` && |\n| &&
|
||||
` oControl.setProperty( "device_browser" , sap.ui.Device.browser.name );` && |\n| &&
|
||||
` oControl.fireFinished();` && |\n| &&
|
||||
` ` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` });` && |\n| &&
|
||||
`});`.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
|
@ -18,10 +18,6 @@ CLASS z2ui5_cl_cc_timer DEFINITION
|
|||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS load_cc
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
CLASS-METHODS get_js
|
||||
RETURNING
|
||||
VALUE(result) TYPE string.
|
||||
|
@ -34,7 +30,8 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS z2ui5_cl_cc_timer IMPLEMENTATION.
|
||||
CLASS Z2UI5_CL_CC_TIMER IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD constructor.
|
||||
|
||||
|
@ -42,6 +39,7 @@ CLASS z2ui5_cl_cc_timer IMPLEMENTATION.
|
|||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD control.
|
||||
|
||||
result = mo_view.
|
||||
|
@ -54,11 +52,6 @@ CLASS z2ui5_cl_cc_timer IMPLEMENTATION.
|
|||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD load_cc.
|
||||
|
||||
result = mo_view->_generic( ns = `html` name = `script` )->_cc_plain_xml( get_js( ) )->get_parent( ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD get_js.
|
||||
|
||||
|
@ -103,5 +96,4 @@ CLASS z2ui5_cl_cc_timer IMPLEMENTATION.
|
|||
`});`.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
|
@ -15,10 +15,6 @@ CLASS z2ui5_cl_cc_title DEFINITION
|
|||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS load_cc
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
CLASS-METHODS get_js
|
||||
RETURNING
|
||||
VALUE(result) TYPE string.
|
||||
|
@ -74,11 +70,4 @@ CLASS Z2UI5_CL_CC_TITLE IMPLEMENTATION.
|
|||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD load_cc.
|
||||
|
||||
result = mo_view->_generic( ns = `html` name = `script` )->_cc_plain_xml( get_js( ) )->get_parent( ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
|
@ -45,23 +45,14 @@ CLASS z2ui5_cl_fw_http_handler IMPLEMENTATION.
|
|||
( n = `data-sap-ui-compatVersion` v = `edge` ) ).
|
||||
ENDIF.
|
||||
|
||||
* DATA(lt_load_cc) = t_load_cc.
|
||||
* IF t_load_cc IS INITIAL.
|
||||
data(lv_add_js) =
|
||||
z2ui5_cl_cc_timer=>get_js( ) &&
|
||||
z2ui5_cl_cc_focus=>get_js( ) &&
|
||||
z2ui5_cl_cc_title=>get_js( ) &&
|
||||
z2ui5_cl_cc_title=>get_js( ) &&
|
||||
z2ui5_cl_cc_title=>get_js( ) &&
|
||||
z2ui5_cl_cc_title=>get_js( ) &&
|
||||
z2ui5_cl_cc_title=>get_js( ) &&
|
||||
z2ui5_cl_cc_scroll=>get_js( ) &&
|
||||
z2ui5_cl_cc_geolocation=>get_js( ) &&
|
||||
z2ui5_cl_cc_messaging=>get_js( ) &&
|
||||
custom_js.
|
||||
* DATA(lv_cc) = ``.
|
||||
* LOOP AT lt_load_cc INTO DATA(li_cc).
|
||||
* lv_cc = lv_cc && li_cc->get_js( ) && |\n|.
|
||||
* ENDLOOP.
|
||||
|
||||
|
||||
IF content_security_policy IS NOT SUPPLIED.
|
||||
DATA(lv_sec_policy) = `<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' 'unsafe-eval' data: ` &&
|
||||
|
@ -138,7 +129,6 @@ CLASS z2ui5_cl_fw_http_handler IMPLEMENTATION.
|
|||
` definition: sap.z2ui5.oResponse.PARAMS.S_POPUP.XML,` && |\n| &&
|
||||
` controller: sap.z2ui5.oController,` && |\n| &&
|
||||
` }).then(oFragment => {` && |\n| &&
|
||||
* ` debugger;` && |\n| &&
|
||||
` oFragment.setModel(new sap.ui.model.json.JSONModel(sap.z2ui5.oResponse.OVIEWMODEL))` && |\n| &&
|
||||
` sap.z2ui5.oView.addDependent(oFragment);` && |\n| &&
|
||||
` oFragment.open();` && |\n| &&
|
||||
|
@ -517,7 +507,6 @@ CLASS z2ui5_cl_fw_http_handler IMPLEMENTATION.
|
|||
` sap.z2ui5.checkNestAfter = false;` && |\n| &&
|
||||
` sap.z2ui5.checkNestAfter2 = false;` && |\n| &&
|
||||
|\n| &&
|
||||
* ` debugger;` && |\n| &&
|
||||
` sap.z2ui5.oBody.OLOCATION = {` && |\n| &&
|
||||
` ORIGIN: window.location.origin,` && |\n| &&
|
||||
` PATHNAME: sap.z2ui5.pathname,` && |\n| &&
|
||||
|
@ -570,10 +559,6 @@ CLASS z2ui5_cl_fw_http_handler IMPLEMENTATION.
|
|||
`sap.z2ui5.Helper.DateAbapTimestampToDate = (sTimestamp => new sap.gantt.misc.Format.abapTimestampToDate(sTimestamp));` && |\n| &&
|
||||
`sap.z2ui5.Helper.DateAbapDateToDateObject = (d => new Date(d.slice(0,4), (d[4]+d[5])-1, d[6]+d[7]));` && |\n| &&
|
||||
`sap.z2ui5.Helper.DateAbapDateTimeToDateObject = ((d,t = '000000') => new Date(d.slice(0,4), (d[4]+d[5])-1, d[6]+d[7],t.slice(0,2),t.slice(2,4),t.slice(4,6)));` && |\n| &&
|
||||
* custom_js && |\n| &&
|
||||
* z2ui5_cl_cc_timer=>get_js( ) && |\n| &&
|
||||
* VALUE string( FOR z2ui5_cl_cc_timer=>get_js( ) && |\n| &&
|
||||
* lv_cc && |\n| &&
|
||||
lv_add_js && |\n| &&
|
||||
` });` && |\n| &&
|
||||
`</script>` && |\n| &&
|
||||
|
|
|
@ -1871,6 +1871,9 @@ CLASS z2ui5_cl_xml_view DEFINITION
|
|||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view .
|
||||
|
||||
METHODS _z2ui5
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view_cc.
|
||||
|
||||
METHODS _cc
|
||||
RETURNING
|
||||
|
@ -7049,4 +7052,11 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
|||
result = me.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD _Z2UI5.
|
||||
|
||||
result = new #( me ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
83
src/z2ui5_cl_xml_view_cc.clas.abap
Normal file
83
src/z2ui5_cl_xml_view_cc.clas.abap
Normal file
|
@ -0,0 +1,83 @@
|
|||
CLASS z2ui5_cl_xml_view_cc DEFINITION
|
||||
PUBLIC
|
||||
FINAL
|
||||
CREATE PUBLIC .
|
||||
|
||||
PUBLIC SECTION.
|
||||
|
||||
METHODS title
|
||||
IMPORTING
|
||||
title TYPE clike OPTIONAL
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS scroll
|
||||
IMPORTING
|
||||
setupdate TYPE clike OPTIONAL
|
||||
items TYPE clike OPTIONAL
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS timer
|
||||
IMPORTING
|
||||
finished TYPE clike OPTIONAL
|
||||
delayms TYPE clike OPTIONAL
|
||||
checkrepeat TYPE clike OPTIONAL
|
||||
PREFERRED PARAMETER finished
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS constructor
|
||||
IMPORTING
|
||||
view TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
DATA mo_view TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
PROTECTED SECTION.
|
||||
PRIVATE SECTION.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
||||
CLASS z2ui5_cl_xml_view_cc IMPLEMENTATION.
|
||||
|
||||
METHOD scroll.
|
||||
|
||||
result = mo_view.
|
||||
mo_view->_generic( name = `Scroll`
|
||||
ns = `z2ui5`
|
||||
t_prop = VALUE #(
|
||||
( n = `setUpdate` v = setupdate )
|
||||
( n = `items` v = items )
|
||||
) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD constructor.
|
||||
|
||||
me->mo_view = view.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD title.
|
||||
|
||||
result = mo_view.
|
||||
mo_view->_generic( name = `Title`
|
||||
ns = `z2ui5`
|
||||
t_prop = VALUE #( ( n = `title` v = title ) ) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD timer.
|
||||
|
||||
result = mo_view.
|
||||
mo_view->_generic( name = `Timer`
|
||||
ns = `z2ui5`
|
||||
t_prop = VALUE #( ( n = `delayMS` v = delayms )
|
||||
( n = `finished` v = finished )
|
||||
( n = `checkRepeat` v = z2ui5_cl_fw_utility=>boolean_abap_2_json( checkrepeat ) )
|
||||
) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
16
src/z2ui5_cl_xml_view_cc.clas.xml
Normal file
16
src/z2ui5_cl_xml_view_cc.clas.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
|
||||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
||||
<asx:values>
|
||||
<VSEOCLASS>
|
||||
<CLSNAME>Z2UI5_CL_XML_VIEW_CC</CLSNAME>
|
||||
<LANGU>E</LANGU>
|
||||
<DESCRIPT>abap2UI5 - view parser custom controls</DESCRIPT>
|
||||
<STATE>1</STATE>
|
||||
<CLSCCINCL>X</CLSCCINCL>
|
||||
<FIXPT>X</FIXPT>
|
||||
<UNICODE>X</UNICODE>
|
||||
</VSEOCLASS>
|
||||
</asx:values>
|
||||
</asx:abap>
|
||||
</abapGit>
|
Loading…
Reference in New Issue
Block a user