-
Notifications
You must be signed in to change notification settings - Fork 47
/
to-do-list.html
175 lines (166 loc) · 6.04 KB
/
to-do-list.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
---
title: TODO List Maker | Simple Daily Use Tools
layout: post
---
<html>
<head>
<!-- Meta tags common for website -->
{% include common-meta %}
<title>{{ page.title }}</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<meta name="description" content="This is easy to use open source tool to create a TODO list online." />
<meta name="keywords" content="online,tool,todo,task,list,grocery,maker,builder,creator,generator,opensource" />
<!-- CSS for the site theme -->
{% include theme-css %}
<link rel="stylesheet" href="plugins/colorpicker/bootstrap-colorpicker.min.css">
<link rel="stylesheet" href="plugins/bootstrap-slider/slider.css">
<!-- Annoying IE fixes -->
{% include ie-fixes %}
<!-- Data Table Addon Styles -->
<link rel="stylesheet" href="https://tools.fromdev.com/plugins/datatables.net/dataTables.bootstrap.min.css">
</head>
<body class="hold-transition skin-green sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">
<!-- header tag from theme -->
{% include theme-header %}
<!-- Sidebar for the whole website -->
{% include theme-sidebar %}
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Main content -->
<section class="content">
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">Create a To Do List</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="form-group">
<div class="input-group margin">
<input class="form-control" id="input" type="text" placeholder="Enter task or item here" />
<span class="input-group-btn">
<button type="button" id="add-item" class="btn btn-default btn-flat"><i class="fa fa-plus"></i>
Add</button>
</span>
</div>
</div>
</div>
<!-- /.box-body -->
</div>
</section>
<section class="content">
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">Recently Created List Item History (Saved On Browser)</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<div id="history_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div id="history">Empty</div>
</div>
</div>
<!-- /.box-body -->
</div>
</section>
<section class="content" id="content">
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">About TODO List Creator Tool</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<img class="img-responsive" src="images/amazon-link-creator.jpg"
alt="Online Amazon Affiliate link Generator Tool" title="Online Amazon Affiliate link Generator Tool">
<p>This is a free online tool to create simple todo list.</p>
</div>
<!-- /.box-body -->
</div>
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">What is a TODO list?</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<p>TODO list is a a common term used for list of things to be done. It is like a checklist.</p>
</div>
<!-- /.box-body -->
</div>
</section>
{% include addthis %}
</div>
<!-- /.content-wrapper -->
{% include theme-footer %}
</div>
<!-- ./wrapper -->
{% include theme-bottom-js %}
</body>
<script src="/javascripts/fromdev-ux-addon.js"></script>
<script src="/plugins/selectOnFocus/jquery.selectOnFocus.min.js"></script>
<script src="/plugins/copyText/jquery.copyText.min.js"></script>
<script src="/javascripts/fromdev-utils.js?v=1"></script>
<script src="/plugins/datatables.net/jquery.dataTables.min.js"></script>
<script src="/plugins/datatables.net/dataTables.bootstrap.min.js"></script>
<script src="/javascripts/custom-analytics.js"></script>
<script src="/javascripts/history.js"></script>
<script>
const Page = {
request: {},
list: [],
context: {
tableName: 'TODO-LIST-MAKER',
containerId: '#history',
createTableHeader: () => {
return `<thead><tr><th>To Do Item</th><th>Date Created</th></tr></thead>`;
},
createRow: (context) => {
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric' };
return `<tr>
<td>${context.item}</td>
<td>${(new Date(context.timestamp).toLocaleDateString(undefined, options))}</td>
</tr>`;
}
}
};
//On load show history
History.showHistory(Page.context);
var clear = function () {
$('#error').text('');
Page.request = {};
};
$(document).ready(function () {
const addItem = () => {
clear();
Page.request.item = $('#input').val();
Page.request.timestamp = Date.now();
Page.request.status = 'Open';
Page.list.push(Page.request);
History.collectAndShow(Page);
};
$('#add-item').click(function () {
try {
addItem();
} catch (e) {
CustomAnalytics.collector.collectError(
{
eventAction: `${Page.context.tableName}-addItem-click`,
message: `${JSON.stringify(Page.request)}`
},
e
);
}
});
$('#input').selectOnFocus();
embedCodeSetup();
$("#embedCode").selectOnFocus();
CopyTextAddon.register('taggedurl');
CopyTextAddon.register('cleanurl');
CopyTextAddon.register('asin');
CopyTextAddon.register('linkhtml');
$('#generators-category').addClass('active');
$('.markdown-body').attr('style', 'max-width:100%;');
History.showHistory(Page.context);
});
</script>
</html>