├── app
├── src
│ ├── assets
│ │ ├── images
│ │ │ ├── book.jpg
│ │ │ ├── user.png
│ │ │ ├── favicon.ico
│ │ │ └── favicon.png
│ │ ├── fonts
│ │ │ ├── overpass
│ │ │ │ ├── Overpass-Bold.eot
│ │ │ │ ├── Overpass-Bold.ttf
│ │ │ │ ├── Overpass-Black.eot
│ │ │ │ ├── Overpass-Black.ttf
│ │ │ │ ├── Overpass-Black.woff
│ │ │ │ ├── Overpass-Black.woff2
│ │ │ │ ├── Overpass-Bold.woff
│ │ │ │ ├── Overpass-Bold.woff2
│ │ │ │ ├── Overpass-Italic.eot
│ │ │ │ ├── Overpass-Italic.ttf
│ │ │ │ ├── Overpass-Italic.woff
│ │ │ │ ├── Overpass-Light.eot
│ │ │ │ ├── Overpass-Light.ttf
│ │ │ │ ├── Overpass-Light.woff
│ │ │ │ ├── Overpass-Light.woff2
│ │ │ │ ├── Overpass-Regular.eot
│ │ │ │ ├── Overpass-Regular.ttf
│ │ │ │ ├── Overpass-ExtraBold.eot
│ │ │ │ ├── Overpass-ExtraBold.ttf
│ │ │ │ ├── Overpass-Italic.woff2
│ │ │ │ ├── Overpass-Regular.woff
│ │ │ │ ├── Overpass-Regular.woff2
│ │ │ │ ├── Overpass-SemiBold.eot
│ │ │ │ ├── Overpass-SemiBold.ttf
│ │ │ │ ├── Overpass-SemiBold.woff
│ │ │ │ ├── Overpass-ExtraBold.woff
│ │ │ │ ├── Overpass-ExtraBold.woff2
│ │ │ │ ├── Overpass-SemiBold.woff2
│ │ │ │ └── stylesheet.css
│ │ │ └── feather-font
│ │ │ │ ├── fonts
│ │ │ │ ├── feather.eot
│ │ │ │ ├── feather.ttf
│ │ │ │ └── feather.woff
│ │ │ │ └── examples
│ │ │ │ └── index.css
│ │ ├── vendors
│ │ │ ├── core
│ │ │ │ └── core.css
│ │ │ ├── promise-polyfill
│ │ │ │ └── polyfill.min.js
│ │ │ └── datatables.net-bs4
│ │ │ │ ├── dataTables.bootstrap4.css
│ │ │ │ └── dataTables.bootstrap4.js
│ │ └── js
│ │ │ └── template.js
│ ├── connection.js
│ ├── views
│ │ ├── js
│ │ │ ├── data-table.js
│ │ │ ├── load-user.js
│ │ │ ├── login.js
│ │ │ ├── modificar.js
│ │ │ ├── consultar.js
│ │ │ ├── metodos-tree.js
│ │ │ ├── tree.js
│ │ │ ├── eliminar.js
│ │ │ ├── agregar.js
│ │ │ └── load-books.js
│ │ ├── login.html
│ │ ├── consultar.html
│ │ ├── index.html
│ │ └── modificar.html
│ └── preload.js
├── .gitignore
└── package.json
├── biblioteca
├── src
│ ├── assets
│ │ ├── images
│ │ │ ├── book.jpg
│ │ │ ├── user.png
│ │ │ ├── favicon.ico
│ │ │ └── favicon.png
│ │ ├── fonts
│ │ │ ├── overpass
│ │ │ │ ├── Overpass-Black.eot
│ │ │ │ ├── Overpass-Black.ttf
│ │ │ │ ├── Overpass-Bold.eot
│ │ │ │ ├── Overpass-Bold.ttf
│ │ │ │ ├── Overpass-Bold.woff
│ │ │ │ ├── Overpass-Light.eot
│ │ │ │ ├── Overpass-Light.ttf
│ │ │ │ ├── Overpass-Black.woff
│ │ │ │ ├── Overpass-Black.woff2
│ │ │ │ ├── Overpass-Bold.woff2
│ │ │ │ ├── Overpass-Italic.eot
│ │ │ │ ├── Overpass-Italic.ttf
│ │ │ │ ├── Overpass-Italic.woff
│ │ │ │ ├── Overpass-Light.woff
│ │ │ │ ├── Overpass-Light.woff2
│ │ │ │ ├── Overpass-Regular.eot
│ │ │ │ ├── Overpass-Regular.ttf
│ │ │ │ ├── Overpass-ExtraBold.eot
│ │ │ │ ├── Overpass-ExtraBold.ttf
│ │ │ │ ├── Overpass-ExtraBold.woff
│ │ │ │ ├── Overpass-Italic.woff2
│ │ │ │ ├── Overpass-Regular.woff
│ │ │ │ ├── Overpass-Regular.woff2
│ │ │ │ ├── Overpass-SemiBold.eot
│ │ │ │ ├── Overpass-SemiBold.ttf
│ │ │ │ ├── Overpass-SemiBold.woff
│ │ │ │ ├── Overpass-SemiBold.woff2
│ │ │ │ ├── Overpass-ExtraBold.woff2
│ │ │ │ └── stylesheet.css
│ │ │ └── feather-font
│ │ │ │ ├── fonts
│ │ │ │ ├── feather.eot
│ │ │ │ ├── feather.ttf
│ │ │ │ └── feather.woff
│ │ │ │ └── examples
│ │ │ │ └── index.css
│ │ ├── vendors
│ │ │ ├── core
│ │ │ │ └── core.css
│ │ │ ├── promise-polyfill
│ │ │ │ └── polyfill.min.js
│ │ │ └── datatables.net-bs4
│ │ │ │ ├── dataTables.bootstrap4.css
│ │ │ │ └── dataTables.bootstrap4.js
│ │ └── js
│ │ │ └── template.js
│ ├── connection.js
│ ├── views
│ │ ├── js
│ │ │ ├── data-table.js
│ │ │ ├── load-user.js
│ │ │ ├── login.js
│ │ │ ├── modificar.js
│ │ │ ├── consultar.js
│ │ │ ├── metodos-tree.js
│ │ │ ├── tree.js
│ │ │ ├── eliminar.js
│ │ │ ├── agregar.js
│ │ │ └── load-books.js
│ │ ├── login.html
│ │ ├── consultar.html
│ │ ├── index.html
│ │ └── modificar.html
│ └── preload.js
├── .gitignore
└── package.json
├── LICENSE
├── README.md
└── BD
└── bd_libreria.sql
/app/src/assets/images/book.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/images/book.jpg
--------------------------------------------------------------------------------
/app/src/assets/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/images/user.png
--------------------------------------------------------------------------------
/app/src/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/images/favicon.ico
--------------------------------------------------------------------------------
/app/src/assets/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/images/favicon.png
--------------------------------------------------------------------------------
/biblioteca/src/assets/images/book.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/images/book.jpg
--------------------------------------------------------------------------------
/biblioteca/src/assets/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/images/user.png
--------------------------------------------------------------------------------
/biblioteca/src/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/images/favicon.ico
--------------------------------------------------------------------------------
/biblioteca/src/assets/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/images/favicon.png
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Bold.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Bold.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Black.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Black.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Black.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Black.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Black.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Black.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Black.woff2
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Bold.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Bold.woff2
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Italic.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Italic.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Italic.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Light.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Light.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Light.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Light.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Light.woff2
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Regular.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Regular.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/feather-font/fonts/feather.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/feather-font/fonts/feather.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/feather-font/fonts/feather.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/feather-font/fonts/feather.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/feather-font/fonts/feather.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/feather-font/fonts/feather.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-ExtraBold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-ExtraBold.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-ExtraBold.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Italic.woff2
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Regular.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-Regular.woff2
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-SemiBold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-SemiBold.eot
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-SemiBold.ttf
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-SemiBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-SemiBold.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-ExtraBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-ExtraBold.woff
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-ExtraBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-ExtraBold.woff2
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/Overpass-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/app/src/assets/fonts/overpass/Overpass-SemiBold.woff2
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Black.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Black.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Black.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Bold.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Bold.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Bold.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Light.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Light.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Light.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Black.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Black.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Black.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Black.woff2
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Bold.woff2
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Italic.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Italic.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Italic.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Light.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Light.woff2
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Regular.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Regular.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/feather-font/fonts/feather.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/feather-font/fonts/feather.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/feather-font/fonts/feather.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/feather-font/fonts/feather.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/feather-font/fonts/feather.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/feather-font/fonts/feather.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Italic.woff2
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Regular.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-Regular.woff2
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.eot
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.ttf
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.woff
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-SemiBold.woff2
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/carmonabernaldiego/electron/HEAD/biblioteca/src/assets/fonts/overpass/Overpass-ExtraBold.woff2
--------------------------------------------------------------------------------
/app/src/connection.js:
--------------------------------------------------------------------------------
1 | const mysql = require('mysql2');
2 |
3 | const connection = mysql.createConnection({
4 | host: '127.0.0.1',
5 | user: 'root',
6 | password: '',
7 | database: 'bd_libreria',
8 | port: '3306'
9 | });
10 |
11 | connection.connect(function (err) {
12 | if (err) {
13 | console.log(err.code);
14 | console.log(err.fatal);
15 | return;
16 | } else {
17 | console.log('Conexion exitosa.');
18 | }
19 | });
20 |
21 | module.exports = connection;
--------------------------------------------------------------------------------
/biblioteca/src/connection.js:
--------------------------------------------------------------------------------
1 | const mysql = require('mysql2');
2 |
3 | const connection = mysql.createConnection({
4 | host: '127.0.0.1',
5 | user: 'root',
6 | password: 'root',
7 | database: 'bd_libreria',
8 | port: '3306'
9 | });
10 |
11 | connection.connect(function (err) {
12 | if (err) {
13 | console.log(err.code);
14 | console.log(err.fatal);
15 | return;
16 | } else {
17 | console.log('Conexion exitosa.');
18 | }
19 | });
20 |
21 | module.exports = connection;
--------------------------------------------------------------------------------
/app/src/views/js/data-table.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | 'use strict';
3 |
4 | $(function () {
5 | $('#dataTable').DataTable({
6 | "aLengthMenu": [
7 | [10, 30, 50, -1],
8 | [10, 30, 50, "todo"]
9 | ],
10 | "iDisplayLength": 10,
11 | "language": {
12 | url: "./js/es-MX.json",
13 | search: ""
14 | }
15 | });
16 | $('#dataTable').each(function () {
17 | var datatable = $(this);
18 | // SEARCH - Add the placeholder for Search and Turn this into in-line form control
19 | var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
20 | search_input.attr('placeholder', 'Search');
21 | search_input.removeClass('form-control-sm');
22 | // LENGTH - Inline-Form control
23 | var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
24 | length_sel.removeClass('form-control-sm');
25 | });
26 | });
27 | });
--------------------------------------------------------------------------------
/biblioteca/src/views/js/data-table.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | 'use strict';
3 |
4 | $(function () {
5 | $('#dataTable').DataTable({
6 | "aLengthMenu": [
7 | [10, 30, 50, -1],
8 | [10, 30, 50, "todo"]
9 | ],
10 | "iDisplayLength": 10,
11 | "language": {
12 | url: "./js/es-MX.json",
13 | search: ""
14 | }
15 | });
16 | $('#dataTable').each(function () {
17 | var datatable = $(this);
18 | // SEARCH - Add the placeholder for Search and Turn this into in-line form control
19 | var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
20 | search_input.attr('placeholder', 'Search');
21 | search_input.removeClass('form-control-sm');
22 | // LENGTH - Inline-Form control
23 | var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
24 | length_sel.removeClass('form-control-sm');
25 | });
26 | });
27 | });
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Diego Carmona Bernal
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/src/preload.js:
--------------------------------------------------------------------------------
1 | const contextBridge = require('electron').contextBridge;
2 | const ipcRender = require('electron').ipcRenderer;
3 |
4 | const ipc = {
5 | 'render': {
6 | 'send': [
7 | 'login',
8 | 'logout',
9 | 'invitado',
10 | 'addBook',
11 | 'updateBook',
12 | 'deleteBook',
13 | 'consultBook',
14 | 'consultCarreras'
15 | ],
16 | 'sendReceive': [
17 | 'getCarreras',
18 | 'getUserData',
19 | 'getBooks',
20 | 'getBook',
21 | 'confirmAddBook',
22 | 'confirmUpdateBook',
23 | 'confirmDeleteBook'
24 | ]
25 | }
26 | };
27 |
28 | contextBridge.exposeInMainWorld(
29 | 'ipcRender', {
30 | send: (channel, args) => {
31 | let validChannels = ipc.render.send;
32 |
33 | if (validChannels.includes(channel)) {
34 | ipcRender.send(channel, args);
35 | }
36 | },
37 | invoke: (channel, args) => {
38 | let validChannels = ipc.render.sendReceive;
39 |
40 | if (validChannels.includes(channel)) {
41 | return ipcRender.invoke(channel, args);
42 | }
43 | }
44 | });
--------------------------------------------------------------------------------
/biblioteca/src/preload.js:
--------------------------------------------------------------------------------
1 | const contextBridge = require('electron').contextBridge;
2 | const ipcRender = require('electron').ipcRenderer;
3 |
4 | const ipc = {
5 | 'render': {
6 | 'send': [
7 | 'login',
8 | 'logout',
9 | 'invitado',
10 | 'addBook',
11 | 'updateBook',
12 | 'deleteBook',
13 | 'consultBook',
14 | 'consultCarreras'
15 | ],
16 | 'sendReceive': [
17 | 'getCarreras',
18 | 'getUserData',
19 | 'getBooks',
20 | 'getBook',
21 | 'confirmAddBook',
22 | 'confirmUpdateBook',
23 | 'confirmDeleteBook'
24 | ]
25 | }
26 | };
27 |
28 | contextBridge.exposeInMainWorld(
29 | 'ipcRender', {
30 | send: (channel, args) => {
31 | let validChannels = ipc.render.send;
32 |
33 | if (validChannels.includes(channel)) {
34 | ipcRender.send(channel, args);
35 | }
36 | },
37 | invoke: (channel, args) => {
38 | let validChannels = ipc.render.sendReceive;
39 |
40 | if (validChannels.includes(channel)) {
41 | return ipcRender.invoke(channel, args);
42 | }
43 | }
44 | });
--------------------------------------------------------------------------------
/biblioteca/src/views/js/load-user.js:
--------------------------------------------------------------------------------
1 | let page;
2 |
3 | document.addEventListener('DOMContentLoaded', function () {
4 | page = new Page(window);
5 | });
6 |
7 | class Page {
8 | constructor() {
9 | this.attachEvents();
10 | this.loadDataUser();
11 | }
12 |
13 | get(id) {
14 | return document.querySelector(id);
15 | }
16 |
17 | attachEvents() {
18 | let btnLogout = this.get('#btnLogout');
19 | btnLogout.addEventListener('click', this.logout);
20 | }
21 |
22 | loadDataUser() {
23 | let profileUser = this.get('#profileUser');
24 | let profileUserBox = this.get('#profileUserBox');
25 | let profileName = this.get('#profileName');
26 | let profileEmail = this.get('#profileEmail');
27 |
28 | window.ipcRender.invoke('getUserData').then((result) => {
29 | const { user, email, permissions, image, name } = result;
30 |
31 | if (permissions == 'admin') {
32 | profileName.innerHTML = name;
33 | profileEmail.innerHTML = email;
34 | profileUser.src = '../assets/images/' + image;
35 | profileUserBox.src = '../assets/images/' + image;
36 |
37 | window.ipcRender.send('consultCarreras');
38 | } else if (permissions == 'invitado') {
39 | profileName.innerHTML = 'Lector';
40 | profileEmail.innerHTML = '';
41 | }
42 | });
43 | }
44 |
45 | logout() {
46 | window.ipcRender.send('logout', 'confirm-logout');
47 | }
48 | }
--------------------------------------------------------------------------------
/app/src/views/js/load-user.js:
--------------------------------------------------------------------------------
1 | let page;
2 |
3 | document.addEventListener('DOMContentLoaded', function () {
4 | page = new Page(window);
5 | });
6 |
7 | class Page {
8 | constructor() {
9 | this.attachEvents();
10 | this.loadDataUser();
11 | }
12 |
13 | get(id) {
14 | return document.querySelector(id);
15 | }
16 |
17 | attachEvents() {
18 | let btnLogout = this.get('#btnLogout');
19 | btnLogout.addEventListener('click', this.logout);
20 | }
21 |
22 | loadDataUser() {
23 | let profileUser = this.get('#profileUser');
24 | let profileUserBox = this.get('#profileUserBox');
25 | let profileName = this.get('#profileName');
26 | let profileEmail = this.get('#profileEmail');
27 |
28 | window.ipcRender.invoke('getUserData').then((result) => {
29 | const { user, email, permissions, image, name } = result;
30 |
31 | if (permissions == 'admin') {
32 | profileName.innerHTML = name;
33 | profileEmail.innerHTML = email;
34 | profileUser.src = 'http://mysoftup.com/images/users/' + image;
35 | profileUserBox.src = 'http://mysoftup.com/images/users/' + image;
36 |
37 | window.ipcRender.send('consultCarreras');
38 | } else if (permissions == 'invitado') {
39 | profileName.innerHTML = 'Lector';
40 | profileEmail.innerHTML = '';
41 | }
42 | });
43 | }
44 |
45 | logout() {
46 | window.ipcRender.send('logout', 'confirm-logout');
47 | }
48 | }
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 | .DS_Store
18 |
19 | # Directory for instrumented libs generated by jscoverage/JSCover
20 | lib-cov
21 |
22 | # Coverage directory used by tools like istanbul
23 | coverage
24 | *.lcov
25 |
26 | # nyc test coverage
27 | .nyc_output
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (https://nodejs.org/api/addons.html)
33 | build/Release
34 |
35 | # Dependency directories
36 | node_modules/
37 | jspm_packages/
38 |
39 | # TypeScript v1 declaration files
40 | typings/
41 |
42 | # TypeScript cache
43 | *.tsbuildinfo
44 |
45 | # Optional npm cache directory
46 | .npm
47 |
48 | # Optional eslint cache
49 | .eslintcache
50 |
51 | # Optional REPL history
52 | .node_repl_history
53 |
54 | # Output of 'npm pack'
55 | *.tgz
56 |
57 | # Yarn Integrity file
58 | .yarn-integrity
59 |
60 | # dotenv environment variables file
61 | .env
62 | .env.test
63 |
64 | # parcel-bundler cache (https://parceljs.org/)
65 | .cache
66 |
67 | # next.js build output
68 | .next
69 |
70 | # nuxt.js build output
71 | .nuxt
72 |
73 | # vuepress build output
74 | .vuepress/dist
75 |
76 | # Serverless directories
77 | .serverless/
78 |
79 | # FuseBox cache
80 | .fusebox/
81 |
82 | # DynamoDB Local files
83 | .dynamodb/
84 |
85 | # Webpack
86 | .webpack/
87 |
88 | # Electron-Forge
89 | out/
90 |
--------------------------------------------------------------------------------
/biblioteca/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | server.js
10 |
11 | # Diagnostic reports (https://nodejs.org/api/report.html)
12 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13 |
14 | # Runtime data
15 | pids
16 | *.pid
17 | *.seed
18 | *.pid.lock
19 | .DS_Store
20 |
21 | # Directory for instrumented libs generated by jscoverage/JSCover
22 | lib-cov
23 |
24 | # Coverage directory used by tools like istanbul
25 | coverage
26 | *.lcov
27 |
28 | # nyc test coverage
29 | .nyc_output
30 |
31 | # node-waf configuration
32 | .lock-wscript
33 |
34 | # Compiled binary addons (https://nodejs.org/api/addons.html)
35 | build/Release
36 |
37 | # Dependency directories
38 | node_modules/
39 | jspm_packages/
40 |
41 | # TypeScript v1 declaration files
42 | typings/
43 |
44 | # TypeScript cache
45 | *.tsbuildinfo
46 |
47 | # Optional npm cache directory
48 | .npm
49 |
50 | # Optional eslint cache
51 | .eslintcache
52 |
53 | # Optional REPL history
54 | .node_repl_history
55 |
56 | # Output of 'npm pack'
57 | *.tgz
58 |
59 | # Yarn Integrity file
60 | .yarn-integrity
61 |
62 | # dotenv environment variables file
63 | .env
64 | .env.test
65 |
66 | # parcel-bundler cache (https://parceljs.org/)
67 | .cache
68 |
69 | # next.js build output
70 | .next
71 |
72 | # nuxt.js build output
73 | .nuxt
74 |
75 | # vuepress build output
76 | .vuepress/dist
77 |
78 | # Serverless directories
79 | .serverless/
80 |
81 | # FuseBox cache
82 | .fusebox/
83 |
84 | # DynamoDB Local files
85 | .dynamodb/
86 |
87 | # Webpack
88 | .webpack/
89 |
90 | # Electron-Forge
91 | out/
92 |
--------------------------------------------------------------------------------
/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "app",
3 | "productName": "app",
4 | "version": "1.0.0",
5 | "description": "Biblioteca Virtual",
6 | "main": "src/main.js",
7 | "scripts": {
8 | "start": "electron-forge start",
9 | "package": "electron-forge package",
10 | "make": "electron-forge make",
11 | "publish": "electron-forge publish",
12 | "lint": "echo \"No linting configured\""
13 | },
14 | "keywords": [],
15 | "author": {
16 | "name": "Diego Carmona Bernal",
17 | "email": "cbdiegox@gmail.com"
18 | },
19 | "license": "MIT",
20 | "config": {
21 | "forge": {
22 | "packagerConfig": {},
23 | "makers": [
24 | {
25 | "name": "@electron-forge/maker-squirrel",
26 | "config": {
27 | "name": "app"
28 | }
29 | },
30 | {
31 | "name": "@electron-forge/maker-zip",
32 | "platforms": [
33 | "darwin"
34 | ]
35 | },
36 | {
37 | "name": "@electron-forge/maker-deb",
38 | "config": {}
39 | },
40 | {
41 | "name": "@electron-forge/maker-rpm",
42 | "config": {}
43 | }
44 | ]
45 | }
46 | },
47 | "dependencies": {
48 | "electron-squirrel-startup": "^1.0.0",
49 | "electron-store": "^8.0.2",
50 | "mysql2": "^2.3.3"
51 | },
52 | "devDependencies": {
53 | "@electron-forge/cli": "^6.0.0-beta.64",
54 | "@electron-forge/maker-deb": "^6.0.0-beta.64",
55 | "@electron-forge/maker-rpm": "^6.0.0-beta.64",
56 | "@electron-forge/maker-squirrel": "^6.0.0-beta.64",
57 | "@electron-forge/maker-zip": "^6.0.0-beta.64",
58 | "electron": "^19.0.10"
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/views/js/login.js:
--------------------------------------------------------------------------------
1 | let error = document.querySelector('#text-error');
2 | let email = document.querySelector('#txtEmail');
3 | let password = document.querySelector('#txtPassword');
4 |
5 | let btnLogin = document.querySelector('#btnLogin');
6 |
7 | btnLogin.addEventListener('click', () => {
8 | validateInputs();
9 | });
10 |
11 | let btnInvitado = document.querySelector('#btnInvitado');
12 |
13 | btnInvitado.addEventListener('click', () => {
14 | invitado();
15 | });
16 |
17 | const formSubmit = (event) => {
18 | event.preventDefault();
19 | login();
20 | return false;
21 | }
22 |
23 | const login = () => {
24 | if (!(email.value == '' && password.value == '')) {
25 | const data = { email: email.value, password: password.value };
26 |
27 | window.ipcRender.send('login', data);
28 |
29 | setTimeout(errorLogin, 300);
30 | }
31 | }
32 |
33 | const errorLogin = () => {
34 | error.innerHTML = 'Correo electrónico o contraseña equivocada.';
35 | error.classList.remove('text-muted');
36 | error.classList.add('text-danger');
37 |
38 | email.value = '';
39 | password.value = '';
40 | email.focus();
41 | }
42 |
43 | const validateInputs = () => {
44 | if (email.value == '') {
45 | error.innerHTML = 'Ingresá tú dirección de correo electrónico.';
46 | error.classList.remove('text-muted');
47 | error.classList.add('text-danger');
48 | } else if (password.value == '') {
49 | error.innerHTML = 'Ingresá tú contraseña.';
50 | error.classList.remove('text-muted');
51 | error.classList.add('text-danger');
52 | }
53 | }
54 |
55 | const invitado = () => {
56 | window.ipcRender.send('invitado', 'invitado');
57 | }
--------------------------------------------------------------------------------
/biblioteca/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "biblioteca",
3 | "productName": "biblioteca",
4 | "version": "1.0.0",
5 | "description": "Biblioteca Virtual",
6 | "main": "src/main.js",
7 | "scripts": {
8 | "start": "electron-forge start",
9 | "package": "electron-forge package",
10 | "make": "electron-forge make",
11 | "publish": "electron-forge publish",
12 | "lint": "echo \"No linting configured\""
13 | },
14 | "keywords": [],
15 | "author": {
16 | "name": "Diego Carmona Bernal",
17 | "email": "cbdiegox@gmail.com"
18 | },
19 | "license": "MIT",
20 | "config": {
21 | "forge": {
22 | "packagerConfig": {},
23 | "makers": [
24 | {
25 | "name": "@electron-forge/maker-squirrel",
26 | "config": {
27 | "name": "biblioteca"
28 | }
29 | },
30 | {
31 | "name": "@electron-forge/maker-zip",
32 | "platforms": [
33 | "darwin"
34 | ]
35 | },
36 | {
37 | "name": "@electron-forge/maker-deb",
38 | "config": {}
39 | },
40 | {
41 | "name": "@electron-forge/maker-rpm",
42 | "config": {}
43 | }
44 | ]
45 | }
46 | },
47 | "dependencies": {
48 | "electron-squirrel-startup": "^1.0.0",
49 | "electron-store": "^8.0.2",
50 | "mysql2": "^2.3.3"
51 | },
52 | "devDependencies": {
53 | "@electron-forge/cli": "^6.0.0-beta.63",
54 | "@electron-forge/maker-deb": "^6.0.0-beta.63",
55 | "@electron-forge/maker-rpm": "^6.0.0-beta.63",
56 | "@electron-forge/maker-squirrel": "^6.0.0-beta.63",
57 | "@electron-forge/maker-zip": "^6.0.0-beta.63",
58 | "electron": "^19.0.11"
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/biblioteca/src/views/js/login.js:
--------------------------------------------------------------------------------
1 | let error = document.querySelector('#text-error');
2 | let email = document.querySelector('#txtEmail');
3 | let password = document.querySelector('#txtPassword');
4 |
5 | let btnLogin = document.querySelector('#btnLogin');
6 |
7 | btnLogin.addEventListener('click', () => {
8 | validateInputs();
9 | });
10 |
11 | let btnInvitado = document.querySelector('#btnInvitado');
12 |
13 | btnInvitado.addEventListener('click', () => {
14 | invitado();
15 | });
16 |
17 | const formSubmit = (event) => {
18 | event.preventDefault();
19 | login();
20 | return false;
21 | }
22 |
23 | const login = () => {
24 | if (!(email.value == '' && password.value == '')) {
25 | const data = { email: email.value, password: password.value };
26 |
27 | window.ipcRender.send('login', data);
28 |
29 | setTimeout(errorLogin, 300);
30 | }
31 | }
32 |
33 | const errorLogin = () => {
34 | error.innerHTML = 'Correo electrónico o contraseña equivocada.';
35 | error.classList.remove('text-muted');
36 | error.classList.add('text-danger');
37 |
38 | email.value = '';
39 | password.value = '';
40 | email.focus();
41 | }
42 |
43 | const validateInputs = () => {
44 | if (email.value == '') {
45 | error.innerHTML = 'Ingresá tú dirección de correo electrónico.';
46 | error.classList.remove('text-muted');
47 | error.classList.add('text-danger');
48 | } else if (password.value == '') {
49 | error.innerHTML = 'Ingresá tú contraseña.';
50 | error.classList.remove('text-muted');
51 | error.classList.add('text-danger');
52 | }
53 | }
54 |
55 | const invitado = () => {
56 | window.ipcRender.send('invitado', 'invitado');
57 | }
--------------------------------------------------------------------------------
/app/src/assets/vendors/core/core.css:
--------------------------------------------------------------------------------
1 | .ps{overflow:hidden!important;overflow-anchor:none;-ms-overflow-style:none;touch-action:auto;-ms-touch-action:auto}.ps__rail-x{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;height:15px;bottom:0;position:absolute}.ps__rail-y{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;width:15px;right:0;position:absolute}.ps--active-x>.ps__rail-x,.ps--active-y>.ps__rail-y{display:block;background-color:transparent}.ps--focus>.ps__rail-x,.ps--focus>.ps__rail-y,.ps--scrolling-x>.ps__rail-x,.ps--scrolling-y>.ps__rail-y,.ps:hover>.ps__rail-x,.ps:hover>.ps__rail-y{opacity:.6}.ps .ps__rail-x.ps--clicking,.ps .ps__rail-x:focus,.ps .ps__rail-x:hover,.ps .ps__rail-y.ps--clicking,.ps .ps__rail-y:focus,.ps .ps__rail-y:hover{background-color:#eee;opacity:.9}.ps__thumb-x{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,height .2s ease-in-out;-webkit-transition:background-color .2s linear,height .2s ease-in-out;height:6px;bottom:2px;position:absolute}.ps__thumb-y{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,width .2s ease-in-out;-webkit-transition:background-color .2s linear,width .2s ease-in-out;width:6px;right:2px;position:absolute}.ps__rail-x.ps--clicking .ps__thumb-x,.ps__rail-x:focus>.ps__thumb-x,.ps__rail-x:hover>.ps__thumb-x{background-color:#999;height:11px}.ps__rail-y.ps--clicking .ps__thumb-y,.ps__rail-y:focus>.ps__thumb-y,.ps__rail-y:hover>.ps__thumb-y{background-color:#999;width:11px}@supports (-ms-overflow-style:none){.ps{overflow:auto!important}}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.ps{overflow:auto!important}}
--------------------------------------------------------------------------------
/biblioteca/src/assets/vendors/core/core.css:
--------------------------------------------------------------------------------
1 | .ps{overflow:hidden!important;overflow-anchor:none;-ms-overflow-style:none;touch-action:auto;-ms-touch-action:auto}.ps__rail-x{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;height:15px;bottom:0;position:absolute}.ps__rail-y{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;width:15px;right:0;position:absolute}.ps--active-x>.ps__rail-x,.ps--active-y>.ps__rail-y{display:block;background-color:transparent}.ps--focus>.ps__rail-x,.ps--focus>.ps__rail-y,.ps--scrolling-x>.ps__rail-x,.ps--scrolling-y>.ps__rail-y,.ps:hover>.ps__rail-x,.ps:hover>.ps__rail-y{opacity:.6}.ps .ps__rail-x.ps--clicking,.ps .ps__rail-x:focus,.ps .ps__rail-x:hover,.ps .ps__rail-y.ps--clicking,.ps .ps__rail-y:focus,.ps .ps__rail-y:hover{background-color:#eee;opacity:.9}.ps__thumb-x{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,height .2s ease-in-out;-webkit-transition:background-color .2s linear,height .2s ease-in-out;height:6px;bottom:2px;position:absolute}.ps__thumb-y{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,width .2s ease-in-out;-webkit-transition:background-color .2s linear,width .2s ease-in-out;width:6px;right:2px;position:absolute}.ps__rail-x.ps--clicking .ps__thumb-x,.ps__rail-x:focus>.ps__thumb-x,.ps__rail-x:hover>.ps__thumb-x{background-color:#999;height:11px}.ps__rail-y.ps--clicking .ps__thumb-y,.ps__rail-y:focus>.ps__thumb-y,.ps__rail-y:hover>.ps__thumb-y{background-color:#999;width:11px}@supports (-ms-overflow-style:none){.ps{overflow:auto!important}}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.ps{overflow:auto!important}}
--------------------------------------------------------------------------------
/app/src/views/js/modificar.js:
--------------------------------------------------------------------------------
1 | const updateBook = (ISBN) => {
2 | window.ipcRender.send('consultBook', ISBN);
3 |
4 | location.href = './form-modificar.html';
5 | }
6 |
7 | const mostrarLibros = (libros) => {
8 | let TablaLibros = document.querySelector('#tabla-libros');
9 | let texto = '';
10 |
11 | TablaLibros.innerHTML = '';
12 |
13 | for (let i = 0; i < libros.length; i++) {
14 | texto +=
15 | `
16 |
17 | ${libros[i].isbn}
18 | ${libros[i].nombre}
19 | ${libros[i].editorial}
20 | ${libros[i].carrera}
21 | ${libros[i].ubicacion}
22 | Modificar
23 |
24 | `;
25 | }
26 |
27 | TablaLibros.innerHTML = texto;
28 | }
29 |
30 | const consultBooks = () => {
31 | window.ipcRender.invoke('getBooks').then((result) => {
32 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
33 |
34 | isbn = isbn.replace(/(^_)|(_$)/g, '');
35 | nombre = nombre.replace(/(^_)|(_$)/g, '');
36 | carrera = carrera.replace(/(^_)|(_$)/g, '');
37 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
38 | editorial = editorial.replace(/(^_)|(_$)/g, '');
39 |
40 | isbn = isbn.split('_');
41 | nombre = nombre.split('_');
42 | carrera = carrera.split('_');
43 | ubicacion = ubicacion.split('_');
44 | editorial = editorial.split('_');
45 |
46 | let libros = [];
47 |
48 | for (let i = 0; i < isbn.length; i++) {
49 | libros.push({
50 | 'isbn': isbn[i],
51 | 'nombre': nombre[i],
52 | 'carrera': carrera[i],
53 | 'ubicacion': ubicacion[i],
54 | 'editorial': editorial[i]
55 | });
56 | }
57 |
58 | mostrarLibros(libros);
59 | });
60 | }
61 |
62 | consultBooks();
--------------------------------------------------------------------------------
/biblioteca/src/views/js/modificar.js:
--------------------------------------------------------------------------------
1 | const updateBook = (ISBN) => {
2 | window.ipcRender.send('consultBook', ISBN);
3 |
4 | location.href = './form-modificar.html';
5 | }
6 |
7 | const mostrarLibros = (libros) => {
8 | let TablaLibros = document.querySelector('#tabla-libros');
9 | let texto = '';
10 |
11 | TablaLibros.innerHTML = '';
12 |
13 | for (let i = 0; i < libros.length; i++) {
14 | texto +=
15 | `
16 |
17 | ${libros[i].isbn}
18 | ${libros[i].nombre}
19 | ${libros[i].editorial}
20 | ${libros[i].carrera}
21 | ${libros[i].ubicacion}
22 | Modificar
23 |
24 | `;
25 | }
26 |
27 | TablaLibros.innerHTML = texto;
28 | }
29 |
30 | const consultBooks = () => {
31 | window.ipcRender.invoke('getBooks').then((result) => {
32 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
33 |
34 | isbn = isbn.replace(/(^_)|(_$)/g, '');
35 | nombre = nombre.replace(/(^_)|(_$)/g, '');
36 | carrera = carrera.replace(/(^_)|(_$)/g, '');
37 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
38 | editorial = editorial.replace(/(^_)|(_$)/g, '');
39 |
40 | isbn = isbn.split('_');
41 | nombre = nombre.split('_');
42 | carrera = carrera.split('_');
43 | ubicacion = ubicacion.split('_');
44 | editorial = editorial.split('_');
45 |
46 | let libros = [];
47 |
48 | for (let i = 0; i < isbn.length; i++) {
49 | libros.push({
50 | 'isbn': isbn[i],
51 | 'nombre': nombre[i],
52 | 'carrera': carrera[i],
53 | 'ubicacion': ubicacion[i],
54 | 'editorial': editorial[i]
55 | });
56 | }
57 |
58 | mostrarLibros(libros);
59 | });
60 | }
61 |
62 | consultBooks();
--------------------------------------------------------------------------------
/app/src/views/js/consultar.js:
--------------------------------------------------------------------------------
1 | let pageConsult;
2 |
3 | document.addEventListener('DOMContentLoaded', function () {
4 | pageConsult = new PageConsult(window);
5 | });
6 |
7 | class PageConsult {
8 | constructor() {
9 | this.consultBooks();
10 | }
11 |
12 | consultBooks() {
13 | window.ipcRender.invoke('getBooks').then((result) => {
14 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
15 |
16 | isbn = isbn.replace(/(^_)|(_$)/g, '');
17 | nombre = nombre.replace(/(^_)|(_$)/g, '');
18 | carrera = carrera.replace(/(^_)|(_$)/g, '');
19 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
20 | editorial = editorial.replace(/(^_)|(_$)/g, '');
21 |
22 | isbn = isbn.split('_');
23 | nombre = nombre.split('_');
24 | carrera = carrera.split('_');
25 | ubicacion = ubicacion.split('_');
26 | editorial = editorial.split('_');
27 |
28 | let libros = [];
29 |
30 | for (let i = 0; i < isbn.length; i++) {
31 | libros.push({
32 | 'isbn': isbn[i],
33 | 'nombre': nombre[i],
34 | 'carrera': carrera[i],
35 | 'ubicacion': ubicacion[i],
36 | 'editorial': editorial[i]
37 | });
38 | }
39 |
40 | mostrarLibros(libros);
41 | });
42 | }
43 | }
44 |
45 | const mostrarLibros = (libros) => {
46 | let TablaLibros = document.querySelector('#tabla-libros');
47 | let texto = '';
48 |
49 | TablaLibros.innerHTML = '';
50 |
51 | for (let i = 0; i < libros.length; i++) {
52 | texto +=
53 | `
54 |
55 | ${libros[i].isbn}
56 | ${libros[i].nombre}
57 | ${libros[i].editorial}
58 | ${libros[i].carrera}
59 | ${libros[i].ubicacion}
60 |
61 | `;
62 | }
63 |
64 | TablaLibros.innerHTML = texto;
65 | }
--------------------------------------------------------------------------------
/biblioteca/src/views/js/consultar.js:
--------------------------------------------------------------------------------
1 | let pageConsult;
2 |
3 | document.addEventListener('DOMContentLoaded', function () {
4 | pageConsult = new PageConsult(window);
5 | });
6 |
7 | class PageConsult {
8 | constructor() {
9 | this.consultBooks();
10 | }
11 |
12 | consultBooks() {
13 | window.ipcRender.invoke('getBooks').then((result) => {
14 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
15 |
16 | isbn = isbn.replace(/(^_)|(_$)/g, '');
17 | nombre = nombre.replace(/(^_)|(_$)/g, '');
18 | carrera = carrera.replace(/(^_)|(_$)/g, '');
19 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
20 | editorial = editorial.replace(/(^_)|(_$)/g, '');
21 |
22 | isbn = isbn.split('_');
23 | nombre = nombre.split('_');
24 | carrera = carrera.split('_');
25 | ubicacion = ubicacion.split('_');
26 | editorial = editorial.split('_');
27 |
28 | let libros = [];
29 |
30 | for (let i = 0; i < isbn.length; i++) {
31 | libros.push({
32 | 'isbn': isbn[i],
33 | 'nombre': nombre[i],
34 | 'carrera': carrera[i],
35 | 'ubicacion': ubicacion[i],
36 | 'editorial': editorial[i]
37 | });
38 | }
39 |
40 | mostrarLibros(libros);
41 | });
42 | }
43 | }
44 |
45 | const mostrarLibros = (libros) => {
46 | let TablaLibros = document.querySelector('#tabla-libros');
47 | let texto = '';
48 |
49 | TablaLibros.innerHTML = '';
50 |
51 | for (let i = 0; i < libros.length; i++) {
52 | texto +=
53 | `
54 |
55 | ${libros[i].isbn}
56 | ${libros[i].nombre}
57 | ${libros[i].editorial}
58 | ${libros[i].carrera}
59 | ${libros[i].ubicacion}
60 |
61 | `;
62 | }
63 |
64 | TablaLibros.innerHTML = texto;
65 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Electron - Fichero Bibliotecario
2 |
3 | **Guía de Instalación Rápida:**
4 |
5 | 1. Abre una terminal o línea de comandos en tu sistema.
6 |
7 | 2. Navega a la ubicación donde deseas clonar el repositorio. Puedes hacerlo usando el comando cd seguido de la ruta del directorio. Por ejemplo: `cd /ruta/del/directorio`
8 |
9 | 3. Clona el repositorio usando el siguiente comando:
10 |
11 | > `git clone https://github.com/carmonabernaldiego/electron.git`
12 |
13 | 4. Accede al gestor de base de datos MySQL y asegúrate de tenerlo instalado en tu sistema. Luego, importa el archivo "bd_libreria.sql" que se encuentra en la carpeta "BD" del repositorio clonado. Puedes importar el archivo utilizando una herramienta de administración de MySQL como phpMyAdmin o el comando mysql en la línea de comandos.
14 |
15 | 5. Después de clonar el repositorio, posiciona la terminal en la carpeta correspondiente dependiendo del sistema operativo:
16 |
17 | - En Windows: Navega a la carpeta "biblioteca" usando el comando cd biblioteca.
18 | - En Linux: Navega a la carpeta "app" usando el comando cd app.
19 |
20 | 6. Ejecuta los siguientes comandos para instalar las dependencias necesarias:
21 |
22 | > `npm install electron`
23 | >
24 | > `npm install mysql2`
25 | >
26 | > `npm install electron-store`
27 |
28 |
29 | Estos comandos instalarán las dependencias de Electron, mysql2 y electron-store en tu proyecto.
30 |
31 | 7. Una vez que se hayan instalado las dependencias, ejecuta el siguiente comando para iniciar la aplicación:
32 |
33 | > `npm run start`
34 |
35 | Este comando iniciará la aplicación utilizando Electron.
36 |
37 | Usuarios:
38 |
39 |
40 |
41 |
42 |
43 | 
44 |
45 | 
46 |
47 | 
48 |
--------------------------------------------------------------------------------
/app/src/views/js/metodos-tree.js:
--------------------------------------------------------------------------------
1 | /*
2 | Pseudo:
3 | Todo va a estar en una funcion que se llame inOrden que se va a encargar de ordenar todo,
4 | esta funcion recibe un arreglo de objetos.
5 |
6 | La Key = libro.NOMBRE
7 | Contenido de Arbol = libro;
8 |
9 | 1. Se recibe un arreglo lleno de objetos (BASE DATOS)
10 | 2. Se hace un Tree.Add ( key , objeto ), esto por medio de un for que se encarde de TreeAdd(libro[i].NOMBRE , libro)
11 | 3. Se retorna un Tree.InOrden (Un arreglo ordenado que solo contenga los objetos)
12 |
13 |
14 | */
15 |
16 | import { arbol } from './tree.js';
17 |
18 | const ordenamientoArbol = (libro) => {
19 | //RECIBO LA FUNCION LIBRO CON LOS RESULTADOS DE LA CONSULTA SQL DESORDENADO
20 | let raiz = new arbol();
21 |
22 | //SE INSERTAN TODOS LOS DATOS AL ARBOL
23 | for (let i = 0; i < libro.length; i++) {
24 | raiz.insertar(libro[i].nombre, libro[i]) //SE MANDA EL TEXTO EN LA KEY Y EL OBJETO
25 | }
26 |
27 | let datosInOrden = [];
28 | datosInOrden = raiz.lanzarInOrden(raiz.nodoInicial);
29 | return datosInOrden;
30 | }
31 |
32 |
33 | const filtrarArbol = (libro, carrera) => {
34 | /*
35 | 1. Recibo el arreglo con todos mis objetos
36 | 2. Se hace un Tree.Add ( key , objeto ), esto por medio de un for que se encarge de TreeAdd(libro[i].NOMBRE, libro)
37 |
38 | 3. Se recorre uno por uno con una condicional de if libro.objeto.carrera = carrera entonces libro.borrar(raiz.nodoInicial , carreras)
39 | */
40 |
41 | let raiz = new arbol();
42 |
43 | for (let i = 0; i < libro.length; i++) {
44 | raiz.insertar(libro[i].nombre, libro[i]);
45 | }
46 |
47 | let carreras = ['Software', 'Ambiental', 'Energía', 'PyMES', 'Inglés'];
48 | let i = carreras.indexOf(carrera);
49 |
50 | if (i !== -1) {
51 | carreras.splice(i, 1);
52 | }
53 |
54 | for (let i = 0; i < carreras.length; i++) {
55 | raiz.filtrarCarrera(raiz.nodoInicial, carreras[i]);
56 | raiz.filtrarCarrera(raiz.nodoInicial, carreras[i]);
57 | //SE MANDA A LLAMAR DOS VECES POR QUE AVECES QUEDAN RESTOS AL SER UN LENGUAJE NO TIPADO
58 | }
59 |
60 | return raiz.lanzarInOrden(raiz.nodoInicial);
61 | }
62 |
63 | export { ordenamientoArbol, filtrarArbol }
--------------------------------------------------------------------------------
/biblioteca/src/views/js/metodos-tree.js:
--------------------------------------------------------------------------------
1 | /*
2 | Pseudo:
3 | Todo va a estar en una funcion que se llame inOrden que se va a encargar de ordenar todo,
4 | esta funcion recibe un arreglo de objetos.
5 |
6 | La Key = libro.NOMBRE
7 | Contenido de Arbol = libro;
8 |
9 | 1. Se recibe un arreglo lleno de objetos (BASE DATOS)
10 | 2. Se hace un Tree.Add ( key , objeto ), esto por medio de un for que se encarde de TreeAdd(libro[i].NOMBRE , libro)
11 | 3. Se retorna un Tree.InOrden (Un arreglo ordenado que solo contenga los objetos)
12 |
13 |
14 | */
15 |
16 | import { arbol } from './tree.js';
17 |
18 | const ordenamientoArbol = (libro) => {
19 | //RECIBO LA FUNCION LIBRO CON LOS RESULTADOS DE LA CONSULTA SQL DESORDENADO
20 | let raiz = new arbol();
21 |
22 | //SE INSERTAN TODOS LOS DATOS AL ARBOL
23 | for (let i = 0; i < libro.length; i++) {
24 | raiz.insertar(libro[i].nombre, libro[i]) //SE MANDA EL TEXTO EN LA KEY Y EL OBJETO
25 | }
26 |
27 | let datosInOrden = [];
28 | datosInOrden = raiz.lanzarInOrden(raiz.nodoInicial);
29 | return datosInOrden;
30 | }
31 |
32 |
33 | const filtrarArbol = (libro, carrera) => {
34 | /*
35 | 1. Recibo el arreglo con todos mis objetos
36 | 2. Se hace un Tree.Add ( key , objeto ), esto por medio de un for que se encarge de TreeAdd(libro[i].NOMBRE, libro)
37 |
38 | 3. Se recorre uno por uno con una condicional de if libro.objeto.carrera = carrera entonces libro.borrar(raiz.nodoInicial , carreras)
39 | */
40 |
41 | let raiz = new arbol();
42 |
43 | for (let i = 0; i < libro.length; i++) {
44 | raiz.insertar(libro[i].nombre, libro[i]);
45 | }
46 |
47 | let carreras = ['Software', 'Ambiental', 'Energía', 'PyMES', 'Inglés'];
48 | let i = carreras.indexOf(carrera);
49 |
50 | if (i !== -1) {
51 | carreras.splice(i, 1);
52 | }
53 |
54 | for (let i = 0; i < carreras.length; i++) {
55 | raiz.filtrarCarrera(raiz.nodoInicial, carreras[i]);
56 | raiz.filtrarCarrera(raiz.nodoInicial, carreras[i]);
57 | //SE MANDA A LLAMAR DOS VECES POR QUE AVECES QUEDAN RESTOS AL SER UN LENGUAJE NO TIPADO
58 | }
59 |
60 | return raiz.lanzarInOrden(raiz.nodoInicial);
61 | }
62 |
63 | export { ordenamientoArbol, filtrarArbol }
--------------------------------------------------------------------------------
/app/src/assets/fonts/overpass/stylesheet.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Overpass';
3 | src: url('Overpass-Regular.eot');
4 | src: url('Overpass-Regular.eot?#iefix') format('embedded-opentype'),
5 | url('Overpass-Regular.woff2') format('woff2'),
6 | url('Overpass-Regular.woff') format('woff'),
7 | url('Overpass-Regular.ttf') format('truetype');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 |
12 | @font-face {
13 | font-family: 'Overpass';
14 | src: url('Overpass-SemiBold.eot');
15 | src: url('Overpass-SemiBold.eot?#iefix') format('embedded-opentype'),
16 | url('Overpass-SemiBold.woff2') format('woff2'),
17 | url('Overpass-SemiBold.woff') format('woff'),
18 | url('Overpass-SemiBold.ttf') format('truetype');
19 | font-weight: 600;
20 | font-style: normal;
21 | }
22 |
23 | @font-face {
24 | font-family: 'Overpass';
25 | src: url('Overpass-Italic.eot');
26 | src: url('Overpass-Italic.eot?#iefix') format('embedded-opentype'),
27 | url('Overpass-Italic.woff2') format('woff2'),
28 | url('Overpass-Italic.woff') format('woff'),
29 | url('Overpass-Italic.ttf') format('truetype');
30 | font-weight: normal;
31 | font-style: italic;
32 | }
33 |
34 | @font-face {
35 | font-family: 'Overpass';
36 | src: url('Overpass-Light.eot');
37 | src: url('Overpass-Light.eot?#iefix') format('embedded-opentype'),
38 | url('Overpass-Light.woff2') format('woff2'),
39 | url('Overpass-Light.woff') format('woff'),
40 | url('Overpass-Light.ttf') format('truetype');
41 | font-weight: 300;
42 | font-style: normal;
43 | }
44 |
45 | @font-face {
46 | font-family: 'Overpass';
47 | src: url('Overpass-ExtraBold.eot');
48 | src: url('Overpass-ExtraBold.eot?#iefix') format('embedded-opentype'),
49 | url('Overpass-ExtraBold.woff2') format('woff2'),
50 | url('Overpass-ExtraBold.woff') format('woff'),
51 | url('Overpass-ExtraBold.ttf') format('truetype');
52 | font-weight: 800;
53 | font-style: normal;
54 | }
55 |
56 | @font-face {
57 | font-family: 'Overpass';
58 | src: url('Overpass-Bold.eot');
59 | src: url('Overpass-Bold.eot?#iefix') format('embedded-opentype'),
60 | url('Overpass-Bold.woff2') format('woff2'),
61 | url('Overpass-Bold.woff') format('woff'),
62 | url('Overpass-Bold.ttf') format('truetype');
63 | font-weight: bold;
64 | font-style: normal;
65 | }
66 |
67 | @font-face {
68 | font-family: 'Overpass';
69 | src: url('Overpass-Black.eot');
70 | src: url('Overpass-Black.eot?#iefix') format('embedded-opentype'),
71 | url('Overpass-Black.woff2') format('woff2'),
72 | url('Overpass-Black.woff') format('woff'),
73 | url('Overpass-Black.ttf') format('truetype');
74 | font-weight: 900;
75 | font-style: normal;
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/overpass/stylesheet.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Overpass';
3 | src: url('Overpass-Regular.eot');
4 | src: url('Overpass-Regular.eot?#iefix') format('embedded-opentype'),
5 | url('Overpass-Regular.woff2') format('woff2'),
6 | url('Overpass-Regular.woff') format('woff'),
7 | url('Overpass-Regular.ttf') format('truetype');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 |
12 | @font-face {
13 | font-family: 'Overpass';
14 | src: url('Overpass-SemiBold.eot');
15 | src: url('Overpass-SemiBold.eot?#iefix') format('embedded-opentype'),
16 | url('Overpass-SemiBold.woff2') format('woff2'),
17 | url('Overpass-SemiBold.woff') format('woff'),
18 | url('Overpass-SemiBold.ttf') format('truetype');
19 | font-weight: 600;
20 | font-style: normal;
21 | }
22 |
23 | @font-face {
24 | font-family: 'Overpass';
25 | src: url('Overpass-Italic.eot');
26 | src: url('Overpass-Italic.eot?#iefix') format('embedded-opentype'),
27 | url('Overpass-Italic.woff2') format('woff2'),
28 | url('Overpass-Italic.woff') format('woff'),
29 | url('Overpass-Italic.ttf') format('truetype');
30 | font-weight: normal;
31 | font-style: italic;
32 | }
33 |
34 | @font-face {
35 | font-family: 'Overpass';
36 | src: url('Overpass-Light.eot');
37 | src: url('Overpass-Light.eot?#iefix') format('embedded-opentype'),
38 | url('Overpass-Light.woff2') format('woff2'),
39 | url('Overpass-Light.woff') format('woff'),
40 | url('Overpass-Light.ttf') format('truetype');
41 | font-weight: 300;
42 | font-style: normal;
43 | }
44 |
45 | @font-face {
46 | font-family: 'Overpass';
47 | src: url('Overpass-ExtraBold.eot');
48 | src: url('Overpass-ExtraBold.eot?#iefix') format('embedded-opentype'),
49 | url('Overpass-ExtraBold.woff2') format('woff2'),
50 | url('Overpass-ExtraBold.woff') format('woff'),
51 | url('Overpass-ExtraBold.ttf') format('truetype');
52 | font-weight: 800;
53 | font-style: normal;
54 | }
55 |
56 | @font-face {
57 | font-family: 'Overpass';
58 | src: url('Overpass-Bold.eot');
59 | src: url('Overpass-Bold.eot?#iefix') format('embedded-opentype'),
60 | url('Overpass-Bold.woff2') format('woff2'),
61 | url('Overpass-Bold.woff') format('woff'),
62 | url('Overpass-Bold.ttf') format('truetype');
63 | font-weight: bold;
64 | font-style: normal;
65 | }
66 |
67 | @font-face {
68 | font-family: 'Overpass';
69 | src: url('Overpass-Black.eot');
70 | src: url('Overpass-Black.eot?#iefix') format('embedded-opentype'),
71 | url('Overpass-Black.woff2') format('woff2'),
72 | url('Overpass-Black.woff') format('woff'),
73 | url('Overpass-Black.ttf') format('truetype');
74 | font-weight: 900;
75 | font-style: normal;
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/app/src/assets/vendors/promise-polyfill/polyfill.min.js:
--------------------------------------------------------------------------------
1 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||"undefined"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if("function"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype["finally"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var u=n.then;if("function"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError("Promise.race accepts an array"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=o});
2 |
--------------------------------------------------------------------------------
/biblioteca/src/assets/vendors/promise-polyfill/polyfill.min.js:
--------------------------------------------------------------------------------
1 | !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(e){return!(!e||"undefined"==typeof e.length)}function t(){}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],c(e,this)}function r(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(r){return void f(n.promise,r)}i(n.promise,o)}else(1===e._state?i:f)(n.promise,e._value)})):e._deferreds.push(n)}function i(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if(n instanceof o)return e._state=3,e._value=n,void u(e);if("function"==typeof t)return void c(function(e,n){return function(){e.apply(n,arguments)}}(t,n),e)}e._state=1,e._value=n,u(e)}catch(r){f(e,r)}}function f(e,n){e._state=2,e._value=n,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var n=0,t=e._deferreds.length;t>n;n++)r(e,e._deferreds[n]);e._deferreds=null}function c(e,n){var t=!1;try{e(function(e){t||(t=!0,i(n,e))},function(e){t||(t=!0,f(n,e))})}catch(o){if(t)return;t=!0,f(n,o)}}var a=setTimeout;o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,n){var o=new this.constructor(t);return r(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,n,o)),o},o.prototype["finally"]=e,o.all=function(e){return new o(function(t,o){function r(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var u=n.then;if("function"==typeof u)return void u.call(n,function(n){r(e,n)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o(function(n){n(e)})},o.reject=function(e){return new o(function(n,t){t(e)})},o.race=function(e){return new o(function(t,r){if(!n(e))return r(new TypeError("Promise.race accepts an array"));for(var i=0,f=e.length;f>i;i++)o.resolve(e[i]).then(t,r)})},o._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},o._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=o});
2 |
--------------------------------------------------------------------------------
/app/src/views/js/tree.js:
--------------------------------------------------------------------------------
1 | class nodo {
2 | constructor(key, objeto) { //Aqui recibo la key que seria
3 | this.key = key;
4 | this.objeto = objeto;
5 | this.izquierda = null;
6 | this.derecha = null;
7 | }
8 |
9 | insertar(key, objeto) {
10 | if (key < this.key) {
11 | if (this.izquierda == null) {
12 | this.izquierda = new nodo(key, objeto);
13 | } else {
14 | this.izquierda.insertar(key, objeto);
15 | }
16 | } else {
17 | if (this.derecha == null) {
18 | this.derecha = new nodo(key, objeto);
19 | } else {
20 | this.derecha.insertar(key, objeto);
21 | }
22 |
23 | }
24 | }
25 | }
26 |
27 | export class arbol {
28 | constructor() {
29 | this.nodoInicial = null;
30 | }
31 |
32 | insertar(key, objeto) {
33 | if (this.nodoInicial == null) {
34 | this.nodoInicial = new nodo(key, objeto);
35 | } else {
36 | this.nodoInicial.insertar(key, objeto);
37 | }
38 | }
39 |
40 | lanzarInOrden(nodo) {
41 |
42 | //SE DEFINE UN ARREGLO
43 | let datosInOrden = [];
44 |
45 | //Se manda el arreglo al metodo in Orden
46 | datosInOrden = this.inOrden(nodo, datosInOrden)
47 | return datosInOrden;
48 |
49 |
50 | }
51 |
52 | inOrden(nodo, datosInOrden) {
53 | if (nodo == null) {
54 | return;
55 | } else {
56 | this.inOrden(nodo.izquierda, datosInOrden);
57 | //console.log( nodo.key );
58 | datosInOrden.push(nodo.objeto);
59 | this.inOrden(nodo.derecha, datosInOrden);
60 | //PUSHEA RECURSIVAMENTE AL DATOS IN ORDEN
61 | }
62 |
63 | //CUANDO NO PASA NADA SOLO LO REGRESA
64 | return datosInOrden;
65 | }
66 |
67 | //SE AÑADE EXISTE
68 | existe(nodo, busqueda) {
69 | if (nodo == null) {
70 | return false;
71 | }
72 |
73 | if (nodo.key == busqueda) {
74 | return true;
75 | } else if (busqueda < nodo.key) {
76 | return this.existe(nodo.izquierda, busqueda);
77 | } else {
78 | return this.existe(nodo.derecha, busqueda);
79 | }
80 |
81 | }
82 |
83 | eliminar(nodo, keyBorrar) {
84 | if (nodo == null) {
85 | return nodo;
86 | }
87 |
88 | //METODO DE BUSQUEDA
89 | if (keyBorrar < nodo.key) {
90 |
91 | nodo.izquierda = this.eliminar(nodo.izquierda, keyBorrar);
92 |
93 | } else if (keyBorrar > nodo.key) {
94 |
95 | nodo.derecha = this.eliminar(nodo.derecha, keyBorrar)
96 | } else {
97 |
98 | // Borrar nodo sin nodos hoja (nodos nodo)
99 |
100 | if (nodo.izquierda == null && nodo.derecha == null) {
101 | return null;
102 | } else if (nodo.izquierda == null) {
103 | return nodo.derecha;
104 | } else if (nodo.derecha == null) {
105 | return nodo.izquierda;
106 |
107 |
108 | } else {
109 | let valorMinimo = this.valorMinimo(nodo.derecha);
110 |
111 | nodo.key = valorMinimo.key;
112 | nodo.objeto = valorMinimo.objeto;
113 | nodo.derecha = this.eliminar(nodo.derecha, valorMinimo.key);
114 |
115 | }
116 | }
117 | return nodo;
118 | }
119 |
120 | valorMinimo(nodo) {
121 | if (nodo.izquierda != null) {
122 | return this.valorMinimo(nodo.izquierda);
123 | }
124 | return nodo;
125 | }
126 |
127 | filtrarCarrera(nodo, carrera) {
128 | {
129 | if (nodo == null) {
130 | return;
131 | } else {
132 | this.filtrarCarrera(nodo.izquierda, carrera);
133 |
134 | if (nodo.objeto.carrera == carrera) {
135 |
136 | this.eliminar(this.nodoInicial, nodo.key);
137 | }
138 |
139 | this.filtrarCarrera(nodo.derecha, carrera);
140 | }
141 | }
142 | }
143 | }
--------------------------------------------------------------------------------
/biblioteca/src/views/js/tree.js:
--------------------------------------------------------------------------------
1 | class nodo {
2 | constructor(key, objeto) { //Aqui recibo la key que seria
3 | this.key = key;
4 | this.objeto = objeto;
5 | this.izquierda = null;
6 | this.derecha = null;
7 | }
8 |
9 | insertar(key, objeto) {
10 | if (key < this.key) {
11 | if (this.izquierda == null) {
12 | this.izquierda = new nodo(key, objeto);
13 | } else {
14 | this.izquierda.insertar(key, objeto);
15 | }
16 | } else {
17 | if (this.derecha == null) {
18 | this.derecha = new nodo(key, objeto);
19 | } else {
20 | this.derecha.insertar(key, objeto);
21 | }
22 |
23 | }
24 | }
25 | }
26 |
27 | export class arbol {
28 | constructor() {
29 | this.nodoInicial = null;
30 | }
31 |
32 | insertar(key, objeto) {
33 | if (this.nodoInicial == null) {
34 | this.nodoInicial = new nodo(key, objeto);
35 | } else {
36 | this.nodoInicial.insertar(key, objeto);
37 | }
38 | }
39 |
40 | lanzarInOrden(nodo) {
41 |
42 | //SE DEFINE UN ARREGLO
43 | let datosInOrden = [];
44 |
45 | //Se manda el arreglo al metodo in Orden
46 | datosInOrden = this.inOrden(nodo, datosInOrden)
47 | return datosInOrden;
48 |
49 |
50 | }
51 |
52 | inOrden(nodo, datosInOrden) {
53 | if (nodo == null) {
54 | return;
55 | } else {
56 | this.inOrden(nodo.izquierda, datosInOrden);
57 | //console.log( nodo.key );
58 | datosInOrden.push(nodo.objeto);
59 | this.inOrden(nodo.derecha, datosInOrden);
60 | //PUSHEA RECURSIVAMENTE AL DATOS IN ORDEN
61 | }
62 |
63 | //CUANDO NO PASA NADA SOLO LO REGRESA
64 | return datosInOrden;
65 | }
66 |
67 | //SE AÑADE EXISTE
68 | existe(nodo, busqueda) {
69 | if (nodo == null) {
70 | return false;
71 | }
72 |
73 | if (nodo.key == busqueda) {
74 | return true;
75 | } else if (busqueda < nodo.key) {
76 | return this.existe(nodo.izquierda, busqueda);
77 | } else {
78 | return this.existe(nodo.derecha, busqueda);
79 | }
80 |
81 | }
82 |
83 | eliminar(nodo, keyBorrar) {
84 | if (nodo == null) {
85 | return nodo;
86 | }
87 |
88 | //METODO DE BUSQUEDA
89 | if (keyBorrar < nodo.key) {
90 |
91 | nodo.izquierda = this.eliminar(nodo.izquierda, keyBorrar);
92 |
93 | } else if (keyBorrar > nodo.key) {
94 |
95 | nodo.derecha = this.eliminar(nodo.derecha, keyBorrar)
96 | } else {
97 |
98 | // Borrar nodo sin nodos hoja (nodos nodo)
99 |
100 | if (nodo.izquierda == null && nodo.derecha == null) {
101 | return null;
102 | } else if (nodo.izquierda == null) {
103 | return nodo.derecha;
104 | } else if (nodo.derecha == null) {
105 | return nodo.izquierda;
106 |
107 |
108 | } else {
109 | let valorMinimo = this.valorMinimo(nodo.derecha);
110 |
111 | nodo.key = valorMinimo.key;
112 | nodo.objeto = valorMinimo.objeto;
113 | nodo.derecha = this.eliminar(nodo.derecha, valorMinimo.key);
114 |
115 | }
116 | }
117 | return nodo;
118 | }
119 |
120 | valorMinimo(nodo) {
121 | if (nodo.izquierda != null) {
122 | return this.valorMinimo(nodo.izquierda);
123 | }
124 | return nodo;
125 | }
126 |
127 | filtrarCarrera(nodo, carrera) {
128 | {
129 | if (nodo == null) {
130 | return;
131 | } else {
132 | this.filtrarCarrera(nodo.izquierda, carrera);
133 |
134 | if (nodo.objeto.carrera == carrera) {
135 |
136 | this.eliminar(this.nodoInicial, nodo.key);
137 | }
138 |
139 | this.filtrarCarrera(nodo.derecha, carrera);
140 | }
141 | }
142 | }
143 | }
--------------------------------------------------------------------------------
/app/src/views/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/biblioteca/src/views/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/app/src/views/js/eliminar.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | showSwal = function (type, ISBN) {
3 | 'use strict';
4 | if (type === 'passing-parameter-execute-cancel') {
5 | const swalWithBootstrapButtons = Swal.mixin({
6 | customClass: {
7 | confirmButton: 'btn btn-success',
8 | cancelButton: 'btn btn-danger mr-2'
9 | },
10 | buttonsStyling: false,
11 | allowEscapeKey: false,
12 | allowOutsideClick: false
13 | });
14 |
15 | swalWithBootstrapButtons.fire({
16 | title: '¿Estas seguro?',
17 | text: "¡Esta acción no se puede revertir!",
18 | icon: 'warning',
19 | showCancelButton: true,
20 | confirmButtonClass: 'mr-2',
21 | confirmButtonText: '¡Si, eliminar!',
22 | cancelButtonText: '¡No, cancelar!',
23 | reverseButtons: true
24 | }).then((result) => {
25 | if (result.value) {
26 | window.ipcRender.send('deleteBook', ISBN);
27 | localStorage.setItem('reload', '1');
28 | location.reload();
29 | } else if (result.dismiss === Swal.DismissReason.cancel) {
30 | swalWithBootstrapButtons.fire(
31 | 'Cancelado',
32 | 'La información permanece segura :)',
33 | 'error'
34 | );
35 | }
36 | });
37 | }
38 | }
39 | });
40 |
41 | if (localStorage.getItem('reload') == '1') {
42 | localStorage.removeItem('reload');
43 |
44 | window.ipcRender.invoke('confirmDeleteBook').then((confirm) => {
45 | const swalWithBootstrapButtons = Swal.mixin({
46 | customClass: {
47 | confirmButton: 'btn btn-success',
48 | cancelButton: 'btn btn-danger mr-2'
49 | },
50 | buttonsStyling: false,
51 | allowEscapeKey: false,
52 | allowOutsideClick: false
53 | });
54 |
55 | if (confirm == 1) {
56 | swalWithBootstrapButtons.fire({
57 | title: '¡Eliminado!',
58 | text: "Registro eliminado.",
59 | icon: 'success',
60 | confirmButtonClass: 'mr-2'
61 | }).then((result) => {
62 | if (result.value) {
63 | consultBooks();
64 | location.reload();
65 | }
66 | });
67 | } else if (confirm == 0) {
68 | swalWithBootstrapButtons.fire(
69 | 'Cancelado',
70 | 'La información permanece segura :)',
71 | 'error'
72 | );
73 | }
74 | });
75 | }
76 |
77 | const mostrarLibros = (libros) => {
78 | let TablaLibros = document.querySelector('#tabla-libros');
79 | let texto = '';
80 |
81 | TablaLibros.innerHTML = '';
82 |
83 | for (let i = 0; i < libros.length; i++) {
84 | texto +=
85 | `
86 |
87 | ${libros[i].isbn}
88 | ${libros[i].nombre}
89 | ${libros[i].editorial}
90 | ${libros[i].carrera}
91 | ${libros[i].ubicacion}
92 | Eliminar
93 |
94 | `;
95 | }
96 |
97 | TablaLibros.innerHTML = texto;
98 | }
99 |
100 | const consultBooks = () => {
101 | window.ipcRender.invoke('getBooks').then((result) => {
102 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
103 |
104 | isbn = isbn.replace(/(^_)|(_$)/g, '');
105 | nombre = nombre.replace(/(^_)|(_$)/g, '');
106 | carrera = carrera.replace(/(^_)|(_$)/g, '');
107 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
108 | editorial = editorial.replace(/(^_)|(_$)/g, '');
109 |
110 | isbn = isbn.split('_');
111 | nombre = nombre.split('_');
112 | carrera = carrera.split('_');
113 | ubicacion = ubicacion.split('_');
114 | editorial = editorial.split('_');
115 |
116 | let libros = [];
117 |
118 | for (let i = 0; i < isbn.length; i++) {
119 | libros.push({
120 | 'isbn': isbn[i],
121 | 'nombre': nombre[i],
122 | 'carrera': carrera[i],
123 | 'ubicacion': ubicacion[i],
124 | 'editorial': editorial[i]
125 | });
126 | }
127 |
128 | mostrarLibros(libros);
129 | });
130 | }
131 |
132 | consultBooks();
--------------------------------------------------------------------------------
/biblioteca/src/views/js/eliminar.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | showSwal = function (type, ISBN) {
3 | 'use strict';
4 | if (type === 'passing-parameter-execute-cancel') {
5 | const swalWithBootstrapButtons = Swal.mixin({
6 | customClass: {
7 | confirmButton: 'btn btn-success',
8 | cancelButton: 'btn btn-danger mr-2'
9 | },
10 | buttonsStyling: false,
11 | allowEscapeKey: false,
12 | allowOutsideClick: false
13 | });
14 |
15 | swalWithBootstrapButtons.fire({
16 | title: '¿Estas seguro?',
17 | text: "¡Esta acción no se puede revertir!",
18 | icon: 'warning',
19 | showCancelButton: true,
20 | confirmButtonClass: 'mr-2',
21 | confirmButtonText: '¡Si, eliminar!',
22 | cancelButtonText: '¡No, cancelar!',
23 | reverseButtons: true
24 | }).then((result) => {
25 | if (result.value) {
26 | window.ipcRender.send('deleteBook', ISBN);
27 | localStorage.setItem('reload', '1');
28 | location.reload();
29 | } else if (result.dismiss === Swal.DismissReason.cancel) {
30 | swalWithBootstrapButtons.fire(
31 | 'Cancelado',
32 | 'La información permanece segura :)',
33 | 'error'
34 | );
35 | }
36 | });
37 | }
38 | }
39 | });
40 |
41 | if (localStorage.getItem('reload') == '1') {
42 | localStorage.removeItem('reload');
43 |
44 | window.ipcRender.invoke('confirmDeleteBook').then((confirm) => {
45 | const swalWithBootstrapButtons = Swal.mixin({
46 | customClass: {
47 | confirmButton: 'btn btn-success',
48 | cancelButton: 'btn btn-danger mr-2'
49 | },
50 | buttonsStyling: false,
51 | allowEscapeKey: false,
52 | allowOutsideClick: false
53 | });
54 |
55 | if (confirm == 1) {
56 | swalWithBootstrapButtons.fire({
57 | title: '¡Eliminado!',
58 | text: "Registro eliminado.",
59 | icon: 'success',
60 | confirmButtonClass: 'mr-2'
61 | }).then((result) => {
62 | if (result.value) {
63 | consultBooks();
64 | location.reload();
65 | }
66 | });
67 | } else if (confirm == 0) {
68 | swalWithBootstrapButtons.fire(
69 | 'Cancelado',
70 | 'La información permanece segura :)',
71 | 'error'
72 | );
73 | }
74 | });
75 | }
76 |
77 | const mostrarLibros = (libros) => {
78 | let TablaLibros = document.querySelector('#tabla-libros');
79 | let texto = '';
80 |
81 | TablaLibros.innerHTML = '';
82 |
83 | for (let i = 0; i < libros.length; i++) {
84 | texto +=
85 | `
86 |
87 | ${libros[i].isbn}
88 | ${libros[i].nombre}
89 | ${libros[i].editorial}
90 | ${libros[i].carrera}
91 | ${libros[i].ubicacion}
92 | Eliminar
93 |
94 | `;
95 | }
96 |
97 | TablaLibros.innerHTML = texto;
98 | }
99 |
100 | const consultBooks = () => {
101 | window.ipcRender.invoke('getBooks').then((result) => {
102 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
103 |
104 | isbn = isbn.replace(/(^_)|(_$)/g, '');
105 | nombre = nombre.replace(/(^_)|(_$)/g, '');
106 | carrera = carrera.replace(/(^_)|(_$)/g, '');
107 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
108 | editorial = editorial.replace(/(^_)|(_$)/g, '');
109 |
110 | isbn = isbn.split('_');
111 | nombre = nombre.split('_');
112 | carrera = carrera.split('_');
113 | ubicacion = ubicacion.split('_');
114 | editorial = editorial.split('_');
115 |
116 | let libros = [];
117 |
118 | for (let i = 0; i < isbn.length; i++) {
119 | libros.push({
120 | 'isbn': isbn[i],
121 | 'nombre': nombre[i],
122 | 'carrera': carrera[i],
123 | 'ubicacion': ubicacion[i],
124 | 'editorial': editorial[i]
125 | });
126 | }
127 |
128 | mostrarLibros(libros);
129 | });
130 | }
131 |
132 | consultBooks();
--------------------------------------------------------------------------------
/app/src/assets/vendors/datatables.net-bs4/dataTables.bootstrap4.css:
--------------------------------------------------------------------------------
1 | table.dataTable{clear:both;margin-top:6px!important;margin-bottom:6px!important;max-width:none!important;border-collapse:separate!important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap td,table.dataTable.nowrap th{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:400;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:400;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:.85em;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>td.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc{padding-right:30px}table.dataTable thead>tr>td:active,table.dataTable thead>tr>th:active{outline:0}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc_disabled:after,table.dataTable thead .sorting_desc_disabled:before{position:absolute;bottom:.9em;display:block;opacity:.3}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_desc_disabled:after{right:.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0!important}div.dataTables_scrollBody table{border-top:none;margin-top:0!important;margin-bottom:0!important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting:before,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_asc:before,div.dataTables_scrollBody table thead .sorting_desc:after,div.dataTables_scrollBody table thead .sorting_desc:before{display:none}div.dataTables_scrollBody table tbody tr:first-child td,div.dataTables_scrollBody table tbody tr:first-child th{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0!important;border-top:none}@media screen and (max-width:767px){div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_paginate{text-align:center}div.dataTables_wrapper div.dataTables_paginate ul.pagination{justify-content:center!important}}table.dataTable.table-sm>thead>tr>th :not(.sorting_disabled){padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable{border-right-width:0}table.table-bordered.dataTable td,table.table-bordered.dataTable th{border-left-width:0}table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable th:last-child{border-right-width:1px}table.table-bordered.dataTable tbody td,table.table-bordered.dataTable tbody th{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child{padding-right:0}
--------------------------------------------------------------------------------
/biblioteca/src/assets/vendors/datatables.net-bs4/dataTables.bootstrap4.css:
--------------------------------------------------------------------------------
1 | table.dataTable{clear:both;margin-top:6px!important;margin-bottom:6px!important;max-width:none!important;border-collapse:separate!important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap td,table.dataTable.nowrap th{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:400;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:400;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:.85em;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>td.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc{padding-right:30px}table.dataTable thead>tr>td:active,table.dataTable thead>tr>th:active{outline:0}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc_disabled:after,table.dataTable thead .sorting_desc_disabled:before{position:absolute;bottom:.9em;display:block;opacity:.3}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_desc_disabled:after{right:.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0!important}div.dataTables_scrollBody table{border-top:none;margin-top:0!important;margin-bottom:0!important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting:before,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_asc:before,div.dataTables_scrollBody table thead .sorting_desc:after,div.dataTables_scrollBody table thead .sorting_desc:before{display:none}div.dataTables_scrollBody table tbody tr:first-child td,div.dataTables_scrollBody table tbody tr:first-child th{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0!important;border-top:none}@media screen and (max-width:767px){div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_paginate{text-align:center}div.dataTables_wrapper div.dataTables_paginate ul.pagination{justify-content:center!important}}table.dataTable.table-sm>thead>tr>th :not(.sorting_disabled){padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable{border-right-width:0}table.table-bordered.dataTable td,table.table-bordered.dataTable th{border-left-width:0}table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable th:last-child{border-right-width:1px}table.table-bordered.dataTable tbody td,table.table-bordered.dataTable tbody th{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child{padding-right:0}
--------------------------------------------------------------------------------
/app/src/assets/vendors/datatables.net-bs4/dataTables.bootstrap4.js:
--------------------------------------------------------------------------------
1 | /*! DataTables Bootstrap 4 integration
2 | * ©2011-2017 SpryMedia Ltd - datatables.net/license
3 | */
4 |
5 | /**
6 | * DataTables integration for Bootstrap 4. This requires Bootstrap 4 and
7 | * DataTables 1.10 or newer.
8 | *
9 | * This file sets the defaults and adds options to DataTables to style its
10 | * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
11 | * for further information.
12 | */
13 | (function( factory ){
14 | if ( typeof define === 'function' && define.amd ) {
15 | // AMD
16 | define( ['jquery', 'datatables.net'], function ( $ ) {
17 | return factory( $, window, document );
18 | } );
19 | }
20 | else if ( typeof exports === 'object' ) {
21 | // CommonJS
22 | module.exports = function (root, $) {
23 | if ( ! root ) {
24 | root = window;
25 | }
26 |
27 | if ( ! $ || ! $.fn.dataTable ) {
28 | // Require DataTables, which attaches to jQuery, including
29 | // jQuery if needed and have a $ property so we can access the
30 | // jQuery object that is used
31 | $ = require('datatables.net')(root, $).$;
32 | }
33 |
34 | return factory( $, root, root.document );
35 | };
36 | }
37 | else {
38 | // Browser
39 | factory( jQuery, window, document );
40 | }
41 | }(function( $, window, document, undefined ) {
42 | 'use strict';
43 | var DataTable = $.fn.dataTable;
44 |
45 |
46 | /* Set the defaults for DataTables initialisation */
47 | $.extend( true, DataTable.defaults, {
48 | dom:
49 | "<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>" +
50 | "<'row'<'col-sm-12'tr>>" +
51 | "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
52 | renderer: 'bootstrap'
53 | } );
54 |
55 |
56 | /* Default class modification */
57 | $.extend( DataTable.ext.classes, {
58 | sWrapper: "dataTables_wrapper dt-bootstrap4",
59 | sFilterInput: "form-control form-control-sm",
60 | sLengthSelect: "custom-select custom-select-sm form-control form-control-sm",
61 | sProcessing: "dataTables_processing card",
62 | sPageButton: "paginate_button page-item"
63 | } );
64 |
65 |
66 | /* Bootstrap paging button renderer */
67 | DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
68 | var api = new DataTable.Api( settings );
69 | var classes = settings.oClasses;
70 | var lang = settings.oLanguage.oPaginate;
71 | var aria = settings.oLanguage.oAria.paginate || {};
72 | var btnDisplay, btnClass, counter=0;
73 |
74 | var attach = function( container, buttons ) {
75 | var i, ien, node, button;
76 | var clickHandler = function ( e ) {
77 | e.preventDefault();
78 | if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) {
79 | api.page( e.data.action ).draw( 'page' );
80 | }
81 | };
82 |
83 | for ( i=0, ien=buttons.length ; i 0 ?
102 | '' : ' disabled');
103 | break;
104 |
105 | case 'previous':
106 | btnDisplay = lang.sPrevious;
107 | btnClass = button + (page > 0 ?
108 | '' : ' disabled');
109 | break;
110 |
111 | case 'next':
112 | btnDisplay = lang.sNext;
113 | btnClass = button + (page < pages-1 ?
114 | '' : ' disabled');
115 | break;
116 |
117 | case 'last':
118 | btnDisplay = lang.sLast;
119 | btnClass = button + (page < pages-1 ?
120 | '' : ' disabled');
121 | break;
122 |
123 | default:
124 | btnDisplay = button + 1;
125 | btnClass = page === button ?
126 | 'active' : '';
127 | break;
128 | }
129 |
130 | if ( btnDisplay ) {
131 | node = $('', {
132 | 'class': classes.sPageButton+' '+btnClass,
133 | 'id': idx === 0 && typeof button === 'string' ?
134 | settings.sTableId +'_'+ button :
135 | null
136 | } )
137 | .append( $('', {
138 | 'href': '#',
139 | 'aria-controls': settings.sTableId,
140 | 'aria-label': aria[ button ],
141 | 'data-dt-idx': counter,
142 | 'tabindex': settings.iTabIndex,
143 | 'class': 'page-link'
144 | } )
145 | .html( btnDisplay )
146 | )
147 | .appendTo( container );
148 |
149 | settings.oApi._fnBindAction(
150 | node, {action: button}, clickHandler
151 | );
152 |
153 | counter++;
154 | }
155 | }
156 | }
157 | };
158 |
159 | // IE9 throws an 'unknown error' if document.activeElement is used
160 | // inside an iframe or frame.
161 | var activeEl;
162 |
163 | try {
164 | // Because this approach is destroying and recreating the paging
165 | // elements, focus is lost on the select button which is bad for
166 | // accessibility. So we want to restore focus once the draw has
167 | // completed
168 | activeEl = $(host).find(document.activeElement).data('dt-idx');
169 | }
170 | catch (e) {}
171 |
172 | attach(
173 | $(host).empty().html('').children('ul'),
174 | buttons
175 | );
176 |
177 | if ( activeEl !== undefined ) {
178 | $(host).find( '[data-dt-idx='+activeEl+']' ).trigger('focus');
179 | }
180 | };
181 |
182 |
183 | return DataTable;
184 | }));
185 |
--------------------------------------------------------------------------------
/biblioteca/src/assets/vendors/datatables.net-bs4/dataTables.bootstrap4.js:
--------------------------------------------------------------------------------
1 | /*! DataTables Bootstrap 4 integration
2 | * ©2011-2017 SpryMedia Ltd - datatables.net/license
3 | */
4 |
5 | /**
6 | * DataTables integration for Bootstrap 4. This requires Bootstrap 4 and
7 | * DataTables 1.10 or newer.
8 | *
9 | * This file sets the defaults and adds options to DataTables to style its
10 | * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
11 | * for further information.
12 | */
13 | (function( factory ){
14 | if ( typeof define === 'function' && define.amd ) {
15 | // AMD
16 | define( ['jquery', 'datatables.net'], function ( $ ) {
17 | return factory( $, window, document );
18 | } );
19 | }
20 | else if ( typeof exports === 'object' ) {
21 | // CommonJS
22 | module.exports = function (root, $) {
23 | if ( ! root ) {
24 | root = window;
25 | }
26 |
27 | if ( ! $ || ! $.fn.dataTable ) {
28 | // Require DataTables, which attaches to jQuery, including
29 | // jQuery if needed and have a $ property so we can access the
30 | // jQuery object that is used
31 | $ = require('datatables.net')(root, $).$;
32 | }
33 |
34 | return factory( $, root, root.document );
35 | };
36 | }
37 | else {
38 | // Browser
39 | factory( jQuery, window, document );
40 | }
41 | }(function( $, window, document, undefined ) {
42 | 'use strict';
43 | var DataTable = $.fn.dataTable;
44 |
45 |
46 | /* Set the defaults for DataTables initialisation */
47 | $.extend( true, DataTable.defaults, {
48 | dom:
49 | "<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>" +
50 | "<'row'<'col-sm-12'tr>>" +
51 | "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
52 | renderer: 'bootstrap'
53 | } );
54 |
55 |
56 | /* Default class modification */
57 | $.extend( DataTable.ext.classes, {
58 | sWrapper: "dataTables_wrapper dt-bootstrap4",
59 | sFilterInput: "form-control form-control-sm",
60 | sLengthSelect: "custom-select custom-select-sm form-control form-control-sm",
61 | sProcessing: "dataTables_processing card",
62 | sPageButton: "paginate_button page-item"
63 | } );
64 |
65 |
66 | /* Bootstrap paging button renderer */
67 | DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
68 | var api = new DataTable.Api( settings );
69 | var classes = settings.oClasses;
70 | var lang = settings.oLanguage.oPaginate;
71 | var aria = settings.oLanguage.oAria.paginate || {};
72 | var btnDisplay, btnClass, counter=0;
73 |
74 | var attach = function( container, buttons ) {
75 | var i, ien, node, button;
76 | var clickHandler = function ( e ) {
77 | e.preventDefault();
78 | if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) {
79 | api.page( e.data.action ).draw( 'page' );
80 | }
81 | };
82 |
83 | for ( i=0, ien=buttons.length ; i 0 ?
102 | '' : ' disabled');
103 | break;
104 |
105 | case 'previous':
106 | btnDisplay = lang.sPrevious;
107 | btnClass = button + (page > 0 ?
108 | '' : ' disabled');
109 | break;
110 |
111 | case 'next':
112 | btnDisplay = lang.sNext;
113 | btnClass = button + (page < pages-1 ?
114 | '' : ' disabled');
115 | break;
116 |
117 | case 'last':
118 | btnDisplay = lang.sLast;
119 | btnClass = button + (page < pages-1 ?
120 | '' : ' disabled');
121 | break;
122 |
123 | default:
124 | btnDisplay = button + 1;
125 | btnClass = page === button ?
126 | 'active' : '';
127 | break;
128 | }
129 |
130 | if ( btnDisplay ) {
131 | node = $('', {
132 | 'class': classes.sPageButton+' '+btnClass,
133 | 'id': idx === 0 && typeof button === 'string' ?
134 | settings.sTableId +'_'+ button :
135 | null
136 | } )
137 | .append( $('', {
138 | 'href': '#',
139 | 'aria-controls': settings.sTableId,
140 | 'aria-label': aria[ button ],
141 | 'data-dt-idx': counter,
142 | 'tabindex': settings.iTabIndex,
143 | 'class': 'page-link'
144 | } )
145 | .html( btnDisplay )
146 | )
147 | .appendTo( container );
148 |
149 | settings.oApi._fnBindAction(
150 | node, {action: button}, clickHandler
151 | );
152 |
153 | counter++;
154 | }
155 | }
156 | }
157 | };
158 |
159 | // IE9 throws an 'unknown error' if document.activeElement is used
160 | // inside an iframe or frame.
161 | var activeEl;
162 |
163 | try {
164 | // Because this approach is destroying and recreating the paging
165 | // elements, focus is lost on the select button which is bad for
166 | // accessibility. So we want to restore focus once the draw has
167 | // completed
168 | activeEl = $(host).find(document.activeElement).data('dt-idx');
169 | }
170 | catch (e) {}
171 |
172 | attach(
173 | $(host).empty().html('').children('ul'),
174 | buttons
175 | );
176 |
177 | if ( activeEl !== undefined ) {
178 | $(host).find( '[data-dt-idx='+activeEl+']' ).trigger('focus');
179 | }
180 | };
181 |
182 |
183 | return DataTable;
184 | }));
185 |
--------------------------------------------------------------------------------
/app/src/views/js/agregar.js:
--------------------------------------------------------------------------------
1 | let txtISBN = document.querySelector('#txtISBN');
2 | let txtNombre = document.querySelector('#txtNombre');
3 | let selectCarrera = document.querySelector('#selectCarrera');
4 | let txtUbicacion = document.querySelector('#txtUbicacion');
5 | let txtEditorial = document.querySelector('#txtEditorial');
6 |
7 | window.ipcRender.invoke('getCarreras').then((result) => {
8 | let { idCarrera, nombreCarrera } = result;
9 |
10 | idCarrera = idCarrera.replace(/(^_)|(_$)/g, '');
11 | idCarrera = idCarrera.split('_');
12 | nombreCarrera = nombreCarrera.replace(/(^_)|(_$)/g, '');
13 | nombreCarrera = nombreCarrera.split('_');
14 |
15 | let carreras = [];
16 |
17 | for (let i = 0; i < idCarrera.length; i++) {
18 | carreras.push({
19 | 'idCarrera': idCarrera[i],
20 | 'nombreCarrera': nombreCarrera[i]
21 | });
22 | }
23 |
24 | let texto = '';
25 |
26 | for (let i = 0; i < carreras.length; i++) {
27 | texto +=
28 | `
29 | ${carreras[i].nombreCarrera}
30 | `;
31 | }
32 |
33 | selectCarrera.innerHTML += texto;
34 | });
35 |
36 | txtISBN.focus();
37 |
38 | txtISBN.addEventListener('keypress', function (e) {
39 | if (!soloNumeros(e)) {
40 | e.preventDefault();
41 | }
42 | });
43 |
44 | let btnAgregar = document.querySelector('#btnAgregar');
45 |
46 | btnAgregar.addEventListener('click', () => {
47 | if (!(txtISBN.value == '' || txtNombre.value == '' || selectCarrera.value == '' || txtUbicacion.value == '' || txtEditorial.value == '')) {
48 | let data = { isbn: txtISBN.value, nombre: txtNombre.value, carrera: selectCarrera.value, ubicacion: txtUbicacion.value, editorial: txtEditorial.value };
49 | addBook(data);
50 | }
51 | });
52 |
53 | const addBook = (data) => {
54 | window.ipcRender.send('addBook', data);
55 | localStorage.setItem('reload', '1');
56 | location.reload();
57 | }
58 |
59 | if (localStorage.getItem('reload') == '1') {
60 | localStorage.removeItem('reload');
61 |
62 | window.ipcRender.invoke('confirmAddBook').then((confirm) => {
63 | const swalWithBootstrapButtons = Swal.mixin({
64 | customClass: {
65 | confirmButton: 'btn btn-success',
66 | cancelButton: 'btn btn-danger mr-2'
67 | },
68 | buttonsStyling: false,
69 | allowEscapeKey: false,
70 | allowOutsideClick: false
71 | });
72 |
73 | if (confirm == 1) {
74 | swalWithBootstrapButtons.fire({
75 | title: '¡Agregado!',
76 | text: "Registro agregado.",
77 | icon: 'success',
78 | confirmButtonClass: 'mr-2'
79 | }).then((result) => {
80 | if (result.value) {
81 | consultBooks();
82 | }
83 | });
84 | } else if (confirm == 0) {
85 | swalWithBootstrapButtons.fire({
86 | title: '¡Error!',
87 | text: "No se puede agregar un nuevo registro a la base de datos.",
88 | icon: 'error',
89 | confirmButtonClass: 'mr-2'
90 | }).then((result) => {
91 | if (result.value) {
92 | consultBooks();
93 | }
94 | });
95 | }
96 | });
97 | }
98 |
99 | const mostrarLibros = (libros) => {
100 | let TablaLibros = document.querySelector('#tabla-libros');
101 | let texto = '';
102 |
103 | TablaLibros.innerHTML = '';
104 |
105 | for (let i = 0; i < libros.length; i++) {
106 | texto +=
107 | `
108 |
109 | ${libros[i].isbn}
110 | ${libros[i].nombre}
111 | ${libros[i].editorial}
112 | ${libros[i].carrera}
113 | ${libros[i].ubicacion}
114 | Eliminar
115 |
116 | `;
117 | }
118 |
119 | TablaLibros.innerHTML = texto;
120 | }
121 |
122 | const consultBooks = () => {
123 | window.ipcRender.invoke('getBooks').then((result) => {
124 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
125 |
126 | isbn = isbn.replace(/(^_)|(_$)/g, '');
127 | nombre = nombre.replace(/(^_)|(_$)/g, '');
128 | carrera = carrera.replace(/(^_)|(_$)/g, '');
129 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
130 | editorial = editorial.replace(/(^_)|(_$)/g, '');
131 |
132 | isbn = isbn.split('_');
133 | nombre = nombre.split('_');
134 | carrera = carrera.split('_');
135 | ubicacion = ubicacion.split('_');
136 | editorial = editorial.split('_');
137 |
138 | let libros = [];
139 |
140 | for (let i = 0; i < isbn.length; i++) {
141 | libros.push({
142 | 'isbn': isbn[i],
143 | 'nombre': nombre[i],
144 | 'carrera': carrera[i],
145 | 'ubicacion': ubicacion[i],
146 | 'editorial': editorial[i]
147 | });
148 | }
149 |
150 | mostrarLibros(libros);
151 | });
152 | }
153 |
154 | function soloNumeros(e) {
155 | var key = e.charCode;
156 | return key >= 48 && key <= 57 || key == 13;
157 | }
158 |
159 | const formSubmit = (event) => {
160 | event.preventDefault();
161 | return false;
162 | }
--------------------------------------------------------------------------------
/biblioteca/src/views/js/agregar.js:
--------------------------------------------------------------------------------
1 | let txtISBN = document.querySelector('#txtISBN');
2 | let txtNombre = document.querySelector('#txtNombre');
3 | let selectCarrera = document.querySelector('#selectCarrera');
4 | let txtUbicacion = document.querySelector('#txtUbicacion');
5 | let txtEditorial = document.querySelector('#txtEditorial');
6 |
7 | window.ipcRender.invoke('getCarreras').then((result) => {
8 | let { idCarrera, nombreCarrera } = result;
9 |
10 | idCarrera = idCarrera.replace(/(^_)|(_$)/g, '');
11 | idCarrera = idCarrera.split('_');
12 | nombreCarrera = nombreCarrera.replace(/(^_)|(_$)/g, '');
13 | nombreCarrera = nombreCarrera.split('_');
14 |
15 | let carreras = [];
16 |
17 | for (let i = 0; i < idCarrera.length; i++) {
18 | carreras.push({
19 | 'idCarrera': idCarrera[i],
20 | 'nombreCarrera': nombreCarrera[i]
21 | });
22 | }
23 |
24 | let texto = '';
25 |
26 | for (let i = 0; i < carreras.length; i++) {
27 | texto +=
28 | `
29 | ${carreras[i].nombreCarrera}
30 | `;
31 | }
32 |
33 | selectCarrera.innerHTML += texto;
34 | });
35 |
36 | txtISBN.focus();
37 |
38 | txtISBN.addEventListener('keypress', function (e) {
39 | if (!soloNumeros(e)) {
40 | e.preventDefault();
41 | }
42 | });
43 |
44 | let btnAgregar = document.querySelector('#btnAgregar');
45 |
46 | btnAgregar.addEventListener('click', () => {
47 | if (!(txtISBN.value == '' || txtNombre.value == '' || selectCarrera.value == '' || txtUbicacion.value == '' || txtEditorial.value == '')) {
48 | let data = { isbn: txtISBN.value, nombre: txtNombre.value, carrera: selectCarrera.value, ubicacion: txtUbicacion.value, editorial: txtEditorial.value };
49 | addBook(data);
50 | }
51 | });
52 |
53 | const addBook = (data) => {
54 | window.ipcRender.send('addBook', data);
55 | localStorage.setItem('reload', '1');
56 | location.reload();
57 | }
58 |
59 | if (localStorage.getItem('reload') == '1') {
60 | localStorage.removeItem('reload');
61 |
62 | window.ipcRender.invoke('confirmAddBook').then((confirm) => {
63 | const swalWithBootstrapButtons = Swal.mixin({
64 | customClass: {
65 | confirmButton: 'btn btn-success',
66 | cancelButton: 'btn btn-danger mr-2'
67 | },
68 | buttonsStyling: false,
69 | allowEscapeKey: false,
70 | allowOutsideClick: false
71 | });
72 |
73 | if (confirm == 1) {
74 | swalWithBootstrapButtons.fire({
75 | title: '¡Agregado!',
76 | text: "Registro agregado.",
77 | icon: 'success',
78 | confirmButtonClass: 'mr-2'
79 | }).then((result) => {
80 | if (result.value) {
81 | consultBooks();
82 | }
83 | });
84 | } else if (confirm == 0) {
85 | swalWithBootstrapButtons.fire({
86 | title: '¡Error!',
87 | text: "No se puede agregar un nuevo registro a la base de datos.",
88 | icon: 'error',
89 | confirmButtonClass: 'mr-2'
90 | }).then((result) => {
91 | if (result.value) {
92 | consultBooks();
93 | }
94 | });
95 | }
96 | });
97 | }
98 |
99 | const mostrarLibros = (libros) => {
100 | let TablaLibros = document.querySelector('#tabla-libros');
101 | let texto = '';
102 |
103 | TablaLibros.innerHTML = '';
104 |
105 | for (let i = 0; i < libros.length; i++) {
106 | texto +=
107 | `
108 |
109 | ${libros[i].isbn}
110 | ${libros[i].nombre}
111 | ${libros[i].editorial}
112 | ${libros[i].carrera}
113 | ${libros[i].ubicacion}
114 | Eliminar
115 |
116 | `;
117 | }
118 |
119 | TablaLibros.innerHTML = texto;
120 | }
121 |
122 | const consultBooks = () => {
123 | window.ipcRender.invoke('getBooks').then((result) => {
124 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
125 |
126 | isbn = isbn.replace(/(^_)|(_$)/g, '');
127 | nombre = nombre.replace(/(^_)|(_$)/g, '');
128 | carrera = carrera.replace(/(^_)|(_$)/g, '');
129 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
130 | editorial = editorial.replace(/(^_)|(_$)/g, '');
131 |
132 | isbn = isbn.split('_');
133 | nombre = nombre.split('_');
134 | carrera = carrera.split('_');
135 | ubicacion = ubicacion.split('_');
136 | editorial = editorial.split('_');
137 |
138 | let libros = [];
139 |
140 | for (let i = 0; i < isbn.length; i++) {
141 | libros.push({
142 | 'isbn': isbn[i],
143 | 'nombre': nombre[i],
144 | 'carrera': carrera[i],
145 | 'ubicacion': ubicacion[i],
146 | 'editorial': editorial[i]
147 | });
148 | }
149 |
150 | mostrarLibros(libros);
151 | });
152 | }
153 |
154 | function soloNumeros(e) {
155 | var key = e.charCode;
156 | return key >= 48 && key <= 57 || key == 13;
157 | }
158 |
159 | const formSubmit = (event) => {
160 | event.preventDefault();
161 | return false;
162 | }
--------------------------------------------------------------------------------
/BD/bd_libreria.sql:
--------------------------------------------------------------------------------
1 | CREATE DATABASE IF NOT EXISTS bd_libreria;
2 |
3 | USE bd_libreria;
4 |
5 | CREATE TABLE `carreras` (
6 | `id_carrera` int(3) NOT NULL,
7 | `nombre_carrera` varchar(100) COLLATE utf8_spanish2_ci NOT NULL DEFAULT ''
8 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;
9 |
10 | INSERT INTO `carreras` (`id_carrera`, `nombre_carrera`) VALUES
11 | (489, 'Ambiental'),
12 | (571, 'Energía'),
13 | (638, 'PyMES'),
14 | (783, 'Software'),
15 | (892, 'Inglés');
16 |
17 | CREATE TABLE `libros` (
18 | `ISBN` varchar(10) COLLATE utf8_spanish2_ci NOT NULL,
19 | `nombre` varchar(100) COLLATE utf8_spanish2_ci NOT NULL,
20 | `editorial` varchar(100) COLLATE utf8_spanish2_ci DEFAULT NULL,
21 | `carrera` int(3) NOT NULL DEFAULT '0',
22 | `ubicacion` varchar(10) COLLATE utf8_spanish2_ci DEFAULT NULL
23 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;
24 |
25 | INSERT INTO `libros` (`ISBN`, `nombre`, `editorial`, `carrera`, `ubicacion`) VALUES
26 | ('8401921015', 'Compiladores', 'Pearson', 783, 'B2'),
27 | ('8402086969', 'Como programar en c++', 'Deitel', 783, 'A4'),
28 | ('8403083910', 'Ecological restoration', 'Island Press', 489, 'D2'),
29 | ('8412123101', 'Advanced grammar in use', 'Cambridge', 892, 'A2'),
30 | ('8412340082', 'Energía mediante vapor, aire o gas', 'Reverté', 571, 'B3'),
31 | ('8420617040', 'Análisis y diseño de algoritmos', 'Alfaomega', 783, 'A3'),
32 | ('8421348901', 'Nociones de derecho civil y mercantil', 'ISBN', 638, 'B1'),
33 | ('8421349800', 'Manual de climatización', 'IPN', 489, 'C1'),
34 | ('8422621282', 'Antología personal', 'Dinamo', 638, 'C2'),
35 | ('8428930012', 'Ingeniería de software', 'Sommerville', 783, 'C2'),
36 | ('8430504737', 'Alternative energy systems', 'CRC Press', 571, 'A1'),
37 | ('8437283781', 'Diseños experimentales', 'Trillas', 783, 'C4'),
38 | ('8453561911', 'Introduction to java programming', 'Pearson', 783, 'C4'),
39 | ('8456278901', 'Derechos del consumidor', 'IPN', 638, 'B3'),
40 | ('8456289002', 'Interchange', 'Cambridge', 892, 'B3'),
41 | ('8456382021', 'De las palabras a los hechos', 'Tirant', 638, 'C3'),
42 | ('8456782901', 'Wind energy', 'CRC Press', 571, 'C2'),
43 | ('8457802148', 'Ciencia ambiental preservemos la tierra', 'Thomson Learning', 489, 'A2'),
44 | ('8462198312', 'Fundamentos de ecología', 'Cengage', 489, 'C2'),
45 | ('8463557901', 'Oleohidráulica básica', 'Alfaomega', 571, 'B3'),
46 | ('8463737290', 'English grammar in use', 'Cambridge', 892, 'C1'),
47 | ('8466528152', 'Face2Face', 'Cambridge', 892, 'A3'),
48 | ('8467289011', 'Teoría de autómatas, lenguajes y computación', 'Pearson', 783, 'B3'),
49 | ('8467289122', 'World view 2', 'Longman', 892, 'B1'),
50 | ('8467299100', 'Ética', 'IPN', 638, 'A2'),
51 | ('8467381923', 'Know how', 'Oxford', 892, 'A1'),
52 | ('8467829129', 'Photovoltaic systems engineering', 'CRC Press', 571, 'A2'),
53 | ('8469101189', 'How to teach writting', 'Longman', 892, 'A2'),
54 | ('8469696912', 'Fundamentos generales de programación', 'MC Hill', 783, 'A1'),
55 | ('8471891469', 'Agenda ecológica federal', 'ISEF', 489, 'A1'),
56 | ('8473789190', 'Reading keys', 'Macmillan', 892, 'B3'),
57 | ('8477200399', 'Energías e impacto ambiental', 'Milenium', 489, 'A4'),
58 | ('8477212345', 'La enseñanza como puente a la vida', 'IPN', 638, 'C2'),
59 | ('8478200012', 'Economía del medio ambiente', 'Alfaomega', 489, 'A1'),
60 | ('8478289921', 'Ingeniería del software', 'MC Hill', 783, 'A1'),
61 | ('8478290982', 'Tratado de climatología aplicada', 'Mundi-Prensa', 489, 'B3'),
62 | ('8478292010', 'Energy conservation guidebook', 'ISBN', 571, 'A1'),
63 | ('8478371929', 'Ecología y medio ambiente', 'Pearson', 489, 'B3'),
64 | ('8479083492', 'Banco central y tasas de interés', 'IPN', 638, 'B1'),
65 | ('8479802092', 'Curso de energía solar', 'ISBN', 571, 'B1'),
66 | ('8482892902', 'Contabilidad', 'IPN', 638, 'A2'),
67 | ('8482911091', 'Hydrogen fuel', 'CRC Press', 571, 'A2'),
68 | ('8483982947', 'Dispersión de contaminantes en la atmosfera', 'Alfaomega', 489, 'C2'),
69 | ('8487890212', 'La presidencia interina de Victoriano Huerta', 'IPN', 638, 'A3'),
70 | ('8489391002', 'Simple solutions to energy calculations', 'CRC Press', 571, 'C2'),
71 | ('8493012309', 'Energía solar fotovoltaica', 'Marcombo', 571, 'C3'),
72 | ('8493909100', 'Objetive pet', 'Cambridge', 892, 'C2'),
73 | ('8499209899', 'Estructura de datos con C++', 'MC Hill', 783, 'B2'),
74 | ('8499838781', 'Enterprise 1', 'Express', 892, 'C1'),
75 | ('8499928211', 'Derechos de los usuarios de los servicios de salud', 'IPN', 638, 'A1');
76 |
77 | CREATE TABLE `usuarios` (
78 | `usuario` varchar(50) COLLATE utf8_spanish2_ci NOT NULL,
79 | `correo` varchar(200) COLLATE utf8_spanish2_ci DEFAULT NULL,
80 | `contrasena` varchar(50) COLLATE utf8_spanish2_ci NOT NULL,
81 | `permiso` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
82 | `nombre` varchar(90) COLLATE utf8_spanish2_ci NOT NULL,
83 | `imagen` varchar(50) COLLATE utf8_spanish2_ci DEFAULT NULL
84 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;
85 |
86 | INSERT INTO `usuarios` (`usuario`, `correo`, `contrasena`, `permiso`, `nombre`, `imagen`) VALUES
87 | ('admin', 'carmonabernaldiego@gmail.com', 'root', 'admin', 'Diego Carmona Bernal', 'admin788.png'),
88 | ('hiram', 'hiram@gmail.com', 'hiram', 'admin', 'Hiram Culebro', 'admin-eb405861.png'),
89 | ('key', 'key@gmail.com', 'key123', 'admin', 'Keyla Sosa', 'key.jpeg');
90 |
91 | ALTER TABLE `carreras`
92 | ADD PRIMARY KEY (`id_carrera`);
93 |
94 | ALTER TABLE `libros`
95 | ADD PRIMARY KEY (`ISBN`),
96 | ADD KEY `FK_carreras` (`carrera`);
97 |
98 | ALTER TABLE `usuarios`
99 | ADD PRIMARY KEY (`usuario`),
100 | ADD UNIQUE KEY `email` (`correo`);
101 |
102 | ALTER TABLE `libros`
103 | ADD CONSTRAINT `FK_carreras` FOREIGN KEY (`carrera`) REFERENCES `carreras` (`id_carrera`) ON DELETE CASCADE ON UPDATE CASCADE;
104 | COMMIT;
--------------------------------------------------------------------------------
/app/src/assets/js/template.js:
--------------------------------------------------------------------------------
1 |
2 | (function($) {
3 | 'use strict';
4 | $(function() {
5 | var body = $('body');
6 | var mainWrapper = $('.main-wrapper');
7 | var footer = $('footer');
8 | var sidebar = $('.sidebar');
9 | var navbar = $('.navbar').not('.top-navbar');
10 |
11 |
12 | // Enable feather-icons with SVG markup
13 | feather.replace();
14 |
15 | // initializing bootstrap tooltip
16 | $('[data-toggle="tooltip"]').tooltip();
17 |
18 | // initialize clipboard plugin
19 | if ($('.btn-clipboard').length) {
20 | var clipboard = new ClipboardJS('.btn-clipboard');
21 |
22 | // Enabling tooltip to all clipboard buttons
23 | $('.btn-clipboard').attr('data-toggle', 'tooltip').attr('title', 'Copy to clipboard');
24 |
25 | // initializing bootstrap tooltip
26 | $('[data-toggle="tooltip"]').tooltip();
27 |
28 | // initially hide btn-clipboard and show after copy
29 | clipboard.on('success', function(e) {
30 | e.trigger.classList.value = 'btn btn-clipboard btn-current'
31 | $('.btn-current').tooltip('hide');
32 | e.trigger.dataset.originalTitle = 'Copied';
33 | $('.btn-current').tooltip('show');
34 | setTimeout(function(){
35 | $('.btn-current').tooltip('hide');
36 | e.trigger.dataset.originalTitle = 'Copy to clipboard';
37 | e.trigger.classList.value = 'btn btn-clipboard'
38 | },1000);
39 | e.clearSelection();
40 | });
41 | }
42 |
43 |
44 | // Applying perfect-scrollbar
45 | if ($('.sidebar .sidebar-body').length) {
46 | const sidebarBodyScroll = new PerfectScrollbar('.sidebar-body');
47 | }
48 | if ($('.content-nav-wrapper').length) {
49 | const contentNavWrapper = new PerfectScrollbar('.content-nav-wrapper');
50 | }
51 |
52 | // Sidebar toggle to sidebar-folded
53 | $('.sidebar-toggler').on('click', function(e) {
54 | $(this).toggleClass('active');
55 | $(this).toggleClass('not-active');
56 | if (window.matchMedia('(min-width: 992px)').matches) {
57 | e.preventDefault();
58 | body.toggleClass('sidebar-folded');
59 | } else if (window.matchMedia('(max-width: 991px)').matches) {
60 | e.preventDefault();
61 | body.toggleClass('sidebar-open');
62 | }
63 | });
64 |
65 |
66 | // Settings sidebar toggle
67 | $('.settings-sidebar-toggler').on('click', function(e) {
68 | $('body').toggleClass('settings-open');
69 | });
70 |
71 | // Sidebar theme settings
72 | $("input:radio[name=sidebarThemeSettings]").click(function() {
73 | $('body').removeClass('sidebar-light sidebar-dark');
74 | $('body').addClass($(this).val());
75 | })
76 |
77 |
78 | // sidebar-folded on large devices
79 | function iconSidebar(e) {
80 | if (e.matches) {
81 | body.addClass('sidebar-folded');
82 | } else {
83 | body.removeClass('sidebar-folded');
84 | }
85 | }
86 | var desktopMedium = window.matchMedia('(min-width:992px) and (max-width: 1199px)');
87 | desktopMedium.addListener(iconSidebar);
88 | iconSidebar(desktopMedium);
89 |
90 |
91 | //Add active class to nav-link based on url dynamically
92 | function addActiveClass(element) {
93 | if (current === "") {
94 | //for root url
95 | if (element.attr('href').indexOf("index.html") !== -1) {
96 | element.parents('.nav-item').last().addClass('active');
97 | if (element.parents('.sub-menu').length) {
98 | element.closest('.collapse').addClass('show');
99 | element.addClass('active');
100 | }
101 | }
102 | } else {
103 | //for other url
104 | if (element.attr('href').indexOf(current) !== -1) {
105 | element.parents('.nav-item').last().addClass('active');
106 | if (element.parents('.sub-menu').length) {
107 | element.closest('.collapse').addClass('show');
108 | element.addClass('active');
109 | }
110 | if (element.parents('.submenu-item').length) {
111 | element.addClass('active');
112 | }
113 | }
114 | }
115 | }
116 |
117 | var current = location.pathname.split("/").slice(-1)[0].replace(/^\/|\/$/g, '');
118 | $('.nav li a', sidebar).each(function() {
119 | var $this = $(this);
120 | addActiveClass($this);
121 | });
122 |
123 | $('.horizontal-menu .nav li a').each(function() {
124 | var $this = $(this);
125 | addActiveClass($this);
126 | })
127 |
128 |
129 | // open sidebar-folded when hover
130 | $(".sidebar .sidebar-body").hover(
131 | function () {
132 | if (body.hasClass('sidebar-folded')){
133 | body.addClass("open-sidebar-folded");
134 | }
135 | },
136 | function () {
137 | if (body.hasClass('sidebar-folded')){
138 | body.removeClass("open-sidebar-folded");
139 | }
140 | });
141 |
142 | // close sidebar when click outside on mobile/table
143 | $(document).on('click touchstart', function(e){
144 | e.stopPropagation();
145 |
146 | // closing of sidebar menu when clicking outside of it
147 | if (!$(e.target).closest('.sidebar-toggler').length) {
148 | var sidebar = $(e.target).closest('.sidebar').length;
149 | var sidebarBody = $(e.target).closest('.sidebar-body').length;
150 | if (!sidebar && !sidebarBody) {
151 | if ($('body').hasClass('sidebar-open')) {
152 | $('body').removeClass('sidebar-open');
153 | }
154 | }
155 | }
156 | });
157 |
158 | // initializing popover
159 | $('[data-toggle="popover"]').popover();
160 |
161 | //checkbox and radios
162 | $(".form-check label,.form-radio label").append(' ');
163 |
164 |
165 |
166 |
167 | //Horizontal menu in mobile
168 | $('[data-toggle="horizontal-menu-toggle"]').on("click", function() {
169 | $(".horizontal-menu .bottom-navbar").toggleClass("header-toggled");
170 | });
171 | // Horizontal menu navigation in mobile menu on click
172 | var navItemClicked = $('.horizontal-menu .page-navigation >.nav-item');
173 | navItemClicked.on("click", function(event) {
174 | if(window.matchMedia('(max-width: 991px)').matches) {
175 | if(!($(this).hasClass('show-submenu'))) {
176 | navItemClicked.removeClass('show-submenu');
177 | }
178 | $(this).toggleClass('show-submenu');
179 | }
180 | })
181 |
182 | $(window).scroll(function() {
183 | if(window.matchMedia('(min-width: 992px)').matches) {
184 | var header = $('.horizontal-menu');
185 | if ($(window).scrollTop() >= 60) {
186 | $(header).addClass('fixed-on-scroll');
187 | } else {
188 | $(header).removeClass('fixed-on-scroll');
189 | }
190 | }
191 | });
192 |
193 |
194 |
195 | });
196 | })(jQuery);
--------------------------------------------------------------------------------
/biblioteca/src/assets/js/template.js:
--------------------------------------------------------------------------------
1 |
2 | (function($) {
3 | 'use strict';
4 | $(function() {
5 | var body = $('body');
6 | var mainWrapper = $('.main-wrapper');
7 | var footer = $('footer');
8 | var sidebar = $('.sidebar');
9 | var navbar = $('.navbar').not('.top-navbar');
10 |
11 |
12 | // Enable feather-icons with SVG markup
13 | feather.replace();
14 |
15 | // initializing bootstrap tooltip
16 | $('[data-toggle="tooltip"]').tooltip();
17 |
18 | // initialize clipboard plugin
19 | if ($('.btn-clipboard').length) {
20 | var clipboard = new ClipboardJS('.btn-clipboard');
21 |
22 | // Enabling tooltip to all clipboard buttons
23 | $('.btn-clipboard').attr('data-toggle', 'tooltip').attr('title', 'Copy to clipboard');
24 |
25 | // initializing bootstrap tooltip
26 | $('[data-toggle="tooltip"]').tooltip();
27 |
28 | // initially hide btn-clipboard and show after copy
29 | clipboard.on('success', function(e) {
30 | e.trigger.classList.value = 'btn btn-clipboard btn-current'
31 | $('.btn-current').tooltip('hide');
32 | e.trigger.dataset.originalTitle = 'Copied';
33 | $('.btn-current').tooltip('show');
34 | setTimeout(function(){
35 | $('.btn-current').tooltip('hide');
36 | e.trigger.dataset.originalTitle = 'Copy to clipboard';
37 | e.trigger.classList.value = 'btn btn-clipboard'
38 | },1000);
39 | e.clearSelection();
40 | });
41 | }
42 |
43 |
44 | // Applying perfect-scrollbar
45 | if ($('.sidebar .sidebar-body').length) {
46 | const sidebarBodyScroll = new PerfectScrollbar('.sidebar-body');
47 | }
48 | if ($('.content-nav-wrapper').length) {
49 | const contentNavWrapper = new PerfectScrollbar('.content-nav-wrapper');
50 | }
51 |
52 | // Sidebar toggle to sidebar-folded
53 | $('.sidebar-toggler').on('click', function(e) {
54 | $(this).toggleClass('active');
55 | $(this).toggleClass('not-active');
56 | if (window.matchMedia('(min-width: 992px)').matches) {
57 | e.preventDefault();
58 | body.toggleClass('sidebar-folded');
59 | } else if (window.matchMedia('(max-width: 991px)').matches) {
60 | e.preventDefault();
61 | body.toggleClass('sidebar-open');
62 | }
63 | });
64 |
65 |
66 | // Settings sidebar toggle
67 | $('.settings-sidebar-toggler').on('click', function(e) {
68 | $('body').toggleClass('settings-open');
69 | });
70 |
71 | // Sidebar theme settings
72 | $("input:radio[name=sidebarThemeSettings]").click(function() {
73 | $('body').removeClass('sidebar-light sidebar-dark');
74 | $('body').addClass($(this).val());
75 | })
76 |
77 |
78 | // sidebar-folded on large devices
79 | function iconSidebar(e) {
80 | if (e.matches) {
81 | body.addClass('sidebar-folded');
82 | } else {
83 | body.removeClass('sidebar-folded');
84 | }
85 | }
86 | var desktopMedium = window.matchMedia('(min-width:992px) and (max-width: 1199px)');
87 | desktopMedium.addListener(iconSidebar);
88 | iconSidebar(desktopMedium);
89 |
90 |
91 | //Add active class to nav-link based on url dynamically
92 | function addActiveClass(element) {
93 | if (current === "") {
94 | //for root url
95 | if (element.attr('href').indexOf("index.html") !== -1) {
96 | element.parents('.nav-item').last().addClass('active');
97 | if (element.parents('.sub-menu').length) {
98 | element.closest('.collapse').addClass('show');
99 | element.addClass('active');
100 | }
101 | }
102 | } else {
103 | //for other url
104 | if (element.attr('href').indexOf(current) !== -1) {
105 | element.parents('.nav-item').last().addClass('active');
106 | if (element.parents('.sub-menu').length) {
107 | element.closest('.collapse').addClass('show');
108 | element.addClass('active');
109 | }
110 | if (element.parents('.submenu-item').length) {
111 | element.addClass('active');
112 | }
113 | }
114 | }
115 | }
116 |
117 | var current = location.pathname.split("/").slice(-1)[0].replace(/^\/|\/$/g, '');
118 | $('.nav li a', sidebar).each(function() {
119 | var $this = $(this);
120 | addActiveClass($this);
121 | });
122 |
123 | $('.horizontal-menu .nav li a').each(function() {
124 | var $this = $(this);
125 | addActiveClass($this);
126 | })
127 |
128 |
129 | // open sidebar-folded when hover
130 | $(".sidebar .sidebar-body").hover(
131 | function () {
132 | if (body.hasClass('sidebar-folded')){
133 | body.addClass("open-sidebar-folded");
134 | }
135 | },
136 | function () {
137 | if (body.hasClass('sidebar-folded')){
138 | body.removeClass("open-sidebar-folded");
139 | }
140 | });
141 |
142 | // close sidebar when click outside on mobile/table
143 | $(document).on('click touchstart', function(e){
144 | e.stopPropagation();
145 |
146 | // closing of sidebar menu when clicking outside of it
147 | if (!$(e.target).closest('.sidebar-toggler').length) {
148 | var sidebar = $(e.target).closest('.sidebar').length;
149 | var sidebarBody = $(e.target).closest('.sidebar-body').length;
150 | if (!sidebar && !sidebarBody) {
151 | if ($('body').hasClass('sidebar-open')) {
152 | $('body').removeClass('sidebar-open');
153 | }
154 | }
155 | }
156 | });
157 |
158 | // initializing popover
159 | $('[data-toggle="popover"]').popover();
160 |
161 | //checkbox and radios
162 | $(".form-check label,.form-radio label").append(' ');
163 |
164 |
165 |
166 |
167 | //Horizontal menu in mobile
168 | $('[data-toggle="horizontal-menu-toggle"]').on("click", function() {
169 | $(".horizontal-menu .bottom-navbar").toggleClass("header-toggled");
170 | });
171 | // Horizontal menu navigation in mobile menu on click
172 | var navItemClicked = $('.horizontal-menu .page-navigation >.nav-item');
173 | navItemClicked.on("click", function(event) {
174 | if(window.matchMedia('(max-width: 991px)').matches) {
175 | if(!($(this).hasClass('show-submenu'))) {
176 | navItemClicked.removeClass('show-submenu');
177 | }
178 | $(this).toggleClass('show-submenu');
179 | }
180 | })
181 |
182 | $(window).scroll(function() {
183 | if(window.matchMedia('(min-width: 992px)').matches) {
184 | var header = $('.horizontal-menu');
185 | if ($(window).scrollTop() >= 60) {
186 | $(header).addClass('fixed-on-scroll');
187 | } else {
188 | $(header).removeClass('fixed-on-scroll');
189 | }
190 | }
191 | });
192 |
193 |
194 |
195 | });
196 | })(jQuery);
--------------------------------------------------------------------------------
/app/src/assets/fonts/feather-font/examples/index.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | list-style: none;
5 | }
6 |
7 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
8 | dl, dt, dd, ul, ol, li, pre,
9 | form, fieldset, legend, button, input, textarea,
10 | th, td {
11 | margin: 0;
12 | padding: 0;
13 | }
14 |
15 | body,
16 | button, input, select, textarea {
17 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
18 | }
19 | h1, h2, h3, h4, h5, h6 {
20 | font-size: 100%;
21 | }
22 | address, cite, dfn, em, var {
23 | font-style: normal;
24 | }
25 | code, kbd, pre, samp {
26 | font-family: courier new, courier, monospace;
27 | }
28 | small {
29 | font-size: 12px;
30 | }
31 |
32 | ul, ol {
33 | list-style: none;
34 | }
35 |
36 | a {
37 | text-decoration: none;
38 | }
39 | a:hover {
40 | text-decoration: underline;
41 | }
42 |
43 | legend {
44 | color: #000;
45 | }
46 | fieldset, img {
47 | border: 0;
48 | }
49 | button, input, select, textarea {
50 | font-size: 100%;
51 | }
52 |
53 | table {
54 | border-collapse: collapse; border-spacing: 0;
55 | }
56 |
57 | .ks-clear:after, .clear:after {
58 | content: '\20';
59 | display: block;
60 | height: 0;
61 | clear: both;
62 | }
63 | .ks-clear, .clear {
64 | *zoom: 1;
65 | }
66 |
67 | .main {
68 | padding: 30px 100px;
69 | width: 1000px;
70 | margin: 0 auto;
71 | }
72 | .main h1 {
73 | font-size: 36px;
74 | color: #333;
75 | text-align: left;
76 | margin-bottom: 30px;
77 | /* border-bottom: 1px solid #eee; */
78 | }
79 |
80 | .helps {
81 | margin-top:40px;
82 | }
83 | .helps pre {
84 | padding: 20px;
85 | margin: 10px 0;
86 | border: solid 1px #e7e1cd;
87 | background-color: #fffdef;
88 | overflow: auto;
89 | }
90 |
91 | .icon_lists {
92 | width: 100% !important;
93 | }
94 |
95 | .icon_lists li {
96 | float: left;
97 | width: 100px;
98 | height: 180px;
99 | text-align: center;
100 | list-style: none !important;
101 | }
102 | .icon_lists .icon {
103 | font-size: 42px;
104 | line-height: 100px;
105 | margin: 10px 0;
106 | color: #333;
107 | -webkit-transition: font-size 0.25s ease-out 0s;
108 | -moz-transition: font-size 0.25s ease-out 0s;
109 | transition: font-size 0.25s ease-out 0s;
110 | }
111 | .icon_lists .icon:hover {
112 | font-size: 100px;
113 | }
114 |
115 | .markdown {
116 | color: #666;
117 | font-size: 14px;
118 | line-height: 1.8;
119 | }
120 |
121 | .highlight {
122 | line-height: 1.5;
123 | }
124 |
125 | .markdown img {
126 | vertical-align: middle;
127 | max-width: 100%;
128 | }
129 |
130 | .markdown h1 {
131 | color: #404040;
132 | font-weight: 500;
133 | line-height: 40px;
134 | margin-bottom: 24px;
135 | }
136 |
137 | .markdown h2,
138 | .markdown h3,
139 | .markdown h4,
140 | .markdown h5,
141 | .markdown h6 {
142 | color: #404040;
143 | margin: 1.6em 0 0.6em 0;
144 | font-weight: 500;
145 | clear: both;
146 | }
147 |
148 | .markdown h1 {
149 | font-size: 28px;
150 | }
151 |
152 | .markdown h2 {
153 | font-size: 22px;
154 | }
155 |
156 | .markdown h3 {
157 | font-size: 16px;
158 | }
159 |
160 | .markdown h4 {
161 | font-size: 14px;
162 | }
163 |
164 | .markdown h5 {
165 | font-size: 12px;
166 | }
167 |
168 | .markdown h6 {
169 | font-size: 12px;
170 | }
171 |
172 | .markdown hr {
173 | height: 1px;
174 | border: 0;
175 | background: #e9e9e9;
176 | margin: 16px 0;
177 | clear: both;
178 | }
179 |
180 | .markdown p,
181 | .markdown pre {
182 | margin: 1em 0;
183 | }
184 |
185 | .markdown > p,
186 | .markdown > blockquote,
187 | .markdown > .highlight,
188 | .markdown > ol,
189 | .markdown > ul {
190 | width: 80%;
191 | }
192 |
193 | .markdown ul > li {
194 | list-style: circle;
195 | }
196 |
197 | .markdown > ul li,
198 | .markdown blockquote ul > li {
199 | margin-left: 20px;
200 | padding-left: 4px;
201 | }
202 |
203 | .markdown > ul li p,
204 | .markdown > ol li p {
205 | margin: 0.6em 0;
206 | }
207 |
208 | .markdown ol > li {
209 | list-style: decimal;
210 | }
211 |
212 | .markdown > ol li,
213 | .markdown blockquote ol > li {
214 | margin-left: 20px;
215 | padding-left: 4px;
216 | }
217 |
218 | .markdown code {
219 | margin: 0 3px;
220 | padding: 0 5px;
221 | background: #eee;
222 | border-radius: 3px;
223 | }
224 |
225 | .markdown pre {
226 | border-radius: 6px;
227 | background: #f7f7f7;
228 | padding: 20px;
229 | }
230 |
231 | .markdown pre code {
232 | border: none;
233 | background: #f7f7f7;
234 | margin: 0;
235 | }
236 |
237 | .markdown strong,
238 | .markdown b {
239 | font-weight: 600;
240 | }
241 |
242 | .markdown > table {
243 | border-collapse: collapse;
244 | border-spacing: 0px;
245 | empty-cells: show;
246 | border: 1px solid #e9e9e9;
247 | width: 95%;
248 | margin-bottom: 24px;
249 | }
250 |
251 | .markdown > table th {
252 | white-space: nowrap;
253 | color: #333;
254 | font-weight: 600;
255 |
256 | }
257 |
258 | .markdown > table th,
259 | .markdown > table td {
260 | border: 1px solid #e9e9e9;
261 | padding: 8px 16px;
262 | text-align: left;
263 | }
264 |
265 | .markdown > table th {
266 | background: #F7F7F7;
267 | }
268 |
269 | .markdown blockquote {
270 | font-size: 90%;
271 | color: #999;
272 | border-left: 4px solid #e9e9e9;
273 | padding-left: 0.8em;
274 | margin: 1em 0;
275 | font-style: italic;
276 | }
277 |
278 | .markdown blockquote p {
279 | margin: 0;
280 | }
281 |
282 | .markdown .anchor {
283 | opacity: 0;
284 | transition: opacity 0.3s ease;
285 | margin-left: 8px;
286 | }
287 |
288 | .markdown .waiting {
289 | color: #ccc;
290 | }
291 |
292 | .markdown h1:hover .anchor,
293 | .markdown h2:hover .anchor,
294 | .markdown h3:hover .anchor,
295 | .markdown h4:hover .anchor,
296 | .markdown h5:hover .anchor,
297 | .markdown h6:hover .anchor {
298 | opacity: 1;
299 | display: inline-block;
300 | }
301 |
302 | .markdown > br,
303 | .markdown > p > br {
304 | clear: both;
305 | }
306 |
307 |
308 | .hljs {
309 | display: block;
310 | background: white;
311 | padding: 0.5em;
312 | color: #333333;
313 | overflow-x: auto;
314 | }
315 |
316 | .hljs-comment,
317 | .hljs-meta {
318 | color: #969896;
319 | }
320 |
321 | .hljs-string,
322 | .hljs-variable,
323 | .hljs-template-variable,
324 | .hljs-strong,
325 | .hljs-emphasis,
326 | .hljs-quote {
327 | color: #df5000;
328 | }
329 |
330 | .hljs-keyword,
331 | .hljs-selector-tag,
332 | .hljs-type {
333 | color: #a71d5d;
334 | }
335 |
336 | .hljs-literal,
337 | .hljs-symbol,
338 | .hljs-bullet,
339 | .hljs-attribute {
340 | color: #0086b3;
341 | }
342 |
343 | .hljs-section,
344 | .hljs-name {
345 | color: #63a35c;
346 | }
347 |
348 | .hljs-tag {
349 | color: #333333;
350 | }
351 |
352 | .hljs-title,
353 | .hljs-attr,
354 | .hljs-selector-id,
355 | .hljs-selector-class,
356 | .hljs-selector-attr,
357 | .hljs-selector-pseudo {
358 | color: #795da3;
359 | }
360 |
361 | .hljs-addition {
362 | color: #55a532;
363 | background-color: #eaffea;
364 | }
365 |
366 | .hljs-deletion {
367 | color: #bd2c00;
368 | background-color: #ffecec;
369 | }
370 |
371 | .hljs-link {
372 | text-decoration: underline;
373 | }
374 |
375 | pre {
376 | background: #fff;
377 | }
--------------------------------------------------------------------------------
/biblioteca/src/assets/fonts/feather-font/examples/index.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | list-style: none;
5 | }
6 |
7 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
8 | dl, dt, dd, ul, ol, li, pre,
9 | form, fieldset, legend, button, input, textarea,
10 | th, td {
11 | margin: 0;
12 | padding: 0;
13 | }
14 |
15 | body,
16 | button, input, select, textarea {
17 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
18 | }
19 | h1, h2, h3, h4, h5, h6 {
20 | font-size: 100%;
21 | }
22 | address, cite, dfn, em, var {
23 | font-style: normal;
24 | }
25 | code, kbd, pre, samp {
26 | font-family: courier new, courier, monospace;
27 | }
28 | small {
29 | font-size: 12px;
30 | }
31 |
32 | ul, ol {
33 | list-style: none;
34 | }
35 |
36 | a {
37 | text-decoration: none;
38 | }
39 | a:hover {
40 | text-decoration: underline;
41 | }
42 |
43 | legend {
44 | color: #000;
45 | }
46 | fieldset, img {
47 | border: 0;
48 | }
49 | button, input, select, textarea {
50 | font-size: 100%;
51 | }
52 |
53 | table {
54 | border-collapse: collapse; border-spacing: 0;
55 | }
56 |
57 | .ks-clear:after, .clear:after {
58 | content: '\20';
59 | display: block;
60 | height: 0;
61 | clear: both;
62 | }
63 | .ks-clear, .clear {
64 | *zoom: 1;
65 | }
66 |
67 | .main {
68 | padding: 30px 100px;
69 | width: 1000px;
70 | margin: 0 auto;
71 | }
72 | .main h1 {
73 | font-size: 36px;
74 | color: #333;
75 | text-align: left;
76 | margin-bottom: 30px;
77 | /* border-bottom: 1px solid #eee; */
78 | }
79 |
80 | .helps {
81 | margin-top:40px;
82 | }
83 | .helps pre {
84 | padding: 20px;
85 | margin: 10px 0;
86 | border: solid 1px #e7e1cd;
87 | background-color: #fffdef;
88 | overflow: auto;
89 | }
90 |
91 | .icon_lists {
92 | width: 100% !important;
93 | }
94 |
95 | .icon_lists li {
96 | float: left;
97 | width: 100px;
98 | height: 180px;
99 | text-align: center;
100 | list-style: none !important;
101 | }
102 | .icon_lists .icon {
103 | font-size: 42px;
104 | line-height: 100px;
105 | margin: 10px 0;
106 | color: #333;
107 | -webkit-transition: font-size 0.25s ease-out 0s;
108 | -moz-transition: font-size 0.25s ease-out 0s;
109 | transition: font-size 0.25s ease-out 0s;
110 | }
111 | .icon_lists .icon:hover {
112 | font-size: 100px;
113 | }
114 |
115 | .markdown {
116 | color: #666;
117 | font-size: 14px;
118 | line-height: 1.8;
119 | }
120 |
121 | .highlight {
122 | line-height: 1.5;
123 | }
124 |
125 | .markdown img {
126 | vertical-align: middle;
127 | max-width: 100%;
128 | }
129 |
130 | .markdown h1 {
131 | color: #404040;
132 | font-weight: 500;
133 | line-height: 40px;
134 | margin-bottom: 24px;
135 | }
136 |
137 | .markdown h2,
138 | .markdown h3,
139 | .markdown h4,
140 | .markdown h5,
141 | .markdown h6 {
142 | color: #404040;
143 | margin: 1.6em 0 0.6em 0;
144 | font-weight: 500;
145 | clear: both;
146 | }
147 |
148 | .markdown h1 {
149 | font-size: 28px;
150 | }
151 |
152 | .markdown h2 {
153 | font-size: 22px;
154 | }
155 |
156 | .markdown h3 {
157 | font-size: 16px;
158 | }
159 |
160 | .markdown h4 {
161 | font-size: 14px;
162 | }
163 |
164 | .markdown h5 {
165 | font-size: 12px;
166 | }
167 |
168 | .markdown h6 {
169 | font-size: 12px;
170 | }
171 |
172 | .markdown hr {
173 | height: 1px;
174 | border: 0;
175 | background: #e9e9e9;
176 | margin: 16px 0;
177 | clear: both;
178 | }
179 |
180 | .markdown p,
181 | .markdown pre {
182 | margin: 1em 0;
183 | }
184 |
185 | .markdown > p,
186 | .markdown > blockquote,
187 | .markdown > .highlight,
188 | .markdown > ol,
189 | .markdown > ul {
190 | width: 80%;
191 | }
192 |
193 | .markdown ul > li {
194 | list-style: circle;
195 | }
196 |
197 | .markdown > ul li,
198 | .markdown blockquote ul > li {
199 | margin-left: 20px;
200 | padding-left: 4px;
201 | }
202 |
203 | .markdown > ul li p,
204 | .markdown > ol li p {
205 | margin: 0.6em 0;
206 | }
207 |
208 | .markdown ol > li {
209 | list-style: decimal;
210 | }
211 |
212 | .markdown > ol li,
213 | .markdown blockquote ol > li {
214 | margin-left: 20px;
215 | padding-left: 4px;
216 | }
217 |
218 | .markdown code {
219 | margin: 0 3px;
220 | padding: 0 5px;
221 | background: #eee;
222 | border-radius: 3px;
223 | }
224 |
225 | .markdown pre {
226 | border-radius: 6px;
227 | background: #f7f7f7;
228 | padding: 20px;
229 | }
230 |
231 | .markdown pre code {
232 | border: none;
233 | background: #f7f7f7;
234 | margin: 0;
235 | }
236 |
237 | .markdown strong,
238 | .markdown b {
239 | font-weight: 600;
240 | }
241 |
242 | .markdown > table {
243 | border-collapse: collapse;
244 | border-spacing: 0px;
245 | empty-cells: show;
246 | border: 1px solid #e9e9e9;
247 | width: 95%;
248 | margin-bottom: 24px;
249 | }
250 |
251 | .markdown > table th {
252 | white-space: nowrap;
253 | color: #333;
254 | font-weight: 600;
255 |
256 | }
257 |
258 | .markdown > table th,
259 | .markdown > table td {
260 | border: 1px solid #e9e9e9;
261 | padding: 8px 16px;
262 | text-align: left;
263 | }
264 |
265 | .markdown > table th {
266 | background: #F7F7F7;
267 | }
268 |
269 | .markdown blockquote {
270 | font-size: 90%;
271 | color: #999;
272 | border-left: 4px solid #e9e9e9;
273 | padding-left: 0.8em;
274 | margin: 1em 0;
275 | font-style: italic;
276 | }
277 |
278 | .markdown blockquote p {
279 | margin: 0;
280 | }
281 |
282 | .markdown .anchor {
283 | opacity: 0;
284 | transition: opacity 0.3s ease;
285 | margin-left: 8px;
286 | }
287 |
288 | .markdown .waiting {
289 | color: #ccc;
290 | }
291 |
292 | .markdown h1:hover .anchor,
293 | .markdown h2:hover .anchor,
294 | .markdown h3:hover .anchor,
295 | .markdown h4:hover .anchor,
296 | .markdown h5:hover .anchor,
297 | .markdown h6:hover .anchor {
298 | opacity: 1;
299 | display: inline-block;
300 | }
301 |
302 | .markdown > br,
303 | .markdown > p > br {
304 | clear: both;
305 | }
306 |
307 |
308 | .hljs {
309 | display: block;
310 | background: white;
311 | padding: 0.5em;
312 | color: #333333;
313 | overflow-x: auto;
314 | }
315 |
316 | .hljs-comment,
317 | .hljs-meta {
318 | color: #969896;
319 | }
320 |
321 | .hljs-string,
322 | .hljs-variable,
323 | .hljs-template-variable,
324 | .hljs-strong,
325 | .hljs-emphasis,
326 | .hljs-quote {
327 | color: #df5000;
328 | }
329 |
330 | .hljs-keyword,
331 | .hljs-selector-tag,
332 | .hljs-type {
333 | color: #a71d5d;
334 | }
335 |
336 | .hljs-literal,
337 | .hljs-symbol,
338 | .hljs-bullet,
339 | .hljs-attribute {
340 | color: #0086b3;
341 | }
342 |
343 | .hljs-section,
344 | .hljs-name {
345 | color: #63a35c;
346 | }
347 |
348 | .hljs-tag {
349 | color: #333333;
350 | }
351 |
352 | .hljs-title,
353 | .hljs-attr,
354 | .hljs-selector-id,
355 | .hljs-selector-class,
356 | .hljs-selector-attr,
357 | .hljs-selector-pseudo {
358 | color: #795da3;
359 | }
360 |
361 | .hljs-addition {
362 | color: #55a532;
363 | background-color: #eaffea;
364 | }
365 |
366 | .hljs-deletion {
367 | color: #bd2c00;
368 | background-color: #ffecec;
369 | }
370 |
371 | .hljs-link {
372 | text-decoration: underline;
373 | }
374 |
375 | pre {
376 | background: #fff;
377 | }
--------------------------------------------------------------------------------
/app/src/views/consultar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
70 |
71 |
72 |
73 |
74 |
77 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
Libros
137 |
138 |
139 |
140 |
141 | ISBN
142 | Nombre
143 | Editorial
144 | Carrera
145 | Ubicación
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------
/biblioteca/src/views/consultar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
70 |
71 |
72 |
73 |
74 |
77 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
Libros
137 |
138 |
139 |
140 |
141 | ISBN
142 | Nombre
143 | Editorial
144 | Carrera
145 | Ubicación
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------
/app/src/views/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
48 |
49 |
50 |
51 |
52 |
55 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | Mostrar todo
129 |
130 |
131 |
132 |
133 | Software
134 |
135 |
136 |
137 |
138 | Ambiental
139 |
140 |
141 |
142 |
143 | Energía
144 |
145 |
146 |
147 |
148 | PyMES
149 |
150 |
151 |
152 |
153 | Inglés
154 |
155 |
156 |
157 |
158 |
159 |
160 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------
/biblioteca/src/views/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
48 |
49 |
50 |
51 |
52 |
55 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | Mostrar todo
129 |
130 |
131 |
132 |
133 | Software
134 |
135 |
136 |
137 |
138 | Ambiental
139 |
140 |
141 |
142 |
143 | Energía
144 |
145 |
146 |
147 |
148 | PyMES
149 |
150 |
151 |
152 |
153 | Inglés
154 |
155 |
156 |
157 |
158 |
159 |
160 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------
/app/src/views/modificar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
70 |
71 |
72 |
73 |
74 |
77 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
Libros
137 |
138 |
139 |
140 |
141 | ISBN
142 | Nombre
143 | Editorial
144 | Carrera
145 | Ubicación
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/biblioteca/src/views/modificar.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Biblioteca CKH
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
70 |
71 |
72 |
73 |
74 |
77 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
Libros
137 |
138 |
139 |
140 |
141 | ISBN
142 | Nombre
143 | Editorial
144 | Carrera
145 | Ubicación
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/app/src/views/js/load-books.js:
--------------------------------------------------------------------------------
1 | import { ordenamientoArbol, filtrarArbol } from './metodos-tree.js';
2 |
3 | let pageBooks;
4 |
5 | document.addEventListener('DOMContentLoaded', function () {
6 | pageBooks = new PageBooks(window);
7 | });
8 |
9 | class PageBooks {
10 | constructor() {
11 | this.attachEvents();
12 | this.buscarLibros('');
13 | }
14 |
15 | get(id) {
16 | return document.querySelector(id);
17 | }
18 |
19 | attachEvents() {
20 | let btnMostrarTodo = this.get('#btnMostrarTodo');
21 | let btnSoftware = this.get('#btnSoftware');
22 | let btnAmbiental = this.get('#btnAmbiental');
23 | let btnEnergia = this.get('#btnEnergia');
24 | let btnPymes = this.get('#btnPymes');
25 | let btnIngles = this.get('#btnIngles');
26 | let txtBuscar = this.get('#txtSearch');
27 |
28 | btnMostrarTodo.addEventListener('click', () => { this.buscarLibros(''); txtBuscar.value = ''; txtBuscar.focus(); });
29 | btnSoftware.addEventListener('click', () => { this.filtrarCarrera('Software'); txtBuscar.value = ''; txtBuscar.focus(); });
30 | btnAmbiental.addEventListener('click', () => { this.filtrarCarrera('Ambiental'); txtBuscar.value = ''; txtBuscar.focus(); });
31 | btnEnergia.addEventListener('click', () => { this.filtrarCarrera('Energía'); txtBuscar.value = ''; txtBuscar.focus(); });
32 | btnPymes.addEventListener('click', () => { this.filtrarCarrera('PyMES'); txtBuscar.value = ''; txtBuscar.focus(); });
33 | btnIngles.addEventListener('click', () => { this.filtrarCarrera('Inglés'); txtBuscar.value = ''; txtBuscar.focus(); });
34 | txtBuscar.addEventListener('change', () => { this.buscarLibros(txtBuscar.value); txtBuscar.focus(); });
35 |
36 | txtBuscar.focus();
37 | }
38 |
39 | buscarLibros = (data) => {
40 | window.ipcRender.invoke('getBooks').then((result) => {
41 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
42 |
43 | isbn = isbn.replace(/(^_)|(_$)/g, '');
44 | nombre = nombre.replace(/(^_)|(_$)/g, '');
45 | carrera = carrera.replace(/(^_)|(_$)/g, '');
46 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
47 | editorial = editorial.replace(/(^_)|(_$)/g, '');
48 |
49 | isbn = isbn.split('_');
50 | nombre = nombre.split('_');
51 | carrera = carrera.split('_');
52 | ubicacion = ubicacion.split('_');
53 | editorial = editorial.split('_');
54 |
55 | let libros = [];
56 |
57 | for (let i = 0; i < isbn.length; i++) {
58 | libros.push({
59 | 'isbn': isbn[i],
60 | 'nombre': nombre[i],
61 | 'carrera': carrera[i],
62 | 'ubicacion': ubicacion[i],
63 | 'editorial': editorial[i]
64 | });
65 | }
66 |
67 | mostrarLibrosBusqueda(libros, data);
68 | });
69 | }
70 |
71 | filtrarCarrera = (category) => {
72 | window.ipcRender.invoke('getBooks').then((result) => {
73 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
74 |
75 | isbn = isbn.replace(/(^_)|(_$)/g, '');
76 | nombre = nombre.replace(/(^_)|(_$)/g, '');
77 | carrera = carrera.replace(/(^_)|(_$)/g, '');
78 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
79 | editorial = editorial.replace(/(^_)|(_$)/g, '');
80 |
81 | isbn = isbn.split('_');
82 | nombre = nombre.split('_');
83 | carrera = carrera.split('_');
84 | ubicacion = ubicacion.split('_');
85 | editorial = editorial.split('_');
86 |
87 | let libros = [];
88 |
89 | for (let i = 0; i < isbn.length; i++) {
90 | libros.push({
91 | 'isbn': isbn[i],
92 | 'nombre': nombre[i],
93 | 'carrera': carrera[i],
94 | 'ubicacion': ubicacion[i],
95 | 'editorial': editorial[i]
96 | });
97 | }
98 |
99 | //La funcion 'filtrarCarrera' recibe la CARRERA y hace un select de los libros con esa carrera y lo envia a 'mostrarLibros'
100 | mostrarLibros(filtrarArbol(libros, category));
101 | });
102 | }
103 | }
104 |
105 | const mostrarLibros = (libros) => {
106 | let contenedorLibros = document.querySelector('#content-books');
107 | let texto = '';
108 | let contador = 1;
109 |
110 | libros = ordenamientoArbol(libros);
111 |
112 | contenedorLibros.innerHTML = '';
113 |
114 | for (let i = 0; i < libros.length; i++) {
115 | texto +=
116 | `
117 |
118 |
119 |
120 |
121 |
122 |
ISBN: ${libros[i].isbn}
123 | Editorial: ${libros[i].editorial}
124 | Carrera: ${libros[i].carrera}
125 | Ubicación: ${libros[i].ubicacion}
126 |
127 |
128 |
129 | `;
130 |
131 | if (contador == 3) {
132 | contenedorLibros.innerHTML += '' + texto + '
';
133 | texto = '';
134 | contador = 0;
135 | }
136 | contador++;
137 | }
138 | contenedorLibros.innerHTML += '' + texto + '
';
139 | }
140 |
141 | const mostrarLibrosBusqueda = (libros, data) => {
142 | let contenedorLibros = document.querySelector('#content-books');
143 | let texto = '';
144 | let contador = 1;
145 |
146 | libros = ordenamientoArbol(libros);
147 |
148 | contenedorLibros.innerHTML = '';
149 |
150 | for (let i = 0; i < libros.length; i++) {
151 | if (libros[i].nombre.toLowerCase().search(data.toLowerCase()) != -1) {
152 | texto +=
153 | `
154 |
155 |
156 |
157 |
158 |
159 |
ISBN: ${libros[i].isbn}
160 | Editorial: ${libros[i].editorial}
161 | Carrera: ${libros[i].carrera}
162 | Ubicación: ${libros[i].ubicacion}
163 |
164 |
165 |
166 | `;
167 |
168 | if (contador == 3) {
169 | contenedorLibros.innerHTML += '' + texto + '
';
170 | texto = '';
171 | contador = 0;
172 | }
173 | contador++;
174 | }
175 | }
176 | contenedorLibros.innerHTML += '' + texto + '
';
177 | }
--------------------------------------------------------------------------------
/biblioteca/src/views/js/load-books.js:
--------------------------------------------------------------------------------
1 | import { ordenamientoArbol, filtrarArbol } from './metodos-tree.js';
2 |
3 | let pageBooks;
4 |
5 | document.addEventListener('DOMContentLoaded', function () {
6 | pageBooks = new PageBooks(window);
7 | });
8 |
9 | class PageBooks {
10 | constructor() {
11 | this.attachEvents();
12 | this.buscarLibros('');
13 | }
14 |
15 | get(id) {
16 | return document.querySelector(id);
17 | }
18 |
19 | attachEvents() {
20 | let btnMostrarTodo = this.get('#btnMostrarTodo');
21 | let btnSoftware = this.get('#btnSoftware');
22 | let btnAmbiental = this.get('#btnAmbiental');
23 | let btnEnergia = this.get('#btnEnergia');
24 | let btnPymes = this.get('#btnPymes');
25 | let btnIngles = this.get('#btnIngles');
26 | let txtBuscar = this.get('#txtSearch');
27 |
28 | btnMostrarTodo.addEventListener('click', () => { this.buscarLibros(''); txtBuscar.value = ''; txtBuscar.focus(); });
29 | btnSoftware.addEventListener('click', () => { this.filtrarCarrera('Software'); txtBuscar.value = ''; txtBuscar.focus(); });
30 | btnAmbiental.addEventListener('click', () => { this.filtrarCarrera('Ambiental'); txtBuscar.value = ''; txtBuscar.focus(); });
31 | btnEnergia.addEventListener('click', () => { this.filtrarCarrera('Energía'); txtBuscar.value = ''; txtBuscar.focus(); });
32 | btnPymes.addEventListener('click', () => { this.filtrarCarrera('PyMES'); txtBuscar.value = ''; txtBuscar.focus(); });
33 | btnIngles.addEventListener('click', () => { this.filtrarCarrera('Inglés'); txtBuscar.value = ''; txtBuscar.focus(); });
34 | txtBuscar.addEventListener('change', () => { this.buscarLibros(txtBuscar.value); txtBuscar.focus(); });
35 |
36 | txtBuscar.focus();
37 | }
38 |
39 | buscarLibros = (data) => {
40 | window.ipcRender.invoke('getBooks').then((result) => {
41 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
42 |
43 | isbn = isbn.replace(/(^_)|(_$)/g, '');
44 | nombre = nombre.replace(/(^_)|(_$)/g, '');
45 | carrera = carrera.replace(/(^_)|(_$)/g, '');
46 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
47 | editorial = editorial.replace(/(^_)|(_$)/g, '');
48 |
49 | isbn = isbn.split('_');
50 | nombre = nombre.split('_');
51 | carrera = carrera.split('_');
52 | ubicacion = ubicacion.split('_');
53 | editorial = editorial.split('_');
54 |
55 | let libros = [];
56 |
57 | for (let i = 0; i < isbn.length; i++) {
58 | libros.push({
59 | 'isbn': isbn[i],
60 | 'nombre': nombre[i],
61 | 'carrera': carrera[i],
62 | 'ubicacion': ubicacion[i],
63 | 'editorial': editorial[i]
64 | });
65 | }
66 |
67 | mostrarLibrosBusqueda(libros, data);
68 | });
69 | }
70 |
71 | filtrarCarrera = (category) => {
72 | window.ipcRender.invoke('getBooks').then((result) => {
73 | let { isbn, nombre, carrera, ubicacion, editorial } = result;
74 |
75 | isbn = isbn.replace(/(^_)|(_$)/g, '');
76 | nombre = nombre.replace(/(^_)|(_$)/g, '');
77 | carrera = carrera.replace(/(^_)|(_$)/g, '');
78 | ubicacion = ubicacion.replace(/(^_)|(_$)/g, '');
79 | editorial = editorial.replace(/(^_)|(_$)/g, '');
80 |
81 | isbn = isbn.split('_');
82 | nombre = nombre.split('_');
83 | carrera = carrera.split('_');
84 | ubicacion = ubicacion.split('_');
85 | editorial = editorial.split('_');
86 |
87 | let libros = [];
88 |
89 | for (let i = 0; i < isbn.length; i++) {
90 | libros.push({
91 | 'isbn': isbn[i],
92 | 'nombre': nombre[i],
93 | 'carrera': carrera[i],
94 | 'ubicacion': ubicacion[i],
95 | 'editorial': editorial[i]
96 | });
97 | }
98 |
99 | //La funcion 'filtrarCarrera' recibe la CARRERA y hace un select de los libros con esa carrera y lo envia a 'mostrarLibros'
100 | mostrarLibros(filtrarArbol(libros, category));
101 | });
102 | }
103 | }
104 |
105 | const mostrarLibros = (libros) => {
106 | let contenedorLibros = document.querySelector('#content-books');
107 | let texto = '';
108 | let contador = 1;
109 |
110 | libros = ordenamientoArbol(libros);
111 |
112 | contenedorLibros.innerHTML = '';
113 |
114 | for (let i = 0; i < libros.length; i++) {
115 | texto +=
116 | `
117 |
118 |
119 |
120 |
121 |
122 |
ISBN: ${libros[i].isbn}
123 | Editorial: ${libros[i].editorial}
124 | Carrera: ${libros[i].carrera}
125 | Ubicación: ${libros[i].ubicacion}
126 |
127 |
128 |
129 | `;
130 |
131 | if (contador == 3) {
132 | contenedorLibros.innerHTML += '' + texto + '
';
133 | texto = '';
134 | contador = 0;
135 | }
136 | contador++;
137 | }
138 | contenedorLibros.innerHTML += '' + texto + '
';
139 | }
140 |
141 | const mostrarLibrosBusqueda = (libros, data) => {
142 | let contenedorLibros = document.querySelector('#content-books');
143 | let texto = '';
144 | let contador = 1;
145 |
146 | libros = ordenamientoArbol(libros);
147 |
148 | contenedorLibros.innerHTML = '';
149 |
150 | for (let i = 0; i < libros.length; i++) {
151 | if (libros[i].nombre.toLowerCase().search(data.toLowerCase()) != -1) {
152 | texto +=
153 | `
154 |
155 |
156 |
157 |
158 |
159 |
ISBN: ${libros[i].isbn}
160 | Editorial: ${libros[i].editorial}
161 | Carrera: ${libros[i].carrera}
162 | Ubicación: ${libros[i].ubicacion}
163 |
164 |
165 |
166 | `;
167 |
168 | if (contador == 3) {
169 | contenedorLibros.innerHTML += '' + texto + '
';
170 | texto = '';
171 | contador = 0;
172 | }
173 | contador++;
174 | }
175 | }
176 | contenedorLibros.innerHTML += '' + texto + '
';
177 | }
--------------------------------------------------------------------------------