Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
3b89ee9a
Commit
3b89ee9a
authored
Jun 18, 2020
by
alinetenorio
Browse files
habilitando plano após desabilitar
parent
653d68f8
Changes
2
Show whitespace changes
Inline
Side-by-side
resources/views/evento/submeterTrabalho.blade.php
View file @
3b89ee9a
...
@@ -276,7 +276,7 @@
...
@@ -276,7 +276,7 @@
</div>
</div>
<hr>
<hr>
<h
4
>Participantes</h
4
>
<h
3
>Participantes</h
3
>
{{-- Participantes --}}
{{-- Participantes --}}
<div class="
row
" style="
margin
-
top
:
20
px
">
<div class="
row
" style="
margin
-
top
:
20
px
">
...
@@ -292,7 +292,7 @@
...
@@ -292,7 +292,7 @@
@for (
$i
= 0;
$i
<
$countParticipante
;
$i
++)
@for (
$i
= 0;
$i
<
$countParticipante
;
$i
++)
<div id="
novoParticipante
" style="
display
:
block
;
">
<div id="
novoParticipante
" style="
display
:
block
;
">
<br>
<br>
<h
5
>Dados do participante</h
5
>
<h
4
>Dados do participante</h
4
>
<div class="
row
">
<div class="
row
">
<div class="
col
-
sm
-
5
">
<div class="
col
-
sm
-
5
">
<label>Nome Completo*</label>
<label>Nome Completo*</label>
...
@@ -544,7 +544,7 @@
...
@@ -544,7 +544,7 @@
function
montarLinhaInput
()
{
function
montarLinhaInput
()
{
return
"<div id="
+
"novoParticipante"
+
">"
+
return
"<div id="
+
"novoParticipante"
+
">"
+
"<br><h
5
>Dados do participante</h
5
>"
+
"<br><h
4
>Dados do participante</h
4
>"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"col-sm-5"
+
">"
+
"<div class="
+
"col-sm-5"
+
">"
+
"<label>Nome Completo*</label>"
+
"<label>Nome Completo*</label>"
+
...
...
resources/views/projeto/editar.blade.php
View file @
3b89ee9a
...
@@ -266,7 +266,7 @@
...
@@ -266,7 +266,7 @@
</div>
</div>
<hr>
<hr>
<h
4
>Participantes</h
4
>
<h
3
>Participantes</h
3
>
{{-- Participantes --}}
{{-- Participantes --}}
<div class="
row
" style="
margin
-
top
:
20
px
">
<div class="
row
" style="
margin
-
top
:
20
px
">
...
@@ -277,7 +277,7 @@
...
@@ -277,7 +277,7 @@
@if(
$participante->user_id
===
$user->id
)
@if(
$participante->user_id
===
$user->id
)
<div id="
novoParticipante
">
<div id="
novoParticipante
">
<br>
<br>
<h
5
>Dados do participante</h
5
>
<h
4
>Dados do participante</h
4
>
<div class="
row
">
<div class="
row
">
<div class="
col
-
sm
-
5
">
<div class="
col
-
sm
-
5
">
<label>Nome Completo</label>
<label>Nome Completo</label>
...
@@ -317,9 +317,18 @@
...
@@ -317,9 +317,18 @@
</select>
</select>
</div>
</div>
</div>
</div>
<div class="
row
">
<div class='col-sm-11'>
<h6 class="
mb
-
1
">Possui plano de trabalho?</h6>
<h6 class="
mb
-
1
">Possui plano de trabalho?</h6>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
simPlano
" id="
simPlano
">Sim</button>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
simPlano
" id="
simPlano
">Sim</button>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
naoPlano
">Não</button>
<button class="
btn
btn
-
primary
mt
-
2
mb
-
2
naoPlano
">Não</button>
</div>
<div class="
col
-
sm
-
1
deletarSemPlano
" >
<a class="
delete
">
<img src="
/
img
/
icons
/
user
-
times
-
solid
.
svg
" style="
width
:
25
px
;
margin
-
top
:
35
px
">
</a>
</div>
</div>
<div id="
planoHabilitado
" >
<div id="
planoHabilitado
" >
@foreach (
$arquivos
as
$arquivo
)
@foreach (
$arquivos
as
$arquivo
)
@if(
$arquivo->participanteId
===
$participante->id
)
@if(
$arquivo->participanteId
===
$participante->id
)
...
@@ -414,12 +423,17 @@
...
@@ -414,12 +423,17 @@
});
});
$
(
'.simPlano'
)
.
click
(
function
(
e
)
{
$
(
'.simPlano'
)
.
click
(
function
(
e
)
{
var
possuiPlano
=
$
(
this
)
.
next
()
.
next
()[
0
]
.
firstElementChild
;
var
possuiPlano
=
$
(
this
)
.
parent
()
.
parent
()
.
next
();
if
(
possuiPlano
==
null
){
if
(
possuiPlano
[
0
]
.
firstElementChild
==
null
){
e
.
preventDefault
();
e
.
preventDefault
();
linha
=
linhaPlanoTrabalho
();
linha
=
linhaPlanoTrabalho
();
$
(
this
)
.
next
()
.
next
()
.
append
(
linha
);
possuiPlano
.
append
(
linha
);
}
else
if
(
possuiPlano
[
0
]
.
firstElementChild
.
className
==
'exibirPlano'
){
possuiPlano
[
0
]
.
style
.
display
=
'block'
;
}
}
deletar
=
$
(
this
)
.
parent
()
.
next
()[
0
];
deletar
.
style
.
display
=
"none"
;
});
});
// $('#addPlanoTrabalho').click(function(e) {
// $('#addPlanoTrabalho').click(function(e) {
...
@@ -471,25 +485,27 @@
...
@@ -471,25 +485,27 @@
});
});
$
(
document
)
.
on
(
'click'
,
'.simPlano'
,
function
(
e
)
{
$
(
document
)
.
on
(
'click'
,
'.simPlano'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
//var plano = $(this).next().next()[0];
//plano.style.display = 'block';
$
(
this
)
.
next
()[
0
]
.
className
=
'btn btn-primary mt-2 mb-2 naoPlano'
;
$
(
this
)
.
next
()[
0
]
.
className
=
'btn btn-primary mt-2 mb-2 naoPlano'
;
console
.
log
(
'button sim'
);
console
.
log
(
'button sim'
);
});
});
$
(
document
)
.
on
(
'click'
,
'.naoPlano'
,
function
(
e
)
{
$
(
document
)
.
on
(
'click'
,
'.naoPlano'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
var
plano
=
$
(
this
)
.
next
()[
0
];
var
plano
=
$
(
this
)
.
parent
()
.
parent
()
.
next
()[
0
];
plano
.
style
.
display
=
'none'
;
plano
.
style
.
display
=
'none'
;
$
(
this
)
.
prev
()[
0
]
.
className
=
'btn btn-primary mt-2 mb-2 simPlano'
;
$
(
this
)
.
prev
()[
0
]
.
className
=
'btn btn-primary mt-2 mb-2 simPlano'
;
deletar
=
$
(
this
)
.
parent
()
.
next
()[
0
]
deletar
.
style
.
display
=
"block"
;
console
.
log
(
'button nao'
);
console
.
log
(
'button nao'
);
});
});
$
(
function
()
{
$
(
function
()
{
var
simPlano
=
document
.
getElementsByClassName
(
'simPlano'
);
var
simPlano
=
document
.
getElementsByClassName
(
'simPlano'
);
for
(
var
i
=
0
;
i
<
simPlano
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
simPlano
.
length
;
i
++
){
var
planoHabilitado
=
simPlano
[
i
]
.
nex
tElement
Sibling
.
nextElementSibling
;
var
planoHabilitado
=
simPlano
[
i
]
.
paren
tElement
.
parentElement
.
nextElementSibling
;
//se há plano de trabalho
//se há plano de trabalho
if
(
planoHabilitado
.
firstElementChild
!=
null
&&
planoHabilitado
.
firstElementChild
.
className
==
'exibirPlano'
){
if
(
planoHabilitado
.
firstElementChild
!=
null
&&
planoHabilitado
.
firstElementChild
.
className
==
'exibirPlano'
){
simPlano
[
i
]
.
parentElement
.
nextElementSibling
.
style
.
display
=
"none"
;
simPlano
[
i
]
.
nextElementSibling
.
className
=
'btn btn-primary mt-2 mb-2 naoPlano'
;
simPlano
[
i
]
.
nextElementSibling
.
className
=
'btn btn-primary mt-2 mb-2 naoPlano'
;
simPlano
[
i
]
.
className
=
'btn btn-primary focus mt-2 mb-2 simPlano'
;
simPlano
[
i
]
.
className
=
'btn btn-primary focus mt-2 mb-2 simPlano'
;
}
else
{
}
else
{
...
@@ -514,7 +530,7 @@
...
@@ -514,7 +530,7 @@
function
montarLinhaInput
()
{
function
montarLinhaInput
()
{
return
"<div id="
+
"novoParticipante"
+
">"
+
return
"<div id="
+
"novoParticipante"
+
">"
+
"<br><h
5
>Dados do participante</h
5
>"
+
"<br><h
4
>Dados do participante</h
4
>"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"row"
+
">"
+
"<div class="
+
"col-sm-5"
+
">"
+
"<div class="
+
"col-sm-5"
+
">"
+
"<label>Nome Completo</label>"
+
"<label>Nome Completo</label>"
+
...
@@ -661,6 +677,14 @@
...
@@ -661,6 +677,14 @@
"</div>"
;
"</div>"
;
}
}
function
addDeletar
(){
return
"<div class="
+
"col-sm-1"
+
" style="
+
"display:inline;"
+
">"
+
"<a class="
+
"delete"
+
">"
+
"<img src="
+
"/img/icons/user-times-solid.svg"
+
" style="
+
"width:25px;margin-top:35px"
+
">"
+
"</a>"
+
"</div>"
;
}
function
areas
()
{
function
areas
()
{
var
grandeArea
=
$
(
'#grandeArea'
)
.
val
();
var
grandeArea
=
$
(
'#grandeArea'
)
.
val
();
$
.
getJSON
(
"{{ config('app.url') }}/naturezas/areas/"
+
grandeArea
,
$
.
getJSON
(
"{{ config('app.url') }}/naturezas/areas/"
+
grandeArea
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment