How to set a html as the home page of the app - ionic4

I used easy java simulation to create a simulation and export it into an HTML file with some reference js and CSS file
How do I edit it to make an ionic app
<ion-content>
<head>
<link rel="stylesheet" type="text/css" href="assets/css/ejss.css" />
<script src="assets/js/common_script.js"></script>
<script src="assets/js/textresizedetector.js"></script>
<script src="assets/js/ejsS.v1.min.js"></script>
</head>
<body>
<div role="button" id="_topFrame" style="text-align:center"></div>
<script src="assets/js/Test.js"></script>
</body>
</ion-content>
Use these code on the home page but running it does not display anything

Related

Vue2Leaflet component does not display the map

I'm trying to use the Vue2Leaflet component (https://vuejsexamples.com/vue-2-components-for-leaflet-maps/) but I have hard time to make it works. I could not make this simple example work, with the html file :
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet/dist/leaflet.css" />
</head>
<body>
<div id="app" style="height: 400px">
<v-map :zoom=13 :center="[47.413220, -1.219482]">
<v-tilelayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"></v-tilelayer>
<v-marker :lat-lng="[47.413220, -1.219482]"></v-marker>
</v-map>
</div>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script src="https://unpkg.com/vue2-leaflet"></script>
</body>
</html>
and the js file :
Vue.component('v-map', window.Vue2Leaflet.LMap)
Vue.component('v-tilelayer', window.Vue2Leaflet.TileLayer)
Vue.component('v-marker', window.Vue2Leaflet.Marker)
new Vue({ el: '#app'});
I made a fiddle with this basic exemple : http://jsfiddle.net/rvxc2uLk/3.
What am I missing ?
You forgot the "L" before .TileLayer also for .Marker.
Vue.component('v-map', window.Vue2Leaflet.LMap)
Vue.component('v-tilelayer', window.Vue2Leaflet.LTileLayer)
Vue.component('v-marker', window.Vue2Leaflet.LMarker)

How to add icon to title bar

I am trying to make web application and i need to add an icon to my title bar with a name.
I am making the web application using empty project in MVC with web form included. I am doing the coding using Visual studio 2017. I have tried my layout as below so far.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<link href="~/Content/nav.css" rel="stylesheet" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="icon" type="image/svg" href="~/Content/img/download.png" />
<script src="~/Scripts/layout.js"></script>
<title>#ViewBag.Title</title>
</head>
<body>
<navbar>
<div class="topnav" id="myTopnav">
Home
Login
Payment
Customer Registration
<a href="javascript:void(0);" class="icon" onclick="myfunction()">
<i class="fa fa-bars"></i>
</a>
</div>
<div>
#RenderBody()
</div>
</navbar>
</body>
</html>
I have tried to link the image before title but it took a wrong turn. Since I am new to MVC, please give me some method to add an icon to title bar.
What you are looking for is called a favicon. You can generate it from png or whatever and then include it in your page like this:
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Here's a favicon generator (one of many):
https://www.favicon-generator.org/
The problem lays in this code:
<link rel="icon" type="image/svg" href="~/Content/img/download.png" />
You are specifying that the type is image/svg while instead it is a image/png.
Be sure that a png image exists in Content/img folder.

Mobile Test Workbench does not recognize dojomobile

I created a simple dojomobile app in worklight 6.1. I have the mobile test workbench installed in the same eclipse env as worklight. The code below is the dojo code for the hybrid app's index.html. It is a very basic dojo mobile app using default header information from worklight.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" href="images/favicon.png">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="stylesheet" href="css/main.css">
<script>window.$ = window.jQuery = WLJQ;</script>
<script type="text/javascript" src="dojox/mobile/deviceTheme.js"></script>
<script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js"></script>
</head>
<body style="display: none;">
<div data-dojo-type="dojox.mobile.View" id="view0" data-dojo-props="selected:true">
<div data-dojo-type="dojox.mobile.Heading" data-dojo-props="label:'Heading'"></div>
<h2 data-dojo-type="dojox.mobile.RoundRectCategory">Category</h2>
<div data-dojo-type="dojox.mobile.RoundRect">
<div data-dojo-type="dojox.mobile.RoundRectList">
<div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item'"></div>
<div data-dojo-type="dojox.mobile.ListItem" data-dojo-props="label:'Item'"></div>
</div>
</div>
<button data-dojo-type="dojox.mobile.Button">Button1</button>
<button data-dojo-type="dojox.mobile.Button">Button2</button>
<button data-dojo-type="dojox.mobile.Button">Button3</button>
</div>
<script src="js/initOptions.js"></script>
<script src="js/main.js"></script>
<script src="js/messages.js"></script>
</body>
</html>
The problem when I register the app in the test workbench and record a test on my android device (Samsung s4). The test app does not recognize it is running dojo. The display of the app on the device is missing the header line. The test contents from from the recorded steps say that I clicked on JQuery Button and not dojox.mobile.Button.
Weird thing, when you go to replay the recorded test, the app displays properly (header and other dojo controls), and the script fails because it is looking for JQuery Button. I could go in and edit the script so that it is correct, but that is not what I want to do for every script that I record or rerecord because of app changes.
Please let me know what I'm doing wrong or is this a known problem.
Jquery is added by default into the worklight application. See the script tag with
<script>window.$ = window.jQuery = WLJQ;</script>
in your Html head tag. Remove it and try!

