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();
|
||||
|
||||
foreach ($this->routeCollection->all() as $key => $route) {
|
||||
if ($route['options']['menu'] === $menuId) {
|
||||
$routes[$route['options']['order']] = $route;
|
||||
if ($route->getOption('menu') === $menuId) {
|
||||
$a['route'] = $key;
|
||||
$a['label'] = $route->getOption('label');
|
||||
$routes[$route->getOption('order')] = $a;
|
||||
}
|
||||
}
|
||||
|
||||
ksort($routes);
|
||||
|
||||
return $routes;
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
Gumby.debug('Initializing Tabs', $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');
|
||||
|
||||
var scope = this;
|
||||
|
@ -1,3 +1,7 @@
|
||||
cl_chill_main_homepage:
|
||||
pattern: /hello
|
||||
defaults: { _controller: CLChillMainBundle:Default:index }
|
||||
options:
|
||||
menu: person
|
||||
order: 0
|
||||
label: HomePage
|
||||
|
@ -5,7 +5,7 @@ services:
|
||||
menu_composer:
|
||||
class: CL\Chill\MainBundle\DependencyInjection\Services\MenuComposer
|
||||
arguments:
|
||||
- "@routing.loader"
|
||||
- "@router"
|
||||
# cl_chill_main.example:
|
||||
# class: %cl_chill_main.example.class%
|
||||
# arguments: [@service_id, "plain_value", %parameter%]
|
||||
|
@ -10,7 +10,7 @@
|
||||
Gumby.debug('Initializing Tabs', $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');
|
||||
|
||||
var scope = this;
|
||||
|
@ -153,7 +153,7 @@
|
||||
|
||||
"bundles/clchillmain/js/gumby.init.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 %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user