-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
80 lines (68 loc) · 2.49 KB
/
index.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head>
<title>Table Generator</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@charset "UTF-8";
[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate) {
display:none !important;
}
ng\:form {
display:block;
}
.ng-animate-shim {
visibility:hidden;
}
.ng-anchor {
position:absolute;
}
</style>
<link href="css/common.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div class="wrapper" ng-app="app" ng-controller="generator">
<div class="innerWrapper-main">
<h1 class="page-title">Table generator</h1>
<form id="input-form">
<div class="table-grid">
<div>
<p>Person table</p>
<textarea placeholder="Paste person table" ng-change="parsePersonsTable()" ng-model="personString"></textarea>
</div>
<div>
<p>Users Table</p>
<textarea placeholder="Paste users table" ng-change="parseUsersTable()" ng-model="inputString"></textarea>
</div>
</div>
<div class="table_wrapper">
<table cellpadding="0" cellspacing="0" ng-show="(data.length > 0)?true:false">
<tr ng-repeat="x in data">
<td ng-repeat="y in x"><input type="text" ng-model="y.item"></input></td>
<td><input type="button" class="remove" value="×" title="Remove this row" ng-click="remField($index);" ng-disabled="(data.length <= 1)?true:false"></input></td>
</tr>
</table>
</div>
<div class="bottom-cta">
<input type="button" ng-click="generateJson()" value="Generate JSON"></input>
</div>
</form>
</div>
<div id="output" class="pop-up" ng-class="(open_output)?'show':'hide'" ng-cloak>
<div ng-click="open_output = false;">
<div class="output_container self-clear" ng-click="stopPropagation($event)">
<p class="code-copied" ng-class="(showCopied)?'show':'hide'" ng-cloak>Code copied</p>
<textarea ng-bind="output" id="output_string"></textarea>
<button class="float-right copy-btn btn" ng-click="copyValue('output_string')">Copy Code</button>
<button class="float-right copy-btn btn" ng-click="preview()">Preview</button>
</div>
</div>
</div>
</div>
<script src="js/angular.min.js"></script>
<script src="js/main.js"></script>
<script src="persons.js"></script>
</body>
</html>