Commit a0f99254 by Felipe Escala Torres

[ADD] masive user edit

parent 4d60bdba
......@@ -20,4 +20,6 @@ public interface CursoDAO {
public JSONObject eliminarCurso(JSONObject datos) throws Exception;
public JSONObject asignarCurso(JSONObject datos) throws Exception;
public JSONObject eliminarCursos(JSONObject datos) throws Exception;
}
......@@ -28,4 +28,10 @@ public interface UsuarioDAO {
public JSONObject editarUsuarios(JSONObject datos) throws Exception;
public JSONObject validarUsuario(JSONObject datos) throws Exception;
public JSONObject validarCursos(JSONObject datos) throws Exception;
public JSONObject editarGradoMasivo(JSONObject datos) throws Exception;
public JSONObject listarDetalle(JSONObject datos) throws Exception;
}
......@@ -19,7 +19,7 @@ import so.aulavirtual.utilities.ResponseHelper;
* @author sistem17user
*/
public class CursoMysqlDAO implements CursoDAO {
@Override
public JSONObject listarCursos(JSONObject datos) throws Exception {
JSONObject jreturn = new JSONObject();
......@@ -95,7 +95,7 @@ public class CursoMysqlDAO implements CursoDAO {
jreturn.put("draw", datos.getInt("draw"));
return jreturn;
}
@Override
public JSONObject listarCurso(JSONObject datos) throws Exception {
JSONObject jreturn;
......@@ -151,7 +151,7 @@ public class CursoMysqlDAO implements CursoDAO {
jreturn = new JSONObject(response);
return jreturn;
}
@Override
public JSONObject eliminarCurso(JSONObject datos) throws Exception {
JSONObject jreturn;
......@@ -175,7 +175,7 @@ public class CursoMysqlDAO implements CursoDAO {
response.setMessage("Curso eliminado correctamente");
} else {
response.setStatus(false);
response.setMessage("Error al eliminar cursos");
response.setMessage("Error al eliminar curso");
}
} catch (Exception e) {
e.printStackTrace();
......@@ -201,7 +201,7 @@ public class CursoMysqlDAO implements CursoDAO {
jreturn = new JSONObject(response);
return jreturn;
}
@Override
public JSONObject asignarCurso(JSONObject datos) throws Exception {
JSONObject jreturn;
......@@ -261,4 +261,60 @@ public class CursoMysqlDAO implements CursoDAO {
jreturn = new JSONObject(response);
return jreturn;
}
@Override
public JSONObject eliminarCursos(JSONObject datos) throws Exception {
JSONObject jreturn;
JSONArray lista;
JSONObject data = new JSONObject();
Connection con = null;
PreparedStatement pst = null;
ResultSet rSet = null;
int rs = 0;
String sql;
ResponseHelper response = new ResponseHelper();
try {
con = MysqlDAOFactory.obtenerConexion(GeneralVariables.nameDB);
con.setAutoCommit(false);
JSONArray deletedItems = datos.getJSONArray("lista");
sql = " delete from mdl_user_enrolments "
+ " where id = ? ";
pst = con.prepareStatement(sql);
for (int i = 0; i < deletedItems.length(); i++) {
pst.setInt(1, deletedItems.getInt(i));
pst.addBatch();
}
lista = new JSONArray(pst.executeBatch());
if (lista.length() > 0) {
con.commit();
response.setStatus(true);
response.setMessage("Curso eliminado correctamente");
} else {
response.setStatus(false);
response.setMessage("Error al eliminar cursos");
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
} finally {
try {
if (rSet != null) {
rSet.close();
}
if (pst != null) {
pst.close();
}
if (con != null) {
con.close();
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
}
}
jreturn = new JSONObject(response);
return jreturn;
}
}
......@@ -27,41 +27,103 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
public JSONObject listarUsuarios(JSONObject datos) throws Exception {
JSONObject jreturn = new JSONObject();
JSONArray lista = new JSONArray();
JSONObject data = new JSONObject();
Connection con = null;
PreparedStatement pst = null;
ResultSet rSet = null;
int cantidadRegistros = 0;
String sql;
String condicion = "";
try {
con = MysqlDAOFactory.obtenerConexion(GeneralVariables.nameDB);
if (datos.has("dniUsuario")) {
condicion = " where mu.idnumber = " + datos.getInt("dniUsuario") + " ";
sql = " SELECT "
+ " mu.id, "
+ " IFNULL(mu.firstname, ''), "
+ " IFNULL(mu.lastname, ''), "
+ " IFNULL(mu.apePat, ''), "
+ " IFNULL(mu.apeMat, ''), "
+ " IFNULL(mu.auth, ''), "
+ " IFNULL(mu.username, ''), "
+ " IFNULL(IF(mu.username like 'e________@sistemahelicoidal.edu.pe' or mu.username like 'd________@sistemahelicoidal.edu.pe, SUBSTR(mu.username, 2, 8) , mu.idnumber), ''), "
+ " IFNULL(uid.`data`, ''), "
+ " IFNULL(mu.desSede, ''), "
+ " IFNULL(mu.desNiv, ''), "
+ " IFNULL(mu.desGra, ''), "
+ " IFNULL(mu.conTemp, '') "
+ " FROM "
+ " mdl_user mu "
+ " left JOIN mdl_user_info_data uid "
+ " ON uid.userid = mu.id "
+ " and uid.fieldid = 6 "
+ " WHERE mu.username like ? "
+ " ORDER BY mu.id DESC "
+ " LIMIT " + datos.getInt("start") + ", " + datos.getInt("length");
pst = con.prepareStatement(sql);
pst.setString(1, "%" + datos.getInt("dniUsuario") + "%");
} else if (datos.has("codigoGrado")) {
sql = " SELECT "
+ " mu.id, "
+ " IFNULL(mu.firstname, ''), "
+ " IFNULL(mu.lastname, ''), "
+ " IFNULL(mu.apePat, ''), "
+ " IFNULL(mu.apeMat, ''), "
+ " IFNULL(mu.auth, ''), "
+ " IFNULL(mu.username, ''), "
+ " IFNULL(IF(mu.username like 'e________@sistemahelicoidal.edu.pe' or mu.username like 'd________@sistemahelicoidal.edu.pe, SUBSTR(mu.username, 2, 8) , mu.idnumber), ''), "
+ " IFNULL(uid. DATA, ''), "
+ " IFNULL(mu.desSede, ''), "
+ " IFNULL(mu.desNiv, ''), "
+ " IFNULL(mu.desGra, ''), "
+ " IFNULL(mu.conTemp, '') "
+ "FROM "
+ " mdl_user AS mu "
+ "LEFT JOIN mdl_user_info_data uid ON uid.userid = mu.id "
+ "AND uid.fieldid = 6 "
+ "INNER JOIN ( "
+ " SELECT "
+ " mue.userid AS id "
+ " FROM "
+ " mdl_user_enrolments AS mue "
+ " INNER JOIN mdl_enrol AS me ON me.id = mue.enrolid "
+ " INNER JOIN mdl_course AS mc ON mc.id = me.courseid "
+ " INNER JOIN mdl_course_categories AS mcc ON mcc.id = mc.category "
+ " WHERE "
+ " mc.category = ? "
+ " AND mcc.parent != 0 "
+ ") AS ts ON ts.id = mu.id "
+ "WHERE "
+ " mu.username LIKE 'e%' "
+ "GROUP BY "
+ " mu.id, "
+ " uid.id "
+ "ORDER BY "
+ " mu.id DESC "
+ " LIMIT " + datos.getInt("start") + ", " + datos.getInt("length");
pst = con.prepareStatement(sql);
pst.setInt(1, datos.getInt("codigoGrado"));
} else {
sql = " SELECT "
+ " mu.id, "
+ " IFNULL(mu.firstname, ''), "
+ " IFNULL(mu.lastname, ''), "
+ " IFNULL(mu.apePat, ''), "
+ " IFNULL(mu.apeMat, ''), "
+ " IFNULL(mu.auth, ''), "
+ " IFNULL(mu.username, ''), "
+ " IFNULL(IF(mu.username like 'e________@sistemahelicoidal.edu.pe' or mu.username like 'd________@sistemahelicoidal.edu.pe', SUBSTR(mu.username, 2, 8) , mu.idnumber), ''), "
+ " IFNULL(uid.`data`, ''), "
+ " IFNULL(mu.desSede, ''), "
+ " IFNULL(mu.desNiv, ''), "
+ " IFNULL(mu.desGra, ''), "
+ " IFNULL(mu.conTemp, '') "
+ " FROM "
+ " mdl_user mu "
+ " left JOIN mdl_user_info_data uid "
+ " ON uid.userid = mu.id "
+ " and uid.fieldid = 6 "
+ " ORDER BY mu.id DESC "
+ " LIMIT " + datos.getInt("start") + ", " + datos.getInt("length");
pst = con.prepareStatement(sql);
}
con = MysqlDAOFactory.obtenerConexion(GeneralVariables.nameDB);
sql = " SELECT "
+ " mu.id, "
+ " IFNULL(mu.firstname, ''), "
+ " IFNULL(mu.lastname, ''), "
+ " IFNULL(mu.apePat, ''), "
+ " IFNULL(mu.apeMat, ''), "
+ " IFNULL(mu.auth, ''), "
+ " IFNULL(mu.username, ''), "
+ " IFNULL(mu.idnumber, ''), "
+ " IFNULL(uid.`data`, ''), "
+ " IFNULL(mu.desSede, ''), "
+ " IFNULL(mu.desNiv, ''), "
+ " IFNULL(mu.desGra, ''), "
+ " IFNULL(mu.conTemp, '') "
+ " FROM "
+ " mdl_user mu "
+ " LEFT JOIN mdl_user_info_data uid "
+ " ON uid.userid = mu.id "
+ " " + condicion + " "
+ " ORDER BY mu.id DESC "
+ " LIMIT " + datos.getInt("start") + ", " + datos.getInt("length");
System.out.println("QUERY ---> " + sql);
pst = con.prepareStatement(sql);
rSet = pst.executeQuery();
int conta = datos.getInt("start") + 1;
while (rSet.next()) {
......@@ -84,12 +146,48 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
lista.put(obj);
conta++;
}
sql = " select count(*) "
+ " from mdl_user mu "
+ " left join mdl_user_info_data uid "
+ " on uid.userid = mu.id "
+ " " + condicion + " ";
pst = con.prepareStatement(sql);
if (datos.has("dniUsuario")) {
sql = " SELECT "
+ " count(*) "
+ " FROM "
+ " mdl_user mu "
+ " left JOIN mdl_user_info_data uid "
+ " ON uid.userid = mu.id "
+ " and uid.fieldid = 6 "
+ " WHERE mu.username like ? ";
pst = con.prepareStatement(sql);
pst.setString(1, "%" + datos.getInt("dniUsuario") + "%");
} else if (datos.has("codigoGrado")) {
sql = " SELECT count(*) FROM "
+ " ( "
+ " SELECT mu.id FROM "
+ " mdl_user AS mu "
+ " LEFT JOIN mdl_user_info_data uid ON uid.userid = mu.id "
+ " AND uid.fieldid = 6 "
+ " INNER JOIN ( "
+ " SELECT mue.userid AS id "
+ " FROM mdl_user_enrolments AS mue "
+ " INNER JOIN mdl_enrol AS me ON me.id = mue.enrolid "
+ " INNER JOIN mdl_course AS mc ON mc.id = me.courseid "
+ " INNER JOIN mdl_course_categories AS mcc ON mcc.id = mc.category "
+ " WHERE mc.category = ? "
+ " AND mcc.parent != 0 "
+ " ) AS ts ON ts.id = mu.id "
+ " WHERE mu.username LIKE 'e%' "
+ " GROUP BY mu.id "
+ " ) AS t ";
pst = con.prepareStatement(sql);
pst.setInt(1, datos.getInt("codigoGrado"));
} else {
sql = " SELECT "
+ " count(*) "
+ " FROM "
+ " mdl_user mu "
+ " left JOIN mdl_user_info_data uid "
+ " ON uid.userid = mu.id "
+ " and uid.fieldid = 6 ";
pst = con.prepareStatement(sql);
}
rSet = pst.executeQuery();
rSet.next();
cantidadRegistros = rSet.getInt(1);
......@@ -134,7 +232,8 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
+ "FROM "
+ " usuario AS u "
+ "WHERE "
+ " est_usu = 1 ";
+ " est_usu = 1 "
+ " order by u.sede asc ";
pst = con.prepareStatement(sql);
rSet = pst.executeQuery();
while (rSet.next()) {
......@@ -192,7 +291,8 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
+ " mdl_course_categories AS mdc "
+ " WHERE "
+ " mdc.parent = 0 "
+ "AND mdc.id NOT IN (2, 4) ";
+ " AND mdc.id NOT IN (2, 4) "
+ " and mdc.visible = 1 ";
pst = con.prepareStatement(sql);
rSet = pst.executeQuery();
while (rSet.next()) {
......@@ -249,7 +349,8 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
+ " FROM "
+ " mdl_course_categories AS mdc "
+ " WHERE "
+ " mdc.parent = ? ";
+ " mdc.parent = ? "
+ " and mdc.visible = 1 ";
pst = con.prepareStatement(sql);
pst.setInt(1, datos.getInt("parent"));
rSet = pst.executeQuery();
......@@ -439,14 +540,14 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
} else if (tipoUsuario == 2) {
pst.setString(c++, datos.getString("sedeUsuario"));
}
pst.setString(c++, datos.getString("claveUsuario"));
pst.setString(c++, datos.getString("claveUsuario").equals("") ? null : datos.getString("claveUsuario"));
rs = pst.executeUpdate();
if (rs == 1) {
rSet = pst.getGeneratedKeys();
rSet.next();
int codigoUsuario = rSet.getInt(1);
sql = " insert into mdl_user_info_data(userid, fieldid, data) "
+ " values ( ?, 4, ? ) ";
+ " values ( ?, 6, ? ) ";
pst = con.prepareStatement(sql);
pst.setInt(1, codigoUsuario);
pst.setString(2, datos.getString("rolUsuario"));
......@@ -537,6 +638,7 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
+ " conTemp = ? "
+ " where id = ? ";
pst = con.prepareStatement(sql);
System.out.println("Param Editar ---> " + datos);
int c = 1;
pst.setString(c++, datos.getString("tipoUsuario"));
pst.setString(c++, datos.getString("correoUsuario"));
......@@ -549,7 +651,7 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
pst.setString(c++, datos.getString("nivelUsuario"));
pst.setString(c++, datos.getString("gradoUsuario"));
pst.setString(c++, datos.getString("sedeUsuario"));
pst.setString(c++, datos.getString("claveUsuario"));
pst.setString(c++, datos.getString("claveUsuario").equals("") ? null : datos.getString("claveUsuario"));
pst.setInt(c++, datos.getInt("codigoUsuario"));
rs = pst.executeUpdate();
if (rs == 1) {
......@@ -561,9 +663,30 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
pst.setInt(2, datos.getInt("codigoUsuario"));
rs = pst.executeUpdate();
if (rs == 1) {
con.commit();
response.setStatus(true);
response.setMessage("Usuario correctamente modificado");
if (datos.getString("rolUsuario").equals("ESTUDIANTE")) {
sql = " insert into mdl_user_enrolments (enrolid, userid, timeend) "
+ " select me.id, ?, 0 from mdl_course as mc "
+ " inner join mdl_enrol as me "
+ " on me.courseid = mc.id "
+ " where me.enrol = 'manual' "
+ " and category = ? ";
pst = con.prepareStatement(sql);
pst.setInt(1, datos.getInt("codigoUsuario"));
pst.setInt(2, datos.getInt("codigoGrado"));
rs = pst.executeUpdate();
if (rs >= 1) {
con.commit();
response.setStatus(true);
response.setMessage("Usuario correctamente modificado");
} else {
response.setStatus(false);
response.setMessage("Ocurrió un error al registrar cursos");
}
} else {
con.commit();
response.setStatus(true);
response.setMessage("Usuario correctamente modificado");
}
} else {
response.setStatus(false);
response.setMessage("Error al modificar Rol");
......@@ -607,14 +730,14 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
ResponseHelper response = new ResponseHelper();
try {
con = MysqlDAOFactory.obtenerConexion(GeneralVariables.nameDB);
String edit = datos.has("codigoUsuario") ? " and username != ? " : " ";
String edit = datos.has("codigoUsuario") ? " and id != ? " : " ";
sql = " select count(*) from mdl_user "
+ " where username = ? "
+ edit;
pst = con.prepareStatement(sql);
pst.setString(1, datos.getString("correoUsuario"));
if (datos.has("codigoUsuario")) {
pst.setString(2, datos.getString("correoUsuario"));
pst.setInt(2, datos.getInt("codigoUsuario"));
}
rSet = pst.executeQuery();
rSet.next();
......@@ -651,4 +774,201 @@ public class UsuarioMysqlDAO implements UsuarioDAO {
return jreturn;
}
@Override
public JSONObject validarCursos(JSONObject datos) throws Exception {
JSONObject jreturn;
Connection con = null;
PreparedStatement pst = null;
ResultSet rSet = null;
int rs;
String sql;
ResponseHelper response = new ResponseHelper();
try {
con = MysqlDAOFactory.obtenerConexion(GeneralVariables.nameDB);
sql = " select count(*) from mdl_user_enrolments "
+ " where userid = ? ";
pst = con.prepareStatement(sql);
pst.setInt(1, datos.getInt("codigoUsuario"));
rSet = pst.executeQuery();
rSet.next();
rs = rSet.getInt(1);
if (rs > 0) {
response.setStatus(true);
response.setMessage("Tiene cursos asignados");
} else {
response.setStatus(false);
response.setMessage("No tiene cursos asignados");
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
} finally {
try {
if (rSet != null) {
rSet.close();
}
if (pst != null) {
pst.close();
}
if (con != null) {
con.close();
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
}
}
jreturn = new JSONObject(response);
return jreturn;
}
@Override
public JSONObject editarGradoMasivo(JSONObject datos) throws Exception {
JSONObject jreturn;
JSONArray listaCorrecto = new JSONArray();
JSONArray listaIncorrecto = new JSONArray();
Connection con = null;
PreparedStatement pst = null;
ResultSet rSet = null;
int rs;
String sql;
ResponseHelper response = new ResponseHelper();
try {
con = MysqlDAOFactory.obtenerConexion(GeneralVariables.nameDB);
JSONArray estudiantes = datos.getJSONArray("listaEstudiantes");
for (int i = 0; i < estudiantes.length(); i++) {
con.setAutoCommit(false);
sql = " DELETE FROM mdl_user_enrolments "
+ " WHERE userid = ? "
+ " AND enrolid IN ( "
+ " SELECT me.id "
+ " FROM mdl_course AS mc "
+ " INNER JOIN mdl_enrol AS me ON me.courseid = mc.id "
+ " WHERE me.enrol = 'manual' "
+ " AND category = ? "
+ " ) ";
pst = con.prepareStatement(sql);
pst.setInt(1, estudiantes.getInt(i));
pst.setInt(2, datos.getInt("codigoGradoInicial"));
rs = pst.executeUpdate();
if (rs < 1 || rs == -1) {
listaIncorrecto.put(estudiantes.get(i));
con.rollback();
} else {
sql = " insert into mdl_user_enrolments (enrolid, userid, timeend) "
+ " select me.id, ?, 0 from mdl_course as mc "
+ " inner join mdl_enrol as me "
+ " on me.courseid = mc.id "
+ " where me.enrol = 'manual' "
+ " and category = ? ";
pst = con.prepareStatement(sql);
pst.setInt(1, estudiantes.getInt(i));
pst.setInt(2, datos.getInt("codigoGradoFinal"));
rs = pst.executeUpdate();
if (rs < 1 || rs == -1) {
listaIncorrecto.put(estudiantes.get(i));
con.rollback();
} else {
con.commit();
listaCorrecto.put(estudiantes.get(i));
}
}
}
if (listaCorrecto.length() > 0) {
response.setData(new JSONObject()
.put("incorrectos", listaIncorrecto)
.put("correctos", listaCorrecto));
response.setStatus(true);
} else {
response.setMessage("No se pudo procesar la operación");
response.setStatus(false);
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
} finally {
try {
if (rSet != null) {
rSet.close();
}
if (pst != null) {
pst.close();
}
if (con != null) {
con.close();
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
}
}
jreturn = new JSONObject(response);
return jreturn;
}
@Override
public JSONObject listarDetalle(JSONObject datos) throws Exception {
JSONObject jreturn = new JSONObject();
JSONArray lista = new JSONArray();
Connection con = null;
PreparedStatement pst = null;
ResultSet rSet = null;
int cantidadRegistros = 0;
String sql;
ResponseHelper response = new ResponseHelper();
try {
con = MysqlDAOFactory.obtenerConexion(GeneralVariables.nameDB);
sql = " select firstname, lastname, SUBSTR(username, 2, 8) from mdl_user "
+ " where id in (" + datos.getString("codigosUsuarios") + ") "
+ " LIMIT " + datos.getInt("start") + ", " + datos.getInt("length");
pst = con.prepareStatement(sql);
rSet = pst.executeQuery();
int conta = datos.getInt("start") + 1;
while (rSet.next()) {
JSONObject obj = new JSONObject();
obj.put("numeral", conta);
obj.put("nombreUsuario", rSet.getString(1));
obj.put("apellidoUsuario", rSet.getString(2));
obj.put("correoUsuario", rSet.getString(3));
lista.put(obj);
conta++;
}
sql = " select count(*) from mdl_user "
+ " where id in (" + datos.getString("codigosUsuarios") + ") ";
pst = con.prepareStatement(sql);
rSet = pst.executeQuery();
rSet.next();
cantidadRegistros = rSet.getInt(1);
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
} finally {
try {
if (rSet != null) {
rSet.close();
}
if (pst != null) {
pst.close();
}
if (con != null) {
con.close();
}
} catch (Exception e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error --->" + e.getMessage());
}
}
jreturn.put("data", lista);
jreturn.put("recordsFiltered", cantidadRegistros);
jreturn.put("recordsTotal", cantidadRegistros);
jreturn.put("draw", datos.getInt("draw"));
return jreturn;
}
}
......@@ -58,4 +58,14 @@ public class CursoService {
return obj;
}
public JSONObject eliminarCursos(JSONObject datos) {
JSONObject obj = null;
try {
obj = dao.eliminarCursos(datos);
} catch (Exception e) {
e.printStackTrace();
}
return obj;
}
}
......@@ -98,4 +98,24 @@ public class UsuarioService {
return obj;
}
public JSONObject editarGradoMasivo(JSONObject datos) {
JSONObject obj = null;
try {
obj = dao.editarGradoMasivo(datos);
} catch (Exception e) {
e.printStackTrace();
}
return obj;
}
public JSONObject listarDetalle(JSONObject datos) {
JSONObject obj = null;
try {
obj = dao.listarDetalle(datos);
} catch (Exception e) {
e.printStackTrace();
}
return obj;
}
}
......@@ -37,6 +37,9 @@ public class CursoServlet extends HttpServlet {
case "asignarCurso":
asignarCurso(request, response);
break;
case "eliminarCursos":
eliminarCursos(request, response);
break;
default:
break;
}
......@@ -85,4 +88,14 @@ public class CursoServlet extends HttpServlet {
out.println(rs);
}
private void eliminarCursos(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
CursoService srv = new CursoService();
String jsonString = request.getParameter("json");
JSONObject json = new JSONObject(jsonString);
JSONObject rs = srv.eliminarCursos(json);
out.println(rs);
}
}
......@@ -49,6 +49,12 @@ public class UsuarioServlet extends HttpServlet {
case "validarUsuario":
validarUsuario(request, response);
break;
case "editarGradoMasivo":
editarGradoMasivo(request, response);
break;
case "listarDetalle":
listarDetalle(request, response);
break;
default:
break;
}
......@@ -132,4 +138,27 @@ public class UsuarioServlet extends HttpServlet {
JSONObject rs = srv.validarUsuario(json);
out.println(rs);
}
private void editarGradoMasivo(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
UsuarioService srv = new UsuarioService();
String jsonString = request.getParameter("json");
JSONObject json = new JSONObject(jsonString);
JSONObject rs = srv.editarGradoMasivo(json);
out.println(rs);
}
private void listarDetalle(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("application/json");
PrintWriter out = response.getWriter();
UsuarioService srv = new UsuarioService();
String jsonString = request.getParameter("json");
JSONObject json = new JSONObject(jsonString);
json.put("draw", Integer.parseInt(request.getParameter("draw")));
json.put("length", Integer.parseInt(request.getParameter("length")));
json.put("start", Integer.parseInt(request.getParameter("start")));
JSONObject rs = srv.listarDetalle(json);
out.println(rs);
}
}
......@@ -109,18 +109,12 @@ label {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
@media screen and (max-width: 769px){
.button-plus{
padding-top: 11px;
}
}
#txtBusqProductos::-webkit-search-cancel-button{
position:relative;
padding: 2px;
}
@media (min-width: 768px){
.sidebar{
width: 200px;
......@@ -190,6 +184,10 @@ label {
padding: 3px 15px;
}
.table-sm > thead > tr > th, .table-sm > tbody > tr > th, .table-sm > tfoot > tr > th, .table-sm > thead > tr > td, .table-sm > tbody > tr > td, .table-sm > tfoot > tr > td {
padding: 5px 15px;
}
.table{
width: 100% !important;
}
......@@ -243,7 +241,7 @@ a.disabled {
}
}
.footer.fixed {
.ffooter {
position: fixed;
bottom: 0;
left: 0;
......@@ -252,6 +250,33 @@ a.disabled {
padding: 10px 20px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 200px;
margin-left: 200px;
}
.ffooter-xl{
margin-left: 56px;
}
@media (max-width:768px) {
.ffooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 8px 5px;
background: white;
border-top: 1px solid #e7eaec;
margin-left: 0px;
font-size: 13px;
text-align: center;
}
}
table.display tbody tr:hover td {
background-color: #AAB7D1 !important;
}
.modal-header[class*=bg-] {
padding: 10px 15px;
}
\ No newline at end of file
This image diff could not be displayed because it is too large. You can view the blob instead.
......@@ -17,9 +17,9 @@
const capitalizeWords = str => str.split(' ').map((word, i, arr) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ')
function msnSuccess(message, action) {
function msnSuccess(message, action, charge) {
var final = action || function () {};
bootbox.dialog({
let bbxSuccess = bootbox.dialog({
className: "dialogExtraSmall",
title: "<i class='ace-icon fa fa-tags white'></i> <span class='white'>Notificación</span>",
headerClass: "modal-bg-success",
......@@ -34,6 +34,11 @@
}
}
});
if (charge !== undefined) {
bbxSuccess.init(() => {
charge()
})
}
}
function msnError(message, action) {
......@@ -168,6 +173,27 @@
$("#" + id).parent().unblock();
}
};
var loader = {
iniciarLoader: function () {
$.blockUI({
message: '<i class="icon-spinner9 spinner position-left" style="font-size:25px"></i>',
overlayCSS: {
backgroundColor: '#1b2024',
opacity: 0.95,
cursor: 'wait'
},
css: {
border: 0,
color: '#fff',
padding: 0,
backgroundColor: 'transparent'
}
});
},
terminarLoader: function () {
$.unblockUI();
}
};
function load(msg) {
$.blockUI({
......@@ -187,33 +213,10 @@
}
});
}
function unload() {
$.unblockUI();
}
var loader = {
iniciarLoader: function () {
$.blockUI({
message: '<i class="icon-spinner9 spinner position-left" style="font-size:25px"></i>',
overlayCSS: {
backgroundColor: '#1b2024',
opacity: 0.95,
cursor: 'wait'
},
css: {
border: 0,
color: '#fff',
padding: 0,
backgroundColor: 'transparent'
}
});
},
terminarLoader: function () {
$.unblockUI();
}
};
$(window).resize(function () {
const width = $(window).width();
if (width < 1589 && width > 1199) {
......@@ -237,4 +240,10 @@
}
});
}
if (width < 959) {
$('.pace-done').addClass('sidebar-xs')
} else {
$('.pace-done').removeClass('sidebar-xs')
}
});
......@@ -18,7 +18,7 @@
let letter = String.fromCharCode(event.which).toLowerCase()
let valid =
-1 !== exp.indexOf(letter) ||
9 === keyCode || 13 === keyCode ||
9 === keyCode || 13 === keyCode ||
37 !== whichCode && 37 === keyCode ||
39 === keyCode && 39 !== whichCode ||
8 === keyCode ||
......@@ -29,7 +29,7 @@
});
el.addEventListener('drop', (event) => {
let word = event.dataTransfer.getData("text")
let word = event.dataTransfer.getData("text").toLowerCase()
let conta = 0;
for (var i = 0; i < word.length; i++) {
let letter = word.charAt(i)
......@@ -42,7 +42,7 @@
}
})
el.addEventListener('paste', (event) => {
let word = event.clipboardData.getData('text');
let word = event.clipboardData.getData('text').toLowerCase()
let conta = 0;
for (var i = 0; i < word.length; i++) {
let letter = word.charAt(i)
......@@ -54,7 +54,6 @@
event.preventDefault()
}
})
})
}
......
......@@ -6,5 +6,4 @@
} else {
window.location = 'mantenimientoUsuario.jsp'
}
console.log(dataRequest);
})(Cookies);
\ No newline at end of file
/* global loader, dataRequest */
/* global loader, dataRequest, elementLoader */
let tableCursos
let deletedItem = []
const helpers = {
tblCursosCharge() {
loader.iniciarLoader()
tableCursos.destroy()
initComponents.listarCursos()
},
tblCursosRefresh() {
tableCursos.ajax.reload();
loader.iniciarLoader()
tableCursos.ajax.reload(null, false);
}
}
......@@ -23,8 +26,10 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
elementLoader.terminarLoader('cboCurso')
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
elementLoader.terminarLoader('cboCurso')
reject('Error en la petición')
}
})
......@@ -37,8 +42,10 @@
url: "../UsuarioServlet?accion=listarNivel",
dataType: "json",
success: function (data, textStatus, jqXHR) {
elementLoader.terminarLoader('cboNivel')
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
elementLoader.terminarLoader('cboNivel')
reject('Error en la petición')
}
})
......@@ -54,8 +61,10 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
elementLoader.terminarLoader('cboGrado')
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
elementLoader.terminarLoader('cboGrado')
reject('Error en la petición')
}
})
......@@ -71,8 +80,10 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
......@@ -88,8 +99,29 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
})
},
eliminarCursos(json) {
return new Promise((resolve, reject) => {
$.ajax({
type: 'POST',
url: "../CursoServlet?accion=eliminarCursos",
dataType: "json",
data: {
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
......@@ -98,12 +130,20 @@
}
const DOMEvents = {
init() {
this.checkSelects()
this.tblCursosEliminar()
this.registrarCurso()
this.limpiarRegistro()
this.eliminarCursos()
},
checkSelects() {
$('#cboNivel').change(() => {
var cboNivel = $('#cboNivel').val()
if (cboNivel !== '') {
if (cboNivel !== '3') {
$('#cboGrado').attr('disabled', false)
elementLoader.iniciarLoader('cboGrado')
initRequest.cargarGrado()
} else {
$("#cboGrado").attr('disabled', true)
......@@ -119,6 +159,7 @@
var cboGrado = $('#cboGrado').val()
if (cboGrado !== '') {
$('#cboCurso').attr('disabled', false)
elementLoader.iniciarLoader('cboCurso')
initRequest.cargarCurso()
} else {
$("#cboCurso").attr('disabled', true)
......@@ -130,9 +171,9 @@
$('#tblCursos tbody').on('click', '.eliminar', (e) => {
let thisNode = e.currentTarget;
var data = tableCursos.row($(thisNode).parents('tr')).data();
console.log(data);
msnConfirm('¿Está seguro de eliminar este curso?', (option) => {
if (option) {
loader.iniciarLoader()
httpRequest.eliminarCurso(data)
.then((data) => {
if (data.status) {
......@@ -171,6 +212,7 @@
codigoGrado: $('#cboGrado').val(),
codigoCurso: $('#cboCurso').val()
}
loader.iniciarLoader()
httpRequest.asignarCurso(json)
.then((data) => {
if (data.status) {
......@@ -185,7 +227,6 @@
}
})
.catch(err => console.log(err))
console.log("Todo chevere");
}
})
},
......@@ -195,6 +236,76 @@
$('#cboGrado').val('')
$('#cboCurso').val('')
})
},
checkedAll() {
$('.ckTitle').click((e) => {
let thisNode = e.currentTarget;
if (thisNode.checked) {
$('.ckItem').each((i, v) => {
if (!v.checked) {
v.click()
}
})
} else {
$('.ckItem').each((i, v) => {
if (v.checked) {
v.click()
}
})
}
})
},
pushCheckedItem() {
$('.ckItem').click((e) => {
let thisNode = e.currentTarget
let codigoItem = $(thisNode).val();
if (thisNode.checked) {
deletedItem.push(codigoItem);
} else {
let itemChecked = $('.ckItem').filter(':checked').length
if (itemChecked > 0 && $('.ckTitle').prop('checked') || $('.ckTitle').parent().hasClass('checked')) {
$('.ckTitle').parent().removeClass('checked')
}
deletedItem.forEach((v, i) => {
if (v === codigoItem) {
deletedItem.splice(i, 1);
}
})
}
if (deletedItem.length > 0) {
$('#btnEliminar').removeClass('hide');
} else {
$('#btnEliminar').addClass('hide');
}
})
},
eliminarCursos() {
$('#btnEliminar').click(() => {
let json = {
lista: deletedItem
}
msnConfirm(`¿Seguro de eliminar ${deletedItem.length} cursos?`, (option) => {
if (option) {
loader.iniciarLoader()
httpRequest.eliminarCursos(json)
.then((data) => {
if (data.status) {
msnSuccess(`Cursos correctamente eliminados`, () => {
helpers.tblCursosRefresh()
deletedItem = []
})
} else {
if ((data.message).includes('--->')) {
msnError("Ha ocurrido un error")
} else {
msnError(data.message)
}
}
})
.catch(err => console.log(err))
}
})
})
}
}
......@@ -260,7 +371,13 @@
}
const initComponents = {
init() {
this.listarCursos()
this.initTableComponents()
this.chargeDataUser()
},
listarCursos() {
let checks = 0
json = {
codigoUsuario: dataRequest.codigoUsuario
}
......@@ -280,7 +397,7 @@
"previous": "Anterior"
}
},
dom: '<"datatable-scroll"t> < "datatable-footers"ip > ',
dom: '<"datatable-scroll"t>r<"datatable-footers"ip>',
"ajax": {
type: 'POST',
url: "../CursoServlet?accion=listarCursos",
......@@ -297,14 +414,24 @@
"bLengthChange": false,
"bInfo": true,
"paging": true,
"iDisplayLength": 20,
"iDisplayLength": 15,
"columnDefs": [
{targets: 0, orderable: false, width: "5%", className: "text-center"},
{targets: 1, orderable: false, width: "15%", className: "text-center"},
{targets: 2, orderable: false, width: "15%", className: "text-center"},
{targets: 3, orderable: false, width: "7%", className: "text-center"}
{targets: 1, orderable: false, width: "5%", className: "text-center"},
{targets: 2, orderable: false, width: "15%"},
{targets: 3, orderable: false, width: "15%"},
{targets: 4, orderable: false, width: "7%", className: "text-center"}
],
"columns": [
{'data': null, 'render': (data, type, row) => {
let checked = ''
if (deletedItem.includes(row.codigoCurso.toString())) {
checked = 'checked'
checks++
}
return `<input type="checkbox" class="ckItem" value="${row.codigoCurso}" ${checked}>`
}
},
{"data": "numeral"},
{"data": "nombreGrado", "render": (data, type, row) => {
return capitalizeWords(data);
......@@ -322,19 +449,30 @@
}
],
fnDrawCallback: () => {
loader.terminarLoader();
loader.terminarLoader()
}
});
},
initTableComponents() {
$('#tblCursos').on('draw.dt', () => {
$('[data-toggle="tooltip"]').tooltip();
$('.ckItem').uniform()
DOMEvents.checkedAll()
DOMEvents.pushCheckedItem()
})
},
chargeDataUser() {
$('#dataUser').text(`${dataRequest.apellidosUsuario !== '' ? dataRequest.apellidosUsuario + ',' : ''} ${dataRequest.nombreUsuario !== '' ? dataRequest.nombreUsuario + ' /' : ''} ${dataRequest.dniUsuario !== '' ? dataRequest.dniUsuario : ''}`)
}
}
initialize = () => {
initComponents.listarCursos()
loader.iniciarLoader()
initComponents.init()
elementLoader.iniciarLoader('cboNivel')
initRequest.cargarNivel()
DOMEvents.checkSelects()
DOMEvents.tblCursosEliminar()
DOMEvents.registrarCurso()
DOMEvents.limpiarRegistro()
DOMEvents.init()
$('.ckTitle').uniform()
}
initialize()
\ No newline at end of file
/* global loader, bootbox, Cookies */
/* global loader, bootbox, Cookies, elementLoader */
// VARIABLES GLOBALES
let tableUsuarios;
let selectedItem = [];
let checks;
let selectedGroup = {};
// VARIABLES GLOBALES
const helpers = {
......@@ -10,7 +13,8 @@
initComponents.listarUsuarios()
},
tblUsuariosRefresh() {
tableUsuarios.ajax.reload();
loader.iniciarLoader()
tableUsuarios.ajax.reload(null, false);
}
}
......@@ -22,8 +26,10 @@
url: "../UsuarioServlet?accion=listarSede",
dataType: "json",
success: function (data, textStatus, jqXHR) {
elementLoader.terminarLoader('cboSede')
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
elementLoader.terminarLoader('cboSede')
reject('Error en la petición')
}
})
......@@ -39,8 +45,10 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
......@@ -53,8 +61,11 @@
url: "../UsuarioServlet?accion=listarNivel",
dataType: "json",
success: function (data, textStatus, jqXHR) {
elementLoader.terminarLoader('cboNivel')
elementLoader.terminarLoader('cboNivelBusqueda')
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
elementLoader.terminarLoader('cboNivel')
reject('Error en la petición')
}
})
......@@ -70,8 +81,11 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
elementLoader.terminarLoader('cboGrado')
elementLoader.terminarLoader('cboGradoBusqueda')
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
elementLoader.terminarLoader('cboGrado')
reject('Error en la petición')
}
})
......@@ -87,8 +101,10 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
......@@ -104,8 +120,10 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
......@@ -121,8 +139,29 @@
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
})
},
editarGradoMasivo(json) {
return new Promise((resolve, reject) => {
$.ajax({
type: 'POST',
url: "../UsuarioServlet?accion=editarGradoMasivo",
dataType: "json",
data: {
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
loader.terminarLoader()
resolve(data)
}, error: function (jqXHR, textStatus, errorThrown) {
loader.terminarLoader()
reject('Error en la petición')
}
})
......@@ -131,11 +170,24 @@
}
const DOMEvents = {
init() {
this.nuevoUsuario()
this.tblUsuariosEditar()
this.tblUsuariosAsignar()
this.tblUsuarioEliminar()
this.tblUsuariosBuscar()
this.tblUsuariosLimpiar()
this.autoClickSearch()
this.checkTipoBusqueda()
this.checkSelectsBusqueda()
this.editarUsuarios()
this.pushCheckedItem()
},
tblUsuariosEditar() {
$('#tblUsuarios tbody').on('click', '.editar', (e) => {
let thisNode = e.currentTarget;
let data = tableUsuarios.row($(thisNode).parents('tr')).data();
console.log(data);
let bbxEditarUsuario = bootbox.dialog({
title: "<span>EDITAR USUARIO</span>",
headerClass: "modal-bg-primary",
......@@ -167,7 +219,7 @@
<div class="col-md-4">
<div class="form-group">
<label>Dni: <span class="asterisk">(*)</span></label>
<input type="text" class="form-control" id="txtDni2" name="txtDni" placeholder="Ingrese DNI">
<input type="text" class="form-control" id="txtDni2" name="txtDni" placeholder="Ingrese DNI" maxlength="8">
</div>
</div>
</div>
......@@ -175,19 +227,19 @@
<div class="col-md-4">
<div class="form-group">
<label>Apellido Paterno: <span class="asterisk">(*)</span></label>
<input type="text" class="form-control" id="txtApepat" name="txtApepat" placeholder="Ingrese apellido paterno">
<input type="text" class="form-control" id="txtApepat" name="txtApepat" placeholder="Ingrese apellido paterno" style="text-transform:uppercase">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Apellido Materno: <span class="asterisk">(*)</span></label>
<input type="text" class="form-control" id="txApemat" name="txApemat" placeholder="Ingrese apellido materno">
<input type="text" class="form-control" id="txApemat" name="txApemat" placeholder="Ingrese apellido materno" style="text-transform:uppercase">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Nombre(s): <span class="asterisk">(*)</span></label>
<input type="text" class="form-control" id="txtNombre" name="txtNombre" placeholder="Ingrese nombre(s)">
<input type="text" class="form-control" id="txtNombre" name="txtNombre" placeholder="Ingrese nombre(s)" style="text-transform:uppercase">
</div>
</div>
</div>
......@@ -200,7 +252,7 @@
</div>
<div class="col-md-6">
<div class="form-group">
<label>Contraseña temporal: <span class="asterisk">(*)</span></label>
<label>Contraseña temporal: </label>
<input type="text" class="form-control" id="txtClave" name="txtClave" placeholder="Ingrese contraseña temporal">
</div>
</div>
......@@ -246,13 +298,16 @@
label: "<i class='fa fa-check bigger-110'></i>&nbsp; Editar ",
className: "btn bg-success border-success-600 btn-xs",
callback: () => {
var valCrearUsuario = $("#formCrearUsuario").validate({
let valCrearUsuario = $("#formCrearUsuario").validate({
rules: {
cboRol: {required: true},
cboTipo: {required: true},
txtDni: {required: true},
txtDni: {
required: true,
maxlength: 8,
minlength: 8
},
txtCorreo: {required: true},
txtClave: {required: true},
txtApepat: {required: true},
txApemat: {required: true},
txtNombre: {required: true},
......@@ -263,9 +318,12 @@
messages: {
cboRol: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
cboTipo: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txtDni: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txtDni: {
required: "<b>&times;</b>&nbsp;Este campo es requerido",
maxlength: "<b>&times;</b>&nbsp;Debe ingresar 8 dígitos",
minlength: "<b>&times;</b>&nbsp;Debe ingresar 8 dígitos"
},
txtCorreo: {required: "<b>&times;</b>&nbsp;Este campo es requerido", email: "<b>&times;</b>&nbsp;Ingrese un correo válido"},
txtClave: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txtApepat: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txApemat: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txtNombre: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
......@@ -286,10 +344,11 @@
gradoUsuario: $("#cboGrado option:selected").text(),
codigoGrado: $('#cboGrado').val(),
sedeUsuario: $("#cboSede option:selected").text(),
claveUsuario: $('#txtClave').val(),
claveUsuario: $('#txtClave').val() === undefined ? '' : $('#txtClave').val(),
rolUsuario: $('#cboRol').val(),
codigoUsuario: data.codigoUsuario
}
loader.iniciarLoader()
httpRequest.validarUsuario(json)
.then((rs) => {
if (!rs.status) {
......@@ -297,8 +356,16 @@
$(`#tblUsuarios tbody .click${data.numeral}`).click()
})
} else {
// if (json.rolUsuario === 'ESTUDIANTE') {
// if (json.gradoUsuario !== data.gradoUsuario) {
//
// }
// } else {
//
// }
msnConfirm(" ¿Está seguro de modifcar este usuario? ", (option) => {
if (option) {
loader.iniciarLoader()
httpRequest.editarUsuario(json)
.then((data) => {
if (data.status) {
......@@ -332,6 +399,8 @@
}
})
bbxEditarUsuario.init(() => {
elementLoader.iniciarLoader('cboSede')
elementLoader.iniciarLoader('cboNivel')
initRequest.cargarSedeData(data.sedeUsuario)
initRequest.cargarNivelData(data.nivelUsuario)
this.generarCorreo()
......@@ -343,9 +412,9 @@
},
tblUsuariosAsignar() {
$('#tblUsuarios tbody').on('click', '.asignar', (e) => {
loader.iniciarLoader()
let thisNode = e.currentTarget;
var data = tableUsuarios.row($(thisNode).parents('tr')).data();
console.log(data);
let data = tableUsuarios.row($(thisNode).parents('tr')).data();
Cookies.set("dataUsuario", JSON.stringify(data), {expiry: 600})
window.location = 'mantenimientoCurso.jsp'
})
......@@ -353,10 +422,10 @@
tblUsuarioEliminar() {
$('#tblUsuarios tbody').on('click', '.eliminar', (e) => {
let thisNode = e.currentTarget;
var data = tableUsuarios.row($(thisNode).parents('tr')).data();
console.log(data);
let data = tableUsuarios.row($(thisNode).parents('tr')).data();
msnConfirm(`<label>¿Seguro de eliminar este Usuario?</label>`, (option) => {
if (option) {
loader.iniciarLoader()
httpRequest.eliminarUsuario(data)
.then((data) => {
if (data.status) {
......@@ -375,14 +444,9 @@
});
})
},
tblUsuariosTooltip() {
$('#tblUsuarios').on('draw.dt', () => {
$('[data-toggle="tooltip"]').tooltip();
})
},
tblUsuariosBuscar() {
$('#btnBuscar').click(() => {
var valBusqUsuario = $("#frmBusqRequ").validate({
let valBusqUsuario = $("#frmBusqRequ").validate({
rules: {
txtDni: {
required: true,
......@@ -399,22 +463,27 @@
}
});
if (valBusqUsuario.form()) {
loader.iniciarLoader()
helpers.tblUsuariosCharge()
}
})
},
tblUsuariosLimpiar() {
$('#btnLimpiar').click(() => {
loader.iniciarLoader()
$('#cboTipoBusqueda').val('1')
$('#cboTipoBusqueda').change()
$('#txtDni').val('')
helpers.tblUsuariosCharge()
})
},
checkSelects() {
$('#cboNivel').change(() => {
var cboNivel = $('#cboNivel').val()
let cboNivel = $('#cboNivel').val()
if (cboNivel !== '') {
if (cboNivel !== '3') {
$(".colGrado").removeClass('hide')
elementLoader.iniciarLoader('cboGrado')
initRequest.cargarGrado()
} else {
$(".colGrado").addClass('hide')
......@@ -425,12 +494,26 @@
}
})
},
checkSelectsBusqueda() {
$('#cboNivelBusqueda').change(() => {
let cboNivel = $('#cboNivelBusqueda').val()
if (cboNivel !== '') {
$("#cboGradoBusqueda").prop('disabled', false)
elementLoader.iniciarLoader('cboGradoBusqueda')
initRequest.cargarGradoBusqueda()
} else {
$('#cboGradoBusqueda').html('<option>[SELECCIONE]</option>')
$("#cboGradoBusqueda").prop('disabled', true)
}
})
},
checkSelectsData(nombre) {
$('#cboNivel').change(() => {
var cboNivel = $('#cboNivel').val()
let cboNivel = $('#cboNivel').val()
if (cboNivel !== '') {
if (cboNivel !== '3') {
$(".colGrado").removeClass('hide')
elementLoader.iniciarLoader('cboGrado')
initRequest.cargarGradoData(nombre)
} else {
$(".colGrado").addClass('hide')
......@@ -441,10 +524,27 @@
}
})
},
checkSelectsDataMasivo(codigo) {
$('#cboNivel').change(() => {
let cboNivel = $('#cboNivel').val()
if (cboNivel !== '') {
if (cboNivel !== '3') {
$("#cboGrado").attr('disabled', false)
elementLoader.iniciarLoader('cboGrado')
initRequest.cargarGradoDataMasivo(codigo)
} else {
$("#cboGrado").attr('disabled', true)
$('#cboGrado').html('<option value="3" selected=true>Academias</option>')
}
} else {
$("#cboGrado").attr('disabled', true)
}
})
},
nuevoUsuario() {
$('#btnNuevo').click(() => {
let bbxCrearUsuario = bootbox.dialog({
title: "<span>EDITAR USUARIO</span>",
title: "<span>CREAR USUARIO</span>",
headerClass: "modal-bg-primary",
className: "bbxCrearUsuario",
size: "large",
......@@ -483,19 +583,19 @@
<div class="col-md-4">
<div class="form-group">
<label>Apellido Paterno: <span class="asterisk">(*)</span></label>
<input type="text" class="form-control" id="txtApepat" name="txtApepat" placeholder="Ingrese apellido paterno">
<input type="text" class="form-control" id="txtApepat" name="txtApepat" placeholder="Ingrese apellido paterno" style="text-transform:uppercase">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Apellido Materno: <span class="asterisk">(*)</span></label>
<input type="text" class="form-control" id="txApemat" name="txApemat" placeholder="Ingrese apellido materno">
<input type="text" class="form-control" id="txApemat" name="txApemat" placeholder="Ingrese apellido materno" style="text-transform:uppercase">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Nombre(s): <span class="asterisk">(*)</span></label>
<input type="text" class="form-control" id="txtNombre" name="txtNombre" placeholder="Ingrese nombre(s)">
<input type="text" class="form-control" id="txtNombre" name="txtNombre" placeholder="Ingrese nombre(s)" style="text-transform:uppercase">
</div>
</div>
</div>
......@@ -508,7 +608,7 @@
</div>
<div class="col-md-6">
<div class="form-group">
<label>Contraseña temporal: <span class="asterisk">(*)</span></label>
<label>Contraseña temporal: </label>
<input type="text" class="form-control" id="txtClave" name="txtClave" placeholder="Ingrese contraseña temporal">
</div>
</div>
......@@ -554,7 +654,7 @@
label: "<i class='fa fa-check bigger-110'></i>&nbsp; Crear",
className: "btn bg-success border-success-600 btn-xs",
callback: () => {
var valCrearUsuario = $("#formCrearUsuario").validate({
let valCrearUsuario = $("#formCrearUsuario").validate({
rules: {
cboRol: {required: true},
cboTipo: {required: true},
......@@ -564,7 +664,6 @@
minlength: 8
},
txtCorreo: {required: true},
txtClave: {required: true},
txtApepat: {required: true},
txApemat: {required: true},
txtNombre: {required: true},
......@@ -581,7 +680,6 @@
minlength: "<b>&times;</b>&nbsp;Debe ingresar 8 dígitos"
},
txtCorreo: {required: "<b>&times;</b>&nbsp;Este campo es requerido", email: "<b>&times;</b>&nbsp;Ingrese un correo válido"},
txtClave: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txtApepat: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txApemat: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
txtNombre: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
......@@ -602,9 +700,10 @@
gradoUsuario: $("#cboGrado option:selected").text(),
codigoGrado: $('#cboGrado').val(),
sedeUsuario: $("#cboSede option:selected").text(),
claveUsuario: $('#txtClave').val(),
claveUsuario: $('#txtClave').val() === undefined ? '' : $('#txtClave').val(),
rolUsuario: $('#cboRol').val()
}
loader.iniciarLoader()
httpRequest.validarUsuario(json)
.then((data) => {
if (!data.status) {
......@@ -614,6 +713,7 @@
} else {
msnConfirm(" ¿Está seguro de registrar este usuario? ", (option) => {
if (option) {
loader.iniciarLoader()
httpRequest.nuevoUsuario(json)
.then((data) => {
if (data.status) {
......@@ -648,10 +748,13 @@
})
bbxCrearUsuario.init(() => {
initComponents.initAlfiValidate()
elementLoader.iniciarLoader('cboSede')
initRequest.cargarSede()
elementLoader.iniciarLoader('cboNivel')
initRequest.cargarNivel()
this.checkSelects()
this.generarCorreo()
$('#')
})
})
},
......@@ -660,7 +763,7 @@
$('#cboSede').val('')
$('#cboNivel').val('')
$('#cboGrado').val('')
var rol = $('#cboRol').val();
let rol = $('#cboRol').val();
if (rol === '') {
$('.rowCbo').addClass('hide')
$('#txtDni2').val("");
......@@ -691,12 +794,12 @@
$('#txtCorreo').attr('placeholder', 'Correo Autogenerado');
}
});
$('#txtDni2').keydown(() => {
var dni = $('#txtDni2').val();
var rol = $('#cboRol').val();
$('#txtDni2').keypress(() => {
let dni = $('#txtDni2').val();
let rol = $('#cboRol').val();
if (rol === 'ESTUDIANTE' || rol === 'DOCENTE') {
if (dni.length >= 1) {
var letraRol = $("#cboRol option:selected").text().substring(1, 0).toLowerCase();
let letraRol = $("#cboRol option:selected").text().substring(1, 0).toLowerCase();
correo = letraRol + dni + "@sistemahelicoidal.edu.pe";
$('#txtCorreo').val(correo);
} else {
......@@ -711,6 +814,242 @@
$('#btnBuscar').click()
}
})
},
checkedAll() {
$('.ckTitle').click((e) => {
let thisNode = e.currentTarget;
if (thisNode.checked) {
$('.ckItem').each((i, v) => {
if (!v.checked) {
v.click()
}
})
} else {
$('.ckItem').each((i, v) => {
if (v.checked) {
v.click()
}
})
}
})
},
pushCheckedItem() {
$('#tblUsuarios tbody').on('click', '.ckItem', (e) => {
let thisNode = e.currentTarget
let codigoItem = $(thisNode).val()
if (thisNode.checked) {
selectedItem.push(codigoItem);
} else {
let itemChecked = $('.ckItem').filter(':checked').length
if (itemChecked > 0 && $('.ckTitle').prop('checked') || $('.ckTitle').parent().hasClass('checked')) {
$('.ckTitle').parent().removeClass('checked')
}
selectedItem.forEach((v, i) => {
if (v === codigoItem) {
selectedItem.splice(i, 1);
}
})
}
if (selectedItem.length > 0) {
$('#btnModificar').removeClass('hide');
$('#btnNuevo').addClass('hide');
} else {
$('#btnModificar').addClass('hide');
$('#btnNuevo').removeClass('hide');
}
})
},
editarUsuarios() {
$('#btnModificar').click(() => {
let bbxEditarMasivo = bootbox.dialog({
title: "<span>EDITAR USUARIOS</span>",
headerClass: "modal-bg-primary",
className: "bbxEditarUsuarios",
size: "medium",
message: `<form id="formEditarMasivo" onsubmit="return false" autocomplete="off">
<div class="row">
<div class="colNivel col-md-6">
<div class="form-group">
<label>Nivel: <span class="asterisk">(*)</span></label>
<select class="form-control" id="cboNivel" name="cboNivel">
<option value="">[SELECCIONE]</option>
</select>
</div>
</div>
<div class="colGrado col-md-6">
<div class="form-group">
<label>Grado: <span class="asterisk">(*)</span></label>
<select class="form-control" id="cboGrado" name="cboGrado">
<option value="">[SELECCIONE]</option>
</select>
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<div class="form-group" style="margin-bottom: 0px;">
<div class="text-right">
<span class="asterisk">(*)</span> Campo obligatorio
</div>
</div>
</div>
</div>`,
buttons: {
si: {
label: "<i class='fa fa-check bigger-110'></i>&nbsp; Editar",
className: "btn bg-success border-success-600 btn-xs",
callback: () => {
let valEditarMasivo = $("#formEditarMasivo").validate({
rules: {
cboNivel: {required: true},
cboGrado: {
required: true,
selectnic: true
}
},
messages: {
cboNivel: {required: "<b>&times;</b>&nbsp;Este campo es requerido"},
cboGrado: {required: "<b>&times;</b>&nbsp;Este campo es requerido"}
}
});
if (valEditarMasivo.form()) {
let json = {
listaEstudiantes: selectedItem,
codigoGradoFinal: $('#cboGrado').val(),
codigoGradoInicial: selectedGroup.codGradoUsuario
}
msnConfirm(`¿Está seguro de editar estos ${selectedItem.length} estudiantes?`, (option) => {
if (option) {
loader.iniciarLoader()
httpRequest.editarGradoMasivo(json)
.then((data) => {
if (data.status) {
helpers.tblUsuariosRefresh()
msnSuccess(`<div class="row" style="margin-bottom: 8px;">
<div class="col-md-12">
<div>La operación fue procesada satisfactoriamente: </div>
</div>
</div>
<div class="row" style="margin-bottom: 5px;">
<div class="col-md-2">
<span class="label bg-slate border-slate-600" >${data.data.correctos.length}</span>
</div>
<div class="col-md-5">
<span class="label bg-success border-success-600" style="color: white">CORRECTOS</span>
</div>
<div class="col-md-5">
<a class="text-size-small pull-right" id="detallesCorrectos"><i class="fa fa-angle-double-right">Ver detalles</i></a>
</div>
</div>
<div class="row" style="margin-bottom: 0px;">
<div class="col-md-2">
<span class="label bg-slate border-slate-600">${data.data.incorrectos.length} </span>
</div>
<div class="col-md-5">
<span class="label bg-danger border-danger-600" style="color: white">INCORRECTOS</span>
</div>
<div class="col-md-5 ${data.data.incorrectos.length === 0 ? 'hide' : ''}">
<a class="text-size-small pull-right" id="detallesIncorrectos"><i class="fa fa-angle-double-right">Ver detalles</i></a>
</div>
</div>`,
() => {
selectedItem = []
}, () => {
$('#detallesCorrectos').click(() => {
this.showDetail('CORRECTOS', data.data.correctos)
})
$('#detallesIncorrectos').click(() => {
this.showDetail('INCORRECTOS', data.data.incorrectos)
})
})
} else {
msnError(`${data.message}`)
}
})
.catch(err => console.log(err))
} else {
$('#btnModificar').click()
}
})
} else {
return false
}
}
},
no: {
label: '<i class="fa fa-times" bigger-110></i>&nbsp; Cancelar',
className: 'btn bg-danger border-danger-600 btn-xs',
callback: () => {
}
}
}
})
bbxEditarMasivo.init(() => {
elementLoader.iniciarLoader('cboNivel')
initRequest.cargarNivelDataMasivo(selectedGroup.nivelUsuario)
DOMEvents.checkSelectsDataMasivo(selectedGroup.codGradoUsuario)
})
})
},
checkTipoBusqueda() {
$('#cboTipoBusqueda').change(() => {
let val = $('#cboTipoBusqueda').val()
if (val === '1') {
$('#div-busq-dni').removeClass('hide')
$('#div-busq-nivel').addClass('hide')
$('#div-busq-grado').addClass('hide')
} else {
$('#div-busq-dni').addClass('hide')
$('#div-busq-nivel').removeClass('hide')
$('#div-busq-grado').removeClass('hide')
$('#cboNivelBusqueda').html('<option>[SELECCIONE]</option>')
$('#cboGradoBusqueda').html('<option>[SELECCIONE]</option>')
elementLoader.iniciarLoader('cboNivelBusqueda')
initRequest.cargarNivelBusqueda()
}
})
},
showDetail(type, data) {
$('.dialogExtraSmall').addClass('hide')
let listaDetalle = bootbox.dialog({
title: "<b><i class='ace-icon fa fa-tags'></i> <span class=''>&nbsp; DETALLE DE OPERACIÓN</span></b>",
headerClass: `modal-bg-${type === 'INCORRECTOS' ? 'danger' : 'success'}`,
size: "medium",
className: 'bbxDetalle',
message: `<div class="panel panel-${type === 'INCORRECTOS' ? 'danger' : 'success'}">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; REGISTROS ${type}</h6>
</div>
<div class="table-responsive">
<table class="table display dataTable table-striped table-hover table-sm table-bordered" id="tblDetalle">
<thead class="">
<tr>
<th class="text-center">Nº</th>
<th class="text-center">NOMBRE</th>
<th class="text-center">APELLIDOS</th>
<th class="text-center">DNI</th>
</tr>
</thead>
</table>
</div>
</div>`
})
listaDetalle.init(() => {
let json = {
codigosUsuarios: data.toString()
}
$('.bootbox-close-button').removeClass('hide')
this.removeHideMsn()
initComponents.listarDetalle(json)
})
},
removeHideMsn() {
$('.bootbox-close-button').click(() => {
$('.dialogExtraSmall').removeClass('hide')
$('.bootbox-close-button').addClass('hide')
})
}
}
......@@ -719,14 +1058,14 @@
httpRequest.listarSede()
.then((data) => {
if (data.status) {
var print = " <option value=''>[SELECCIONE]</option> "
var lista = data.results
for (var i in lista) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
print += " <option value ='" + lista[i].codigoSede + "' " + "" + ">" + lista[i].nombreSede + "</option> "
}
$("#cboSede").html(print)
} else {
var print = " <option value=''>No hay contenido</option> "
let print = " <option value=''>No hay contenido</option> "
$("#cboSede").html(print)
}
})
......@@ -736,14 +1075,14 @@
httpRequest.listarNivel()
.then((data) => {
if (data.status) {
var print = " <option value=''>[SELECCIONE]</option> "
var lista = data.results
for (var i in lista) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
print += " <option value ='" + lista[i].codigoNivel + "' " + "" + ">" + lista[i].nombreNivel + "</option> "
}
$("#cboNivel").html(print)
} else {
var print = " <option value=''>No hay contenido</option> "
let print = " <option value=''>No hay contenido</option> "
$("#cboNivel").html(print)
}
})
......@@ -756,32 +1095,71 @@
httpRequest.listarGrado(json)
.then((data) => {
if (data.status) {
var print = " <option value=''>[SELECCIONE]</option> "
var lista = data.results
for (var i in lista) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
print += " <option value ='" + lista[i].codigoGrado + "' " + "" + ">" + lista[i].nombreGrado + "</option> "
}
$("#cboGrado").html(print)
} else {
var print = " <option value=''>No hay contenido</option> "
let print = " <option value=''>No hay contenido</option> "
$("#cboGrado").html(print)
}
})
.catch(err => console.log(err))
},
cargarNivelBusqueda() {
httpRequest.listarNivel()
.then((data) => {
if (data.status) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
if (lista[i].codigoNivel !== 3) {
print += " <option value ='" + lista[i].codigoNivel + "' " + "" + ">" + lista[i].nombreNivel + "</option> "
}
}
$("#cboNivelBusqueda").html(print)
} else {
let print = " <option value=''>No hay contenido</option> "
$("#cboNivelBusqueda").html(print)
}
})
.catch(err => console.log(err))
},
cargarGradoBusqueda() {
let json = {
parent: $("#cboNivelBusqueda").val()
}
httpRequest.listarGrado(json)
.then((data) => {
if (data.status) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
print += " <option value ='" + lista[i].codigoGrado + "' " + "" + ">" + lista[i].nombreGrado + "</option> "
}
$("#cboGradoBusqueda").html(print)
} else {
let print = " <option value=''>No hay contenido</option> "
$("#cboGradoBusqueda").html(print)
}
})
.catch(err => console.log(err))
},
cargarSedeData(nombre) {
httpRequest.listarSede()
.then((data) => {
if (data.status) {
var print = " <option value=''>[SELECCIONE]</option> "
var lista = data.results
for (var i in lista) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
let selected = nombre === lista[i].nombreSede ? "selected=true" : ""
print += " <option value ='" + lista[i].codigoSede + "' " + " " + selected + " >" + lista[i].nombreSede + "</option> "
}
$("#cboSede").html(print)
} else {
var print = " <option value=''>No hay contenido</option> "
let print = " <option value=''>No hay contenido</option> "
$("#cboSede").html(print)
}
})
......@@ -791,21 +1169,63 @@
httpRequest.listarNivel()
.then((data) => {
if (data.status) {
var print = " <option value=''>[SELECCIONE]</option> "
var lista = data.results
for (var i in lista) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
let selected = capitalizeWords(nombre) === lista[i].nombreNivel ? "selected=true" : ""
print += " <option value ='" + lista[i].codigoNivel + "' " + " " + selected + " >" + lista[i].nombreNivel + "</option> "
}
$("#cboNivel").html(print)
$("#cboNivel").change()
} else {
var print = " <option value=''>No hay contenido</option> "
let print = " <option value=''>No hay contenido</option> "
$("#cboNivel").html(print)
}
})
.catch(err => console.log(err))
},
cargarNivelDataMasivo(nombre) {
httpRequest.listarNivel()
.then((data) => {
if (data.status) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
if (lista[i].codigoNivel !== 3) {
let selected = capitalizeWords(nombre) === lista[i].nombreNivel ? "selected=true" : ""
print += " <option value ='" + lista[i].codigoNivel + "' " + " " + selected + " >" + lista[i].nombreNivel + "</option> "
}
}
$("#cboNivel").html(print)
$("#cboNivel").change()
} else {
let print = " <option value=''>No hay contenido</option> "
$("#cboNivel").html(print)
}
})
.catch(err => console.log(err))
},
cargarGradoDataMasivo(codigo) {
let json = {
parent: $("#cboNivel").val()
}
httpRequest.listarGrado(json)
.then((data) => {
if (data.status) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
let selected = capitalizeWords(codigo) === lista[i].codigoGrado.toString() ? "selected=true" : ""
print += " <option value ='" + lista[i].codigoGrado + "' " + " " + selected + " >" + lista[i].nombreGrado + "</option> "
}
$("#cboGrado").html(print)
} else {
let print = " <option value=''>No hay contenido</option> "
$("#cboGrado").html(print)
}
})
.catch(err => console.log(err))
},
cargarGradoData(nombre) {
let json = {
parent: $("#cboNivel").val()
......@@ -813,15 +1233,15 @@
httpRequest.listarGrado(json)
.then((data) => {
if (data.status) {
var print = " <option value=''>[SELECCIONE]</option> "
var lista = data.results
for (var i in lista) {
let print = " <option value=''>[SELECCIONE]</option> "
let lista = data.results
for (let i in lista) {
let selected = capitalizeWords(nombre) === lista[i].nombreGrado ? "selected=true" : ""
print += " <option value ='" + lista[i].codigoGrado + "' " + " " + selected + " >" + lista[i].nombreGrado + "</option> "
}
$("#cboGrado").html(print)
} else {
var print = " <option value=''>No hay contenido</option> "
let print = " <option value=''>No hay contenido</option> "
$("#cboGrado").html(print)
}
})
......@@ -830,10 +1250,26 @@
}
const initComponents = {
init() {
this.listarUsuarios()
this.initTableComponents()
this.initAlfiValidate()
this.addMethodVal()
},
listarUsuarios() {
let visible = false
json = {}
if ($('#txtDni').val() !== "") {
if ($('#txtDni').val() !== "" && $('#cboTipoBusqueda').val() === '1') {
json.dniUsuario = $('#txtDni').val()
visible = false
} else if ($('#cboGradoBusqueda').val() !== "" && $('#cboTipoBusqueda').val() === '2') {
json.codigoGrado = $('#cboGradoBusqueda').val()
selectedGroup.nivelUsuario = $("#cboNivelBusqueda option:selected").text()
selectedGroup.gradoUsuario = $("#cboGradoBusqueda option:selected").text()
selectedGroup.codGradoUsuario = $("#cboGradoBusqueda").val()
visible = true
} else {
visible = false
}
tableUsuarios = $("#tblUsuarios").DataTable({
"language": {
......@@ -851,7 +1287,7 @@
"previous": "Anterior"
}
},
dom: '<"datatable-scroll"t> < "datatable-footers"ip > ',
dom: '<"datatable-scroll"t>r<"datatable-footers"ip>',
"ajax": {
type: 'POST',
url: "../UsuarioServlet?accion=listarUsuarios",
......@@ -868,17 +1304,27 @@
"bLengthChange": false,
"bInfo": true,
"paging": true,
"iDisplayLength": 20,
"iDisplayLength": visible ? 30 : 20,
"columnDefs": [
{targets: 0, orderable: false, width: "5%", className: "text-center"},
{targets: 1, orderable: false, width: "20%", className: "text-center"},
{targets: 2, orderable: false, width: "7%", className: "text-center"},
{targets: 3, orderable: false, width: "7%", className: "text-center"},
{targets: 4, orderable: false, width: "15%", className: "text-center"},
{targets: 5, orderable: false, width: "15%", className: "text-center"},
{targets: 6, orderable: false, width: "10%", className: "text-center"}
{targets: 0, orderable: false, width: "5%", className: "text-center", "visible": visible},
{targets: 1, orderable: false, width: "5%", className: "text-center"},
{targets: 2, orderable: false, width: "20%"},
{targets: 3, orderable: false, width: "15%", className: "text-center"},
{targets: 4, orderable: false, width: "10%", className: "text-center"},
{targets: 5, orderable: false, width: "15%"},
{targets: 6, orderable: false, width: "10%", className: "text-center"},
{targets: 7, orderable: false, width: "10%", className: "text-center"}
],
"columns": [
{'data': null, 'render': (data, type, row) => {
let checked = ''
if (selectedItem.includes(row.codigoUsuario.toString())) {
checked = 'checked'
checks++
}
return `<input type="checkbox" class="ckItem" value="${row.codigoUsuario}" ${checked}>`
}
},
{"data": "numeral"},
{"data": null, "render": (data, type, row) => {
return capitalizeWords(row.nombreUsuario + ' ' + row.apellidosUsuario);
......@@ -895,7 +1341,7 @@
}
},
{"data": null, "render": (data, type, row) => {
var actions = "";
let actions = "";
actions += `<span data-toggle="tooltip" data-placement="left" title="Editar" style="cursor: pointer"> <i class='editar click${row.numeral} icon-pencil text-blue-800'></i>&nbsp;&nbsp; </span>`
actions += `<span data-toggle="tooltip" data-placement="left" title="Asignar" style="cursor: pointer"> <i class='asignar icon-cog2 text-slate-700'></i>&nbsp;&nbsp; </span>`
actions += `<span data-toggle="tooltip" data-placement="left" title="Eliminar" style="cursor: pointer"> <i class='eliminar glyphicon glyphicon-trash text-danger-700'></i>&nbsp;&nbsp; </span>`
......@@ -908,6 +1354,66 @@
}
});
},
listarDetalle(json) {
tblDetalle = $("#tblDetalle").DataTable({
"language": {
"lengthMenu": "Mostrar: _MENU_",
"zeroRecords": "&nbsp;&nbsp;&nbsp; No se encontraron resultados",
"info": "&nbsp;&nbsp;&nbsp; Mostrando del _START_ al _END_ de un total de _TOTAL_ registros",
"infoEmpty": "&nbsp;&nbsp;&nbsp; Mostrando 0 de 0 registros",
"search": "Filtrar:",
"loadingRecords": "Cargando...",
"processing": '<span style="width:100%;"><img src="http://www.snacklocal.com/images/ajaxload.gif"></span>',
"paginate": {
"first": "First",
"last": "Last",
"next": "Siguiente",
"previous": "Anterior"
}
},
dom: '<"datatable-scroll"t>r<"datatable-footers"ip>',
"ajax": {
type: 'POST',
url: "../UsuarioServlet?accion=listarDetalle",
data: {
json: JSON.stringify(json)
}, beforeSend: (xhr) => {
elementLoader.iniciarLoader('bbxDetalle')
}
},
"bSort": false,
"bFilter": false,
"serverSide": true,
"processing": true,
"aaSorting": [],
"ordering": false,
"bLengthChange": false,
"bInfo": true,
"paging": true,
"iDisplayLength": 10,
"columnDefs": [
{targets: 0, orderable: false, width: "5%", className: "text-center"},
{targets: 1, orderable: false, width: "15%"},
{targets: 2, orderable: false, width: "15%"},
{targets: 3, orderable: false, width: "25%", className: "text-center"}
],
"columns": [
{"data": "numeral"},
{'data': 'nombreUsuario', render: (data, type, row) => {
return capitalizeWords(data)
}
},
{'data': 'apellidoUsuario', render: (data, type, row) => {
return capitalizeWords(data)
}
},
{'data': 'correoUsuario'}
],
fnDrawCallback: () => {
elementLoader.terminarLoader('bbxDetalle')
}
});
},
initAlfiValidate() {
new Input({el: '#txtDni2', param: 'numbers'}).validate()
new Input({el: '#txtApepat', param: 'letters'}).validate()
......@@ -916,6 +1422,13 @@
new Input({el: '#txtCorreo', param: 'email'}).validate()
new Input({el: '#txtDni', param: 'numbers'}).validate()
},
initTableComponents() {
$('#tblUsuarios').on('draw.dt', () => {
$('[data-toggle="tooltip"]').tooltip();
$('.ckItem, .ckTitle').uniform()
DOMEvents.checkedAll()
})
},
chargeDataBootbox(data) {
$('#cboRol').val(data.rolUsuario)
$('#cboTipo').val((data.tipoUsuario).toUpperCase())
......@@ -926,22 +1439,21 @@
$('#txtApepat').val(capitalizeWords(data.apepatUsuario))
$('#txApemat').val(capitalizeWords(data.apematUsuario))
$('#txtNombre').val(capitalizeWords(data.nombreUsuario))
},
addMethodVal() {
jQuery.validator.addMethod("selectnic", (value, element) => {
if (value === selectedGroup.codGradoUsuario) {
return false
}
return true
}, "<b>&times;</b>&nbsp; No puede seleccionar el mismo grado")
}
}
initialize = () => {
initComponents.listarUsuarios()
DOMEvents.nuevoUsuario()
DOMEvents.tblUsuariosEditar()
DOMEvents.tblUsuariosAsignar()
DOMEvents.tblUsuarioEliminar()
DOMEvents.tblUsuariosTooltip()
DOMEvents.tblUsuariosBuscar()
DOMEvents.tblUsuariosLimpiar()
initComponents.initAlfiValidate()
DOMEvents.autoClickSearch()
loader.iniciarLoader()
initComponents.init()
DOMEvents.init()
}
initialize()
\ No newline at end of file
initialize()
\ No newline at end of file
/* global Papa */
const DOMEvents = {
cargarCSV() {
$('#btnCargar').click(function () {
var archivo;
$('#filePrueba').parse({
header: true,
dynamicTyping: false,
encoding: "ISO-8859-1",
before: function (file) {
archivo = file;
}
});
Papa.parse(archivo, {
header: true,
dynamicTyping: false,
encoding: "ISO-8859-1",
complete: function (results) {
$('#txtJson').html(JSON.stringify(results.data, undefined, 2))
}
})
})
}
}
\ No newline at end of file
......@@ -34,12 +34,7 @@
<div class="media">
<div class="media-body media-middle">
<span class="media-heading text-semibold" style="font-size:15px">${capitalizeWords(datos)} </span>
</div>
<div class="media-right media-middle">
<ul class="icons-list">
<li><a class="logOut"><i class="fa fa-sign-out"></i></a></li>
</ul>
</div>
</div>
</div>`;
let banner2 = `<a class="dropdown-toggle" data-toggle="dropdown">
<img src="../img/${capitalizeWords(datos).charAt(0)}.jpg" alt="">
......
(function (a) {
if (typeof define === "function" && define.amd) {
define(["jquery"], a);
} else {
a(jQuery);
}
})(function (a) {
a.ui = a.ui || {};
var b = a.ui.version = "1.12.1";
(function () {
var b, c = Math.max, d = Math.abs, e = /left|center|right/, f = /top|center|bottom/, g = /[\+\-]\d+(\.[\d]+)?%?/, h = /^\w+/, i = /%$/, j = a.fn.pos;
function k(a, b, c) {
return [parseFloat(a[0]) * (i.test(a[0]) ? b / 100 : 1), parseFloat(a[1]) * (i.test(a[1]) ? c / 100 : 1)];
}
function l(b, c) {
return parseInt(a.css(b, c), 10) || 0;
}
function m(b) {
var c = b[0];
if (c.nodeType === 9) {
return {
width: b.width(),
height: b.height(),
offset: {
top: 0,
left: 0
}
};
}
if (a.isWindow(c)) {
return {
width: b.width(),
height: b.height(),
offset: {
top: b.scrollTop(),
left: b.scrollLeft()
}
};
}
if (c.preventDefault) {
return {
width: 0,
height: 0,
offset: {
top: c.pageY,
left: c.pageX
}
};
}
return {
width: b.outerWidth(),
height: b.outerHeight(),
offset: b.offset()
};
}
a.pos = {
scrollbarWidth: function () {
if (b !== undefined) {
return b;
}
var c, d, e = a("<div " + "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + "<div style='height:100px;width:auto;'></div></div>"), f = e.children()[0];
a("body").append(e);
c = f.offsetWidth;
e.css("overflow", "scroll");
d = f.offsetWidth;
if (c === d) {
d = e[0].clientWidth;
}
e.remove();
return b = c - d;
},
getScrollInfo: function (b) {
var c = b.isWindow || b.isDocument ? "" : b.element.css("overflow-x"), d = b.isWindow || b.isDocument ? "" : b.element.css("overflow-y"), e = c === "scroll" || c === "auto" && b.width < b.element[0].scrollWidth, f = d === "scroll" || d === "auto" && b.height < b.element[0].scrollHeight;
return {
width: f ? a.pos.scrollbarWidth() : 0,
height: e ? a.pos.scrollbarWidth() : 0
};
},
getWithinInfo: function (b) {
var c = a(b || window), d = a.isWindow(c[0]), e = !!c[0] && c[0].nodeType === 9, f = !d && !e;
return {
element: c,
isWindow: d,
isDocument: e,
offset: f ? a(b).offset() : {
left: 0,
top: 0
},
scrollLeft: c.scrollLeft(),
scrollTop: c.scrollTop(),
width: c.outerWidth(),
height: c.outerHeight()
};
}
};
a.fn.pos = function (b) {
if (!b || !b.of) {
return j.apply(this, arguments);
}
b = a.extend({}, b);
var i, n, o, p, q, r, s = a(b.of), t = a.pos.getWithinInfo(b.within), u = a.pos.getScrollInfo(t), v = (b.collision || "flip").split(" "), w = {};
r = m(s);
if (s[0].preventDefault) {
b.at = "left top";
}
n = r.width;
o = r.height;
p = r.offset;
q = a.extend({}, p);
a.each(["my", "at"], function () {
var a = (b[this] || "").split(" "), c, d;
if (a.length === 1) {
a = e.test(a[0]) ? a.concat(["center"]) : f.test(a[0]) ? ["center"].concat(a) : ["center", "center"];
}
a[0] = e.test(a[0]) ? a[0] : "center";
a[1] = f.test(a[1]) ? a[1] : "center";
c = g.exec(a[0]);
d = g.exec(a[1]);
w[this] = [c ? c[0] : 0, d ? d[0] : 0];
b[this] = [h.exec(a[0])[0], h.exec(a[1])[0]];
});
if (v.length === 1) {
v[1] = v[0];
}
if (b.at[0] === "right") {
q.left += n;
} else if (b.at[0] === "center") {
q.left += n / 2;
}
if (b.at[1] === "bottom") {
q.top += o;
} else if (b.at[1] === "center") {
q.top += o / 2;
}
i = k(w.at, n, o);
q.left += i[0];
q.top += i[1];
return this.each(function () {
var e, f, g = a(this), h = g.outerWidth(), j = g.outerHeight(), m = l(this, "marginLeft"), r = l(this, "marginTop"), x = h + m + l(this, "marginRight") + u.width, y = j + r + l(this, "marginBottom") + u.height, z = a.extend({}, q), A = k(w.my, g.outerWidth(), g.outerHeight());
if (b.my[0] === "right") {
z.left -= h;
} else if (b.my[0] === "center") {
z.left -= h / 2;
}
if (b.my[1] === "bottom") {
z.top -= j;
} else if (b.my[1] === "center") {
z.top -= j / 2;
}
z.left += A[0];
z.top += A[1];
e = {
marginLeft: m,
marginTop: r
};
a.each(["left", "top"], function (c, d) {
if (a.ui.pos[v[c]]) {
a.ui.pos[v[c]][d](z, {
targetWidth: n,
targetHeight: o,
elemWidth: h,
elemHeight: j,
collisionPosition: e,
collisionWidth: x,
collisionHeight: y,
offset: [i[0] + A[0], i[1] + A[1]],
my: b.my,
at: b.at,
within: t,
elem: g
});
}
});
if (b.using) {
f = function (a) {
var e = p.left - z.left, f = e + n - h, i = p.top - z.top, k = i + o - j, l = {
target: {
element: s,
left: p.left,
top: p.top,
width: n,
height: o
},
element: {
element: g,
left: z.left,
top: z.top,
width: h,
height: j
},
horizontal: f < 0 ? "left" : e > 0 ? "right" : "center",
vertical: k < 0 ? "top" : i > 0 ? "bottom" : "middle"
};
if (n < h && d(e + f) < n) {
l.horizontal = "center";
}
if (o < j && d(i + k) < o) {
l.vertical = "middle";
}
if (c(d(e), d(f)) > c(d(i), d(k))) {
l.important = "horizontal";
} else {
l.important = "vertical";
}
b.using.call(this, a, l);
};
}
g.offset(a.extend(z, {
using: f
}));
});
};
a.ui.pos = {
_trigger: function (a, b, c, d) {
if (b.elem) {
b.elem.trigger({
type: c,
position: a,
positionData: b,
triggered: d
});
}
},
fit: {
left: function (b, d) {
a.ui.pos._trigger(b, d, "posCollide", "fitLeft");
var e = d.within, f = e.isWindow ? e.scrollLeft : e.offset.left, g = e.width, h = b.left - d.collisionPosition.marginLeft, i = f - h, j = h + d.collisionWidth - g - f, k;
if (d.collisionWidth > g) {
if (i > 0 && j <= 0) {
k = b.left + i + d.collisionWidth - g - f;
b.left += i - k;
} else if (j > 0 && i <= 0) {
b.left = f;
} else {
if (i > j) {
b.left = f + g - d.collisionWidth;
} else {
b.left = f;
}
}
} else if (i > 0) {
b.left += i;
} else if (j > 0) {
b.left -= j;
} else {
b.left = c(b.left - h, b.left);
}
a.ui.pos._trigger(b, d, "posCollided", "fitLeft");
},
top: function (b, d) {
a.ui.pos._trigger(b, d, "posCollide", "fitTop");
var e = d.within, f = e.isWindow ? e.scrollTop : e.offset.top, g = d.within.height, h = b.top - d.collisionPosition.marginTop, i = f - h, j = h + d.collisionHeight - g - f, k;
if (d.collisionHeight > g) {
if (i > 0 && j <= 0) {
k = b.top + i + d.collisionHeight - g - f;
b.top += i - k;
} else if (j > 0 && i <= 0) {
b.top = f;
} else {
if (i > j) {
b.top = f + g - d.collisionHeight;
} else {
b.top = f;
}
}
} else if (i > 0) {
b.top += i;
} else if (j > 0) {
b.top -= j;
} else {
b.top = c(b.top - h, b.top);
}
a.ui.pos._trigger(b, d, "posCollided", "fitTop");
}
},
flip: {
left: function (b, c) {
a.ui.pos._trigger(b, c, "posCollide", "flipLeft");
var e = c.within, f = e.offset.left + e.scrollLeft, g = e.width, h = e.isWindow ? e.scrollLeft : e.offset.left, i = b.left - c.collisionPosition.marginLeft, j = i - h, k = i + c.collisionWidth - g - h, l = c.my[0] === "left" ? -c.elemWidth : c.my[0] === "right" ? c.elemWidth : 0, m = c.at[0] === "left" ? c.targetWidth : c.at[0] === "right" ? -c.targetWidth : 0, n = -2 * c.offset[0], o, p;
if (j < 0) {
o = b.left + l + m + n + c.collisionWidth - g - f;
if (o < 0 || o < d(j)) {
b.left += l + m + n;
}
} else if (k > 0) {
p = b.left - c.collisionPosition.marginLeft + l + m + n - h;
if (p > 0 || d(p) < k) {
b.left += l + m + n;
}
}
a.ui.pos._trigger(b, c, "posCollided", "flipLeft");
},
top: function (b, c) {
a.ui.pos._trigger(b, c, "posCollide", "flipTop");
var e = c.within, f = e.offset.top + e.scrollTop, g = e.height, h = e.isWindow ? e.scrollTop : e.offset.top, i = b.top - c.collisionPosition.marginTop, j = i - h, k = i + c.collisionHeight - g - h, l = c.my[1] === "top", m = l ? -c.elemHeight : c.my[1] === "bottom" ? c.elemHeight : 0, n = c.at[1] === "top" ? c.targetHeight : c.at[1] === "bottom" ? -c.targetHeight : 0, o = -2 * c.offset[1], p, q;
if (j < 0) {
q = b.top + m + n + o + c.collisionHeight - g - f;
if (q < 0 || q < d(j)) {
b.top += m + n + o;
}
} else if (k > 0) {
p = b.top - c.collisionPosition.marginTop + m + n + o - h;
if (p > 0 || d(p) < k) {
b.top += m + n + o;
}
}
a.ui.pos._trigger(b, c, "posCollided", "flipTop");
}
},
flipfit: {
left: function () {
a.ui.pos.flip.left.apply(this, arguments);
a.ui.pos.fit.left.apply(this, arguments);
},
top: function () {
a.ui.pos.flip.top.apply(this, arguments);
a.ui.pos.fit.top.apply(this, arguments);
}
}
};
(function () {
var b, c, d, e, f, g = document.getElementsByTagName("body")[0], h = document.createElement("div");
b = document.createElement(g ? "div" : "body");
d = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
margin: 0,
background: "none"
};
if (g) {
a.extend(d, {
position: "absolute",
left: "-1000px",
top: "-1000px"
});
}
for (f in d) {
b.style[f] = d[f];
}
b.appendChild(h);
c = g || document.documentElement;
c.insertBefore(b, c.firstChild);
h.style.cssText = "position: absolute; left: 10.7432222px;";
e = a(h).offset().left;
a.support.offsetFractions = e > 10 && e < 11;
b.innerHTML = "";
c.removeChild(b);
})();
})();
var c = a.ui.position;
});
(function (a) {
"use strict";
if (typeof define === "function" && define.amd) {
define(["jquery"], a);
} else if (window.jQuery && !window.jQuery.fn.iconpicker) {
a(window.jQuery);
}
})(function (a) {
"use strict";
var b = {
isEmpty: function (a) {
return a === false || a === "" || a === null || a === undefined;
},
isEmptyObject: function (a) {
return this.isEmpty(a) === true || a.length === 0;
},
isElement: function (b) {
return a(b).length > 0;
},
isString: function (a) {
return typeof a === "string" || a instanceof String;
},
isArray: function (b) {
return a.isArray(b);
},
inArray: function (b, c) {
return a.inArray(b, c) !== -1;
},
throwError: function (a) {
throw "Font Awesome Icon Picker Exception: " + a;
}
};
var c = function (d, e) {
this._id = c._idCounter++;
this.element = a(d).addClass("iconpicker-element");
this._trigger("iconpickerCreate");
this.options = a.extend({}, c.defaultOptions, this.element.data(), e);
this.options.templates = a.extend({}, c.defaultOptions.templates, this.options.templates);
this.options.originalPlacement = this.options.placement;
this.container = b.isElement(this.options.container) ? a(this.options.container) : false;
if (this.container === false) {
if (this.element.is(".dropdown-toggle")) {
this.container = a("~ .dropdown-menu:first", this.element);
} else {
this.container = this.element.is("input,textarea,button,.btn") ? this.element.parent() : this.element;
}
}
this.container.addClass("iconpicker-container");
if (this.isDropdownMenu()) {
this.options.templates.search = false;
this.options.templates.buttons = false;
this.options.placement = "inline";
}
this.input = this.element.is("input,textarea") ? this.element.addClass("iconpicker-input") : false;
if (this.input === false) {
this.input = this.container.find(this.options.input);
if (!this.input.is("input,textarea")) {
this.input = false;
}
}
this.component = this.isDropdownMenu() ? this.container.parent().find(this.options.component) : this.container.find(this.options.component);
if (this.component.length === 0) {
this.component = false;
} else {
this.component.find("i").addClass("iconpicker-component");
}
this._createPopover();
this._createIconpicker();
if (this.getAcceptButton().length === 0) {
this.options.mustAccept = false;
}
if (this.isInputGroup()) {
this.container.parent().append(this.popover);
} else {
this.container.append(this.popover);
}
this._bindElementEvents();
this._bindWindowEvents();
this.update(this.options.selected);
if (this.isInline()) {
this.show();
}
this._trigger("iconpickerCreated");
};
c._idCounter = 0;
c.defaultOptions = {
title: false,
selected: false,
defaultValue: false,
placement: "bottom",
collision: "none",
animation: true,
hideOnSelect: false,
showFooter: false,
searchInFooter: false,
mustAccept: false,
selectedCustomClass: "bg-primary",
icons: [],
fullClassFormatter: function (a) {
return "fa " + a;
},
input: "input,.iconpicker-input",
inputSearch: false,
container: false,
component: ".input-group-addon,.iconpicker-component",
templates: {
popover: '<div class="iconpicker-popover popover"><div class="arrow"></div>' + '<div class="popover-title"></div><div class="popover-content"></div></div>',
footer: '<div class="popover-footer"></div>',
buttons: '<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button>' + ' <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',
search: '<input type="search" class="form-control iconpicker-search"/>',
iconpicker: '<div class="iconpicker"><div class="iconpicker-items"></div></div>',
iconpickerItem: '<a role="button" href="#" class="iconpicker-item fa-2x"><i></i></a>'
}
};
c.batch = function (b, c) {
var d = Array.prototype.slice.call(arguments, 2);
return a(b).each(function () {
var b = a(this).data("iconpicker");
if (!!b) {
b[c].apply(b, d);
}
});
};
c.prototype = {
constructor: c,
options: {},
_id: 0,
_trigger: function (b, c) {
c = c || {};
this.element.trigger(a.extend({
type: b,
iconpickerInstance: this
}, c));
},
_createPopover: function () {
this.popover = a(this.options.templates.popover);
var c = this.popover.find(".popover-title");
if (!!this.options.title) {
c.append(a('<div class="popover-title-text">' + this.options.title + "</div>"));
}
if (this.hasSeparatedSearchInput() && !this.options.searchInFooter) {
c.append(this.options.templates.search);
} else if (!this.options.title) {
c.remove();
}
if (this.options.showFooter && !b.isEmpty(this.options.templates.footer)) {
var d = a(this.options.templates.footer);
if (this.hasSeparatedSearchInput() && this.options.searchInFooter) {
d.append(a(this.options.templates.search));
}
if (!b.isEmpty(this.options.templates.buttons)) {
d.append(a(this.options.templates.buttons));
}
this.popover.append(d);
}
if (this.options.animation === true) {
this.popover.addClass("fade");
}
return this.popover;
},
_createIconpicker: function () {
var b = this;
this.iconpicker = a(this.options.templates.iconpicker);
var c = function (c) {
var d = a(this);
if (d.is("i")) {
d = d.parent();
}
b._trigger("iconpickerSelect", {
iconpickerItem: d,
iconpickerValue: b.iconpickerValue
});
if (b.options.mustAccept === false) {
b.update(d.data("iconpickerValue"));
b._trigger("iconpickerSelected", {
iconpickerItem: this,
iconpickerValue: b.iconpickerValue
});
} else {
b.update(d.data("iconpickerValue"), true);
}
if (b.options.hideOnSelect && b.options.mustAccept === false) {
b.hide();
}
c.preventDefault();
return false;
};
for (var d in this.options.icons) {
if (typeof this.options.icons[d] === "string") {
var e = a(this.options.templates.iconpickerItem);
e.find("i").addClass(this.options.fullClassFormatter(this.options.icons[d]));
e.data("iconpickerValue", this.options.icons[d]).on("click.iconpicker", c);
this.iconpicker.find(".iconpicker-items").append(e.attr("title", "." + this.options.icons[d]));
}
}
this.popover.find(".popover-content").append(this.iconpicker);
return this.iconpicker;
},
_isEventInsideIconpicker: function (b) {
var c = a(b.target);
if ((!c.hasClass("iconpicker-element") || c.hasClass("iconpicker-element") && !c.is(this.element)) && c.parents(".iconpicker-popover").length === 0) {
return false;
}
return true;
},
_bindElementEvents: function () {
var c = this;
this.getSearchInput().on("keyup.iconpicker", function () {
c.filter(a(this).val().toLowerCase());
});
this.getAcceptButton().on("click.iconpicker", function () {
var a = c.iconpicker.find(".iconpicker-selected").get(0);
c.update(c.iconpickerValue);
c._trigger("iconpickerSelected", {
iconpickerItem: a,
iconpickerValue: c.iconpickerValue
});
if (!c.isInline()) {
c.hide();
}
});
this.getCancelButton().on("click.iconpicker", function () {
if (!c.isInline()) {
c.hide();
}
});
this.element.on("focus.iconpicker", function (a) {
c.show();
a.stopPropagation();
});
if (this.hasComponent()) {
this.component.on("click.iconpicker", function () {
c.toggle();
});
}
if (this.hasInput()) {
this.input.on("keyup.iconpicker", function (d) {
if (!b.inArray(d.keyCode, [38, 40, 37, 39, 16, 17, 18, 9, 8, 91, 93, 20, 46, 186, 190, 46, 78, 188, 44, 86])) {
c.update();
} else {
c._updateFormGroupStatus(c.getValid(this.value) !== false);
}
if (c.options.inputSearch === true) {
c.filter(a(this).val().toLowerCase());
}
});
}
},
_bindWindowEvents: function () {
var b = a(window.document);
var c = this;
var d = ".iconpicker.inst" + this._id;
a(window).on("resize.iconpicker" + d + " orientationchange.iconpicker" + d, function (a) {
if (c.popover.hasClass("in")) {
c.updatePlacement();
}
});
if (!c.isInline()) {
b.on("mouseup" + d, function (a) {
if (!c._isEventInsideIconpicker(a) && !c.isInline()) {
c.hide();
}
a.stopPropagation();
a.preventDefault();
return false;
});
}
return false;
},
_unbindElementEvents: function () {
this.popover.off(".iconpicker");
this.element.off(".iconpicker");
if (this.hasInput()) {
this.input.off(".iconpicker");
}
if (this.hasComponent()) {
this.component.off(".iconpicker");
}
if (this.hasContainer()) {
this.container.off(".iconpicker");
}
},
_unbindWindowEvents: function () {
a(window).off(".iconpicker.inst" + this._id);
a(window.document).off(".iconpicker.inst" + this._id);
},
updatePlacement: function (b, c) {
b = b || this.options.placement;
this.options.placement = b;
c = c || this.options.collision;
c = c === true ? "flip" : c;
var d = {
at: "right bottom",
my: "right top",
of: this.hasInput() && !this.isInputGroup() ? this.input : this.container,
collision: c === true ? "flip" : c,
within: window
};
this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner " + "rightTop right rightBottom bottomRight bottomRightCorner " + "bottom bottomLeft bottomLeftCorner leftBottom left leftTop");
if (typeof b === "object") {
return this.popover.pos(a.extend({}, d, b));
}
switch (b) {
case "inline":
{
d = false;
}
break;
case "topLeftCorner":
{
d.my = "right bottom";
d.at = "left top";
}
break;
case "topLeft":
{
d.my = "left bottom";
d.at = "left top";
}
break;
case "top":
{
d.my = "center bottom";
d.at = "center top";
}
break;
case "topRight":
{
d.my = "right bottom";
d.at = "right top";
}
break;
case "topRightCorner":
{
d.my = "left bottom";
d.at = "right top";
}
break;
case "rightTop":
{
d.my = "left bottom";
d.at = "right center";
}
break;
case "right":
{
d.my = "left center";
d.at = "right center";
}
break;
case "rightBottom":
{
d.my = "left top";
d.at = "right center";
}
break;
case "bottomRightCorner":
{
d.my = "left top";
d.at = "right bottom";
}
break;
case "bottomRight":
{
d.my = "right top";
d.at = "right bottom";
}
break;
case "bottom":
{
d.my = "center top";
d.at = "center bottom";
}
break;
case "bottomLeft":
{
d.my = "left top";
d.at = "left bottom";
}
break;
case "bottomLeftCorner":
{
d.my = "right top";
d.at = "left bottom";
}
break;
case "leftBottom":
{
d.my = "right top";
d.at = "left center";
}
break;
case "left":
{
d.my = "right center";
d.at = "left center";
}
break;
case "leftTop":
{
d.my = "right bottom";
d.at = "left center";
}
break;
default:
{
return false;
}
break;
}
this.popover.css({
display: this.options.placement === "inline" ? "" : "block"
});
if (d !== false) {
this.popover.pos(d).css("maxWidth", a(window).width() - this.container.offset().left - 5);
} else {
this.popover.css({
top: "auto",
right: "auto",
bottom: "auto",
left: "auto",
maxWidth: "none"
});
}
this.popover.addClass(this.options.placement);
return true;
},
_updateComponents: function () {
this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected " + this.options.selectedCustomClass);
if (this.iconpickerValue) {
this.iconpicker.find("." + this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g, ".")).parent().addClass("iconpicker-selected " + this.options.selectedCustomClass);
}
if (this.hasComponent()) {
var a = this.component.find("i");
if (a.length > 0) {
a.attr("class", this.options.fullClassFormatter(this.iconpickerValue));
} else {
this.component.html(this.getHtml());
}
}
},
_updateFormGroupStatus: function (a) {
if (this.hasInput()) {
if (a !== false) {
this.input.parents(".form-group:first").removeClass("has-error");
} else {
this.input.parents(".form-group:first").addClass("has-error");
}
return true;
}
return false;
},
getValid: function (c) {
if (!b.isString(c)) {
c = "";
}
var d = c === "";
c = a.trim(c);
if (b.inArray(c, this.options.icons) || d) {
return c;
}
return false;
},
setValue: function (a) {
var b = this.getValid(a);
if (b !== false) {
this.iconpickerValue = b;
this._trigger("iconpickerSetValue", {
iconpickerValue: b
});
return this.iconpickerValue;
} else {
this._trigger("iconpickerInvalid", {
iconpickerValue: a
});
return false;
}
},
getHtml: function () {
return '<i class="' + this.options.fullClassFormatter(this.iconpickerValue) + '"></i>';
},
setSourceValue: function (a) {
a = this.setValue(a);
if (a !== false && a !== "") {
if (this.hasInput()) {
this.input.val(this.iconpickerValue);
} else {
this.element.data("iconpickerValue", this.iconpickerValue);
}
this._trigger("iconpickerSetSourceValue", {
iconpickerValue: a
});
}
return a;
},
getSourceValue: function (a) {
a = a || this.options.defaultValue;
var b = a;
if (this.hasInput()) {
b = this.input.val();
} else {
b = this.element.data("iconpickerValue");
}
if (b === undefined || b === "" || b === null || b === false) {
b = a;
}
return b;
},
hasInput: function () {
return this.input !== false;
},
isInputSearch: function () {
return this.hasInput() && this.options.inputSearch === true;
},
isInputGroup: function () {
return this.container.is(".input-group");
},
isDropdownMenu: function () {
return this.container.is(".dropdown-menu");
},
hasSeparatedSearchInput: function () {
return this.options.templates.search !== false && !this.isInputSearch();
},
hasComponent: function () {
return this.component !== false;
},
hasContainer: function () {
return this.container !== false;
},
getAcceptButton: function () {
return this.popover.find(".iconpicker-btn-accept");
},
getCancelButton: function () {
return this.popover.find(".iconpicker-btn-cancel");
},
getSearchInput: function () {
return this.popover.find(".iconpicker-search");
},
filter: function (c) {
if (b.isEmpty(c)) {
this.iconpicker.find(".iconpicker-item").show();
return a(false);
} else {
var d = [];
this.iconpicker.find(".iconpicker-item").each(function () {
var b = a(this);
var e = b.attr("title").toLowerCase();
var f = false;
try {
f = new RegExp(c, "g");
} catch (a) {
f = false;
}
if (f !== false && e.match(f)) {
d.push(b);
b.show();
} else {
b.hide();
}
});
return d;
}
},
show: function () {
if (this.popover.hasClass("in")) {
return false;
}
a.iconpicker.batch(a(".iconpicker-popover.in:not(.inline)").not(this.popover), "hide");
this._trigger("iconpickerShow");
this.updatePlacement();
this.popover.addClass("in");
setTimeout(a.proxy(function () {
this.popover.css("display", this.isInline() ? "" : "block");
this._trigger("iconpickerShown");
}, this), this.options.animation ? 300 : 1);
$('.iconpicker-search').focus();
},
hide: function () {
if (!this.popover.hasClass("in")) {
return false;
}
this._trigger("iconpickerHide");
this.popover.removeClass("in");
setTimeout(a.proxy(function () {
this.popover.css("display", "none");
this.getSearchInput().val("");
this.filter("");
this._trigger("iconpickerHidden");
}, this), this.options.animation ? 300 : 1);
},
toggle: function () {
if (this.popover.is(":visible")) {
this.hide();
} else {
this.show(true);
}
},
update: function (a, b) {
a = a ? a : this.getSourceValue(this.iconpickerValue);
this._trigger("iconpickerUpdate");
if (b === true) {
a = this.setValue(a);
} else {
a = this.setSourceValue(a);
this._updateFormGroupStatus(a !== false);
}
if (a !== false) {
this._updateComponents();
}
this._trigger("iconpickerUpdated");
return a;
},
destroy: function () {
this._trigger("iconpickerDestroy");
this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element");
this._unbindElementEvents();
this._unbindWindowEvents();
a(this.popover).remove();
this._trigger("iconpickerDestroyed");
},
disable: function () {
if (this.hasInput()) {
this.input.prop("disabled", true);
return true;
}
return false;
},
enable: function () {
if (this.hasInput()) {
this.input.prop("disabled", false);
return true;
}
return false;
},
isDisabled: function () {
if (this.hasInput()) {
return this.input.prop("disabled") === true;
}
return false;
},
isInline: function () {
return this.options.placement === "inline" || this.popover.hasClass("inline");
}
};
a.iconpicker = c;
a.fn.iconpicker = function (b) {
return this.each(function () {
var d = a(this);
if (!d.data("iconpicker")) {
d.data("iconpicker", new c(this, typeof b === "object" ? b : {}));
}
});
};
c.defaultOptions.icons = ["fa-500px", "fa-address-book", "fa-address-book-o", "fa-address-card", "fa-address-card-o", "fa-adjust", "fa-adn", "fa-align-center", "fa-align-justify", "fa-align-left", "fa-align-right", "fa-amazon", "fa-ambulance", "fa-american-sign-language-interpreting", "fa-anchor", "fa-android", "fa-angellist", "fa-angle-double-down", "fa-angle-double-left", "fa-angle-double-right", "fa-angle-double-up", "fa-angle-down", "fa-angle-left", "fa-angle-right", "fa-angle-up", "fa-apple", "fa-archive", "fa-area-chart", "fa-arrow-circle-down", "fa-arrow-circle-left", "fa-arrow-circle-o-down", "fa-arrow-circle-o-left", "fa-arrow-circle-o-right", "fa-arrow-circle-o-up", "fa-arrow-circle-right", "fa-arrow-circle-up", "fa-arrow-down", "fa-arrow-left", "fa-arrow-right", "fa-arrow-up", "fa-arrows", "fa-arrows-alt", "fa-arrows-h", "fa-arrows-v", "fa-asl-interpreting", "fa-assistive-listening-systems", "fa-asterisk", "fa-at", "fa-audio-description", "fa-automobile", "fa-backward", "fa-balance-scale", "fa-ban", "fa-bandcamp", "fa-bank", "fa-bar-chart", "fa-bar-chart-o", "fa-barcode", "fa-bars", "fa-bath", "fa-bathtub", "fa-battery", "fa-battery-0", "fa-battery-1", "fa-battery-2", "fa-battery-3", "fa-battery-4", "fa-battery-empty", "fa-battery-full", "fa-battery-half", "fa-battery-quarter", "fa-battery-three-quarters", "fa-bed", "fa-beer", "fa-behance", "fa-behance-square", "fa-bell", "fa-bell-o", "fa-bell-slash", "fa-bell-slash-o", "fa-bicycle", "fa-binoculars", "fa-birthday-cake", "fa-bitbucket", "fa-bitbucket-square", "fa-bitcoin", "fa-black-tie", "fa-blind", "fa-bluetooth", "fa-bluetooth-b", "fa-bold", "fa-bolt", "fa-bomb", "fa-book", "fa-bookmark", "fa-bookmark-o", "fa-braille", "fa-briefcase", "fa-btc", "fa-bug", "fa-building", "fa-building-o", "fa-bullhorn", "fa-bullseye", "fa-bus", "fa-buysellads", "fa-cab", "fa-calculator", "fa-calendar", "fa-calendar-check-o", "fa-calendar-minus-o", "fa-calendar-o", "fa-calendar-plus-o", "fa-calendar-times-o", "fa-camera", "fa-camera-retro", "fa-car", "fa-caret-down", "fa-caret-left", "fa-caret-right", "fa-caret-square-o-down", "fa-caret-square-o-left", "fa-caret-square-o-right", "fa-caret-square-o-up", "fa-caret-up", "fa-cart-arrow-down", "fa-cart-plus", "fa-cc", "fa-cc-amex", "fa-cc-diners-club", "fa-cc-discover", "fa-cc-jcb", "fa-cc-mastercard", "fa-cc-paypal", "fa-cc-stripe", "fa-cc-visa", "fa-certificate", "fa-chain", "fa-chain-broken", "fa-check", "fa-check-circle", "fa-check-circle-o", "fa-check-square", "fa-check-square-o", "fa-chevron-circle-down", "fa-chevron-circle-left", "fa-chevron-circle-right", "fa-chevron-circle-up", "fa-chevron-down", "fa-chevron-left", "fa-chevron-right", "fa-chevron-up", "fa-child", "fa-chrome", "fa-circle", "fa-circle-o", "fa-circle-o-notch", "fa-circle-thin", "fa-clipboard", "fa-clock-o", "fa-clone", "fa-close", "fa-cloud", "fa-cloud-download", "fa-cloud-upload", "fa-cny", "fa-code", "fa-code-fork", "fa-codepen", "fa-codiepie", "fa-coffee", "fa-cog", "fa-cogs", "fa-columns", "fa-comment", "fa-comment-o", "fa-commenting", "fa-commenting-o", "fa-comments", "fa-comments-o", "fa-compass", "fa-compress", "fa-connectdevelop", "fa-contao", "fa-copy", "fa-copyright", "fa-creative-commons", "fa-credit-card", "fa-credit-card-alt", "fa-crop", "fa-crosshairs", "fa-css3", "fa-cube", "fa-cubes", "fa-cut", "fa-cutlery", "fa-dashboard", "fa-dashcube", "fa-database", "fa-deaf", "fa-deafness", "fa-dedent", "fa-delicious", "fa-desktop", "fa-deviantart", "fa-diamond", "fa-digg", "fa-dollar", "fa-dot-circle-o", "fa-download", "fa-dribbble", "fa-drivers-license", "fa-drivers-license-o", "fa-dropbox", "fa-drupal", "fa-edge", "fa-edit", "fa-eercast", "fa-eject", "fa-ellipsis-h", "fa-ellipsis-v", "fa-empire", "fa-envelope", "fa-envelope-o", "fa-envelope-open", "fa-envelope-open-o", "fa-envelope-square", "fa-envira", "fa-eraser", "fa-etsy", "fa-eur", "fa-euro", "fa-exchange", "fa-exclamation", "fa-exclamation-circle", "fa-exclamation-triangle", "fa-expand", "fa-expeditedssl", "fa-external-link", "fa-external-link-square", "fa-eye", "fa-eye-slash", "fa-eyedropper", "fa-fa", "fa-facebook", "fa-facebook-f", "fa-facebook-official", "fa-facebook-square", "fa-fast-backward", "fa-fast-forward", "fa-fax", "fa-feed", "fa-female", "fa-fighter-jet", "fa-file", "fa-file-archive-o", "fa-file-audio-o", "fa-file-code-o", "fa-file-excel-o", "fa-file-image-o", "fa-file-movie-o", "fa-file-o", "fa-file-pdf-o", "fa-file-photo-o", "fa-file-picture-o", "fa-file-powerpoint-o", "fa-file-sound-o", "fa-file-text", "fa-file-text-o", "fa-file-video-o", "fa-file-word-o", "fa-file-zip-o", "fa-files-o", "fa-film", "fa-filter", "fa-fire", "fa-fire-extinguisher", "fa-firefox", "fa-first-order", "fa-flag", "fa-flag-checkered", "fa-flag-o", "fa-flash", "fa-flask", "fa-flickr", "fa-floppy-o", "fa-folder", "fa-folder-o", "fa-folder-open", "fa-folder-open-o", "fa-font", "fa-font-awesome", "fa-fonticons", "fa-fort-awesome", "fa-forumbee", "fa-forward", "fa-foursquare", "fa-free-code-camp", "fa-frown-o", "fa-futbol-o", "fa-gamepad", "fa-gavel", "fa-gbp", "fa-ge", "fa-gear", "fa-gears", "fa-genderless", "fa-get-pocket", "fa-gg", "fa-gg-circle", "fa-gift", "fa-git", "fa-git-square", "fa-github", "fa-github-alt", "fa-github-square", "fa-gitlab", "fa-gittip", "fa-glass", "fa-glide", "fa-glide-g", "fa-globe", "fa-google", "fa-google-plus", "fa-google-plus-circle", "fa-google-plus-official", "fa-google-plus-square", "fa-google-wallet", "fa-graduation-cap", "fa-gratipay", "fa-grav", "fa-group", "fa-h-square", "fa-hacker-news", "fa-hand-grab-o", "fa-hand-lizard-o", "fa-hand-o-down", "fa-hand-o-left", "fa-hand-o-right", "fa-hand-o-up", "fa-hand-paper-o", "fa-hand-peace-o", "fa-hand-pointer-o", "fa-hand-rock-o", "fa-hand-scissors-o", "fa-hand-spock-o", "fa-hand-stop-o", "fa-handshake-o", "fa-hard-of-hearing", "fa-hashtag", "fa-hdd-o", "fa-header", "fa-headphones", "fa-heart", "fa-heart-o", "fa-heartbeat", "fa-history", "fa-home", "fa-hospital-o", "fa-hotel", "fa-hourglass", "fa-hourglass-1", "fa-hourglass-2", "fa-hourglass-3", "fa-hourglass-end", "fa-hourglass-half", "fa-hourglass-o", "fa-hourglass-start", "fa-houzz", "fa-html5", "fa-i-cursor", "fa-id-badge", "fa-id-card", "fa-id-card-o", "fa-ils", "fa-image", "fa-imdb", "fa-inbox", "fa-indent", "fa-industry", "fa-info", "fa-info-circle", "fa-inr", "fa-instagram", "fa-institution", "fa-internet-explorer", "fa-intersex", "fa-ioxhost", "fa-italic", "fa-joomla", "fa-jpy", "fa-jsfiddle", "fa-key", "fa-keyboard-o", "fa-krw", "fa-language", "fa-laptop", "fa-lastfm", "fa-lastfm-square", "fa-leaf", "fa-leanpub", "fa-legal", "fa-lemon-o", "fa-level-down", "fa-level-up", "fa-life-bouy", "fa-life-buoy", "fa-life-ring", "fa-life-saver", "fa-lightbulb-o", "fa-line-chart", "fa-link", "fa-linkedin", "fa-linkedin-square", "fa-linode", "fa-linux", "fa-list", "fa-list-alt", "fa-list-ol", "fa-list-ul", "fa-location-arrow", "fa-lock", "fa-long-arrow-down", "fa-long-arrow-left", "fa-long-arrow-right", "fa-long-arrow-up", "fa-low-vision", "fa-magic", "fa-magnet", "fa-mail-forward", "fa-mail-reply", "fa-mail-reply-all", "fa-male", "fa-map", "fa-map-marker", "fa-map-o", "fa-map-pin", "fa-map-signs", "fa-mars", "fa-mars-double", "fa-mars-stroke", "fa-mars-stroke-h", "fa-mars-stroke-v", "fa-maxcdn", "fa-meanpath", "fa-medium", "fa-medkit", "fa-meetup", "fa-meh-o", "fa-mercury", "fa-microchip", "fa-microphone", "fa-microphone-slash", "fa-minus", "fa-minus-circle", "fa-minus-square", "fa-minus-square-o", "fa-mixcloud", "fa-mobile", "fa-mobile-phone", "fa-modx", "fa-money", "fa-moon-o", "fa-mortar-board", "fa-motorcycle", "fa-mouse-pointer", "fa-music", "fa-navicon", "fa-neuter", "fa-newspaper-o", "fa-object-group", "fa-object-ungroup", "fa-odnoklassniki", "fa-odnoklassniki-square", "fa-opencart", "fa-openid", "fa-opera", "fa-optin-monster", "fa-outdent", "fa-pagelines", "fa-paint-brush", "fa-paper-plane", "fa-paper-plane-o", "fa-paperclip", "fa-paragraph", "fa-paste", "fa-pause", "fa-pause-circle", "fa-pause-circle-o", "fa-paw", "fa-paypal", "fa-pencil", "fa-pencil-square", "fa-pencil-square-o", "fa-percent", "fa-phone", "fa-phone-square", "fa-photo", "fa-picture-o", "fa-pie-chart", "fa-pied-piper", "fa-pied-piper-alt", "fa-pied-piper-pp", "fa-pinterest", "fa-pinterest-p", "fa-pinterest-square", "fa-plane", "fa-play", "fa-play-circle", "fa-play-circle-o", "fa-plug", "fa-plus", "fa-plus-circle", "fa-plus-square", "fa-plus-square-o", "fa-podcast", "fa-power-off", "fa-print", "fa-product-hunt", "fa-puzzle-piece", "fa-qq", "fa-qrcode", "fa-question", "fa-question-circle", "fa-question-circle-o", "fa-quora", "fa-quote-left", "fa-quote-right", "fa-ra", "fa-random", "fa-ravelry", "fa-rebel", "fa-recycle", "fa-reddit", "fa-reddit-alien", "fa-reddit-square", "fa-refresh", "fa-registered", "fa-remove", "fa-renren", "fa-reorder", "fa-repeat", "fa-reply", "fa-reply-all", "fa-resistance", "fa-retweet", "fa-rmb", "fa-road", "fa-rocket", "fa-rotate-left", "fa-rotate-right", "fa-rouble", "fa-rss", "fa-rss-square", "fa-rub", "fa-ruble", "fa-rupee", "fa-s15", "fa-safari", "fa-save", "fa-scissors", "fa-scribd", "fa-search", "fa-search-minus", "fa-search-plus", "fa-sellsy", "fa-send", "fa-send-o", "fa-server", "fa-share", "fa-share-alt", "fa-share-alt-square", "fa-share-square", "fa-share-square-o", "fa-shekel", "fa-sheqel", "fa-shield", "fa-ship", "fa-shirtsinbulk", "fa-shopping-bag", "fa-shopping-basket", "fa-shopping-cart", "fa-shower", "fa-sign-in", "fa-sign-language", "fa-sign-out", "fa-signal", "fa-signing", "fa-simplybuilt", "fa-sitemap", "fa-skyatlas", "fa-skype", "fa-slack", "fa-sliders", "fa-slideshare", "fa-smile-o", "fa-snapchat", "fa-snapchat-ghost", "fa-snapchat-square", "fa-snowflake-o", "fa-soccer-ball-o", "fa-sort", "fa-sort-alpha-asc", "fa-sort-alpha-desc", "fa-sort-amount-asc", "fa-sort-amount-desc", "fa-sort-asc", "fa-sort-desc", "fa-sort-down", "fa-sort-numeric-asc", "fa-sort-numeric-desc", "fa-sort-up", "fa-soundcloud", "fa-space-shuttle", "fa-spinner", "fa-spoon", "fa-spotify", "fa-square", "fa-square-o", "fa-stack-exchange", "fa-stack-overflow", "fa-star", "fa-star-half", "fa-star-half-empty", "fa-star-half-full", "fa-star-half-o", "fa-star-o", "fa-steam", "fa-steam-square", "fa-step-backward", "fa-step-forward", "fa-stethoscope", "fa-sticky-note", "fa-sticky-note-o", "fa-stop", "fa-stop-circle", "fa-stop-circle-o", "fa-street-view", "fa-strikethrough", "fa-stumbleupon", "fa-stumbleupon-circle", "fa-subscript", "fa-subway", "fa-suitcase", "fa-sun-o", "fa-superpowers", "fa-superscript", "fa-support", "fa-table", "fa-tablet", "fa-tachometer", "fa-tag", "fa-tags", "fa-tasks", "fa-taxi", "fa-telegram", "fa-television", "fa-tencent-weibo", "fa-terminal", "fa-text-height", "fa-text-width", "fa-th", "fa-th-large", "fa-th-list", "fa-themeisle", "fa-thermometer", "fa-thermometer-0", "fa-thermometer-1", "fa-thermometer-2", "fa-thermometer-3", "fa-thermometer-4", "fa-thermometer-empty", "fa-thermometer-full", "fa-thermometer-half", "fa-thermometer-quarter", "fa-thermometer-three-quarters", "fa-thumb-tack", "fa-thumbs-down", "fa-thumbs-o-down", "fa-thumbs-o-up", "fa-thumbs-up", "fa-ticket", "fa-times", "fa-times-circle", "fa-times-circle-o", "fa-times-rectangle", "fa-times-rectangle-o", "fa-tint", "fa-toggle-down", "fa-toggle-left", "fa-toggle-off", "fa-toggle-on", "fa-toggle-right", "fa-toggle-up", "fa-trademark", "fa-train", "fa-transgender", "fa-transgender-alt", "fa-trash", "fa-trash-o", "fa-tree", "fa-trello", "fa-tripadvisor", "fa-trophy", "fa-truck", "fa-try", "fa-tty", "fa-tumblr", "fa-tumblr-square", "fa-turkish-lira", "fa-tv", "fa-twitch", "fa-twitter", "fa-twitter-square", "fa-umbrella", "fa-underline", "fa-undo", "fa-universal-access", "fa-university", "fa-unlink", "fa-unlock", "fa-unlock-alt", "fa-unsorted", "fa-upload", "fa-usb", "fa-usd", "fa-user", "fa-user-circle", "fa-user-circle-o", "fa-user-md", "fa-user-o", "fa-user-plus", "fa-user-secret", "fa-user-times", "fa-users", "fa-vcard", "fa-vcard-o", "fa-venus", "fa-venus-double", "fa-venus-mars", "fa-viacoin", "fa-viadeo", "fa-viadeo-square", "fa-video-camera", "fa-vimeo", "fa-vimeo-square", "fa-vine", "fa-vk", "fa-volume-control-phone", "fa-volume-down", "fa-volume-off", "fa-volume-up", "fa-warning", "fa-wechat", "fa-weibo", "fa-weixin", "fa-whatsapp", "fa-wheelchair", "fa-wheelchair-alt", "fa-wifi", "fa-wikipedia-w", "fa-window-close", "fa-window-close-o", "fa-window-maximize", "fa-window-minimize", "fa-window-restore", "fa-windows", "fa-won", "fa-wordpress", "fa-wpbeginner", "fa-wpexplorer", "fa-wpforms", "fa-wrench", "fa-xing", "fa-xing-square", "fa-y-combinator", "fa-y-combinator-square", "fa-yahoo", "fa-yc", "fa-yc-square", "fa-yelp", "fa-yen", "fa-yoast", "fa-youtube", "fa-youtube-play", "fa-youtube-square"];
});
\ No newline at end of file
!function(a){"function" == typeof define && define.amd?define(["jquery"], a):a(jQuery)}(function(a){a.ui = a.ui || {}; a.ui.version = "1.12.1"; !function(){function b(a, b, c){return[parseFloat(a[0]) * (l.test(a[0])?b / 100:1), parseFloat(a[1]) * (l.test(a[1])?c / 100:1)]}function c(b, c){return parseInt(a.css(b, c), 10) || 0}function d(b){var c = b[0]; return 9 === c.nodeType?{width:b.width(), height:b.height(), offset:{top:0, left:0}}:a.isWindow(c)?{width:b.width(), height:b.height(), offset:{top:b.scrollTop(), left:b.scrollLeft()}}:c.preventDefault?{width:0, height:0, offset:{top:c.pageY, left:c.pageX}}:{width:b.outerWidth(), height:b.outerHeight(), offset:b.offset()}}var e, f = Math.max, g = Math.abs, h = /left|center|right/, i = /top|center|bottom/, j = /[\+\-]\d+(\.[\d]+)?%?/, k = /^\w+/, l = /%$/, m = a.fn.pos; a.pos = {scrollbarWidth:function(){if (void 0 !== e)return e; var b, c, d = a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), f = d.children()[0]; return a("body").append(d), b = f.offsetWidth, d.css("overflow", "scroll"), c = f.offsetWidth, b === c && (c = d[0].clientWidth), d.remove(), e = b - c}, getScrollInfo:function(b){var c = b.isWindow || b.isDocument?"":b.element.css("overflow-x"), d = b.isWindow || b.isDocument?"":b.element.css("overflow-y"), e = "scroll" === c || "auto" === c && b.width < b.element[0].scrollWidth; return{width:"scroll" === d || "auto" === d && b.height < b.element[0].scrollHeight?a.pos.scrollbarWidth():0, height:e?a.pos.scrollbarWidth():0}}, getWithinInfo:function(b){var c = a(b || window), d = a.isWindow(c[0]), e = !!c[0] && 9 === c[0].nodeType; return{element:c, isWindow:d, isDocument:e, offset:d || e?{left:0, top:0}:a(b).offset(), scrollLeft:c.scrollLeft(), scrollTop:c.scrollTop(), width:c.outerWidth(), height:c.outerHeight()}}}, a.fn.pos = function(e){if (!e || !e.of)return m.apply(this, arguments); e = a.extend({}, e); var l, n, o, p, q, r, s = a(e.of), t = a.pos.getWithinInfo(e.within), u = a.pos.getScrollInfo(t), v = (e.collision || "flip").split(" "), w = {}; return r = d(s), s[0].preventDefault && (e.at = "left top"), n = r.width, o = r.height, p = r.offset, q = a.extend({}, p), a.each(["my", "at"], function(){var a, b, c = (e[this] || "").split(" "); 1 === c.length && (c = h.test(c[0])?c.concat(["center"]):i.test(c[0])?["center"].concat(c):["center", "center"]), c[0] = h.test(c[0])?c[0]:"center", c[1] = i.test(c[1])?c[1]:"center", a = j.exec(c[0]), b = j.exec(c[1]), w[this] = [a?a[0]:0, b?b[0]:0], e[this] = [k.exec(c[0])[0], k.exec(c[1])[0]]}), 1 === v.length && (v[1] = v[0]), "right" === e.at[0]?q.left += n:"center" === e.at[0] && (q.left += n / 2), "bottom" === e.at[1]?q.top += o:"center" === e.at[1] && (q.top += o / 2), l = b(w.at, n, o), q.left += l[0], q.top += l[1], this.each(function(){var d, h, i = a(this), j = i.outerWidth(), k = i.outerHeight(), m = c(this, "marginLeft"), r = c(this, "marginTop"), x = j + m + c(this, "marginRight") + u.width, y = k + r + c(this, "marginBottom") + u.height, z = a.extend({}, q), A = b(w.my, i.outerWidth(), i.outerHeight()); "right" === e.my[0]?z.left -= j:"center" === e.my[0] && (z.left -= j / 2), "bottom" === e.my[1]?z.top -= k:"center" === e.my[1] && (z.top -= k / 2), z.left += A[0], z.top += A[1], d = {marginLeft:m, marginTop:r}, a.each(["left", "top"], function(b, c){a.ui.pos[v[b]] && a.ui.pos[v[b]][c](z, {targetWidth:n, targetHeight:o, elemWidth:j, elemHeight:k, collisionPosition:d, collisionWidth:x, collisionHeight:y, offset:[l[0] + A[0], l[1] + A[1]], my:e.my, at:e.at, within:t, elem:i})}), e.using && (h = function(a){var b = p.left - z.left, c = b + n - j, d = p.top - z.top, h = d + o - k, l = {target:{element:s, left:p.left, top:p.top, width:n, height:o}, element:{element:i, left:z.left, top:z.top, width:j, height:k}, horizontal:c < 0?"left":b > 0?"right":"center", vertical:h < 0?"top":d > 0?"bottom":"middle"}; n < j && g(b + c) < n && (l.horizontal = "center"), o < k && g(d + h) < o && (l.vertical = "middle"), f(g(b), g(c)) > f(g(d), g(h))?l.important = "horizontal":l.important = "vertical", e.using.call(this, a, l)}), i.offset(a.extend(z, {using:h}))})}, a.ui.pos = {_trigger:function(a, b, c, d){b.elem && b.elem.trigger({type:c, position:a, positionData:b, triggered:d})}, fit:{left:function(b, c){a.ui.pos._trigger(b, c, "posCollide", "fitLeft"); var d, e = c.within, g = e.isWindow?e.scrollLeft:e.offset.left, h = e.width, i = b.left - c.collisionPosition.marginLeft, j = g - i, k = i + c.collisionWidth - h - g; c.collisionWidth > h?j > 0 && k <= 0?(d = b.left + j + c.collisionWidth - h - g, b.left += j - d):b.left = k > 0 && j <= 0?g:j > k?g + h - c.collisionWidth:g:j > 0?b.left += j:k > 0?b.left -= k:b.left = f(b.left - i, b.left), a.ui.pos._trigger(b, c, "posCollided", "fitLeft")}, top:function(b, c){a.ui.pos._trigger(b, c, "posCollide", "fitTop"); var d, e = c.within, g = e.isWindow?e.scrollTop:e.offset.top, h = c.within.height, i = b.top - c.collisionPosition.marginTop, j = g - i, k = i + c.collisionHeight - h - g; c.collisionHeight > h?j > 0 && k <= 0?(d = b.top + j + c.collisionHeight - h - g, b.top += j - d):b.top = k > 0 && j <= 0?g:j > k?g + h - c.collisionHeight:g:j > 0?b.top += j:k > 0?b.top -= k:b.top = f(b.top - i, b.top), a.ui.pos._trigger(b, c, "posCollided", "fitTop")}}, flip:{left:function(b, c){a.ui.pos._trigger(b, c, "posCollide", "flipLeft"); var d, e, f = c.within, h = f.offset.left + f.scrollLeft, i = f.width, j = f.isWindow?f.scrollLeft:f.offset.left, k = b.left - c.collisionPosition.marginLeft, l = k - j, m = k + c.collisionWidth - i - j, n = "left" === c.my[0]? - c.elemWidth:"right" === c.my[0]?c.elemWidth:0, o = "left" === c.at[0]?c.targetWidth:"right" === c.at[0]? - c.targetWidth:0, p = - 2 * c.offset[0]; l < 0?((d = b.left + n + o + p + c.collisionWidth - i - h) < 0 || d < g(l)) && (b.left += n + o + p):m > 0 && ((e = b.left - c.collisionPosition.marginLeft + n + o + p - j) > 0 || g(e) < m) && (b.left += n + o + p), a.ui.pos._trigger(b, c, "posCollided", "flipLeft")}, top:function(b, c){a.ui.pos._trigger(b, c, "posCollide", "flipTop"); var d, e, f = c.within, h = f.offset.top + f.scrollTop, i = f.height, j = f.isWindow?f.scrollTop:f.offset.top, k = b.top - c.collisionPosition.marginTop, l = k - j, m = k + c.collisionHeight - i - j, n = "top" === c.my[1], o = n? - c.elemHeight:"bottom" === c.my[1]?c.elemHeight:0, p = "top" === c.at[1]?c.targetHeight:"bottom" === c.at[1]? - c.targetHeight:0, q = - 2 * c.offset[1]; l < 0?((e = b.top + o + p + q + c.collisionHeight - i - h) < 0 || e < g(l)) && (b.top += o + p + q):m > 0 && ((d = b.top - c.collisionPosition.marginTop + o + p + q - j) > 0 || g(d) < m) && (b.top += o + p + q), a.ui.pos._trigger(b, c, "posCollided", "flipTop")}}, flipfit:{left:function(){a.ui.pos.flip.left.apply(this, arguments), a.ui.pos.fit.left.apply(this, arguments)}, top:function(){a.ui.pos.flip.top.apply(this, arguments), a.ui.pos.fit.top.apply(this, arguments)}}}, function(){var b, c, d, e, f, g = document.getElementsByTagName("body")[0], h = document.createElement("div"); b = document.createElement(g?"div":"body"), d = {visibility:"hidden", width:0, height:0, border:0, margin:0, background:"none"}, g && a.extend(d, {position:"absolute", left:"-1000px", top:"-1000px"}); for (f in d)b.style[f] = d[f]; b.appendChild(h), c = g || document.documentElement, c.insertBefore(b, c.firstChild), h.style.cssText = "position: absolute; left: 10.7432222px;", e = a(h).offset().left, a.support.offsetFractions = e > 10 && e < 11, b.innerHTML = "", c.removeChild(b)}()}(); a.ui.position}), function(a){"use strict"; "function" == typeof define && define.amd?define(["jquery"], a):window.jQuery && !window.jQuery.fn.iconpicker && a(window.jQuery)}(function(a){"use strict"; var b = {isEmpty:function(a){return!1 === a || "" === a || null === a || void 0 === a}, isEmptyObject:function(a){return!0 === this.isEmpty(a) || 0 === a.length}, isElement:function(b){return a(b).length > 0}, isString:function(a){return"string" == typeof a || a instanceof String}, isArray:function(b){return a.isArray(b)}, inArray:function(b, c){return - 1 !== a.inArray(b, c)}, throwError:function(a){throw"Font Awesome Icon Picker Exception: " + a}}, c = function(d, e){this._id = c._idCounter++, this.element = a(d).addClass("iconpicker-element"), this._trigger("iconpickerCreate"), this.options = a.extend({}, c.defaultOptions, this.element.data(), e), this.options.templates = a.extend({}, c.defaultOptions.templates, this.options.templates), this.options.originalPlacement = this.options.placement, this.container = !!b.isElement(this.options.container) && a(this.options.container), !1 === this.container && (this.element.is(".dropdown-toggle")?this.container = a("~ .dropdown-menu:first", this.element):this.container = this.element.is("input,textarea,button,.btn")?this.element.parent():this.element), this.container.addClass("iconpicker-container"), this.isDropdownMenu() && (this.options.templates.search = !1, this.options.templates.buttons = !1, this.options.placement = "inline"), this.input = !!this.element.is("input,textarea") && this.element.addClass("iconpicker-input"), !1 === this.input && (this.input = this.container.find(this.options.input), this.input.is("input,textarea") || (this.input = !1)), this.component = this.isDropdownMenu()?this.container.parent().find(this.options.component):this.container.find(this.options.component), 0 === this.component.length?this.component = !1:this.component.find("i").addClass("iconpicker-component"), this._createPopover(), this._createIconpicker(), 0 === this.getAcceptButton().length && (this.options.mustAccept = !1), this.isInputGroup()?this.container.parent().append(this.popover):this.container.append(this.popover), this._bindElementEvents(), this._bindWindowEvents(), this.update(this.options.selected), this.isInline() && this.show(), this._trigger("iconpickerCreated")}; c._idCounter = 0, c.defaultOptions = {title:!1, selected:!1, defaultValue:!1, placement:"bottom", collision:"none", animation:!0, hideOnSelect:!1, showFooter:!1, searchInFooter:!1, mustAccept:!1, selectedCustomClass:"bg-primary", icons:[], fullClassFormatter:function(a){return"fa " + a}, input:"input,.iconpicker-input", inputSearch:!1, container:!1, component:".input-group-addon,.iconpicker-component", templates:{popover:'<div class="iconpicker-popover popover"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>', footer:'<div class="popover-footer"></div>', buttons:'<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button> <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>', search:'<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />', iconpicker:'<div class="iconpicker"><div class="iconpicker-items"></div></div>', iconpickerItem:'<a role="button" href="#" class="iconpicker-item"><i></i></a>'}}, c.batch = function(b, c){var d = Array.prototype.slice.call(arguments, 2); return a(b).each(function(){var b = a(this).data("iconpicker"); b && b[c].apply(b, d)})}, c.prototype = {constructor:c, options:{}, _id:0, _trigger:function(b, c){c = c || {}, this.element.trigger(a.extend({type:b, iconpickerInstance:this}, c))}, _createPopover:function(){this.popover = a(this.options.templates.popover); var c = this.popover.find(".popover-title"); if (this.options.title && c.append(a('<div class="popover-title-text">' + this.options.title + "</div>")), this.hasSeparatedSearchInput() && !this.options.searchInFooter?c.append(this.options.templates.search):this.options.title || c.remove(), this.options.showFooter && !b.isEmpty(this.options.templates.footer)){var d = a(this.options.templates.footer); this.hasSeparatedSearchInput() && this.options.searchInFooter && d.append(a(this.options.templates.search)), b.isEmpty(this.options.templates.buttons) || d.append(a(this.options.templates.buttons)), this.popover.append(d)}return!0 === this.options.animation && this.popover.addClass("fade"), this.popover}, _createIconpicker:function(){var b = this; this.iconpicker = a(this.options.templates.iconpicker); var c = function(c){var d = a(this); return d.is("i") && (d = d.parent()), b._trigger("iconpickerSelect", {iconpickerItem:d, iconpickerValue:b.iconpickerValue}), !1 === b.options.mustAccept?(b.update(d.data("iconpickerValue")), b._trigger("iconpickerSelected", {iconpickerItem:this, iconpickerValue:b.iconpickerValue})):b.update(d.data("iconpickerValue"), !0), b.options.hideOnSelect && !1 === b.options.mustAccept && b.hide(), c.preventDefault(), !1}; for (var d in this.options.icons)if ("string" == typeof this.options.icons[d]){var e = a(this.options.templates.iconpickerItem); e.find("i").addClass(this.options.fullClassFormatter(this.options.icons[d])), e.data("iconpickerValue", this.options.icons[d]).on("click.iconpicker", c), this.iconpicker.find(".iconpicker-items").append(e.attr("title", "." + this.options.icons[d]))}return this.popover.find(".popover-content").append(this.iconpicker), this.iconpicker}, _isEventInsideIconpicker:function(b){var c = a(b.target); return!((!c.hasClass("iconpicker-element") || c.hasClass("iconpicker-element") && !c.is(this.element)) && 0 === c.parents(".iconpicker-popover").length)}, _bindElementEvents:function(){var c = this; this.getSearchInput().on("keyup.iconpicker", function(){c.filter(a(this).val().toLowerCase())}), this.getAcceptButton().on("click.iconpicker", function(){var a = c.iconpicker.find(".iconpicker-selected").get(0); c.update(c.iconpickerValue), c._trigger("iconpickerSelected", {iconpickerItem:a, iconpickerValue:c.iconpickerValue}), c.isInline() || c.hide()}), this.getCancelButton().on("click.iconpicker", function(){c.isInline() || c.hide()}), this.element.on("focus.iconpicker", function(a){c.show(), a.stopPropagation()}), this.hasComponent() && this.component.on("click.iconpicker", function(){c.toggle()}), this.hasInput() && this.input.on("keyup.iconpicker", function(d){b.inArray(d.keyCode, [38, 40, 37, 39, 16, 17, 18, 9, 8, 91, 93, 20, 46, 186, 190, 46, 78, 188, 44, 86])?c._updateFormGroupStatus(!1 !== c.getValid(this.value)):c.update(), !0 === c.options.inputSearch && c.filter(a(this).val().toLowerCase())})}, _bindWindowEvents:function(){var b = a(window.document), c = this, d = ".iconpicker.inst" + this._id; return a(window).on("resize.iconpicker" + d + " orientationchange.iconpicker" + d, function(a){c.popover.hasClass("in") && c.updatePlacement()}), c.isInline() || b.on("mouseup" + d, function(a){return c._isEventInsideIconpicker(a) || c.isInline() || c.hide(), a.stopPropagation(), a.preventDefault(), !1}), !1}, _unbindElementEvents:function(){this.popover.off(".iconpicker"), this.element.off(".iconpicker"), this.hasInput() && this.input.off(".iconpicker"), this.hasComponent() && this.component.off(".iconpicker"), this.hasContainer() && this.container.off(".iconpicker")}, _unbindWindowEvents:function(){a(window).off(".iconpicker.inst" + this._id), a(window.document).off(".iconpicker.inst" + this._id)}, updatePlacement:function(b, c){b = b || this.options.placement, this.options.placement = b, c = c || this.options.collision, c = !0 === c?"flip":c; var d = {at:"right bottom", my:"right top", of:this.hasInput() && !this.isInputGroup()?this.input:this.container, collision:!0 === c?"flip":c, within:window}; if (this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner rightTop right rightBottom bottomRight bottomRightCorner bottom bottomLeft bottomLeftCorner leftBottom left leftTop"), "object" == typeof b)return this.popover.pos(a.extend({}, d, b)); switch (b){case"inline":d = !1; break; case"topLeftCorner":d.my = "right bottom", d.at = "left top"; break; case"topLeft":d.my = "left bottom", d.at = "left top"; break; case"top":d.my = "center bottom", d.at = "center top"; break; case"topRight":d.my = "right bottom", d.at = "right top"; break; case"topRightCorner":d.my = "left bottom", d.at = "right top"; break; case"rightTop":d.my = "left bottom", d.at = "right center"; break; case"right":d.my = "left center", d.at = "right center"; break; case"rightBottom":d.my = "left top", d.at = "right center"; break; case"bottomRightCorner":d.my = "left top", d.at = "right bottom"; break; case"bottomRight":d.my = "right top", d.at = "right bottom"; break; case"bottom":d.my = "center top", d.at = "center bottom"; break; case"bottomLeft":d.my = "left top", d.at = "left bottom"; break; case"bottomLeftCorner":d.my = "right top", d.at = "left bottom"; break; case"leftBottom":d.my = "right top", d.at = "left center"; break; case"left":d.my = "right center", d.at = "left center"; break; case"leftTop":d.my = "right bottom", d.at = "left center"; break; default:return!1}return this.popover.css({display:"inline" === this.options.placement?"":"block"}), !1 !== d?this.popover.pos(d).css("maxWidth", a(window).width() - this.container.offset().left - 5):this.popover.css({top:"auto", right:"auto", bottom:"auto", left:"auto", maxWidth:"none"}), this.popover.addClass(this.options.placement), !0}, _updateComponents:function(){if (this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected " + this.options.selectedCustomClass), this.iconpickerValue && this.iconpicker.find("." + this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g, ".")).parent().addClass("iconpicker-selected " + this.options.selectedCustomClass), this.hasComponent()){var a = this.component.find("i"); a.length > 0?a.attr("class", this.options.fullClassFormatter(this.iconpickerValue)):this.component.html(this.getHtml())}}, _updateFormGroupStatus:function(a){return!!this.hasInput() && (!1 !== a?this.input.parents(".form-group:first").removeClass("has-error"):this.input.parents(".form-group:first").addClass("has-error"), !0)}, getValid:function(c){b.isString(c) || (c = ""); var d = "" === c; return c = a.trim(c), !(!b.inArray(c, this.options.icons) && !d) && c}, setValue:function(a){var b = this.getValid(a); return!1 !== b?(this.iconpickerValue = b, this._trigger("iconpickerSetValue", {iconpickerValue:b}), this.iconpickerValue):(this._trigger("iconpickerInvalid", {iconpickerValue:a}), !1)}, getHtml:function(){return'<i class="' + this.options.fullClassFormatter(this.iconpickerValue) + '"></i>'}, setSourceValue:function(a){return a = this.setValue(a), !1 !== a && "" !== a && (this.hasInput()?this.input.val(this.iconpickerValue):this.element.data("iconpickerValue", this.iconpickerValue), this._trigger("iconpickerSetSourceValue", {iconpickerValue:a})), a}, getSourceValue:function(a){a = a || this.options.defaultValue; var b = a; return b = this.hasInput()?this.input.val():this.element.data("iconpickerValue"), void 0 !== b && "" !== b && null !== b && !1 !== b || (b = a), b}, hasInput:function(){return!1 !== this.input}, isInputSearch:function(){return this.hasInput() && !0 === this.options.inputSearch}, isInputGroup:function(){return this.container.is(".input-group")}, isDropdownMenu:function(){return this.container.is(".dropdown-menu")}, hasSeparatedSearchInput:function(){return!1 !== this.options.templates.search && !this.isInputSearch()}, hasComponent:function(){return!1 !== this.component}, hasContainer:function(){return!1 !== this.container}, getAcceptButton:function(){return this.popover.find(".iconpicker-btn-accept")}, getCancelButton:function(){return this.popover.find(".iconpicker-btn-cancel")}, getSearchInput:function(){return this.popover.find(".iconpicker-search")}, filter:function(c){if (b.isEmpty(c))return this.iconpicker.find(".iconpicker-item").show(), a(!1); var d = []; return this.iconpicker.find(".iconpicker-item").each(function(){var b = a(this), e = b.attr("title").toLowerCase(), f = !1; try{f = new RegExp(c, "g")} catch (a){f = !1}!1 !== f && e.match(f)?(d.push(b), b.show()):b.hide()}), d}, show:function(){if (this.popover.hasClass("in"))return!1; a.iconpicker.batch(a(".iconpicker-popover.in:not(.inline)").not(this.popover), "hide"), this._trigger("iconpickerShow"), this.updatePlacement(), this.popover.addClass("in"), setTimeout(a.proxy(function(){this.popover.css("display", this.isInline()?"":"block"), this._trigger("iconpickerShown")}, this), this.options.animation?300:1)}, hide:function(){if (!this.popover.hasClass("in"))return!1; this._trigger("iconpickerHide"), this.popover.removeClass("in"), setTimeout(a.proxy(function(){this.popover.css("display", "none"), this.getSearchInput().val(""), this.filter(""), this._trigger("iconpickerHidden")}, this), this.options.animation?300:1)}, toggle:function(){this.popover.is(":visible")?this.hide():this.show(!0)}, update:function(a, b){return a = a || this.getSourceValue(this.iconpickerValue), this._trigger("iconpickerUpdate"), !0 === b?a = this.setValue(a):(a = this.setSourceValue(a), this._updateFormGroupStatus(!1 !== a)), !1 !== a && this._updateComponents(), this._trigger("iconpickerUpdated"), a}, destroy:function(){this._trigger("iconpickerDestroy"), this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element"), this._unbindElementEvents(), this._unbindWindowEvents(), a(this.popover).remove(), this._trigger("iconpickerDestroyed")}, disable:function(){return!!this.hasInput() && (this.input.prop("disabled", !0), !0)}, enable:function(){return!!this.hasInput() && (this.input.prop("disabled", !1), !0)}, isDisabled:function(){return!!this.hasInput() && !0 === this.input.prop("disabled")}, isInline:function(){return"inline" === this.options.placement || this.popover.hasClass("inline")}}, a.iconpicker = c, a.fn.iconpicker = function(b){return this.each(function(){var d = a(this); d.data("iconpicker") || d.data("iconpicker", new c(this, "object" == typeof b?b:{}))})}, c.defaultOptions.icons = ["fa-500px", "fa-address-book", "fa-address-book-o", "fa-address-card", "fa-address-card-o", "fa-adjust", "fa-adn", "fa-align-center", "fa-align-justify", "fa-align-left", "fa-align-right", "fa-amazon", "fa-ambulance", "fa-american-sign-language-interpreting", "fa-anchor", "fa-android", "fa-angellist", "fa-angle-double-down", "fa-angle-double-left", "fa-angle-double-right", "fa-angle-double-up", "fa-angle-down", "fa-angle-left", "fa-angle-right", "fa-angle-up", "fa-apple", "fa-archive", "fa-area-chart", "fa-arrow-circle-down", "fa-arrow-circle-left", "fa-arrow-circle-o-down", "fa-arrow-circle-o-left", "fa-arrow-circle-o-right", "fa-arrow-circle-o-up", "fa-arrow-circle-right", "fa-arrow-circle-up", "fa-arrow-down", "fa-arrow-left", "fa-arrow-right", "fa-arrow-up", "fa-arrows", "fa-arrows-alt", "fa-arrows-h", "fa-arrows-v", "fa-asl-interpreting", "fa-assistive-listening-systems", "fa-asterisk", "fa-at", "fa-audio-description", "fa-automobile", "fa-backward", "fa-balance-scale", "fa-ban", "fa-bandcamp", "fa-bank", "fa-bar-chart", "fa-bar-chart-o", "fa-barcode", "fa-bars", "fa-bath", "fa-bathtub", "fa-battery", "fa-battery-0", "fa-battery-1", "fa-battery-2", "fa-battery-3", "fa-battery-4", "fa-battery-empty", "fa-battery-full", "fa-battery-half", "fa-battery-quarter", "fa-battery-three-quarters", "fa-bed", "fa-beer", "fa-behance", "fa-behance-square", "fa-bell", "fa-bell-o", "fa-bell-slash", "fa-bell-slash-o", "fa-bicycle", "fa-binoculars", "fa-birthday-cake", "fa-bitbucket", "fa-bitbucket-square", "fa-bitcoin", "fa-black-tie", "fa-blind", "fa-bluetooth", "fa-bluetooth-b", "fa-bold", "fa-bolt", "fa-bomb", "fa-book", "fa-bookmark", "fa-bookmark-o", "fa-braille", "fa-briefcase", "fa-btc", "fa-bug", "fa-building", "fa-building-o", "fa-bullhorn", "fa-bullseye", "fa-bus", "fa-buysellads", "fa-cab", "fa-calculator", "fa-calendar", "fa-calendar-check-o", "fa-calendar-minus-o", "fa-calendar-o", "fa-calendar-plus-o", "fa-calendar-times-o", "fa-camera", "fa-camera-retro", "fa-car", "fa-caret-down", "fa-caret-left", "fa-caret-right", "fa-caret-square-o-down", "fa-caret-square-o-left", "fa-caret-square-o-right", "fa-caret-square-o-up", "fa-caret-up", "fa-cart-arrow-down", "fa-cart-plus", "fa-cc", "fa-cc-amex", "fa-cc-diners-club", "fa-cc-discover", "fa-cc-jcb", "fa-cc-mastercard", "fa-cc-paypal", "fa-cc-stripe", "fa-cc-visa", "fa-certificate", "fa-chain", "fa-chain-broken", "fa-check", "fa-check-circle", "fa-check-circle-o", "fa-check-square", "fa-check-square-o", "fa-chevron-circle-down", "fa-chevron-circle-left", "fa-chevron-circle-right", "fa-chevron-circle-up", "fa-chevron-down", "fa-chevron-left", "fa-chevron-right", "fa-chevron-up", "fa-child", "fa-chrome", "fa-circle", "fa-circle-o", "fa-circle-o-notch", "fa-circle-thin", "fa-clipboard", "fa-clock-o", "fa-clone", "fa-close", "fa-cloud", "fa-cloud-download", "fa-cloud-upload", "fa-cny", "fa-code", "fa-code-fork", "fa-codepen", "fa-codiepie", "fa-coffee", "fa-cog", "fa-cogs", "fa-columns", "fa-comment", "fa-comment-o", "fa-commenting", "fa-commenting-o", "fa-comments", "fa-comments-o", "fa-compass", "fa-compress", "fa-connectdevelop", "fa-contao", "fa-copy", "fa-copyright", "fa-creative-commons", "fa-credit-card", "fa-credit-card-alt", "fa-crop", "fa-crosshairs", "fa-css3", "fa-cube", "fa-cubes", "fa-cut", "fa-cutlery", "fa-dashboard", "fa-dashcube", "fa-database", "fa-deaf", "fa-deafness", "fa-dedent", "fa-delicious", "fa-desktop", "fa-deviantart", "fa-diamond", "fa-digg", "fa-dollar", "fa-dot-circle-o", "fa-download", "fa-dribbble", "fa-drivers-license", "fa-drivers-license-o", "fa-dropbox", "fa-drupal", "fa-edge", "fa-edit", "fa-eercast", "fa-eject", "fa-ellipsis-h", "fa-ellipsis-v", "fa-empire", "fa-envelope", "fa-envelope-o", "fa-envelope-open", "fa-envelope-open-o", "fa-envelope-square", "fa-envira", "fa-eraser", "fa-etsy", "fa-eur", "fa-euro", "fa-exchange", "fa-exclamation", "fa-exclamation-circle", "fa-exclamation-triangle", "fa-expand", "fa-expeditedssl", "fa-external-link", "fa-external-link-square", "fa-eye", "fa-eye-slash", "fa-eyedropper", "fa-fa", "fa-facebook", "fa-facebook-f", "fa-facebook-official", "fa-facebook-square", "fa-fast-backward", "fa-fast-forward", "fa-fax", "fa-feed", "fa-female", "fa-fighter-jet", "fa-file", "fa-file-archive-o", "fa-file-audio-o", "fa-file-code-o", "fa-file-excel-o", "fa-file-image-o", "fa-file-movie-o", "fa-file-o", "fa-file-pdf-o", "fa-file-photo-o", "fa-file-picture-o", "fa-file-powerpoint-o", "fa-file-sound-o", "fa-file-text", "fa-file-text-o", "fa-file-video-o", "fa-file-word-o", "fa-file-zip-o", "fa-files-o", "fa-film", "fa-filter", "fa-fire", "fa-fire-extinguisher", "fa-firefox", "fa-first-order", "fa-flag", "fa-flag-checkered", "fa-flag-o", "fa-flash", "fa-flask", "fa-flickr", "fa-floppy-o", "fa-folder", "fa-folder-o", "fa-folder-open", "fa-folder-open-o", "fa-font", "fa-font-awesome", "fa-fonticons", "fa-fort-awesome", "fa-forumbee", "fa-forward", "fa-foursquare", "fa-free-code-camp", "fa-frown-o", "fa-futbol-o", "fa-gamepad", "fa-gavel", "fa-gbp", "fa-ge", "fa-gear", "fa-gears", "fa-genderless", "fa-get-pocket", "fa-gg", "fa-gg-circle", "fa-gift", "fa-git", "fa-git-square", "fa-github", "fa-github-alt", "fa-github-square", "fa-gitlab", "fa-gittip", "fa-glass", "fa-glide", "fa-glide-g", "fa-globe", "fa-google", "fa-google-plus", "fa-google-plus-circle", "fa-google-plus-official", "fa-google-plus-square", "fa-google-wallet", "fa-graduation-cap", "fa-gratipay", "fa-grav", "fa-group", "fa-h-square", "fa-hacker-news", "fa-hand-grab-o", "fa-hand-lizard-o", "fa-hand-o-down", "fa-hand-o-left", "fa-hand-o-right", "fa-hand-o-up", "fa-hand-paper-o", "fa-hand-peace-o", "fa-hand-pointer-o", "fa-hand-rock-o", "fa-hand-scissors-o", "fa-hand-spock-o", "fa-hand-stop-o", "fa-handshake-o", "fa-hard-of-hearing", "fa-hashtag", "fa-hdd-o", "fa-header", "fa-headphones", "fa-heart", "fa-heart-o", "fa-heartbeat", "fa-history", "fa-home", "fa-hospital-o", "fa-hotel", "fa-hourglass", "fa-hourglass-1", "fa-hourglass-2", "fa-hourglass-3", "fa-hourglass-end", "fa-hourglass-half", "fa-hourglass-o", "fa-hourglass-start", "fa-houzz", "fa-html5", "fa-i-cursor", "fa-id-badge", "fa-id-card", "fa-id-card-o", "fa-ils", "fa-image", "fa-imdb", "fa-inbox", "fa-indent", "fa-industry", "fa-info", "fa-info-circle", "fa-inr", "fa-instagram", "fa-institution", "fa-internet-explorer", "fa-intersex", "fa-ioxhost", "fa-italic", "fa-joomla", "fa-jpy", "fa-jsfiddle", "fa-key", "fa-keyboard-o", "fa-krw", "fa-language", "fa-laptop", "fa-lastfm", "fa-lastfm-square", "fa-leaf", "fa-leanpub", "fa-legal", "fa-lemon-o", "fa-level-down", "fa-level-up", "fa-life-bouy", "fa-life-buoy", "fa-life-ring", "fa-life-saver", "fa-lightbulb-o", "fa-line-chart", "fa-link", "fa-linkedin", "fa-linkedin-square", "fa-linode", "fa-linux", "fa-list", "fa-list-alt", "fa-list-ol", "fa-list-ul", "fa-location-arrow", "fa-lock", "fa-long-arrow-down", "fa-long-arrow-left", "fa-long-arrow-right", "fa-long-arrow-up", "fa-low-vision", "fa-magic", "fa-magnet", "fa-mail-forward", "fa-mail-reply", "fa-mail-reply-all", "fa-male", "fa-map", "fa-map-marker", "fa-map-o", "fa-map-pin", "fa-map-signs", "fa-mars", "fa-mars-double", "fa-mars-stroke", "fa-mars-stroke-h", "fa-mars-stroke-v", "fa-maxcdn", "fa-meanpath", "fa-medium", "fa-medkit", "fa-meetup", "fa-meh-o", "fa-mercury", "fa-microchip", "fa-microphone", "fa-microphone-slash", "fa-minus", "fa-minus-circle", "fa-minus-square", "fa-minus-square-o", "fa-mixcloud", "fa-mobile", "fa-mobile-phone", "fa-modx", "fa-money", "fa-moon-o", "fa-mortar-board", "fa-motorcycle", "fa-mouse-pointer", "fa-music", "fa-navicon", "fa-neuter", "fa-newspaper-o", "fa-object-group", "fa-object-ungroup", "fa-odnoklassniki", "fa-odnoklassniki-square", "fa-opencart", "fa-openid", "fa-opera", "fa-optin-monster", "fa-outdent", "fa-pagelines", "fa-paint-brush", "fa-paper-plane", "fa-paper-plane-o", "fa-paperclip", "fa-paragraph", "fa-paste", "fa-pause", "fa-pause-circle", "fa-pause-circle-o", "fa-paw", "fa-paypal", "fa-pencil", "fa-pencil-square", "fa-pencil-square-o", "fa-percent", "fa-phone", "fa-phone-square", "fa-photo", "fa-picture-o", "fa-pie-chart", "fa-pied-piper", "fa-pied-piper-alt", "fa-pied-piper-pp", "fa-pinterest", "fa-pinterest-p", "fa-pinterest-square", "fa-plane", "fa-play", "fa-play-circle", "fa-play-circle-o", "fa-plug", "fa-plus", "fa-plus-circle", "fa-plus-square", "fa-plus-square-o", "fa-podcast", "fa-power-off", "fa-print", "fa-product-hunt", "fa-puzzle-piece", "fa-qq", "fa-qrcode", "fa-question", "fa-question-circle", "fa-question-circle-o", "fa-quora", "fa-quote-left", "fa-quote-right", "fa-ra", "fa-random", "fa-ravelry", "fa-rebel", "fa-recycle", "fa-reddit", "fa-reddit-alien", "fa-reddit-square", "fa-refresh", "fa-registered", "fa-remove", "fa-renren", "fa-reorder", "fa-repeat", "fa-reply", "fa-reply-all", "fa-resistance", "fa-retweet", "fa-rmb", "fa-road", "fa-rocket", "fa-rotate-left", "fa-rotate-right", "fa-rouble", "fa-rss", "fa-rss-square", "fa-rub", "fa-ruble", "fa-rupee", "fa-s15", "fa-safari", "fa-save", "fa-scissors", "fa-scribd", "fa-search", "fa-search-minus", "fa-search-plus", "fa-sellsy", "fa-send", "fa-send-o", "fa-server", "fa-share", "fa-share-alt", "fa-share-alt-square", "fa-share-square", "fa-share-square-o", "fa-shekel", "fa-sheqel", "fa-shield", "fa-ship", "fa-shirtsinbulk", "fa-shopping-bag", "fa-shopping-basket", "fa-shopping-cart", "fa-shower", "fa-sign-in", "fa-sign-language", "fa-sign-out", "fa-signal", "fa-signing", "fa-simplybuilt", "fa-sitemap", "fa-skyatlas", "fa-skype", "fa-slack", "fa-sliders", "fa-slideshare", "fa-smile-o", "fa-snapchat", "fa-snapchat-ghost", "fa-snapchat-square", "fa-snowflake-o", "fa-soccer-ball-o", "fa-sort", "fa-sort-alpha-asc", "fa-sort-alpha-desc", "fa-sort-amount-asc", "fa-sort-amount-desc", "fa-sort-asc", "fa-sort-desc", "fa-sort-down", "fa-sort-numeric-asc", "fa-sort-numeric-desc", "fa-sort-up", "fa-soundcloud", "fa-space-shuttle", "fa-spinner", "fa-spoon", "fa-spotify", "fa-square", "fa-square-o", "fa-stack-exchange", "fa-stack-overflow", "fa-star", "fa-star-half", "fa-star-half-empty", "fa-star-half-full", "fa-star-half-o", "fa-star-o", "fa-steam", "fa-steam-square", "fa-step-backward", "fa-step-forward", "fa-stethoscope", "fa-sticky-note", "fa-sticky-note-o", "fa-stop", "fa-stop-circle", "fa-stop-circle-o", "fa-street-view", "fa-strikethrough", "fa-stumbleupon", "fa-stumbleupon-circle", "fa-subscript", "fa-subway", "fa-suitcase", "fa-sun-o", "fa-superpowers", "fa-superscript", "fa-support", "fa-table", "fa-tablet", "fa-tachometer", "fa-tag", "fa-tags", "fa-tasks", "fa-taxi", "fa-telegram", "fa-television", "fa-tencent-weibo", "fa-terminal", "fa-text-height", "fa-text-width", "fa-th", "fa-th-large", "fa-th-list", "fa-themeisle", "fa-thermometer", "fa-thermometer-0", "fa-thermometer-1", "fa-thermometer-2", "fa-thermometer-3", "fa-thermometer-4", "fa-thermometer-empty", "fa-thermometer-full", "fa-thermometer-half", "fa-thermometer-quarter", "fa-thermometer-three-quarters", "fa-thumb-tack", "fa-thumbs-down", "fa-thumbs-o-down", "fa-thumbs-o-up", "fa-thumbs-up", "fa-ticket", "fa-times", "fa-times-circle", "fa-times-circle-o", "fa-times-rectangle", "fa-times-rectangle-o", "fa-tint", "fa-toggle-down", "fa-toggle-left", "fa-toggle-off", "fa-toggle-on", "fa-toggle-right", "fa-toggle-up", "fa-trademark", "fa-train", "fa-transgender", "fa-transgender-alt", "fa-trash", "fa-trash-o", "fa-tree", "fa-trello", "fa-tripadvisor", "fa-trophy", "fa-truck", "fa-try", "fa-tty", "fa-tumblr", "fa-tumblr-square", "fa-turkish-lira", "fa-tv", "fa-twitch", "fa-twitter", "fa-twitter-square", "fa-umbrella", "fa-underline", "fa-undo", "fa-universal-access", "fa-university", "fa-unlink", "fa-unlock", "fa-unlock-alt", "fa-unsorted", "fa-upload", "fa-usb", "fa-usd", "fa-user", "fa-user-circle", "fa-user-circle-o", "fa-user-md", "fa-user-o", "fa-user-plus", "fa-user-secret", "fa-user-times", "fa-users", "fa-vcard", "fa-vcard-o", "fa-venus", "fa-venus-double", "fa-venus-mars", "fa-viacoin", "fa-viadeo", "fa-viadeo-square", "fa-video-camera", "fa-vimeo", "fa-vimeo-square", "fa-vine", "fa-vk", "fa-volume-control-phone", "fa-volume-down", "fa-volume-off", "fa-volume-up", "fa-warning", "fa-wechat", "fa-weibo", "fa-weixin", "fa-whatsapp", "fa-wheelchair", "fa-wheelchair-alt", "fa-wifi", "fa-wikipedia-w", "fa-window-close", "fa-window-close-o", "fa-window-maximize", "fa-window-minimize", "fa-window-restore", "fa-windows", "fa-won", "fa-wordpress", "fa-wpbeginner", "fa-wpexplorer", "fa-wpforms", "fa-wrench", "fa-xing", "fa-xing-square", "fa-y-combinator", "fa-y-combinator-square", "fa-yahoo", "fa-yc", "fa-yc-square", "fa-yelp", "fa-yen", "fa-yoast", "fa-youtube", "fa-youtube-play", "fa-youtube-square"]});
\ No newline at end of file
......@@ -78,7 +78,7 @@
<!-- Footer -->
<div class="footer text-muted text-center footerText">
<label id="footerDate">&copy; </label><a href="#">&nbsp; Solicitud de Requerimientos</a> por <a href="#">Área Sistemas TIC</a>
<label id="footerDate">&copy; </label><a href="#">&nbsp; Registro de usuarios Aulavirtual</a> por <a href="#">Área Sistemas TIC</a>
</div>
<!-- /footer -->
......
......@@ -23,7 +23,7 @@
<div class="col-sm-12 col-md-12 col-lg-7 col-centered">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="icon icon-books"></i>&nbsp; REGISTRO DE CURSOS</h6>
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="icon icon-books"></i>&nbsp; REGISTRO DE CURSOS &nbsp;<b class="fa fa-arrow-right"></b>&nbsp;<i id="dataUser">&nbsp; </i></h6>
<div class="heading-elements">
<ul class="icons-list">
<li><a data-action="collapse"></a></li>
......@@ -90,15 +90,19 @@
</div>
<div class="col-sm-12 col-md-12 col-lg-7 col-centered">
<div class="col-sm-12 col-md-12 col-lg-6 col-lg-offset-3">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; LISTADO DE CURSOS</h6>
<div class="heading-elements">
<button type="button" id="btnEliminar" class="btn bg-danger-700 border-danger-800 btn-xs hide"><i class="glyphicon glyphicon-trash"></i>&nbsp; Eliminar</button>
</div>
</div>
<div class="table-responsive">
<table class="table dataTable table-striped table-hover table-sm table-bordered" id="tblCursos">
<table class="table display dataTable table-striped table-hover table-sm table-bordered" id="tblCursos">
<thead>
<tr>
<th class="text-center"><input type="checkbox" class="ckTitle"></th>
<th class="text-center"></th>
<th class="text-center">GRADO</th>
<th class="text-center">CURSO</th>
......
......@@ -19,7 +19,7 @@
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-4 col-centered">
<div class="col-sm-12 col-md-12 col-lg-6 col-lg-offset-3">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="icon icon-search4"></i>&nbsp; BÚSQUEDAS DE USUARIOS</h6>
......@@ -32,7 +32,19 @@
<div class="panel-body" id="panelSearch">
<form id="frmBusqRequ" onsubmit="return false" autocomplete="off">
<div class="row">
<div class='col-md-12' id="div-busq-tipo">
<div class="col-md-4">
<div class="form-group">
<label>
TIPO BÚSQUEDA:
</label>
<span class="asterisk">(*)</span>
<select class="form-control" id="cboTipoBusqueda">
<option value="1">DNI</option>
<option value="2">GRADO</option>
</select>
</div>
</div>
<div class='col-md-8' id="div-busq-dni">
<div class="form-group">
<label>
DNI:
......@@ -41,6 +53,28 @@
<input class="form-control" id="txtDni" name="txtDni" placeholder="Ingrese DNI" maxlength="8" autofocus="">
</div>
</div>
<div class='col-md-4 hide' id="div-busq-nivel">
<div class="form-group">
<label>
NIVEL:
</label>
<span class="asterisk">(*)</span>
<select class="form-control" id="cboNivelBusqueda">
<option value="">[SELECCIONE]</option>
</select>
</div>
</div>
<div class='col-md-4 hide' id="div-busq-grado">
<div class="form-group">
<label>
GRADO:
</label>
<span class="asterisk">(*)</span>
<select class="form-control" id="cboGradoBusqueda" disabled="">
<option value="">[SELECCIONE]</option>
</select>
</div>
</div>
</div>
</form>
<div class="row">
......@@ -62,31 +96,33 @@
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-10 col-lg-offset-1">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; LISTADO DE USUARIOS</h6>
<div class="heading-elements">
<button type="button" id="btnNuevo" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo Usuario</button>
</div>
<div class="col-lg-11 col-centered">
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; LISTADO DE USUARIOS</h6>
<div class="heading-elements">
<button type="button" id="btnNuevo" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo Usuario</button>
<button type="button" id="btnModificar" class="btn bg-teal-600 border-teal-700 btn-xs hide"><i class="glyphicon glyphicon-pencil"></i>&nbsp; Modificar Usuarios</button>
</div>
</div>
<div class="table-responsive">
<table class="table display dataTable table-striped table-hover table-sm table-bordered" id="tblUsuarios">
<thead>
<tr>
<th class="text-center"><input type="checkbox" class="ckTitle"></th>
<th class="text-center"></th>
<th class="text-center">USUARIO</th>
<th class="text-center">DNI</th>
<th class="text-center">TIPO</th>
<th class="text-center">CORREO</th>
<th class="text-center">ROL</th>
<th class="text-center">ACCIONES</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="table-responsive">
<table class="table dataTable table-striped table-hover table-sm table-bordered" id="tblUsuarios">
<thead>
<tr>
<th class="text-center"></th>
<th class="text-center">USUARIO</th>
<th class="text-center">DNI</th>
<th class="text-center">TIPO</th>
<th class="text-center">CORREO</th>
<th class="text-center">ROL</th>
<th class="text-center">ACCIONES</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
......
<!-- Footer -->
<div class="footer fixed">
<div class="ffooter">
<label id="footerDate" style="margin-bottom: 0px">&copy; </label><a href="#">&nbsp; Registro de usuarios Aulavirtual</a> por <a href="#">rea Sistemas TIC</a>
</div>
<!-- /footer -->
......
......@@ -2,7 +2,6 @@
<div class="navbar navbar-default header-highlight">
<div class="navbar-header" style="position: relative;">
<a class="navbar-brand" href="../vistas/main.jsp" id="logistica"></a>
<!--<img src="../img/oie_transparent.png" alt="">-->
<ul class="nav navbar-nav visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
<li><a class="sidebar-mobile-main-toggle"><i class="icon-paragraph-justify3"></i></a></li>
......@@ -17,8 +16,8 @@
<ul class="nav navbar-nav navbar-right">
<li class="dropdown language-switch">
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<img src="../plantilla/assets/images/flags/pe.png" class="position-left" alt="">
Sistemas
<!--<img src="../plantilla/assets/images/flags/pe.png" class="position-left" alt="">-->
SISTEMAS
<span class="caret"></span>
</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment