Commit 467b57b4 by Luis Perez

Merge branch 'master' of http://git.setisl.com/inutraliaapp/2018_web_app

# Conflicts:
#	fuel/app/classes/controller/listacompra/index.php
#	fuel/app/views/listacompra/index.twig
parents d97732a8 72f658ad
......@@ -64,4 +64,10 @@ class Controller_App extends Controller{
return new \Response(json_encode(array('localidades' => $array_localidades)));
}
public function notify($type,$message){
Session::set('notification',array('type' => $type, 'text' => $message));
}
}
\ No newline at end of file
......@@ -84,7 +84,7 @@ class Controller_Listacompra_Index extends \Controller_App{
}
}
Session::set_flash('success', "Se han borrado los ingredientes correctamente");
$this->notify("success","Se han borrado los ingredientes correctamente");
return Response::redirect_back();
}
......
......@@ -125,6 +125,7 @@ class Twig_Seti_Extension extends Twig_Extension
'sha1' => new Twig_Function_Function('sha1'),
'var_dump' => new Twig_Function_Function('var_dump'),
'is_divisible' => new Twig_Function_Method($this, 'is_divisible'),
'session_delete' => new Twig_Function_Method($this, 'session_delete'),
);
}
......@@ -199,4 +200,14 @@ class Twig_Seti_Extension extends Twig_Extension
return ($num%$div == 0) ? true : false;
}
/**
*
* Borra de session por key
*
* @param $key
*/
public function session_delete($key){
Session::delete($key);
}
}
......@@ -34,15 +34,16 @@
<div class="cs-loader">
<div class="cs-loader-logo" >
<img src="assets/img/logos/inutralia.png" class="img-responsive-custom">
<div class="cs-loader-inner">
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
</div>
</div>
<div class="cs-loader-inner">
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
</div>
</div>
<!--menú vertical y horizontal-->
{% include 'layout/menu.twig' %}
......@@ -53,6 +54,22 @@
{% endblock %}
</div>
{#PREPARAMOS NOTIFICAION PARA MOSTRAR EL MODAL#}
{% if session_get('notification') %}
<input class="notification type" value="{{ session_get('notification.type') }}">
<input class="notification text" value="{{ session_get('notification.text') }}">
{{ session_delete('notification') }}
{% endif %}
{#FIN NOTIFICAION#}
{% include 'modals/modal_notification.twig ' %}
<!--modal instrucciones pantalla-->
{% include 'modals/modal_info.twig' %}
......
......@@ -34,15 +34,16 @@
<div class="cs-loader">
<div class="cs-loader-logo" >
<img src="assets/img/logos/inutralia.png" class="img-responsive-custom">
<div class="cs-loader-inner">
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
</div>
</div>
<div class="cs-loader-inner">
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
<label></label>
</div>
</div>
<!--menú vertical y horizontal-->
......
......@@ -25,16 +25,18 @@
</div>
<div class="container-box-border-box">
<form class="ac-custom ac-checkmark" autocomplete="off">
<ul class="text-left ml0">
{% if count(ingredients) == 0 %}
<h4>Sin Ingredientes</h4>
{% endif %}
{% for i in ingredients %}
<li> <input id="check_{{ i.id }}" name="check_{{ i.id }}" type="checkbox" used="{{ i.used }}" rel="{{ i.ingredient_id }}" {% if i.ingredient_id == null %} rel2="{{ i.id }}" {% endif %}/><label for="check_{{ i.id }}">{{ i.desc }}</label></li>
{% endfor %}
</ul>
</form>
<div class="div-scrollable-lista">
<form class="ac-custom ac-checkmark" autocomplete="off">
<ul class="text-left ml0">
{% if count(ingredients) == 0 %}
<h4>Sin Ingredientes</h4>
{% endif %}
{% for i in ingredients %}
<li> <input id="check_{{ i.id }}" name="check_{{ i.id }}" type="checkbox" used="{{ i.used }}" rel="{{ i.ingredient_id }}" {% if i.ingredient_id == null %} rel2="{{ i.id }}" {% endif %}/><label for="check_{{ i.id }}">{{ i.desc }}</label></li>
{% endfor %}
</ul>
</form>
</div>
</div>
</div>
</div>
......@@ -42,10 +44,11 @@
<h3 class="mt40" >Puedes editar tu lista de la compra borrando y añadiendo productos.</h3>
<!--botones-->
<div class="row ">
<div class="col-md-6">
<div class="col-xs-6">
<button class="btn btn-custom btn-delete mt20" data-toggle="modal" data-target="#modalDeleteAll" ><i class="fa fa-trash"></i> Todos</button>
</div>
<div class="col-md-6">
<div class="col-xs-6">
<button class="btn btn-custom btn-delete mt20" data-toggle="modal" data-target="#modalDelete"><i class="fa fa-trash"></i> Marcados</button>
</div>
</div>
......
......@@ -10,11 +10,12 @@
<div class="text-center">
<img src="assets/img/listacompra/add_producto.png" class="img-responsive-custom mt40"/>
<h2>AÑADIR PRODUCTO</h2>
<p>Los productos que añadas manualmente no se enviarán a DelSuper en el caso de que elijas esta opción de compra.</p>
</div>
<div class="content pb40">
<div class="content pb40 mt40">
<form>
<p>Producto</p>
<label>Producto</label>
<input type="text" class="form-control" name="product" id="product" value=""/>
<div class="mt20">
......
......@@ -265,6 +265,7 @@
<!--modal recomendaciones resto del día-->
{% include 'modal_resto_dia.twig' %}
{% include 'modals/modal_saved.twig' %}
{% endblock %}
......
<!-- Modal info template -->
<div class="modal fade" id="modalNotification" tabindex="-1" role="dialog" aria-labelledby="modalSuccess">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<div class="text-center">
<img src="" class="img-responsive-custom img-type"/>
</div>
<div class="content text-center pb40">
<h2 class="text-message"></h2>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -239,8 +239,6 @@ input:checked + .slider:before {
left:10px;
padding:10px;
}
}
/*----------------------------------------------------*/
......@@ -279,9 +277,9 @@ input:checked + .slider:before {
.btn-delete{background-color: #c83737}
/*----------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*------------TABS PERSONALIZADOS, PARA MENÚS CON COLORES CORPORATIVOS. PARA LA TAB DEL MENÚ PERSONALIZADO Y PARA LAS DE LOS MENÚS SALUDABLES------------------*/
/*-------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
.nav-tabs-menu-personalizado>li.active>a, .nav-tabs-menu-personalizado>li.active>a:focus, .nav-tabs-menu-personalizado>li.active>a:hover {
color: #fff;
......@@ -393,9 +391,9 @@ input:checked + .slider:before {
}
/*----------------------------------------------------*/
/*-------------TEXTOS, PADINGS, MARGINS------------------*/
/*-------------------------------------------------------*/
/*-------------------------------------------------------------------------------*/
/*---------------------------------TEXTOS, PADINGS, MARGINS----------------------*/
/*------------------------------------------------------------------------------*/
h1{
font-size:2.5em!important;
......@@ -532,14 +530,14 @@ a:focus {
font-size:20px;
}
}
/*****************************************************************************/
/**********************************CHECKBOX Y RADIOBUTTON CUSTOM*****************/
/***************************************************************************************/
/**********************************CHECKBOX Y RADIOBUTTON CUSTOM************************/
/***************************************************************************************/
.ac-custom {
padding: 0 2em;
max-width:100%;
}
.ac-custom label {
display: inline-block;
position: relative;
......@@ -586,7 +584,7 @@ a:focus {
.ac-custom input[type="radio"]:checked + label::before {
opacity: 0.8;
}
/*trazado radio button*/
/*******************trazado radio button******/
.ac-custom svg path {
stroke: #92bb00;
stroke-width: 13px;
......@@ -646,8 +644,10 @@ a:focus {
padding: 15px 5px 15px 5px;
}
}
/*----------------------------------------------GIF CARGA DE PAGINA----------------------*/
/******************************************************************************************/
/*----------------------------------------------GIF CARGA DE PAGINA----------------------*/
/******************************************************************************************/
.cs-loader {
z-index: 9999;
......@@ -658,25 +658,18 @@ a:focus {
left: 0;
height:100vh;
width: 100%;
display:flex;
align-items:center;
justify-content:center;
}
.cs-loader-logo {
position:absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
text-align:center;
top:250px;
}
.cs-loader-inner {
transform: translateY(-50%);
top: 350px;
/*position: absolute;*/
margin-top:40px;
width: calc(100% - 200px);
color: #C966CD;
padding: 0 100px;
......@@ -765,19 +758,143 @@ a:focus {
/**********************************************************************************************************************************/
/*********************************************LOGIN***********************************************************************************/
/*.box-login {*/
/*position: absolute;*/
/*left: 50%;*/
/*top: 50%;*/
/*transform: translate(-50%, -50%);*/
/*width: 30%;*/
/*height: 60%;*/
/*padding: 20px;*/
/*text-align: center;*/
/*box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);*/
/*}*/
/****************************************************************************************************************************************/
@media (max-width:639px){
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 60%;
padding: 10px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 640px) and (max-width: 736px) {
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width:737px) and (max-width: 991px){
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 50%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media(min-width: 992px)and (max-width: 1199px){
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 50%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1199px)and (max-width: 1367px) {
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1368px)and (max-width: 1598px) {
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 50%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1599px)and (max-width: 1599px) {
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1600px)and (max-width: 1930px) {
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height:45%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1935px) {
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 40%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MAIN MENU HORIZONTAL NAVBAR*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
......@@ -811,8 +928,9 @@ a:focus {
font-size:18px;
}
}
/**********************************************************************************************************************/
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-DASHBOARD, HOME*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/**********************************************************************************************************************/
.text-btn-home{
color:#fff;
}
......@@ -825,7 +943,6 @@ a:focus {
animation: bounce 1s;
/*transition: all 0.3s ease-in-out;*/
/*transform: scale(0.8);*/
}
.btn-home:hover {
......@@ -853,15 +970,40 @@ a:focus {
margin-top:40px;
margin-bottom:20px;
}
@media (max-width: 415px) {
.text-btn-home{
font-size:0.68em;
@media (min-width: 1199px)and (max-width: 1367px) {
.icono-menu-saludable{
width:36%;
}
.mt-lista-home{
margin-top:40px;
}
.border-box-home{
padding:10px 5px 2px 5px;
border:5px solid #fff;
}
.mt-logout-home{
margin-top:60px;
}
}
@media(min-width:900px)and (max-width:1024px){
.icono-menu-saludable{
width:40%;
}
.mt-lista-home{
margin-top:20px;
}
.mt-logout-home{
margin-top:80px;
}
}
@media (max-width: 768px) {
.text-btn-home{
margin-bottom:10px;
margin-bottom:10px;
}
.p-text-btn-home{
padding:15px 3px 0px 3px;
......@@ -887,36 +1029,19 @@ a:focus {
margin-bottom:20px;
}
}
@media(min-width:900px)and (max-width:1024px){
.icono-menu-saludable{
width:40%;
}
.mt-lista-home{
margin-top:20px;
}
.mt-logout-home{
margin-top:80px;
}
}
@media (min-width: 1199px)and (max-width: 1367px) {
.icono-menu-saludable{
width:36%;
}
.mt-lista-home{
margin-top:40px;
}
.border-box-home{
padding:10px 5px 2px 5px;
border:5px solid #fff;
@media (max-width: 415px) {
.text-btn-home{
font-size:0.68em;
}
.mt-logout-home{
margin-top:60px;
.p-text-btn-home{
padding:5px 3px 0px 3px;
}
}
/*----------------------------------------*/
/*----------------------------------------------------------------*/
/*----------CUADRÍCULA CUADRADOS MISMA ALTURA HOME--------------*/
/******************************************************************/
.col-container {
display: table;
......@@ -937,8 +1062,9 @@ a:focus {
}
}
/*************************************************************************************************************************/
/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-FILTROS RECETARIO*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
/******************************************************************************************************************************/
.mt-arrow-filters{
margin-top:-40px;
......@@ -967,8 +1093,9 @@ a:focus {
position: relative;
z-index: 9;
}
/****************************************************************************************************************************************/
/****************************************************LISTADO DE ARTICULOS***************************************************************/
/******************************************************************************************************************************************/
.date-box{
position:absolute;
top:0;
......@@ -980,6 +1107,19 @@ a:focus {
}
}
/****************************************************LISTA DE LA COMPRA***************************************************************/
/*******************************************************************************************************************************************/
.div-scrollable-lista{
overflow-y: scroll;
height:400px;
}
@media (min-width:1600px){
.div-scrollable-lista{
overflow-y: scroll;
height:500px;
}
}
/*****************************************************************************************************************************************/
/*********************************************************MENÚS SALUDABLES***************************************************************/
/****************************************************************************************************************************************/
......@@ -1034,169 +1174,3 @@ a:focus {
}
}
/*-*-*-*---*-*-*--*-*-*--*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*RESPONSIVE-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*---*-*-*-*-*-*/
/***_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_vertical iphone 3, 4, 5 **_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_*/
/*@media (width: 320px) {*/
@media (min-width: 318px) and (max-width: 329px) {
}
/*v**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_vertical androids peques**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_*/
@media (min-width: 330px) and (max-width: 374px) {
}
/***_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_horizontal iphone 3, 4, 5 **_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_*/
@media (min-width: 479px) and (max-width: 569px) {
}
/***_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_vertical iphone 6 u 6plis **_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_*/
@media (min-width: 374px) and (max-width: 639px) {
}
@media (max-width:639px){
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 60%;
padding: 10px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
/**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_horizontal iphone 6 y 6plus **_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_*/
@media (min-width: 640px) and (max-width: 736px) {
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
/***_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_ Small devices (tablets, 768px and up) **_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_*/
@media (min-width:737px) and (max-width: 991px){
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 50%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
/***_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_ ipad 3/4 horizontal 1024x 768**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_*/
@media(min-width: 992px)and (max-width: 1199px){
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 50%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
/***_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_ po típico 1366x768**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_**_*_ */
@media (min-width: 1199px)and (max-width: 1367px) {
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1368px)and (max-width: 1598px) {
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 50%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1599px)and (max-width: 1599px) {
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 60%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1600px)and (max-width: 1930px) {
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height:45%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
@media (min-width: 1935px) {
/*********************************************LOGIN***********************************************************************************/
.box-login {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 30%;
height: 40%;
padding: 20px;
text-align: center;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
}
......@@ -13,6 +13,12 @@ $(window).load(function() {
// Control Checked inputs
control_inputs_checked();
// Open modal notification
show_modal_notification();
});
......@@ -94,7 +100,13 @@ function control_inputs_checked() {
*/
function diff_input_checked(el) {
var class_separate = $(el).closest("form").attr('class').split(' ');
var class_form_input = $(el).closest("form.ac-custom").attr('class');
if(typeof class_form_input === "undefined"){
return false
}
var class_separate = class_form_input.split(' ');
var class_type = class_separate[class_separate.length-1];
......@@ -154,4 +166,16 @@ function print_radio_checked(el,type) {
draw( el, type );
}
function show_modal_notification() {
if($('.notification').length !== 0){
$('.img-type').attr('src',$('.notification.type').val() === "success" ? "assets/img/save.png" : "assets/img/notsave.png");
$('.text-message').text($('.notification.text').val());
$('#modalNotification').modal('show');
}
}
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