2016-02-09 14:45:43 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<title>{{ .Title }}</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"> {{ template "header" }}
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/css/view.css">
|
2016-02-09 19:35:37 +03:00
|
|
|
<style>
|
|
|
|
.yue ul {
|
|
|
|
padding: 0;
|
|
|
|
list-style-type: none;
|
|
|
|
}
|
2016-03-31 18:03:00 +03:00
|
|
|
span { cursor: pointer; }
|
2016-02-09 19:35:37 +03:00
|
|
|
</style>
|
2016-02-09 14:45:43 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<!-- Fixed navbar -->
|
|
|
|
<nav class="navbar navbar-default navbar-fixed-bottom">
|
|
|
|
<div class="container">
|
|
|
|
<div class="navbar-header">
|
|
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
|
|
|
<span class="sr-only">Toggle navigation</span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
</button>
|
2016-02-16 00:59:32 +03:00
|
|
|
<a class="navbar-brand" href="/">{{ .Title }}</a>
|
2016-02-09 14:45:43 +03:00
|
|
|
</div>
|
|
|
|
<div id="navbar" class="collapse navbar-collapse">
|
|
|
|
<ul class="nav navbar-nav">
|
2016-02-11 00:40:21 +03:00
|
|
|
<li><a href="/{{ .Title }}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a></li>
|
|
|
|
<li><a href="/{{ .Title }}/view"><span class="glyphicon glyphicon-sunglasses" aria-hidden="true"></span> View</a></li>
|
|
|
|
<li class="active"><a href="/{{ .Title }}/list"><span class="glyphicon glyphicon-align-left" aria-hidden="true"></span> List</a></li>
|
2016-03-14 21:44:43 +03:00
|
|
|
<li><a href="/Help/view"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> Help</a></li>
|
2016-02-09 14:45:43 +03:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<!--/.nav-collapse -->
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<div class="yue">
|
|
|
|
<ul>
|
|
|
|
{{ range $index, $element := .ListItems }}
|
2016-03-31 18:03:00 +03:00
|
|
|
{{ $element }}
|
2016-02-09 14:45:43 +03:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$('.deletable').click(function(event) {
|
|
|
|
event.preventDefault();
|
|
|
|
var lineNum = $(this).attr('id')
|
|
|
|
$.ajax({
|
|
|
|
url: "/listitem" + '?' + $.param({
|
|
|
|
"lineNum": lineNum,
|
|
|
|
"title": "{{ .Title }}"
|
|
|
|
}),
|
|
|
|
type: 'DELETE',
|
|
|
|
success: function() {
|
|
|
|
window.location.reload(true);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2016-02-11 04:43:51 +03:00
|
|
|
|
|
|
|
$(document).keydown(function(e){
|
|
|
|
if( e.which === 69 && e.ctrlKey && e.shiftKey ){
|
|
|
|
console.log('control + shift + e');
|
|
|
|
window.location = "/{{ .Title }}";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$(document).keydown(function(e){
|
|
|
|
if( e.which === 90 && e.ctrlKey && e.shiftKey ){
|
|
|
|
console.log('control + shift + z');
|
|
|
|
window.location = "/{{ .Title }}/view";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2016-02-09 14:45:43 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
2016-02-07 16:45:42 +03:00
|
|
|
|
|
|
|
</html>
|