@@ -639,7 +639,7 @@ sap.ui.define("z2ui5/MultiInputExt", ["sap/ui/core/Control", "sap/m/Token", "sap
639639 let table = z2ui5 . oView . byId ( this . getProperty ( "MultiInputId" ) ) ;
640640 if ( ! table ) {
641641 try {
642- table = Core . byId ( Element . getElementsByName ( this . getProperty ( "MultiInputName" ) ) [ 0 ] . id . replace ( '-inner' , '' ) ) ;
642+ // table = Core.byId(Element.getElementsByName(this.getProperty("MultiInputName"))[0].id.replace('-inner', ''));
643643 } catch ( e ) {
644644 return ;
645645 }
@@ -667,8 +667,10 @@ sap.ui.define("z2ui5/MultiInputExt", ["sap/ui/core/Control", "sap/m/Token", "sap
667667) ;
668668
669669sap . ui . define ( "z2ui5/CameraPicture" , [
670- "sap/ui/core/Control"
671- ] , function ( Control ) {
670+ "sap/ui/core/Control" ,
671+ "sap/m/Dialog" ,
672+ "sap/m/Button"
673+ ] , function ( Control , Dialog , Button ) {
672674 "use strict" ;
673675 return Control . extend ( "z2ui5.CameraPicture" , {
674676 metadata : {
@@ -708,30 +710,30 @@ sap.ui.define("z2ui5/CameraPicture" , [
708710 onPicture : function ( oEvent ) {
709711
710712 if ( ! this . _oScanDialog ) {
711- this . _oScanDialog = new sap . m . Dialog ( {
713+ this . _oScanDialog = new Dialog ( {
712714 title : "Device Photo Function" ,
713715 contentWidth : "640px" ,
714716 contentHeight : "480px" ,
715717 horizontalScrolling : false ,
716718 verticalScrolling : false ,
717- stretchOnPhone : true ,
719+ stretch : true ,
718720 content : [
719- new sap . ui . core . HTML ( {
721+ new HTML ( {
720722 id : this . getId ( ) + 'PictureContainer' ,
721723 content : '<video width="600px" height="400px" autoplay="true" id="zvideo">'
722724 } ) ,
723- new sap . m . Button ( {
725+ new Button ( {
724726 text : "Capture" ,
725727 press : function ( oEvent ) {
726728 this . capture ( ) ;
727729 this . _oScanDialog . close ( ) ;
728730 } . bind ( this )
729731 } ) ,
730- new sap . ui . core . HTML ( {
732+ new HTML ( {
731733 content : '<canvas hidden id="zcanvas" style="overflow:auto"></canvas>'
732734 } ) ,
733735 ] ,
734- endButton : new sap . m . Button ( {
736+ endButton : new Button ( {
735737 text : "Cancel" ,
736738 press : function ( oEvent ) {
737739 this . _oScanDialog . close ( ) ;
@@ -759,7 +761,7 @@ sap.ui.define("z2ui5/CameraPicture" , [
759761
760762 renderer : function ( oRM , oControl ) {
761763
762- var oButton = new sap . m . Button ( {
764+ var oButton = new Button ( {
763765 icon : "sap-icon://camera" ,
764766 text : "Camera" ,
765767 press : oControl . onPicture . bind ( oControl ) ,
@@ -817,7 +819,7 @@ sap.ui.define("z2ui5/Util", [], () => {
817819 "use strict" ;
818820 return {
819821 DateCreateObject : ( s ) => new Date ( s ) ,
820- DateAbapTimestampToDate : ( sTimestamp ) => new sap . gantt . misc . Format . abapTimestampToDate ( sTimestamp ) ,
822+ // DateAbapTimestampToDate: (sTimestamp) => new sap.gantt.misc.Format.abapTimestampToDate(sTimestamp), commented for UI5 2.x compatibility
821823 DateAbapDateToDateObject : ( d ) => new Date ( d . slice ( 0 , 4 ) , parseInt ( d . slice ( 4 , 6 ) ) - 1 , d . slice ( 6 , 8 ) ) ,
822824 DateAbapDateTimeToDateObject : ( d , t = '000000' ) => new Date ( d . slice ( 0 , 4 ) , parseInt ( d . slice ( 4 , 6 ) ) - 1 , d . slice ( 6 , 8 ) , t . slice ( 0 , 2 ) , t . slice ( 2 , 4 ) , t . slice ( 4 , 6 ) ) ,
823825 } ;
0 commit comments