Dojox Mobile FilteredListMixin

If I load Dojo from the CDN, everything works perfectly fine. If I load it locally, the mixin doesn't work, and I get the following error in the console:
07-01 02:47:22.428: E/Web Console(7881): Error: declare: mixin #1 is not a callable constructor. at file:///android_asset/www/libs/dojo/dojo/dojo.js:15
Here is an example. This works fine:
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js" data-dojo-config="parseOnLoad:true, mblForceBookmarkable:true"></script>
<script type="text/javascript">
require([ "dojox/mobile/parser", "dojox/mobile", "dojox/mobile/View", "dojox/mobile/Heading", "dojox/mobile/RoundRectList", "dojox/mobile/ScrollableView", "dojox/mobile/ContentPane", "dojox/mobile/TextBox", "dojox/mobile/EdgeToEdgeList", "dojox/mobile/FilteredListMixin"]);
</script>
<link href="libs/dojo/dojox/mobile/themes/iphone/iphone.css" media="screen"
rel="stylesheet" title="no title" type="text/css">
<link href="libs/dojo/dojox/mobile/themes/iphone/Accordion.css" media="screen"
rel="stylesheet" title="no title" type="text/css">
</head>
<body>
<div id="search" data-dojo-type="dojox/mobile/View">
<h1 data-dojo-type="dojox/mobile/Heading"
data-dojo-props="fixed: 'top'">Filtered RoundRectList</h1>
<ul id="list" data-dojo-type="dojox/mobile/RoundRectList"
data-dojo-mixins="dojox/mobile/FilteredListMixin"
data-dojo-props="placeHolder: 'Search'">
<li data-dojo-props='moveTo:"1.information", transition:"slide"'
data-dojo-type="dojox/mobile/ListItem">Information</li>
<li data-dojo-props='moveTo:"1.urgency", transition:"slide"'
data-dojo-type="dojox/mobile/ListItem">Urgency</li>
<li data-dojo-props='moveTo:"1.data", transition:"slide"'
data-dojo-type="dojox/mobile/ListItem">Data</li>
</ul>
</div>
</body>
</html>
But if I change the script src from the CDN reference, and use this:
<script src="libs/dojo/dojo/dojo.js" type="text/javascript" data-dojo-config="parseOnLoad:true, mblForceBookmarkable: true"></script>
Then it doesn't work anymore. I am using the standard dojo-release-1.9.1. My libs folder contains the following files:
"dojo/dojo/dojo.js"
"dojo/dojox/mobile.js"
"dojo/dojox/mobile" (entire folder including all subfolders)
Any help would be greatly appreciated.
--Josh
Your lib directory is missing the dijit/ folder.
Indeed, dojox/mobile has some dependencies on several dijit modules (for ex, FilterListMixin requires 'dijit/registry'), and, according to what you describe, these modules are not available in your libs folder.
Copy the dijit/ folder into your root dojo/ directory and hopefully it should work the same.

jQuery UI Tab Loading a url

I've been trying to make a jQuery tab UI like in the following Better alternative to an iframe? but after hours of troubleshooting I just don't know what I'm doing wrong.
My test.html:
<html>
<head>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function() {
$("#tabs").tabs();
});
</script>
</head>
<body>
<div id="tabs">
<ul>
<li><span>One</span></li>
<li><span>Two</span></li>
<li><span>Three</span></li>
</ul>
</div>
</body>
So in my folder I have test.html (the above), one.html, two.html, and three.html. When I load test.html, any tab I select just says Loading... and the html pages never load.
For a more visual explanation, I'm trying to do what this demo is but with html pages:
http://www.coldfusionjedi.com/demos/jquerytabs/test.cfm
Please help haha I'm so lost as to what I'm doing wrong. Thanks in advance :)