Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nutrapharm_producto
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cristian Mauricio Diaz Canales
nutrapharm_producto
Commits
b934652b
Commit
b934652b
authored
Sep 10, 2020
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cambios #1 se elimina height en marco foto
parent
a2a581ae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
app/Resources/views/producto_final/camera_logic.html.twig
app/Resources/views/producto_final/camera_logic.html.twig
+1
-1
app/Resources/views/producto_final/landing_producto.html.twig
...Resources/views/producto_final/landing_producto.html.twig
+15
-13
web/frontend/js/capture-2.js
web/frontend/js/capture-2.js
+2
-2
No files found.
app/Resources/views/producto_final/camera_logic.html.twig
View file @
b934652b
<div
id=
"tomarFotoContainer"
style=
"display:none"
>
<div
id=
"tomarFotoContainer"
style=
"display:none
; background: url('
{{
asset
(
'manuel/images/selfie-p.jpg'
)
}}
') no-repeat center center; background-size:cover;
"
>
<div
id=
"cameraContainer"
class=
"camera"
style=
"display: block"
>
<video
id=
"video"
>
No se encuentra disponible una camara
</video>
</div>
...
...
app/Resources/views/producto_final/landing_producto.html.twig
View file @
b934652b
...
...
@@ -30,14 +30,12 @@
{%
block
body
%}
<div
class=
"app-container"
>
<img
class=
"img-responsive logo-app"
src=
"
{{
asset
(
'manuel/images/atrevete-desafio.png'
)
}}
"
alt=
"Atrévete al desafío"
/>
<div
id=
"foto_actual"
class=
"marco-foto"
style=
"background: url('
{{
asset
(
'manuel/images/selfie-p.jpg'
)
}}
') no-repeat center center; background-size:cover;"
>
<button
id=
"startbutton"
></button>
{#CODIGO OCULTO#}
{{
include
(
'producto_final/camera_logic.html.twig'
)
}}
{#CODIGO OCULTO#}
</div>
<div
class=
"botonera-fotos"
>
<div>
...
...
@@ -82,6 +80,9 @@
<button
id=
"btnGuardar"
class=
"btn-guardar"
>
Finalizar
</button>
</div>
<div
class=
"terminos-condiciones"
>
<a
href=
"#"
>
Términos y Condiciones de
<strong>
NUTRAPHARM
</strong></a>
</div>
</div>
{%
endblock
%}
...
...
@@ -98,7 +99,7 @@
var
fileUpload
=
$
(
"
#imgInp
"
);
function
mostrarTomarFoto
(
event
)
{
event
.
preventDefault
();
var
fotoActual
=
$
(
"
#
foto_actual
"
);
var
fotoActual
=
$
(
"
#
tomarFotoContainer
"
);
fotoActual
.
css
(
"
background-image
"
,
"
url('')
"
);
console
.
log
(
"
mostrando tomar foto...
"
);
$
(
"
#tomarFotoContainer
"
).
show
();
...
...
@@ -267,12 +268,12 @@
function
generateUrlBackground
(
source
,
type
)
{
if
(
type
==
"
url
"
)
{
var
fotoActual
=
$
(
"
#
foto_actual
"
);
var
fotoActual
=
$
(
"
#
tomarFotoContainer
"
);
var
img
=
new
Image
();
img
.
src
=
source
;
fotoActual
.
css
(
"
background-image
"
,
"
url('
"
+
img
.
src
+
"
')
"
);
}
else
{
var
fotoActual
=
$
(
"
#
foto_actual
"
);
var
fotoActual
=
$
(
"
#
tomarFotoContainer
"
);
var
img
=
new
Image
();
img
.
src
=
source
;
fotoActual
.
css
(
"
background-image
"
,
"
url('
"
+
img
.
src
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)
+
"
')
"
);
...
...
@@ -286,7 +287,8 @@
switch
(
orientation
)
{
case
0
:
case
90
:
case
-
90
:
console
.
log
(
"
modo horizontal
"
);
case
-
90
:
console
.
log
(
"
modo horizontal
"
);
//window.location.reload();
break
;
}
...
...
web/frontend/js/capture-2.js
View file @
b934652b
...
...
@@ -85,7 +85,7 @@
var
data
=
canvas
.
toDataURL
(
'
image/png
'
);
photo
.
setAttribute
(
'
src
'
,
data
);
var
fotoActual
=
$
(
"
#
foto_actual
"
);
var
fotoActual
=
$
(
"
#
tomarFotoContainer
"
);
fotoActual
.
css
(
"
background-image
"
,
"
url('')
"
);
}
...
...
@@ -100,7 +100,7 @@
var
data
=
canvas
.
toDataURL
(
'
image/png
'
);
console
.
log
(
data
);
photo
.
setAttribute
(
'
src
'
,
data
);
var
fotoActual
=
$
(
"
#
foto_actual
"
);
var
fotoActual
=
$
(
"
#
tomarFotoContainer
"
);
var
img
=
new
Image
();
img
.
src
=
data
;
fotoActual
.
css
(
"
background-image
"
,
"
url('
"
+
img
.
src
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)
+
"
')
"
);
...
...
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