Unverified Commit 8547bd21 authored by Alisson Albuquerque's avatar Alisson Albuquerque Committed by GitHub
Browse files

Merge pull request #2 from alissonalbuquerque/task/implement_dropdown

Task/implement_dropdown - Atualização de Layout e refatoação de pad-ensino
parents 40390e35 da1ae912
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
$(document).ready(function() {
$("#add_row").on("click", function() {
// Dynamic Rows Code
// Get max row id and set new id
var newid = 0;
$.each($("#tab_logic tr"), function() {
if (parseInt($(this).data("id")) > newid) {
newid = parseInt($(this).data("id"));
}
});
newid++;
var tr = $("<tr></tr>", {
id: "addr"+newid,
"data-id": newid
});
// loop through each td and create new elements with name of newid
$.each($("#tab_logic tbody tr:nth(0) td"), function() {
var td;
var cur_td = $(this);
var children = cur_td.children();
// add new td and element if it has a nane
if ($(this).data("name") !== undefined) {
td = $("<td></td>", {
"data-name": $(cur_td).data("name")
});
var c = $(cur_td).find($(children[0]).prop('tagName')).clone().val("");
c.attr("name", $(cur_td).data("name") + newid);
c.appendTo($(td));
td.appendTo($(tr));
} else {
td = $("<td></td>", {
'text': $('#tab_logic tr').length
}).appendTo($(tr));
}
});
// add delete button and td
/*
$("<td></td>").append(
$("<button class='btn btn-danger glyphicon glyphicon-remove row-remove'></button>")
.click(function() {
$(this).closest("tr").remove();
})
).appendTo($(tr));
*/
// add the new row
$(tr).appendTo($('#tab_logic'));
$(tr).find("td button.row-remove").on("click", function() {
$(this).closest("tr").remove();
});
});
// Sortable Code
var fixHelperModified = function(e, tr) {
var $originals = tr.children();
var $helper = tr.clone();
$helper.children().each(function(index) {
$(this).width($originals.eq(index).width())
});
return $helper;
};
$(".table-sortable tbody").sortable({
helper: fixHelperModified
}).disableSelection();
$(".table-sortable thead").disableSelection();
$("#add_row").trigger("click");
});
\ No newline at end of file
window._ = require('lodash');
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
// import Echo from 'laravel-echo';
// window.Pusher = require('pusher-js');
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// forceTLS: true
// });
<x-guest-layout> @extends('auth.main')
<x-slot name="content">
<!-- Container principal --> @section('body')
<div class="container"> <!-- Container principal -->
<div class="ftco-section">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12 col-lg-7"> <div class="col-md-12 col-lg-7">
<div class="login-wrap"> <div class="login-wrap">
...@@ -24,6 +26,7 @@ ...@@ -24,6 +26,7 @@
<p class="w-100 text-center">O primeiro acesso deve ser realizado utilizando seu e-mail <p class="w-100 text-center">O primeiro acesso deve ser realizado utilizando seu e-mail
e CPF, nos campos de login e senha respectivamente</p> e CPF, nos campos de login e senha respectivamente</p>
</div> </div>
<!-- Login --> <!-- Login -->
<div class="half p-4 py-md-5"> <div class="half p-4 py-md-5">
<div class="w-100"> <div class="w-100">
...@@ -42,8 +45,7 @@ ...@@ -42,8 +45,7 @@
class="fa fa-fw fa-eye field-icon toggle-password"></span> class="fa fa-fw fa-eye field-icon toggle-password"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<button type="submit" <button type="submit" class="form-control btn btn-secondary rounded submit px-3">Entrar</button>
class="form-control btn btn-secondary rounded submit px-3">Entrar</button>
</div> </div>
<div class="form-group d-md-flex"> <div class="form-group d-md-flex">
<div class="w-50 text-left"> <div class="w-50 text-left">
...@@ -55,7 +57,7 @@ ...@@ -55,7 +57,7 @@
</label> </label>
</div> </div>
<div class="w-50 text-md-right"> <div class="w-50 text-md-right">
<a href="#" style="color: rgb(22, 21, 21);">Reculperar senha</a> <a href="#" style="color: rgb(22, 21, 21);"></a>
</div> </div>
</div> </div>
</div> </div>
...@@ -63,6 +65,6 @@ ...@@ -63,6 +65,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</x-slot> </div>
</x-guest-layout> @endsection
\ No newline at end of file
<!doctype html>
<html lang="pt-br">
<head>
<title>PAD - Plano de Avaliação Docente </title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
@include('components.frontend-libs')
<link rel="stylesheet" href="{{ asset('css/auth.css') }}" />
</head>
<body>
<header>
<div class="navbar shadow-sm" alt="Max-width 100%">
<div class="container d-flex justify-content-between">
<a class="navbar-brand d-flex align-items-center" href="#">
<img src="http://www.avaliacaodocente.upe.br/assets/img/logo-upe.png" class="img-fluid"
width="128" height="93" alt="" />
</a>
<a class="navbar-brand d-flex align-items-center" href="#">
<img src="https://www.gestaododesempenho.pe.gov.br/AvaliacaoDesempenho/public/resources/images/logos-direita.png"
class="img-fluid" width="268" height="100" alt="" />
</a>
</div>
</div>
</header>
<div class="stylo p-3 n-flex">
<h2>Portal de acesso ao</h2>
<h3>Plano de Atividades Docentes - PAD</h3>
</div>
<div class="container">
@section('body')
@show
</div>
<div class="stylo p-2"> </div>
<footer class="pt-3 my-3 align-items-center border-top" alt="Max-width 100%">
<div class="w-100">
<p class="copyright-upe d-flex text-center text-muted justify-content-center">
Copyright &#9400;2022. Universidade de Pernambuco - Todos os direitos reservados
</p>
</div>
</footer>
</body>
</html>
\ No newline at end of file
<svg viewBox="0 0 316 316" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}>
<path d="M305.8 81.125C305.77 80.995 305.69 80.885 305.65 80.755C305.56 80.525 305.49 80.285 305.37 80.075C305.29 79.935 305.17 79.815 305.07 79.685C304.94 79.515 304.83 79.325 304.68 79.175C304.55 79.045 304.39 78.955 304.25 78.845C304.09 78.715 303.95 78.575 303.77 78.475L251.32 48.275C249.97 47.495 248.31 47.495 246.96 48.275L194.51 78.475C194.33 78.575 194.19 78.725 194.03 78.845C193.89 78.955 193.73 79.045 193.6 79.175C193.45 79.325 193.34 79.515 193.21 79.685C193.11 79.815 192.99 79.935 192.91 80.075C192.79 80.285 192.71 80.525 192.63 80.755C192.58 80.875 192.51 80.995 192.48 81.125C192.38 81.495 192.33 81.875 192.33 82.265V139.625L148.62 164.795V52.575C148.62 52.185 148.57 51.805 148.47 51.435C148.44 51.305 148.36 51.195 148.32 51.065C148.23 50.835 148.16 50.595 148.04 50.385C147.96 50.245 147.84 50.125 147.74 49.995C147.61 49.825 147.5 49.635 147.35 49.485C147.22 49.355 147.06 49.265 146.92 49.155C146.76 49.025 146.62 48.885 146.44 48.785L93.99 18.585C92.64 17.805 90.98 17.805 89.63 18.585L37.18 48.785C37 48.885 36.86 49.035 36.7 49.155C36.56 49.265 36.4 49.355 36.27 49.485C36.12 49.635 36.01 49.825 35.88 49.995C35.78 50.125 35.66 50.245 35.58 50.385C35.46 50.595 35.38 50.835 35.3 51.065C35.25 51.185 35.18 51.305 35.15 51.435C35.05 51.805 35 52.185 35 52.575V232.235C35 233.795 35.84 235.245 37.19 236.025L142.1 296.425C142.33 296.555 142.58 296.635 142.82 296.725C142.93 296.765 143.04 296.835 143.16 296.865C143.53 296.965 143.9 297.015 144.28 297.015C144.66 297.015 145.03 296.965 145.4 296.865C145.5 296.835 145.59 296.775 145.69 296.745C145.95 296.655 146.21 296.565 146.45 296.435L251.36 236.035C252.72 235.255 253.55 233.815 253.55 232.245V174.885L303.81 145.945C305.17 145.165 306 143.725 306 142.155V82.265C305.95 81.875 305.89 81.495 305.8 81.125ZM144.2 227.205L100.57 202.515L146.39 176.135L196.66 147.195L240.33 172.335L208.29 190.625L144.2 227.205ZM244.75 114.995V164.795L226.39 154.225L201.03 139.625V89.825L219.39 100.395L244.75 114.995ZM249.12 57.105L292.81 82.265L249.12 107.425L205.43 82.265L249.12 57.105ZM114.49 184.425L96.13 194.995V85.305L121.49 70.705L139.85 60.135V169.815L114.49 184.425ZM91.76 27.425L135.45 52.585L91.76 77.745L48.07 52.585L91.76 27.425ZM43.67 60.135L62.03 70.705L87.39 85.305V202.545V202.555V202.565C87.39 202.735 87.44 202.895 87.46 203.055C87.49 203.265 87.49 203.485 87.55 203.695V203.705C87.6 203.875 87.69 204.035 87.76 204.195C87.84 204.375 87.89 204.575 87.99 204.745C87.99 204.745 87.99 204.755 88 204.755C88.09 204.905 88.22 205.035 88.33 205.175C88.45 205.335 88.55 205.495 88.69 205.635L88.7 205.645C88.82 205.765 88.98 205.855 89.12 205.965C89.28 206.085 89.42 206.225 89.59 206.325C89.6 206.325 89.6 206.325 89.61 206.335C89.62 206.335 89.62 206.345 89.63 206.345L139.87 234.775V285.065L43.67 229.705V60.135ZM244.75 229.705L148.58 285.075V234.775L219.8 194.115L244.75 179.875V229.705ZM297.2 139.625L253.49 164.795V114.995L278.85 100.395L297.21 89.825V139.625H297.2Z"/>
</svg>
@props(['status']) @props(['status'])
@if ($status) @if ($status)
<div {{ $attributes->merge(['class' => 'font-medium text-sm text-green-600']) }}> <div {{ $attributes->merge(['class' => 'font-medium text-sm text-success']) }}>
{{ $status }} {{ $status }}
</div> </div>
@endif @endif
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
@if ($errors->any()) @if ($errors->any())
<div {{ $attributes }}> <div {{ $attributes }}>
<div class="font-medium text-red-600"> <div class="font-medium text-danger">
{{ __('Ops! Algo deu errado.') }} {{ __('Ops! Algo deu errado.') }}
</div> </div>
<ul class="mt-3 list-disc list-inside text-sm text-red-600"> <ul class="mt-3 list-disc list-inside text-sm text-danger">
@foreach ($errors->all() as $error) @foreach ($errors->all() as $error)
<li>{{ $error }}</li> <li>{{ $error }}</li>
@endforeach @endforeach
......
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
<!-- Jquery -->
<script src="https://code.jquery.com/jquery-3.6.0.slim.js" integrity="sha256-HwWONEZrpuoh951cQD1ov2HUK5zA5DwJ1DNUXaM6FsY=" crossorigin="anonymous"></script>
<!-- Pooper.js -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"/>
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
\ No newline at end of file
@php
use Nette\Utils\Json;
$_divs = [];
foreach($divs as $div) {
$id = $div['id'];
array_push($_divs, ['id' => $id]);
}
$_divs = Json::encode($_divs);
@endphp
<script type="text/javascript">
$('#get-divs').change(function(e) {
e.preventDefault();
const self = $(this);
const divs = {!! $_divs !!}
divs.forEach((div) => {
$('#'+div.id).hide();
})
if(self.val() !== '0') {
div = $('#'+self.val());
console.log(self.val());
div.show();
}
}).change();
$('#ensino_aulas').show();
</script>
<div class="mb-3 row">
<div class="">
<select class="form-select" name="get-divs" id="get-divs">
<option selected value="0">Selecione uma categoria</option>
@foreach ($divs as $div)
<option value="{{ $div['id'] }}"> {{ $div['name'] }}</option>
@endforeach
</select>
</div>
</div>
...@@ -8,20 +8,10 @@ ...@@ -8,20 +8,10 @@
<title>{{ config('app.name') }} - @yield('title')</title> <title>{{ config('app.name') }} - @yield('title')</title>
@include('components.frontend-libs')
<!-- Styles -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" />
<!-- Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"/>
<link rel="stylesheet" href="{{ asset('css/styles.css') }}"> <link rel="stylesheet" href="{{ asset('css/styles.css') }}">
<link rel="stylesheet" href="{{ asset('css/dashboard.css') }}"> <link rel="stylesheet" href="{{ asset('css/dashboard.css') }}">
<link rel="stylesheet" href="{{ asset('css/forms.css') }}">
</head> </head>
<body> <body>
...@@ -46,16 +36,6 @@ ...@@ -46,16 +36,6 @@
Copyright &copy;2022. Universidade de Pernambuco - Todos os direitos reservados Copyright &copy;2022. Universidade de Pernambuco - Todos os direitos reservados
</footer> </footer>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous">
</script>
@if(Auth::user()->isTypeAdmin()) @if(Auth::user()->isTypeAdmin())
@include('layouts.user-jquery.jquery_admin') @include('layouts.user-jquery.jquery_admin')
@endif @endif
...@@ -71,8 +51,6 @@ ...@@ -71,8 +51,6 @@
@if(Auth::user()->isTypeCoordinator()) @if(Auth::user()->isTypeCoordinator())
@include('layouts.user-jquery.jquery_coordinator') @include('layouts.user-jquery.jquery_coordinator')
@endif @endif
<script src="{{ asset('js/forms.js') }}"></script>
</body> </body>
</html> </html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment