[feat] dynatable para lista de users

merge-requests/10/head
Kali Kaneko 4 years ago
parent 0704997abf
commit 6eaa22ad5e
  1. 1
      Makefile
  2. 69
      assets/jquery.dynatable.css
  3. 1681
      assets/jquery.dynatable.js
  4. 2
      server/server.go
  5. 2
      tmpl/user.html
  6. 13
      tmpl/users.html

@ -5,6 +5,7 @@ all:
mkdir -p dist/js
cp assets/zxcvbn.js dist/js
cp assets/zxcvbn-bootstrap-strength-meter.js dist/js
cp assets/jquery.dynatable* dist/js
go get .
go build

@ -0,0 +1,69 @@
/*
* jQuery Dynatable plugin 0.3.1
*
* Copyright (c) 2014 Steve Schwartz (JangoSteve)
*
* Dual licensed under the AGPL and Proprietary licenses:
* http://www.dynatable.com/license/
*
* Date: Tue Jan 02 2014
*/
th a {
color: #fff;
}
th a:hover {
color: #fff;
text-decoration: underline;
}
.dynatable-search {
float: right;
margin-bottom: 10px;
}
.dynatable-pagination-links {
float: right;
}
.dynatable-record-count {
display: block;
padding: 5px 0;
}
.dynatable-pagination-links span,
.dynatable-pagination-links li {
display: inline-block;
}
.dynatable-page-link,
.dynatable-page-break {
display: block;
padding: 5px 7px;
}
.dynatable-page-link {
cursor: pointer;
}
.dynatable-active-page,
.dynatable-disabled-page {
cursor: text;
}
.dynatable-active-page:hover,
.dynatable-disabled-page:hover {
text-decoration: none;
}
.dynatable-active-page {
background: #71AF5A;
border-radius: 5px;
color: #fff;
}
.dynatable-active-page:hover {
color: #fff;
}
.dynatable-disabled-page,
.dynatable-disabled-page:hover {
background: none;
color: #999;
}

File diff suppressed because it is too large Load Diff

@ -56,6 +56,8 @@ func Serve(addr string, l *ldap.Ldap, m *mail.Mail, ldb *db.DB, usersAskRole []s
r.HandleFunc("/bundle.js", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "dist/bundle.js") })
r.HandleFunc("/style.css", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "dist/style.css") })
r.HandleFunc("/js/jquery.dynatable.js", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "dist/js/jquery.dynatable.js") })
r.HandleFunc("/js/jquery.dynatable.css", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "dist/js/jquery.dynatable.css") })
r.HandleFunc("/js/zxcvbn.js", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "dist/js/zxcvbn.js") })
r.HandleFunc("/js/zxcvbn-bootstrap-strength-meter.js", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "dist/js/zxcvbn-bootstrap-strength-meter.js")

@ -2,7 +2,7 @@
{{template "header_close.html"}}
{{template "navbar.html" .}}
{{$isAdmin := .IsAdmin}}}
{{$isAdmin := .IsAdmin }}
{{with .Data}}
<div class="row justify-content-center">
<br />

@ -1,8 +1,16 @@
{{template "header.html"}}
<script type="text/javascript" src="/js/jquery.dynatable.js"></script>
<link rel="stylesheet" type="text/css" href="/js/jquery.dynatable.css">
{{template "header_close.html"}}
{{template "navbar.html" .}}
<table class="table table-hover">
<style type="text/css">
tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}
th {background: black}
</style>
<table id="users-table" class="table table-hover">
<thead>
<tr>
<th scope="col">Nombre</th>
@ -26,5 +34,8 @@
{{end}}
</tbody>
</table>
<script>
$('#users-table').dynatable();
</script>
{{template "footer.html"}}

Loading…
Cancel
Save