mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
make tabs and submenu working
This commit is contained in:
parent
7d9eeaf15d
commit
75794d9323
@ -29,11 +29,15 @@ class MenuComposer {
|
|||||||
$routes = array();
|
$routes = array();
|
||||||
|
|
||||||
foreach ($this->routeCollection->all() as $key => $route) {
|
foreach ($this->routeCollection->all() as $key => $route) {
|
||||||
if ($route['options']['menu'] === $menuId) {
|
if ($route->getOption('menu') === $menuId) {
|
||||||
$routes[$route['options']['order']] = $route;
|
$a['route'] = $key;
|
||||||
|
$a['label'] = $route->getOption('label');
|
||||||
|
$routes[$route->getOption('order')] = $a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ksort($routes);
|
||||||
|
|
||||||
return $routes;
|
return $routes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
Gumby.debug('Initializing Tabs', $el);
|
Gumby.debug('Initializing Tabs', $el);
|
||||||
|
|
||||||
this.$el = $el;
|
this.$el = $el;
|
||||||
this.$nav = this.$el.find('ul.tab-nav > li');
|
this.$nav = this.$el.find('ul.tab-nav:not(.follow-href-path) > li');
|
||||||
this.$content = this.$el.find('.tab-content');
|
this.$content = this.$el.find('.tab-content');
|
||||||
|
|
||||||
var scope = this;
|
var scope = this;
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
cl_chill_main_homepage:
|
cl_chill_main_homepage:
|
||||||
pattern: /hello
|
pattern: /hello
|
||||||
defaults: { _controller: CLChillMainBundle:Default:index }
|
defaults: { _controller: CLChillMainBundle:Default:index }
|
||||||
|
options:
|
||||||
|
menu: person
|
||||||
|
order: 0
|
||||||
|
label: HomePage
|
||||||
|
@ -5,7 +5,7 @@ services:
|
|||||||
menu_composer:
|
menu_composer:
|
||||||
class: CL\Chill\MainBundle\DependencyInjection\Services\MenuComposer
|
class: CL\Chill\MainBundle\DependencyInjection\Services\MenuComposer
|
||||||
arguments:
|
arguments:
|
||||||
- "@routing.loader"
|
- "@router"
|
||||||
# cl_chill_main.example:
|
# cl_chill_main.example:
|
||||||
# class: %cl_chill_main.example.class%
|
# class: %cl_chill_main.example.class%
|
||||||
# arguments: [@service_id, "plain_value", %parameter%]
|
# arguments: [@service_id, "plain_value", %parameter%]
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
Gumby.debug('Initializing Tabs', $el);
|
Gumby.debug('Initializing Tabs', $el);
|
||||||
|
|
||||||
this.$el = $el;
|
this.$el = $el;
|
||||||
this.$nav = this.$el.find('ul.tab-nav > li');
|
this.$nav = this.$el.find('ul.tab-nav:not(.follow-href-path) > li');
|
||||||
this.$content = this.$el.find('.tab-content');
|
this.$content = this.$el.find('.tab-content');
|
||||||
|
|
||||||
var scope = this;
|
var scope = this;
|
||||||
|
@ -153,7 +153,7 @@
|
|||||||
|
|
||||||
"bundles/clchillmain/js/gumby.init.js"
|
"bundles/clchillmain/js/gumby.init.js"
|
||||||
"bundles/clchillmain/js/ui/*.js" %}
|
"bundles/clchillmain/js/ui/*.js" %}
|
||||||
<script src="{{ asset_url }}" type="text/javascript"></script>
|
<script gumby-debug src="{{ asset_url }}" type="text/javascript"></script>
|
||||||
|
|
||||||
{% endjavascripts %}
|
{% endjavascripts %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user