Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
2018_web_app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
inutralia
2018_web_app
Commits
928b2bca
Commit
928b2bca
authored
Dec 10, 2018
by
David Villalba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Menu personalizado -.-> Post update.
parent
acfece0c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
2 deletions
+61
-2
index.php
fuel/app/classes/controller/login/index.php
+4
-1
index.php
fuel/app/classes/controller/menupersonalizado/index.php
+12
-1
routes.php
fuel/app/config/routes.php
+1
-0
index.twig
fuel/app/views/menupersonalizado/index.twig
+0
-0
index.js
public/assets/js/menupersonalizado/index.js
+44
-0
No files found.
fuel/app/classes/controller/login/index.php
View file @
928b2bca
...
...
@@ -67,7 +67,10 @@ class Controller_Login_Index extends Controller
if
(
!
isset
(
$return
[
'status'
])){
\Session
::
set_flash
(
'name'
,
current
(
$return
)
->
name
);
$user
=
current
(
$return
);
\Session
::
set_flash
(
'name'
,
$user
->
name
);
\Session
::
set
(
'user_id'
,
$user
->
id
);
Response
::
redirect
(
'/dashboard'
);
...
...
fuel/app/classes/controller/menupersonalizado/index.php
View file @
928b2bca
...
...
@@ -23,7 +23,7 @@ class Controller_Menupersonalizado_Index extends \Controller_App{
public
function
before
(){
// //Se cargan funciones de javascript especificas de esta funcionalidad
// Casset::js('dashboard
/index.js');
Casset
::
js
(
'menupersonalizado
/index.js'
);
//
// //Se marca la navegación en forma de migas de pan. Cada miga de pan la forman dos variables:
// // ds : String a mostrar
...
...
@@ -56,4 +56,14 @@ class Controller_Menupersonalizado_Index extends \Controller_App{
return
Response
::
forge
(
$view
);
}
public
function
post_update
(){
\Fuel\Core\Log
::
error
(
"INPUTS --< "
.
print_r
(
\Fuel\Core\Input
::
post
(),
true
));
$week
=
date
(
"W"
);
\Fuel\Core\Log
::
error
(
"SEMANA ----> "
.
print_r
(
$week
,
true
));
}
}
\ No newline at end of file
fuel/app/config/routes.php
View file @
928b2bca
...
...
@@ -32,6 +32,7 @@ return array(
// MENU PERSONALIZADO
'menupersonalizado'
=>
'menupersonalizado/index'
,
'menupersonalizado/update'
=>
'menupersonalizado/index/update'
,
// MENU SALUDABLES
'menussaludables'
=>
'menussaludables/lista/index'
,
...
...
fuel/app/views/menupersonalizado/index.twig
View file @
928b2bca
This diff is collapsed.
Click to expand it.
public/assets/js/menupersonalizado/index.js
0 → 100644
View file @
928b2bca
$
(
document
).
ready
(
function
()
{
$
(
'.save-menu'
).
on
(
'click'
,
function
()
{
var
inputs
=
[];
$
(
':input:checked'
).
map
(
function
()
{
inputs
.
push
({
'recipe_id'
:
$
(
this
).
val
(),
'day_week'
:
$
(
this
).
attr
(
'data-day'
)
}
)
});
$
.
ajax
({
url
:
"menupersonalizado/update"
,
type
:
"POST"
,
method
:
"post"
,
data
:
{
input
:
inputs
},
success
:
function
(
data
)
{
if
(
data
!=
""
&&
data
!=
0
){
// Modal success
$
(
'#modalSuccess'
).
modal
(
'show'
);
}
else
{
// Modal error
}
setTimeout
(
function
(){
location
.
reload
();
},
2000
);
}
})
});
});
\ No newline at end of file
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