web2app-spa
Version:
This template is primarily designed to easily convert HTML pages and URLs into a Capacitor/Cordova based iOS/Android app that can be used as Single-page application (SPA).
1 lines • 2.95 kB
JavaScript
;const UITitle={default:{},resetDefault:function(){UITitle.default.title="Title",UITitle.default.backButtonVisible=0,UITitle.default.backButtonText="Back",UITitle.default.width="auto",UITitle.default.height=105,UITitle.default.backgroundColor="white",UITitle.default.round=0,UITitle.default.border=0,UITitle.default.borderColor="rgba(0, 0, 0, 0.1)",UITitle.default.bottomBorder=1,UITitle.default.bottomInnerSpace=24,UITitle.default.leftInnerSpace=20,UITitle.default.rightInnerSpace=20,UITitle.default.titleFontSize=28,UITitle.default.titleTextColor="rgba(0, 0, 0, 0.8)",UITitle.default.backButtonIconFile="components/ui-title/arrow-blue.svg",UITitle.default.backButtonHeight=20,UITitle.default.backButtonFontSize=14,UITitle.default.backButtonTextColor="#689BD2",UITitle.default.backButtonIconBackgroundColor="rgba(0, 0, 0, 0.0)"}};UITitle.resetDefault(),UITitle.create=function(t={}){const e=createBox();e.default={};for(let a in UITitle.default)e.default[a]=null!=t[a]?t[a]:UITitle.default[a];"auto"==e.default.width&&(e.default.width=getDefaultContainerBox().width);e.publicVariable="publicVariable",e.backButton={},e.backButton.onClickFunc=function(){},e.width=e.default.width,e.height=e.default.height,e.color=e.default.backgroundColor,e.border=e.default.border,e.borderColor=e.default.borderColor,e.element.style.borderBottomWidth=e.default.bottomBorder+"px",e.round=e.default.round,e.lblTitle=createLabel(),e.add(that),that.width=540,that.height=40,that.text=e.default.title,that.fontSize=e.default.titleFontSize,that.color="transparent",that.textColor="rgba(0, 0, 0, 0.8)",that.element.style.fontFamily="opensans-bold",that.left=e.default.leftInnerSpace,that.bottom=e.default.bottomInnerSpace,e.boxBackButton=createBox(),e.add(that),that.left=e.default.leftInnerSpace,that.height=e.default.backButtonHeight,that.color="transparent",that.round=4,that.onClick((function(t){e.backButton.onClickFunc(t)})),e.boxBackButton.imgIcon=createImage(),e.boxBackButton.add(that),that.width=20,that.height=20,that.load(e.default.backButtonIconFile),that.color=e.default.backButtonIconBackgroundColor,that.round=4,that.left=0,that.top=0,e.boxBackButton.lblBack=createLabel(),e.boxBackButton.add(that),that.width="auto",that.height="auto",that.fontSize=e.default.backButtonFontSize,that.text=e.default.backButtonText,that.textColor=e.default.backButtonTextColor,that.aline(e.boxBackButton.imgIcon,"right",3),that.onResize((function(t){e.boxBackButton.width=t.width+t.left+t.fontSize})),e.boxBackButton.aline(e.lblTitle,"top",-4);return e.publicMethod=function(){return"publicMethod"},e.setTitle=function(t){e.lblTitle.text=t},e.backButton.setText=function(t){e.boxBackButton.lblBack.text=t},e.backButton.setVisible=function(t){e.boxBackButton.visible=t},e.backButton.onClick=function(t){e.backButton.onClickFunc=t},e.backButton.setVisible(e.default.backButtonVisible),makeBasicObject(e),e},UITitle.sharedMethod=function(){return"sharedMethod"};