forked from ofersto/Unit-Converter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
54 lines (54 loc) · 1.96 KB
/
popup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html lang="en" ng-app="unitConverter">
<head>
<title>Simple Unit Converter</title>
<link rel="stylesheet" href="css/materialize.min.css">
<style>
body { min-width: 300px; }
.btn-block { width: 100%; }
h5 { margin: 15px 0; }
</style>
<script src="js/jquery-2.2.0.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/materialize.min.js"></script>
<script src="js/converter.js"></script>
</head>
<body ng-controller="mainController">
<div class="container">
<h3>Unit Converter</h3>
<div class="container">
<form class="col s12">
<div class="row">
<div class="input-field">
<input type="number" name="value" min="1" ng-model="value" ng-change="convert()">
</div>
</div>
<div class="row">
<div class="input-field">
<select name="from" ng-model="from" ng-change="convert()">
<option ng-repeat="unit in Utils.keys(units[type])" value="{{ unit }}">{{ unit }}</option>
</select>
</div>
</div>
<div class="row">
<div class="input-field">
<select name="to" ng-model="to" ng-change="convert()">
<option ng-repeat="unit in Utils.keys(units[type])" value="{{ unit }}">{{ unit }}</option>
</select>
</div>
</div>
<div class="row">
<div class="input-field">
<select name="type" ng-model="type" ng-change="typeChanged()">
<option ng-repeat="type in Utils.keys(units)" value="{{ type }}">{{ type }}</option>
</select>
</div>
</div>
<button name="convert" type="button" ng-click="convert()" class="btn btn-block">Convert</button>
</form>
<h5>Result: {{ Utils.round(result, 4) }}</h5>
<p>{{ currStatus }}</p>
</div>
</div>
</body>
</html>