Version Description
(5th May 2017) = * Requires PHP 5.4 * Added filter box in admin for options * Added menu container background colour option * Added hover line colour option * Added active line colour option * Added active button background colour option * Added migration scripts to make data upgrades smoother * Added option to choose custom Font Icons - Pro Only * Removed browser button outline and enabled focus/active states for better accessibility * Bug fixes
Download this release
Release Info
Developer | peterfeatherstone |
Plugin | Responsive Menu |
Version | 3.1.1 |
Comparing to | |
See all releases |
Code changes from version 3.1.0 to 3.1.1
- README.md +1 -1
- app/Collections/OptionsCollection.php +9 -9
- app/Database/Migration.php +18 -0
- app/Database/Migrations/Migrate.php +35 -0
- app/Database/Migrations/Migrate_0_0_1_0_0_2.php +29 -0
- app/Database/Migrations/Migrate_0_0_2_0_0_3.php +25 -0
- app/Database/Migrations/Migrate_0_0_5_0_0_6.php +11 -0
- app/Database/Migrations/Migrate_1_1_0_1_1_1.php +7 -0
- app/Database/Migrations/Migrate_3_1_0_3_1_1.php +14 -0
- app/Validation/Validator.php +5 -1
- app/Validation/Validators/{Numeric.php → Number.php} +1 -1
- config/default_options.php +9 -0
- migration.php +15 -2
- public/css/admin/admin.css +31 -2
- public/css/app.css.twig +38 -7
- public/js/admin/admin.js +39 -0
- public/js/app.js.twig +3 -0
- readme.txt +13 -1
- responsive-menu.php +1 -1
- tests/app/Database/MigrationTest.php +145 -0
- tests/app/Validation/Validators/{NumericTest.php → NumberTest.php} +2 -2
- views/admin/macros.html.twig +11 -0
- views/admin/main.html.twig +4 -0
- views/admin/sections/button.html.twig +16 -13
- views/admin/sections/custom-css.html.twig +1 -1
- views/admin/sections/header-bar.html.twig +8 -8
- views/admin/sections/import-export.html.twig +1 -1
- views/admin/sections/initial-setup.html.twig +1 -0
- views/admin/sections/menu.html.twig +36 -25
- views/admin/sections/single-menu.html.twig +7 -7
- views/admin/sections/sub-menus.html.twig +10 -10
- views/admin/sections/technical.html.twig +3 -3
- views/admin/tabs.html.twig +9 -9
README.md
CHANGED
@@ -1 +1 @@
|
|
1 |
-
[
|
1 |
+
[![Codeship Status](https://www.codeship.io/projects/0f626140-0c02-0135-749e-1e85f2753028/status?branch=master)](https://codeship.com/projects/215186)
|
app/Collections/OptionsCollection.php
CHANGED
@@ -20,32 +20,32 @@ class OptionsCollection implements \ArrayAccess, \Countable {
|
|
20 |
public function getActiveArrow() {
|
21 |
if($this->options['active_arrow_image'])
|
22 |
return '<img alt="' . $this->options['active_arrow_image_alt'] .'" src="' . $this->options['active_arrow_image'] .'" />';
|
23 |
-
|
24 |
-
|
25 |
|
26 |
}
|
27 |
|
28 |
public function getInActiveArrow() {
|
29 |
if($this->options['inactive_arrow_image'])
|
30 |
return '<img alt="' . $this->options['inactive_arrow_image_alt'] .'" src="' . $this->options['inactive_arrow_image'] .'" />';
|
31 |
-
|
32 |
-
|
33 |
|
34 |
}
|
35 |
|
36 |
public function getTitleImage() {
|
37 |
if($this->options['menu_title_image'])
|
38 |
return '<img alt="' . $this->options['menu_title_image_alt'] .'" src="' . $this->options['menu_title_image'] .'" />';
|
39 |
-
|
40 |
-
|
41 |
|
42 |
}
|
43 |
|
44 |
public function getButtonIcon() {
|
45 |
if($this->options['button_image'])
|
46 |
return '<img alt="' . $this->options['button_image_alt'] .'" src="' . $this->options['button_image'] .'" class="responsive-menu-button-icon responsive-menu-button-icon-active" />';
|
47 |
-
|
48 |
-
|
49 |
}
|
50 |
|
51 |
public function getButtonIconActive() {
|
@@ -64,7 +64,7 @@ class OptionsCollection implements \ArrayAccess, \Countable {
|
|
64 |
}
|
65 |
|
66 |
public function offsetSet($offset, $value) {
|
67 |
-
$this->
|
68 |
}
|
69 |
|
70 |
public function offsetUnset($offset) {
|
20 |
public function getActiveArrow() {
|
21 |
if($this->options['active_arrow_image'])
|
22 |
return '<img alt="' . $this->options['active_arrow_image_alt'] .'" src="' . $this->options['active_arrow_image'] .'" />';
|
23 |
+
|
24 |
+
return $this->options['active_arrow_shape'];
|
25 |
|
26 |
}
|
27 |
|
28 |
public function getInActiveArrow() {
|
29 |
if($this->options['inactive_arrow_image'])
|
30 |
return '<img alt="' . $this->options['inactive_arrow_image_alt'] .'" src="' . $this->options['inactive_arrow_image'] .'" />';
|
31 |
+
|
32 |
+
return $this->options['inactive_arrow_shape'];
|
33 |
|
34 |
}
|
35 |
|
36 |
public function getTitleImage() {
|
37 |
if($this->options['menu_title_image'])
|
38 |
return '<img alt="' . $this->options['menu_title_image_alt'] .'" src="' . $this->options['menu_title_image'] .'" />';
|
39 |
+
|
40 |
+
return null;
|
41 |
|
42 |
}
|
43 |
|
44 |
public function getButtonIcon() {
|
45 |
if($this->options['button_image'])
|
46 |
return '<img alt="' . $this->options['button_image_alt'] .'" src="' . $this->options['button_image'] .'" class="responsive-menu-button-icon responsive-menu-button-icon-active" />';
|
47 |
+
|
48 |
+
return '<span class="responsive-menu-inner"></span>';
|
49 |
}
|
50 |
|
51 |
public function getButtonIconActive() {
|
64 |
}
|
65 |
|
66 |
public function offsetSet($offset, $value) {
|
67 |
+
$this->add([$offset => $value]);
|
68 |
}
|
69 |
|
70 |
public function offsetUnset($offset) {
|
app/Database/Migration.php
CHANGED
@@ -33,4 +33,22 @@ class Migration {
|
|
33 |
return $this->manager->removeOptions(array_diff_key($this->manager->all()->toArray(), $this->defaults));
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
33 |
return $this->manager->removeOptions(array_diff_key($this->manager->all()->toArray(), $this->defaults));
|
34 |
}
|
35 |
|
36 |
+
public function getMigrationClasses() {
|
37 |
+
$migrations = [];
|
38 |
+
if($this->old_version):
|
39 |
+
foreach(glob(__DIR__ . '/Migrations/Migrate_*.php') as $file) {
|
40 |
+
$class_name = 'ResponsiveMenu\Database\Migrations\\' . basename($file, '.php');
|
41 |
+
$class = new $class_name;
|
42 |
+
if(
|
43 |
+
version_compare($class->getOldVersion(), $this->new_version, '<') &&
|
44 |
+
version_compare($this->old_version, $class->getNewVersion(), '<')
|
45 |
+
)
|
46 |
+
$migrations[$class->getOldVersion()] = $class;
|
47 |
+
}
|
48 |
+
|
49 |
+
uksort($migrations, 'version_compare');
|
50 |
+
endif;
|
51 |
+
return $migrations;
|
52 |
+
}
|
53 |
+
|
54 |
}
|
app/Database/Migrations/Migrate.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ResponsiveMenu\Database\Migrations;
|
4 |
+
use ResponsiveMenu\Collections\OptionsCollection;
|
5 |
+
|
6 |
+
class Migrate {
|
7 |
+
|
8 |
+
public function migrate(OptionsCollection $options) {
|
9 |
+
if(isset($this->migrations))
|
10 |
+
foreach($this->migrations as $copy_to => $copy_from)
|
11 |
+
$options[$copy_to] = $options[$copy_from];
|
12 |
+
|
13 |
+
if(isset($this->migration_scripts))
|
14 |
+
foreach($this->migration_scripts as $script)
|
15 |
+
$options = $this->$script($options);
|
16 |
+
|
17 |
+
return $options;
|
18 |
+
}
|
19 |
+
|
20 |
+
public function getOldVersion() {
|
21 |
+
$v = $this->getVersionArray();
|
22 |
+
return $v[0] . '.' . $v[1] . '.' . $v[2];
|
23 |
+
}
|
24 |
+
|
25 |
+
public function getNewVersion() {
|
26 |
+
$v = $this->getVersionArray();
|
27 |
+
return $v[3] . '.' . $v[4] . '.' . $v[5];
|
28 |
+
}
|
29 |
+
|
30 |
+
private function getVersionArray() {
|
31 |
+
$versions = str_replace('ResponsiveMenu\Database\Migrations\Migrate_', '', get_class($this));
|
32 |
+
return explode('_', $versions);
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
app/Database/Migrations/Migrate_0_0_1_0_0_2.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ResponsiveMenu\Database\Migrations;
|
4 |
+
use ResponsiveMenu\Collections\OptionsCollection;
|
5 |
+
|
6 |
+
class Migrate_0_0_1_0_0_2 extends Migrate {
|
7 |
+
|
8 |
+
protected $migrations = [
|
9 |
+
'foo' => 'baz'
|
10 |
+
];
|
11 |
+
|
12 |
+
protected $migration_scripts = [
|
13 |
+
'updateSun'
|
14 |
+
];
|
15 |
+
|
16 |
+
protected function updateSun(OptionsCollection $options) {
|
17 |
+
$sun = json_decode($options['sun']);
|
18 |
+
if(is_array($sun)):
|
19 |
+
$new_sun = [];
|
20 |
+
foreach($sun as $update):
|
21 |
+
unset($update[2]);
|
22 |
+
$new_sun[] = $update;
|
23 |
+
endforeach;
|
24 |
+
$options['sun'] = $new_sun;
|
25 |
+
endif;
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/Database/Migrations/Migrate_0_0_2_0_0_3.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ResponsiveMenu\Database\Migrations;
|
4 |
+
use ResponsiveMenu\Collections\OptionsCollection;
|
5 |
+
|
6 |
+
class Migrate_0_0_2_0_0_3 extends Migrate {
|
7 |
+
|
8 |
+
protected $migration_scripts = [
|
9 |
+
'updateSun'
|
10 |
+
];
|
11 |
+
|
12 |
+
protected function updateSun(OptionsCollection $options) {
|
13 |
+
$sun = json_decode($options['sun']);
|
14 |
+
if(is_array($sun)):
|
15 |
+
$new_sun = [];
|
16 |
+
foreach($sun as $update):
|
17 |
+
unset($update[1]);
|
18 |
+
$new_sun[] = $update;
|
19 |
+
endforeach;
|
20 |
+
$options['sun'] = $new_sun;
|
21 |
+
endif;
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/Database/Migrations/Migrate_0_0_5_0_0_6.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ResponsiveMenu\Database\Migrations;
|
4 |
+
|
5 |
+
class Migrate_0_0_5_0_0_6 extends Migrate {
|
6 |
+
|
7 |
+
protected $migrations = [
|
8 |
+
'moon' => 'baz'
|
9 |
+
];
|
10 |
+
|
11 |
+
}
|
app/Database/Migrations/Migrate_1_1_0_1_1_1.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ResponsiveMenu\Database\Migrations;
|
4 |
+
|
5 |
+
class Migrate_1_1_0_1_1_1 extends Migrate {
|
6 |
+
|
7 |
+
}
|
app/Database/Migrations/Migrate_3_1_0_3_1_1.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace ResponsiveMenu\Database\Migrations;
|
4 |
+
|
5 |
+
class Migrate_3_1_0_3_1_1 extends Migrate {
|
6 |
+
|
7 |
+
protected $migrations = [
|
8 |
+
'button_background_colour_active' => 'button_background_colour',
|
9 |
+
'button_line_colour_hover' => 'button_line_colour',
|
10 |
+
'button_line_colour_active' => 'button_line_colour',
|
11 |
+
'menu_container_background_colour' => 'menu_background_colour',
|
12 |
+
];
|
13 |
+
|
14 |
+
}
|
app/Validation/Validator.php
CHANGED
@@ -33,7 +33,7 @@ class Validator {
|
|
33 |
private $validation_map = [
|
34 |
|
35 |
// Numeric Validators
|
36 |
-
'
|
37 |
'breakpoint',
|
38 |
'button_line_width',
|
39 |
'button_line_height',
|
@@ -116,6 +116,10 @@ class Validator {
|
|
116 |
'single_menu_item_submenu_background_colour_hover',
|
117 |
'header_bar_background_color',
|
118 |
'header_bar_text_color',
|
|
|
|
|
|
|
|
|
119 |
]
|
120 |
|
121 |
];
|
33 |
private $validation_map = [
|
34 |
|
35 |
// Numeric Validators
|
36 |
+
'Number' => [
|
37 |
'breakpoint',
|
38 |
'button_line_width',
|
39 |
'button_line_height',
|
116 |
'single_menu_item_submenu_background_colour_hover',
|
117 |
'header_bar_background_color',
|
118 |
'header_bar_text_color',
|
119 |
+
'button_background_colour_active',
|
120 |
+
'button_line_colour_hover',
|
121 |
+
'button_line_colour_active',
|
122 |
+
'menu_container_background_colour'
|
123 |
]
|
124 |
|
125 |
];
|
app/Validation/Validators/{Numeric.php → Number.php}
RENAMED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
namespace ResponsiveMenu\Validation\Validators;
|
4 |
|
5 |
-
class
|
6 |
|
7 |
public function validate() {
|
8 |
$valid_integer = false;
|
2 |
|
3 |
namespace ResponsiveMenu\Validation\Validators;
|
4 |
|
5 |
+
class Number extends BaseValidator {
|
6 |
|
7 |
public function validate() {
|
8 |
$valid_integer = false;
|
config/default_options.php
CHANGED
@@ -18,15 +18,20 @@ function get_responsive_menu_default_options() {
|
|
18 |
'button_image_alt_when_clicked' => null,
|
19 |
'button_font' => null,
|
20 |
'button_font_icon' => null,
|
|
|
21 |
'button_font_icon_when_clicked' => null,
|
|
|
22 |
'button_click_trigger' => '#responsive-menu-button',
|
23 |
'button_title_position' => 'left',
|
24 |
'button_title_line_height' => '13',
|
25 |
'button_title_line_height_unit' => 'px',
|
26 |
'button_background_colour' => '#000',
|
27 |
'button_background_colour_hover' => '#000',
|
|
|
28 |
'button_click_animation' => 'boring',
|
29 |
'button_line_colour' => '#fff',
|
|
|
|
|
30 |
'button_text_colour' => '#fff',
|
31 |
'button_transparent_background' => 'off',
|
32 |
'button_width' => 55,
|
@@ -63,7 +68,9 @@ function get_responsive_menu_default_options() {
|
|
63 |
'inactive_arrow_image' => '',
|
64 |
'inactive_arrow_image_alt' => '',
|
65 |
'active_arrow_font_icon' => '',
|
|
|
66 |
'inactive_arrow_font_icon' => '',
|
|
|
67 |
'arrow_position' => 'right',
|
68 |
'submenu_arrow_width' => '40',
|
69 |
'submenu_arrow_width_unit' => 'px',
|
@@ -74,6 +81,7 @@ function get_responsive_menu_default_options() {
|
|
74 |
'auto_expand_current_submenus' => 'off',
|
75 |
|
76 |
'menu_background_colour' => '#212121',
|
|
|
77 |
'menu_background_image' => '',
|
78 |
'menu_item_background_colour' => '#212121',
|
79 |
'menu_item_background_hover_colour' => '#3f3f3f',
|
@@ -125,6 +133,7 @@ function get_responsive_menu_default_options() {
|
|
125 |
'menu_title_image' => null,
|
126 |
'menu_title_image_alt' => null,
|
127 |
'menu_title_font_icon' => null,
|
|
|
128 |
'menu_appear_from' => 'left',
|
129 |
'menu_title_link' => null,
|
130 |
'menu_title_link_location' => '_self',
|
18 |
'button_image_alt_when_clicked' => null,
|
19 |
'button_font' => null,
|
20 |
'button_font_icon' => null,
|
21 |
+
'button_font_icon_type' => 'font-awesome',
|
22 |
'button_font_icon_when_clicked' => null,
|
23 |
+
'button_font_icon_when_clicked_type' => 'font-awesome',
|
24 |
'button_click_trigger' => '#responsive-menu-button',
|
25 |
'button_title_position' => 'left',
|
26 |
'button_title_line_height' => '13',
|
27 |
'button_title_line_height_unit' => 'px',
|
28 |
'button_background_colour' => '#000',
|
29 |
'button_background_colour_hover' => '#000',
|
30 |
+
'button_background_colour_active' => '#000',
|
31 |
'button_click_animation' => 'boring',
|
32 |
'button_line_colour' => '#fff',
|
33 |
+
'button_line_colour_hover' => '#fff',
|
34 |
+
'button_line_colour_active' => '#fff',
|
35 |
'button_text_colour' => '#fff',
|
36 |
'button_transparent_background' => 'off',
|
37 |
'button_width' => 55,
|
68 |
'inactive_arrow_image' => '',
|
69 |
'inactive_arrow_image_alt' => '',
|
70 |
'active_arrow_font_icon' => '',
|
71 |
+
'active_arrow_font_icon_type' => 'font-awesome',
|
72 |
'inactive_arrow_font_icon' => '',
|
73 |
+
'inactive_arrow_font_icon_type' => 'font-awesome',
|
74 |
'arrow_position' => 'right',
|
75 |
'submenu_arrow_width' => '40',
|
76 |
'submenu_arrow_width_unit' => 'px',
|
81 |
'auto_expand_current_submenus' => 'off',
|
82 |
|
83 |
'menu_background_colour' => '#212121',
|
84 |
+
'menu_container_background_colour' => '#212121',
|
85 |
'menu_background_image' => '',
|
86 |
'menu_item_background_colour' => '#212121',
|
87 |
'menu_item_background_hover_colour' => '#3f3f3f',
|
133 |
'menu_title_image' => null,
|
134 |
'menu_title_image_alt' => null,
|
135 |
'menu_title_font_icon' => null,
|
136 |
+
'menu_title_font_icon_type' => 'font-awesome',
|
137 |
'menu_appear_from' => 'left',
|
138 |
'menu_title_link' => null,
|
139 |
'menu_title_link_location' => '_self',
|
migration.php
CHANGED
@@ -1,14 +1,17 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
add_action('
|
4 |
|
5 |
$options_manager = get_responsive_menu_service('option_manager');
|
6 |
$plugin_data = get_file_data(dirname(__FILE__) . '/responsive-menu.php', ['version']);
|
7 |
$new_version = $plugin_data[0];
|
8 |
|
|
|
|
|
|
|
9 |
$migration = new ResponsiveMenu\Database\Migration(
|
10 |
$options_manager,
|
11 |
-
|
12 |
$new_version,
|
13 |
get_responsive_menu_default_options()
|
14 |
);
|
@@ -27,11 +30,21 @@ add_action('admin_init', function() {
|
|
27 |
}
|
28 |
|
29 |
if($migration->needsUpdate()) {
|
|
|
30 |
$migration->addNewOptions();
|
31 |
$migration->tidyUpOptions();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
$task = new ResponsiveMenu\Tasks\UpdateOptionsTask();
|
33 |
$task->run($options_manager->all(), get_responsive_menu_service('view'));
|
34 |
update_option('responsive_menu_version', $new_version);
|
|
|
35 |
}
|
36 |
|
37 |
});
|
1 |
<?php
|
2 |
|
3 |
+
add_action('init', function() {
|
4 |
|
5 |
$options_manager = get_responsive_menu_service('option_manager');
|
6 |
$plugin_data = get_file_data(dirname(__FILE__) . '/responsive-menu.php', ['version']);
|
7 |
$new_version = $plugin_data[0];
|
8 |
|
9 |
+
// TODO: Remove and just use new version number in April 2018
|
10 |
+
$old_version = get_option('responsive_menu_version') ? get_option('responsive_menu_version') : get_option('RMVer');
|
11 |
+
|
12 |
$migration = new ResponsiveMenu\Database\Migration(
|
13 |
$options_manager,
|
14 |
+
$old_version,
|
15 |
$new_version,
|
16 |
get_responsive_menu_default_options()
|
17 |
);
|
30 |
}
|
31 |
|
32 |
if($migration->needsUpdate()) {
|
33 |
+
|
34 |
$migration->addNewOptions();
|
35 |
$migration->tidyUpOptions();
|
36 |
+
|
37 |
+
if($migration->getMigrationClasses()):
|
38 |
+
$updated_options = $options_manager->all();
|
39 |
+
foreach($migration->getMigrationClasses() as $migration)
|
40 |
+
$migrated_options = $migration->migrate($updated_options);
|
41 |
+
$options_manager->updateOptions($migrated_options->toArray());
|
42 |
+
endif;
|
43 |
+
|
44 |
$task = new ResponsiveMenu\Tasks\UpdateOptionsTask();
|
45 |
$task->run($options_manager->all(), get_responsive_menu_service('view'));
|
46 |
update_option('responsive_menu_version', $new_version);
|
47 |
+
|
48 |
}
|
49 |
|
50 |
});
|
public/css/admin/admin.css
CHANGED
@@ -48,6 +48,14 @@
|
|
48 |
width: calc(100% - 179px) !important;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
.container-fluid form.form-horizontal .bootstrap-select.is-unit {
|
52 |
width: 100px !important;
|
53 |
}
|
@@ -89,6 +97,18 @@
|
|
89 |
font-size: 16px;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
.container-fluid form.form-horizontal .glyphicon.glyphicon-ok {
|
93 |
color: green;
|
94 |
}
|
@@ -98,8 +118,17 @@
|
|
98 |
margin-top: 25px;
|
99 |
}
|
100 |
|
101 |
-
.container-fluid form.form-horizontal
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
104 |
|
105 |
.container-fluid form.form-horizontal ul.nav-tabs .btn-default {
|
48 |
width: calc(100% - 179px) !important;
|
49 |
}
|
50 |
|
51 |
+
.container-fluid form.form-horizontal input.font-icon-input {
|
52 |
+
width: 70% !important;
|
53 |
+
}
|
54 |
+
|
55 |
+
.container-fluid form.form-horizontal .font-icon-select {
|
56 |
+
width: calc(30% - 75px) !important;
|
57 |
+
}
|
58 |
+
|
59 |
.container-fluid form.form-horizontal .bootstrap-select.is-unit {
|
60 |
width: 100px !important;
|
61 |
}
|
97 |
font-size: 16px;
|
98 |
}
|
99 |
|
100 |
+
.container-fluid form.form-horizontal .panel-body small {
|
101 |
+
display: none;
|
102 |
+
float: right;
|
103 |
+
color: #333;
|
104 |
+
font-weight: normal;
|
105 |
+
line-height: 22px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.container-fluid form.form-horizontal .delete-font-icon-row {
|
109 |
+
cursor: pointer;
|
110 |
+
}
|
111 |
+
|
112 |
.container-fluid form.form-horizontal .glyphicon.glyphicon-ok {
|
113 |
color: green;
|
114 |
}
|
118 |
margin-top: 25px;
|
119 |
}
|
120 |
|
121 |
+
.container-fluid form.form-horizontal input#filter-options {
|
122 |
+
padding: 0 15px;
|
123 |
+
width: 100% !important;
|
124 |
+
height: 50px;
|
125 |
+
}
|
126 |
+
|
127 |
+
.container-fluid form.form-horizontal #filter-options-container {
|
128 |
+
margin: 25px 0;
|
129 |
+
background: #F5F5F5;
|
130 |
+
padding: 15px;
|
131 |
+
border: 1px solid #ddd;
|
132 |
}
|
133 |
|
134 |
.container-fluid form.form-horizontal ul.nav-tabs .btn-default {
|
public/css/app.css.twig
CHANGED
@@ -184,6 +184,7 @@ button#responsive-menu-button,
|
|
184 |
z-index: 99999;
|
185 |
display: none;
|
186 |
overflow: hidden;
|
|
|
187 |
}
|
188 |
|
189 |
button#responsive-menu-button img {
|
@@ -229,10 +230,6 @@ button#responsive-menu-button,
|
|
229 |
overflow: visible;
|
230 |
}
|
231 |
|
232 |
-
button#responsive-menu-button:hover {
|
233 |
-
opacity: 0.7;
|
234 |
-
}
|
235 |
-
|
236 |
.responsive-menu-box {
|
237 |
width: {{ options.button_line_width }}px;
|
238 |
height: {{ options.button_line_height * 3 + options.button_line_margin * 2 }}px;
|
@@ -259,6 +256,27 @@ button#responsive-menu-button,
|
|
259 |
transition-timing-function: ease;
|
260 |
}
|
261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
.responsive-menu-inner::before,
|
263 |
.responsive-menu-inner::after {
|
264 |
content: "";
|
@@ -291,8 +309,17 @@ button#responsive-menu-button,
|
|
291 |
}
|
292 |
|
293 |
{% if options.button_transparent_background == 'off' %}
|
294 |
-
button#responsive-menu-button
|
295 |
-
background: {{ options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
}
|
297 |
{% endif %}
|
298 |
|
@@ -300,6 +327,10 @@ button#responsive-menu-button,
|
|
300 |
color: {{ options.button_line_colour }};
|
301 |
}
|
302 |
|
|
|
|
|
|
|
|
|
303 |
.responsive-menu-label {
|
304 |
color: {{ options.button_text_colour }};
|
305 |
font-size: {{ options.button_font_size }}px;
|
@@ -353,7 +384,7 @@ button#responsive-menu-button,
|
|
353 |
background-image: url('{{ options.menu_background_image }}');
|
354 |
background-size: cover;
|
355 |
{% else %}
|
356 |
-
background: {{ options.
|
357 |
{% endif %}
|
358 |
}
|
359 |
|
184 |
z-index: 99999;
|
185 |
display: none;
|
186 |
overflow: hidden;
|
187 |
+
outline: none;
|
188 |
}
|
189 |
|
190 |
button#responsive-menu-button img {
|
230 |
overflow: visible;
|
231 |
}
|
232 |
|
|
|
|
|
|
|
|
|
233 |
.responsive-menu-box {
|
234 |
width: {{ options.button_line_width }}px;
|
235 |
height: {{ options.button_line_height * 3 + options.button_line_margin * 2 }}px;
|
256 |
transition-timing-function: ease;
|
257 |
}
|
258 |
|
259 |
+
.responsive-menu-open .responsive-menu-inner,
|
260 |
+
.responsive-menu-open .responsive-menu-inner::before,
|
261 |
+
.responsive-menu-open .responsive-menu-inner::after {
|
262 |
+
background-color: {{ options.button_line_colour_active }};
|
263 |
+
}
|
264 |
+
|
265 |
+
button#responsive-menu-button:hover .responsive-menu-inner,
|
266 |
+
button#responsive-menu-button:hover .responsive-menu-inner::before,
|
267 |
+
button#responsive-menu-button:hover .responsive-menu-inner::after,
|
268 |
+
button#responsive-menu-button:hover .responsive-menu-open .responsive-menu-inner,
|
269 |
+
button#responsive-menu-button:hover .responsive-menu-open .responsive-menu-inner::before,
|
270 |
+
button#responsive-menu-button:hover .responsive-menu-open .responsive-menu-inner::after,
|
271 |
+
button#responsive-menu-button:focus .responsive-menu-inner,
|
272 |
+
button#responsive-menu-button:focus .responsive-menu-inner::before,
|
273 |
+
button#responsive-menu-button:focus .responsive-menu-inner::after,
|
274 |
+
button#responsive-menu-button:focus .responsive-menu-open .responsive-menu-inner,
|
275 |
+
button#responsive-menu-button:focus .responsive-menu-open .responsive-menu-inner::before,
|
276 |
+
button#responsive-menu-button:focus .responsive-menu-open .responsive-menu-inner::after {
|
277 |
+
background-color: {{ options.button_line_colour_hover }};
|
278 |
+
}
|
279 |
+
|
280 |
.responsive-menu-inner::before,
|
281 |
.responsive-menu-inner::after {
|
282 |
content: "";
|
309 |
}
|
310 |
|
311 |
{% if options.button_transparent_background == 'off' %}
|
312 |
+
.responsive-menu-open button#responsive-menu-button {
|
313 |
+
background: {{ options.button_background_colour_active }}
|
314 |
+
}
|
315 |
+
{% endif %}
|
316 |
+
|
317 |
+
{% if options.button_transparent_background == 'off' %}
|
318 |
+
.responsive-menu-open button#responsive-menu-button:hover,
|
319 |
+
.responsive-menu-open button#responsive-menu-button:focus,
|
320 |
+
button#responsive-menu-button:hover,
|
321 |
+
button#responsive-menu-button:focus {
|
322 |
+
background: {{ options.button_background_colour_hover }}
|
323 |
}
|
324 |
{% endif %}
|
325 |
|
327 |
color: {{ options.button_line_colour }};
|
328 |
}
|
329 |
|
330 |
+
.responsive-menu-open button#responsive-menu-button .responsive-menu-box {
|
331 |
+
color: {{ options.button_line_colour_active }};
|
332 |
+
}
|
333 |
+
|
334 |
.responsive-menu-label {
|
335 |
color: {{ options.button_text_colour }};
|
336 |
font-size: {{ options.button_font_size }}px;
|
384 |
background-image: url('{{ options.menu_background_image }}');
|
385 |
background-size: cover;
|
386 |
{% else %}
|
387 |
+
background: {{ options.menu_container_background_colour }};
|
388 |
{% endif %}
|
389 |
}
|
390 |
|
public/js/admin/admin.js
CHANGED
@@ -74,4 +74,43 @@ jQuery(function($) {
|
|
74 |
$('#responsive-menu-current-page').val(tab_name);
|
75 |
});
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
});
|
74 |
$('#responsive-menu-current-page').val(tab_name);
|
75 |
});
|
76 |
|
77 |
+
$(document).on('keyup', '#filter-options', function() {
|
78 |
+
var search_query = $(this).val();
|
79 |
+
var current_tab = $('.nav-tabs .active').attr('id');
|
80 |
+
$('#options-area').css('width', '99%');
|
81 |
+
$('.nav-tabs, #banner-area').hide();
|
82 |
+
|
83 |
+
if(search_query) {
|
84 |
+
$('.tab-pane').show().css('opacity', '1');
|
85 |
+
$('.panel-body small').css('display', 'block');
|
86 |
+
|
87 |
+
$('.control-label').closest('tr').hide();
|
88 |
+
$('.control-label').each(function (i) {
|
89 |
+
if ($(this).text().toLowerCase().indexOf(search_query.toLowerCase()) >= 0) {
|
90 |
+
$(this).closest('tr').show();
|
91 |
+
}
|
92 |
+
});
|
93 |
+
|
94 |
+
$('#options-area .table-bordered').each(function(i) {
|
95 |
+
|
96 |
+
var visible_rows = $(this).children('tbody').children('tr').filter(function() {
|
97 |
+
return $(this).css('display') == 'table-row';
|
98 |
+
});
|
99 |
+
|
100 |
+
if(visible_rows.length > 0) {
|
101 |
+
$(this).parents('.panel').show();
|
102 |
+
} else {
|
103 |
+
$(this).parents('.panel').hide();
|
104 |
+
}
|
105 |
+
});
|
106 |
+
|
107 |
+
} else {
|
108 |
+
$('.tab-pane').css('display', '').css('opacity', '');
|
109 |
+
$('.control-label').closest('tr').show();
|
110 |
+
$('.nav-tabs, #banner-area, .panel').show();
|
111 |
+
$('#options-area').css('width', '');
|
112 |
+
$('.panel-body small').css('display', '');
|
113 |
+
}
|
114 |
+
});
|
115 |
+
|
116 |
});
|
public/js/app.js.twig
CHANGED
@@ -117,6 +117,9 @@ jQuery(document).ready(function($) {
|
|
117 |
e.stopPropagation();
|
118 |
self.triggerMenu();
|
119 |
});
|
|
|
|
|
|
|
120 |
$('.responsive-menu-subarrow').on('click', function(e) {
|
121 |
e.preventDefault();
|
122 |
e.stopPropagation();
|
117 |
e.stopPropagation();
|
118 |
self.triggerMenu();
|
119 |
});
|
120 |
+
$(this.trigger).mouseup(function(){
|
121 |
+
$(self.trigger).blur();
|
122 |
+
});
|
123 |
$('.responsive-menu-subarrow').on('click', function(e) {
|
124 |
e.preventDefault();
|
125 |
e.stopPropagation();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://responsive.menu/donate
|
|
4 |
Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, hamburger menu, hamburger, mobile, tablet, 3 lines, 3 line, three line, three lines
|
5 |
Requires at least: 3.5.0
|
6 |
Tested up to: 4.7.3
|
7 |
-
Stable tag: 3.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -111,6 +111,18 @@ To view our FAQ, please go to <a href="https://responsive.menu/faq">https://resp
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
= 3.1.0 (25th April 2017) =
|
115 |
* **Requires PHP 5.4**
|
116 |
* Massive overhaul of codebase
|
4 |
Tags: responsive, menu, responsive menu, mobile menu, wordpress responsive menu, wp responsive menu, tablet menu, hamburger menu, hamburger, mobile, tablet, 3 lines, 3 line, three line, three lines
|
5 |
Requires at least: 3.5.0
|
6 |
Tested up to: 4.7.3
|
7 |
+
Stable tag: 3.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 3.1.1 (5th May 2017) =
|
115 |
+
* **Requires PHP 5.4**
|
116 |
+
* Added filter box in admin for options
|
117 |
+
* Added menu container background colour option
|
118 |
+
* Added hover line colour option
|
119 |
+
* Added active line colour option
|
120 |
+
* Added active button background colour option
|
121 |
+
* Added migration scripts to make data upgrades smoother
|
122 |
+
* Added option to choose custom Font Icons - Pro Only
|
123 |
+
* Removed browser button outline and enabled focus/active states for better accessibility
|
124 |
+
* Bug fixes
|
125 |
+
|
126 |
= 3.1.0 (25th April 2017) =
|
127 |
* **Requires PHP 5.4**
|
128 |
* Massive overhaul of codebase
|
responsive-menu.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://responsive.menu
|
6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
7 |
-
Version: 3.1.
|
8 |
Author: Peter Featherstone
|
9 |
Text Domain: responsive-menu
|
10 |
Author URI: https://peterfeatherstone.com
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://responsive.menu
|
6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
7 |
+
Version: 3.1.1
|
8 |
Author: Peter Featherstone
|
9 |
Text Domain: responsive-menu
|
10 |
Author URI: https://peterfeatherstone.com
|
tests/app/Database/MigrationTest.php
CHANGED
@@ -79,4 +79,149 @@ class MigrationTest extends TestCase {
|
|
79 |
$collection = new OptionsCollection(['foo' => 'bar', 'river' => 'run']);
|
80 |
$this->assertEquals($collection, $migration->tidyUpOptions());
|
81 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
79 |
$collection = new OptionsCollection(['foo' => 'bar', 'river' => 'run']);
|
80 |
$this->assertEquals($collection, $migration->tidyUpOptions());
|
81 |
}
|
82 |
+
|
83 |
+
public function testMinorPointUpgradeMigrationScriptsAreReturned() {
|
84 |
+
$migration = new Migration($this->manager, '0.0.1', '0.0.2', $this->defaults);
|
85 |
+
$classes = $migration->getMigrationClasses();
|
86 |
+
|
87 |
+
$this->assertCount(1, $classes);
|
88 |
+
$this->assertArrayHasKey('0.0.1', $classes);
|
89 |
+
}
|
90 |
+
|
91 |
+
public function testMajorPointUpgradeMigrationScriptsAreReturned() {
|
92 |
+
$migration = new Migration($this->manager, '0.8.9', '1.1.1', $this->defaults);
|
93 |
+
$classes = $migration->getMigrationClasses();
|
94 |
+
|
95 |
+
$this->assertCount(1, $classes);
|
96 |
+
$this->assertArrayHasKey('1.1.0', $classes);
|
97 |
+
}
|
98 |
+
|
99 |
+
public function testNotUpgradeMigrationScriptsAreReturnedIfNewInstall() {
|
100 |
+
$migration = new Migration($this->manager, '', '1.1.1', $this->defaults);
|
101 |
+
$classes = $migration->getMigrationClasses();
|
102 |
+
|
103 |
+
$this->assertCount(0, $classes);
|
104 |
+
$this->assertArrayNotHasKey('0.0.1', $classes);
|
105 |
+
}
|
106 |
+
|
107 |
+
public function testMultipleUpgradeMigrationScriptsAreReturned() {
|
108 |
+
$migration = new Migration($this->manager, '0.0.1', '1.1.1', $this->defaults);
|
109 |
+
$classes = $migration->getMigrationClasses();
|
110 |
+
|
111 |
+
$this->assertCount(4, $classes);
|
112 |
+
$this->assertArrayHasKey('0.0.1', $classes);
|
113 |
+
$this->assertArrayHasKey('0.0.2', $classes);
|
114 |
+
$this->assertArrayHasKey('0.0.5', $classes);
|
115 |
+
$this->assertArrayHasKey('1.1.0', $classes);
|
116 |
+
}
|
117 |
+
|
118 |
+
public function testMigrationScriptUpdatesOptions() {
|
119 |
+
$migration = new Migration($this->manager, '0.0.1', '0.0.2', $this->defaults);
|
120 |
+
|
121 |
+
$options = new OptionsCollection([
|
122 |
+
'foo' => 'bar',
|
123 |
+
'baz' => 'qux',
|
124 |
+
'moon' => 'rise'
|
125 |
+
]);
|
126 |
+
|
127 |
+
foreach($migration->getMigrationClasses() as $migration)
|
128 |
+
$migration->migrate($options);
|
129 |
+
|
130 |
+
$this->assertEquals('qux', $options['foo']);
|
131 |
+
$this->assertEquals('qux', $options['baz']);
|
132 |
+
$this->assertEquals('rise', $options['moon']);
|
133 |
+
}
|
134 |
+
|
135 |
+
public function testMigrationScriptChainsUpdatesOptions() {
|
136 |
+
$migration = new Migration($this->manager, '0.0.1', '1.1.1', $this->defaults);
|
137 |
+
|
138 |
+
$options = new OptionsCollection([
|
139 |
+
'foo' => 'bar',
|
140 |
+
'baz' => 'qux',
|
141 |
+
'moon' => 'rise'
|
142 |
+
]);
|
143 |
+
|
144 |
+
foreach($migration->getMigrationClasses() as $migration)
|
145 |
+
$migration->migrate($options);
|
146 |
+
|
147 |
+
$this->assertEquals('qux', $options['foo']);
|
148 |
+
$this->assertEquals('qux', $options['baz']);
|
149 |
+
$this->assertEquals('qux', $options['moon']);
|
150 |
+
}
|
151 |
+
|
152 |
+
public function testMigrationScriptFunctionsAreCalled() {
|
153 |
+
$migration = new Migration($this->manager, '0.0.1', '0.0.2', $this->defaults);
|
154 |
+
|
155 |
+
$options = new OptionsCollection([
|
156 |
+
'foo' => 'bar',
|
157 |
+
'baz' => 'qux',
|
158 |
+
'moon' => 'rise',
|
159 |
+
'sun' => [
|
160 |
+
[5, 'foo', 'bar'],
|
161 |
+
[6, 'baz', 'qux'],
|
162 |
+
[7, 'moon', 'rise']
|
163 |
+
]
|
164 |
+
]);
|
165 |
+
|
166 |
+
foreach($migration->getMigrationClasses() as $migration)
|
167 |
+
$migration->migrate($options);
|
168 |
+
|
169 |
+
$this->assertEquals('qux', $options['foo']);
|
170 |
+
$this->assertEquals('qux', $options['baz']);
|
171 |
+
$this->assertEquals('rise', $options['moon']);
|
172 |
+
|
173 |
+
$expected_sun = [
|
174 |
+
[5, 'foo'],
|
175 |
+
[6, 'baz'],
|
176 |
+
[7, 'moon']
|
177 |
+
];
|
178 |
+
$this->assertEquals(json_encode($expected_sun), $options['sun']);
|
179 |
+
}
|
180 |
+
|
181 |
+
public function testMigrationScriptFunctionsAreChained() {
|
182 |
+
$migration = new Migration($this->manager, '0.0.1', '1.1.1', $this->defaults);
|
183 |
+
|
184 |
+
$options = new OptionsCollection([
|
185 |
+
'foo' => 'bar',
|
186 |
+
'baz' => 'qux',
|
187 |
+
'moon' => 'rise',
|
188 |
+
'sun' => [
|
189 |
+
[5, 'foo', 'bar'],
|
190 |
+
[6, 'baz', 'qux'],
|
191 |
+
[7, 'moon', 'rise']
|
192 |
+
]
|
193 |
+
]);
|
194 |
+
|
195 |
+
foreach($migration->getMigrationClasses() as $migration)
|
196 |
+
$migration->migrate($options);
|
197 |
+
|
198 |
+
$this->assertEquals('qux', $options['foo']);
|
199 |
+
$this->assertEquals('qux', $options['baz']);
|
200 |
+
$this->assertEquals('qux', $options['moon']);
|
201 |
+
|
202 |
+
$expected_sun = [
|
203 |
+
[5],
|
204 |
+
[6],
|
205 |
+
[7]
|
206 |
+
];
|
207 |
+
$this->assertEquals(json_encode($expected_sun), $options['sun']);
|
208 |
+
}
|
209 |
+
|
210 |
+
public function testNoMigrationScriptsAreNotRunIfNewInstall() {
|
211 |
+
$migration = new Migration($this->manager, '', '1.1.1', $this->defaults);
|
212 |
+
|
213 |
+
$options = new OptionsCollection([
|
214 |
+
'foo' => 'bar',
|
215 |
+
'baz' => 'qux',
|
216 |
+
'moon' => 'rise',
|
217 |
+
]);
|
218 |
+
|
219 |
+
foreach($migration->getMigrationClasses() as $migration)
|
220 |
+
$migration->migrate($options);
|
221 |
+
|
222 |
+
$this->assertEquals('bar', $options['foo']);
|
223 |
+
$this->assertEquals('qux', $options['baz']);
|
224 |
+
$this->assertEquals('rise', $options['moon']);
|
225 |
+
}
|
226 |
+
|
227 |
}
|
tests/app/Validation/Validators/{NumericTest.php → NumberTest.php}
RENAMED
@@ -3,7 +3,7 @@
|
|
3 |
use PHPUnit\Framework\TestCase;
|
4 |
use ResponsiveMenu\Validation\Validators;
|
5 |
|
6 |
-
class
|
7 |
|
8 |
public function testNumberList() {
|
9 |
return [
|
@@ -40,7 +40,7 @@ class NumericTest extends TestCase {
|
|
40 |
* @dataProvider testNumberList
|
41 |
*/
|
42 |
public function testIntegerIsValidated($number, $expected) {
|
43 |
-
$validator = new Validators\
|
44 |
$this->assertEquals($expected, $validator->validate());
|
45 |
}
|
46 |
|
3 |
use PHPUnit\Framework\TestCase;
|
4 |
use ResponsiveMenu\Validation\Validators;
|
5 |
|
6 |
+
class NumberTest extends TestCase {
|
7 |
|
8 |
public function testNumberList() {
|
9 |
return [
|
40 |
* @dataProvider testNumberList
|
41 |
*/
|
42 |
public function testIntegerIsValidated($number, $expected) {
|
43 |
+
$validator = new Validators\Number($number);
|
44 |
$this->assertEquals($expected, $validator->validate());
|
45 |
}
|
46 |
|
views/admin/macros.html.twig
CHANGED
@@ -34,6 +34,15 @@
|
|
34 |
</select>
|
35 |
{% endmacro %}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
{% macro button_animation_select(name, value) %}
|
38 |
<select id='responsive-menu-{{ name|replace('_', '-') }}' class='selectpicker show-tick' name='menu[{{ name }}]'>
|
39 |
<option value='off'{% if value == 'off' %} selected='selected'{% endif %}>Off</option>
|
@@ -188,6 +197,8 @@
|
|
188 |
{% endif %}
|
189 |
{% elseif type == 'image' %}
|
190 |
{{ macros.image(name, options[name]) }}
|
|
|
|
|
191 |
{% endif %}
|
192 |
{% if unit %}
|
193 |
<span class='unit'>{{ unit }}</span>
|
34 |
</select>
|
35 |
{% endmacro %}
|
36 |
|
37 |
+
{% macro font_icon(name, value, type) %}
|
38 |
+
<input type='text' id='responsive-menu-{{ name|replace('_', '-') }}' name='menu[{{ name }}]' value='{{ value|escape }}' class='form-control font-icon-input {{ class }}'>
|
39 |
+
<select class='selectpicker show-tick font-icon-select' name='menu[{{ name }}_type]'>
|
40 |
+
<option value='font-awesome' selected='selected'>FontAwesome</option>
|
41 |
+
<option value='glyphicon'>GlyphIcon</option>
|
42 |
+
<option value='custom'>Custom</option>
|
43 |
+
</select>
|
44 |
+
{% endmacro %}
|
45 |
+
|
46 |
{% macro button_animation_select(name, value) %}
|
47 |
<select id='responsive-menu-{{ name|replace('_', '-') }}' class='selectpicker show-tick' name='menu[{{ name }}]'>
|
48 |
<option value='off'{% if value == 'off' %} selected='selected'{% endif %}>Off</option>
|
197 |
{% endif %}
|
198 |
{% elseif type == 'image' %}
|
199 |
{{ macros.image(name, options[name]) }}
|
200 |
+
{% elseif type == 'font-icon' %}
|
201 |
+
{{ macros.font_icon(name, options[name], options[name ~ '_type']) }}
|
202 |
{% endif %}
|
203 |
{% if unit %}
|
204 |
<span class='unit'>{{ unit }}</span>
|
views/admin/main.html.twig
CHANGED
@@ -3,6 +3,10 @@
|
|
3 |
{% include 'admin/alerts.html.twig' %}
|
4 |
{% include 'admin/tabs.html.twig' %}
|
5 |
<div id='options-area'>
|
|
|
|
|
|
|
|
|
6 |
{% include 'admin/options.html.twig' %}
|
7 |
<input type='hidden' id='responsive-menu-current-page' name='responsive-menu-current-page' value="{{ current_page() }}" />
|
8 |
<button type='button' id='responsive-menu-preview' name='responsive-menu-preview' class='btn btn-default'>Preview Changes</button>
|
3 |
{% include 'admin/alerts.html.twig' %}
|
4 |
{% include 'admin/tabs.html.twig' %}
|
5 |
<div id='options-area'>
|
6 |
+
<div id="filter-options-container">
|
7 |
+
<label for="filter-options">Filter Options</label>
|
8 |
+
<input type="search" class="form-control" name="filter-options" id="filter-options" placeholder="Start typing to filter options" />
|
9 |
+
</div>
|
10 |
{% include 'admin/options.html.twig' %}
|
11 |
<input type='hidden' id='responsive-menu-current-page' name='responsive-menu-current-page' value="{{ current_page() }}" />
|
12 |
<button type='button' id='responsive-menu-preview' name='responsive-menu-preview' class='btn btn-default'>Preview Changes</button>
|
views/admin/sections/button.html.twig
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Animation</div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('button_click_animation', 'Type', 'select', options, errors, '', 'semi-pro', 'button_animation', '', 'To see all animations in action please visit <a href="https://jonsuh.com/hamburgers/" target="_blank">this page</a>.') }}
|
7 |
{{ macros.row('button_position_type', 'Positioning', 'select', options, errors, '', '', 'position') }}
|
@@ -10,7 +10,7 @@
|
|
10 |
</div>
|
11 |
|
12 |
<div class='panel panel-default'>
|
13 |
-
<div class='panel-body'>Location</div>
|
14 |
<table class='table table-bordered table-hover'>
|
15 |
{{ macros.row('button_distance_from_side', 'Distance from Side', 'input', options, errors, 'has-unit', 'semi-pro', '', 'percentage') }}
|
16 |
{{ macros.row('button_left_or_right', 'Side', 'select', options, errors, '', '', 'left_right') }}
|
@@ -19,7 +19,7 @@
|
|
19 |
</div>
|
20 |
|
21 |
<div class='panel panel-default'>
|
22 |
-
<div class='panel-body'>Container Sizing</div>
|
23 |
<table class='table table-bordered table-hover'>
|
24 |
{{ macros.row('button_height', 'Height', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
25 |
{{ macros.row('button_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
@@ -27,7 +27,7 @@
|
|
27 |
</div>
|
28 |
|
29 |
<div class='panel panel-default'>
|
30 |
-
<div class='panel-body'>Line Sizing</div>
|
31 |
<table class='table table-bordered table-hover'>
|
32 |
{{ macros.row('button_line_height', 'Height', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
33 |
{{ macros.row('button_line_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
@@ -36,23 +36,26 @@
|
|
36 |
</div>
|
37 |
|
38 |
<div class='panel panel-default'>
|
39 |
-
<div class='panel-body'>
|
40 |
<table class='table table-bordered table-hover'>
|
41 |
-
{{ macros.row('button_background_colour', '
|
42 |
-
{{ macros.row('button_background_colour_hover', '
|
|
|
43 |
{{ macros.row('button_transparent_background', 'Transparent Background', 'checkbox', options, errors) }}
|
44 |
</table>
|
45 |
</div>
|
46 |
|
47 |
<div class='panel panel-default'>
|
48 |
-
<div class='panel-body'>Line Colours</div>
|
49 |
<table class='table table-bordered table-hover'>
|
50 |
{{ macros.row('button_line_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
|
|
|
|
51 |
</table>
|
52 |
</div>
|
53 |
|
54 |
<div class='panel panel-default'>
|
55 |
-
<div class='panel-body'>Title</div>
|
56 |
<table class='table table-bordered table-hover'>
|
57 |
{{ macros.row('button_title', 'Text', 'input', options, errors) }}
|
58 |
{{ macros.row('button_text_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -64,10 +67,10 @@
|
|
64 |
</div>
|
65 |
|
66 |
<div class='panel panel-default'>
|
67 |
-
<div class='panel-body'>Image</div>
|
68 |
<table class='table table-bordered table-hover'>
|
69 |
-
{{ macros.row('button_font_icon', 'Font Icon', '
|
70 |
-
{{ macros.row('button_font_icon_when_clicked', 'Font Icon when Clicked', '
|
71 |
{{ macros.row('button_image', 'Image', 'image', options, errors) }}
|
72 |
{{ macros.row('button_image_alt', 'Alt Text', 'input', options, errors) }}
|
73 |
{{ macros.row('button_image_when_clicked', 'Image when Clicked', 'image', options, errors) }}
|
@@ -76,7 +79,7 @@
|
|
76 |
</div>
|
77 |
|
78 |
<div class='panel panel-default'>
|
79 |
-
<div class='panel-body'>Advanced</div>
|
80 |
<table class='table table-bordered table-hover'>
|
81 |
{{ macros.row('button_click_trigger', 'Trigger', 'input', options, errors) }}
|
82 |
</table>
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Animation<small>Button</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('button_click_animation', 'Type', 'select', options, errors, '', 'semi-pro', 'button_animation', '', 'To see all animations in action please visit <a href="https://jonsuh.com/hamburgers/" target="_blank">this page</a>.') }}
|
7 |
{{ macros.row('button_position_type', 'Positioning', 'select', options, errors, '', '', 'position') }}
|
10 |
</div>
|
11 |
|
12 |
<div class='panel panel-default'>
|
13 |
+
<div class='panel-body'>Location<small>Button</small></div>
|
14 |
<table class='table table-bordered table-hover'>
|
15 |
{{ macros.row('button_distance_from_side', 'Distance from Side', 'input', options, errors, 'has-unit', 'semi-pro', '', 'percentage') }}
|
16 |
{{ macros.row('button_left_or_right', 'Side', 'select', options, errors, '', '', 'left_right') }}
|
19 |
</div>
|
20 |
|
21 |
<div class='panel panel-default'>
|
22 |
+
<div class='panel-body'>Container Sizing<small>Button</small></div>
|
23 |
<table class='table table-bordered table-hover'>
|
24 |
{{ macros.row('button_height', 'Height', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
25 |
{{ macros.row('button_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
27 |
</div>
|
28 |
|
29 |
<div class='panel panel-default'>
|
30 |
+
<div class='panel-body'>Line Sizing<small>Button</small></div>
|
31 |
<table class='table table-bordered table-hover'>
|
32 |
{{ macros.row('button_line_height', 'Height', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
33 |
{{ macros.row('button_line_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
36 |
</div>
|
37 |
|
38 |
<div class='panel panel-default'>
|
39 |
+
<div class='panel-body'>Background Colours<small>Button</small></div>
|
40 |
<table class='table table-bordered table-hover'>
|
41 |
+
{{ macros.row('button_background_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
42 |
+
{{ macros.row('button_background_colour_hover', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
43 |
+
{{ macros.row('button_background_colour_active', 'Active Colour', 'colour', options, errors, '', 'semi-pro') }}
|
44 |
{{ macros.row('button_transparent_background', 'Transparent Background', 'checkbox', options, errors) }}
|
45 |
</table>
|
46 |
</div>
|
47 |
|
48 |
<div class='panel panel-default'>
|
49 |
+
<div class='panel-body'>Line Colours<small>Button</small></div>
|
50 |
<table class='table table-bordered table-hover'>
|
51 |
{{ macros.row('button_line_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
52 |
+
{{ macros.row('button_line_colour_hover', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
53 |
+
{{ macros.row('button_line_colour_active', 'Active Colour', 'colour', options, errors, '', 'semi-pro') }}
|
54 |
</table>
|
55 |
</div>
|
56 |
|
57 |
<div class='panel panel-default'>
|
58 |
+
<div class='panel-body'>Title<small>Button</small></div>
|
59 |
<table class='table table-bordered table-hover'>
|
60 |
{{ macros.row('button_title', 'Text', 'input', options, errors) }}
|
61 |
{{ macros.row('button_text_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
67 |
</div>
|
68 |
|
69 |
<div class='panel panel-default'>
|
70 |
+
<div class='panel-body'>Image<small>Button</small></div>
|
71 |
<table class='table table-bordered table-hover'>
|
72 |
+
{{ macros.row('button_font_icon', 'Font Icon', 'font-icon', options, errors, '', 'pro') }}
|
73 |
+
{{ macros.row('button_font_icon_when_clicked', 'Font Icon when Clicked', 'font-icon', options, errors, '', 'pro') }}
|
74 |
{{ macros.row('button_image', 'Image', 'image', options, errors) }}
|
75 |
{{ macros.row('button_image_alt', 'Alt Text', 'input', options, errors) }}
|
76 |
{{ macros.row('button_image_when_clicked', 'Image when Clicked', 'image', options, errors) }}
|
79 |
</div>
|
80 |
|
81 |
<div class='panel panel-default'>
|
82 |
+
<div class='panel-body'>Advanced<small>Button</small></div>
|
83 |
<table class='table table-bordered table-hover'>
|
84 |
{{ macros.row('button_click_trigger', 'Trigger', 'input', options, errors) }}
|
85 |
</table>
|
views/admin/sections/custom-css.html.twig
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Custom CSS</div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('custom_css', 'Custom CSS', 'textarea', options, errors, '', 'pro') }}
|
7 |
</table>
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Custom CSS<small>Custom CSS</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('custom_css', 'Custom CSS', 'textarea', options, errors, '', 'pro') }}
|
7 |
</table>
|
views/admin/sections/header-bar.html.twig
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Initial Setup</div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('use_header_bar', 'Use Header Bar', 'checkbox', options, errors, '', 'pro') }}
|
7 |
{{ macros.row('header_bar_position_type', 'Positioning', 'select', options, errors, '', 'pro', 'position') }}
|
@@ -10,7 +10,7 @@
|
|
10 |
</div>
|
11 |
|
12 |
<div class='panel panel-default'>
|
13 |
-
<div class='panel-body'>Ordering</div>
|
14 |
<table class='table table-bordered table-hover' id='header-bar-items-order-container'>
|
15 |
<tr{% if errors.header_bar_items_order %} class='danger'{% endif %}>
|
16 |
<td class='well col-md-3'>
|
@@ -44,7 +44,7 @@
|
|
44 |
</div>
|
45 |
|
46 |
<div class='panel panel-default'>
|
47 |
-
<div class='panel-body'>Logo</div>
|
48 |
<table class='table table-bordered table-hover'>
|
49 |
{{ macros.row('header_bar_logo', 'Image', 'image', options, errors, '', 'pro') }}
|
50 |
{{ macros.row('header_bar_logo_alt', 'Alt Text', 'input', options, errors, '', 'pro') }}
|
@@ -53,21 +53,21 @@
|
|
53 |
</div>
|
54 |
|
55 |
<div class='panel panel-default'>
|
56 |
-
<div class='panel-body'>Title</div>
|
57 |
<table class='table table-bordered table-hover'>
|
58 |
{{ macros.row('header_bar_title', 'Text', 'input', options, errors, '', 'pro') }}
|
59 |
</table>
|
60 |
</div>
|
61 |
|
62 |
<div class='panel panel-default'>
|
63 |
-
<div class='panel-body'>Content</div>
|
64 |
<table class='table table-bordered table-hover'>
|
65 |
{{ macros.row('header_bar_html_content', 'HTML Content', 'textarea', options, errors, '', 'pro', '', '', 'HTML and shortcodes can be used here.') }}
|
66 |
</table>
|
67 |
</div>
|
68 |
|
69 |
<div class='panel panel-default'>
|
70 |
-
<div class='panel-body'>Text</div>
|
71 |
<table class='table table-bordered table-hover'>
|
72 |
{{ macros.row('header_bar_font', 'Font', 'input', options, errors, '', 'pro') }}
|
73 |
{{ macros.row('header_bar_font_size', 'Font Size', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
@@ -75,14 +75,14 @@
|
|
75 |
</div>
|
76 |
|
77 |
<div class='panel panel-default'>
|
78 |
-
<div class='panel-body'>Sizing</div>
|
79 |
<table class='table table-bordered table-hover'>
|
80 |
{{ macros.row('header_bar_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
81 |
</table>
|
82 |
</div>
|
83 |
|
84 |
<div class='panel panel-default'>
|
85 |
-
<div class='panel-body'>Colours</div>
|
86 |
<table class='table table-bordered table-hover'>
|
87 |
{{ macros.row('header_bar_background_color', 'Background', 'colour', options, errors, '', 'pro') }}
|
88 |
{{ macros.row('header_bar_text_color', 'Text', 'colour', options, errors, '', 'pro') }}
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Initial Setup<small>Header Bar</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('use_header_bar', 'Use Header Bar', 'checkbox', options, errors, '', 'pro') }}
|
7 |
{{ macros.row('header_bar_position_type', 'Positioning', 'select', options, errors, '', 'pro', 'position') }}
|
10 |
</div>
|
11 |
|
12 |
<div class='panel panel-default'>
|
13 |
+
<div class='panel-body'>Ordering<small>Header Bar</small></div>
|
14 |
<table class='table table-bordered table-hover' id='header-bar-items-order-container'>
|
15 |
<tr{% if errors.header_bar_items_order %} class='danger'{% endif %}>
|
16 |
<td class='well col-md-3'>
|
44 |
</div>
|
45 |
|
46 |
<div class='panel panel-default'>
|
47 |
+
<div class='panel-body'>Logo<small>Header Bar</small></div>
|
48 |
<table class='table table-bordered table-hover'>
|
49 |
{{ macros.row('header_bar_logo', 'Image', 'image', options, errors, '', 'pro') }}
|
50 |
{{ macros.row('header_bar_logo_alt', 'Alt Text', 'input', options, errors, '', 'pro') }}
|
53 |
</div>
|
54 |
|
55 |
<div class='panel panel-default'>
|
56 |
+
<div class='panel-body'>Title<small>Header Bar</small></div>
|
57 |
<table class='table table-bordered table-hover'>
|
58 |
{{ macros.row('header_bar_title', 'Text', 'input', options, errors, '', 'pro') }}
|
59 |
</table>
|
60 |
</div>
|
61 |
|
62 |
<div class='panel panel-default'>
|
63 |
+
<div class='panel-body'>Content<small>Header Bar</small></div>
|
64 |
<table class='table table-bordered table-hover'>
|
65 |
{{ macros.row('header_bar_html_content', 'HTML Content', 'textarea', options, errors, '', 'pro', '', '', 'HTML and shortcodes can be used here.') }}
|
66 |
</table>
|
67 |
</div>
|
68 |
|
69 |
<div class='panel panel-default'>
|
70 |
+
<div class='panel-body'>Text<small>Header Bar</small></div>
|
71 |
<table class='table table-bordered table-hover'>
|
72 |
{{ macros.row('header_bar_font', 'Font', 'input', options, errors, '', 'pro') }}
|
73 |
{{ macros.row('header_bar_font_size', 'Font Size', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
75 |
</div>
|
76 |
|
77 |
<div class='panel panel-default'>
|
78 |
+
<div class='panel-body'>Sizing<small>Header Bar</small></div>
|
79 |
<table class='table table-bordered table-hover'>
|
80 |
{{ macros.row('header_bar_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
81 |
</table>
|
82 |
</div>
|
83 |
|
84 |
<div class='panel panel-default'>
|
85 |
+
<div class='panel-body'>Colours<small>Header Bar</small></div>
|
86 |
<table class='table table-bordered table-hover'>
|
87 |
{{ macros.row('header_bar_background_color', 'Background', 'colour', options, errors, '', 'pro') }}
|
88 |
{{ macros.row('header_bar_text_color', 'Text', 'colour', options, errors, '', 'pro') }}
|
views/admin/sections/import-export.html.twig
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Options to allow increased productivity
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
<tr>
|
7 |
<td class="well col-md-3">
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Options to allow increased productivity.<small>Import/Export</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
<tr>
|
7 |
<td class="well col-md-3">
|
views/admin/sections/initial-setup.html.twig
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
<div class="panel-body">
|
5 |
These are the options you probably want to set first to get you started.
|
6 |
You can view the docs for this section by clicking <a href="https://responsive.menu/docs/initial-setup/" target="_blank">here.</a>
|
|
|
7 |
</div>
|
8 |
<table class="table table-bordered table-hover">
|
9 |
{{ macros.row('breakpoint', 'Breakpoint', 'input', options, errors, '', '', '', '', 'This is the width of the screen at which point you would like the menu to start showing in pixels.', 'px', '', 'Set to 80000 if you want the menu to appear on all devices.') }}
|
4 |
<div class="panel-body">
|
5 |
These are the options you probably want to set first to get you started.
|
6 |
You can view the docs for this section by clicking <a href="https://responsive.menu/docs/initial-setup/" target="_blank">here.</a>
|
7 |
+
<small>Initial Setup</small>
|
8 |
</div>
|
9 |
<table class="table table-bordered table-hover">
|
10 |
{{ macros.row('breakpoint', 'Breakpoint', 'input', options, errors, '', '', '', '', 'This is the width of the screen at which point you would like the menu to start showing in pixels.', 'px', '', 'Set to 80000 if you want the menu to appear on all devices.') }}
|
views/admin/sections/menu.html.twig
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Here you can turn options on or off and re-arrange them accordingly
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
<tr{% if errors.items_order %} class='danger'{% endif %}>
|
7 |
<td class='well col-md-3'>
|
@@ -43,7 +43,7 @@
|
|
43 |
</script>
|
44 |
|
45 |
<div class='panel panel-default'>
|
46 |
-
<div class='panel-body'>Add FontAwesome icons to your menu items
|
47 |
<table class='table table-bordered table-hover'>
|
48 |
<tr{% if errors.menu_font_icons %} class='danger'{% endif %}>
|
49 |
<td class='well col-md-3'>
|
@@ -62,10 +62,20 @@
|
|
62 |
<tr>
|
63 |
<td>Menu Item ID</td>
|
64 |
<td>Icon</td>
|
|
|
|
|
65 |
</tr>
|
66 |
<tr>
|
67 |
<td><input type='text' class='form-control' name='menu[menu_font_icons][id][]' placeholder='32' /></td>
|
68 |
<td><input type='text' class='form-control' name='menu[menu_font_icons][icon][]' placeholder='cog' /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
</tr>
|
70 |
</table>
|
71 |
<button id='add-font-icon' class='btn btn-primary' type='button'>Add Font Icon</button>
|
@@ -86,7 +96,7 @@
|
|
86 |
</script>
|
87 |
|
88 |
<div class='panel panel-default'>
|
89 |
-
<div class='panel-body'>Sizing</div>
|
90 |
<table class='table table-bordered table-hover'>
|
91 |
{{ macros.row('menu_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'percentage') }}
|
92 |
{{ macros.row('menu_maximum_width', 'Maximum Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
@@ -99,13 +109,26 @@
|
|
99 |
</div>
|
100 |
|
101 |
<div class='panel panel-default'>
|
102 |
-
<div class='panel-body'>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
<table class='table table-bordered table-hover'>
|
104 |
{{ macros.row('menu_title', 'Text', 'input', options, errors) }}
|
105 |
{{ macros.row('menu_title_link', 'Link', 'input', options, errors) }}
|
106 |
{{ macros.row('menu_title_link_location', 'Link Location', 'select', options, errors, '', '', 'link_locations') }}
|
107 |
{{ macros.row('menu_title_font_size', 'Font Size', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
108 |
-
{{ macros.row('menu_title_font_icon', 'Font Icon', '
|
109 |
{{ macros.row('menu_title_image', 'Image', 'image', options, errors) }}
|
110 |
{{ macros.row('menu_title_image_alt', 'Alt Text', 'input', options, errors) }}
|
111 |
{{ macros.row('menu_title_background_colour', 'Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -116,7 +139,7 @@
|
|
116 |
</div>
|
117 |
|
118 |
<div class='panel panel-default'>
|
119 |
-
<div class='panel-body'>Additional Content</div>
|
120 |
<table class='table table-bordered table-hover'>
|
121 |
{{ macros.row('menu_additional_content', 'Content', 'textarea', options, errors, '', '', '', '', 'HTML and shortcodes can be used here.') }}
|
122 |
{{ macros.row('menu_additional_content_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -124,7 +147,7 @@
|
|
124 |
</div>
|
125 |
|
126 |
<div class='panel panel-default'>
|
127 |
-
<div class='panel-body'>Animation</div>
|
128 |
<table class='table table-bordered table-hover'>
|
129 |
{{ macros.row('menu_appear_from', 'Appear From', 'select', options, errors, '', '', 'side', '', 'This determines which side the menu slides in from.') }}
|
130 |
{{ macros.row('animation_type', 'Type', 'select', options, errors, '', 'semi-pro', 'animation') }}
|
@@ -135,7 +158,7 @@
|
|
135 |
</div>
|
136 |
|
137 |
<div class='panel panel-default'>
|
138 |
-
<div class='panel-body'>Search Box</div>
|
139 |
<table class='table table-bordered table-hover'>
|
140 |
{{ macros.row('menu_search_box_text', 'Placeholder Text', 'input', options, errors, '', 'pro') }}
|
141 |
{{ macros.row('menu_search_box_text_colour', 'Text Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -146,19 +169,7 @@
|
|
146 |
</div>
|
147 |
|
148 |
<div class='panel panel-default'>
|
149 |
-
<div class='panel-body'>
|
150 |
-
<table class='table table-bordered table-hover'>
|
151 |
-
{{ macros.row('menu_background_image', 'Image', 'image', options, errors, '', '', '', '', 'Enabling this will deactivate all other colour options') }}
|
152 |
-
{{ macros.row('menu_background_colour', 'Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
153 |
-
{{ macros.row('menu_item_background_colour', 'Link Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
154 |
-
{{ macros.row('menu_item_background_hover_colour', 'Link Background Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
155 |
-
{{ macros.row('menu_current_item_background_colour', 'Current Link Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
156 |
-
{{ macros.row('menu_current_item_background_hover_colour', 'Current Link Background Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
157 |
-
</table>
|
158 |
-
</div>
|
159 |
-
|
160 |
-
<div class='panel panel-default'>
|
161 |
-
<div class='panel-body'>Link Borders</div>
|
162 |
<table class='table table-bordered table-hover'>
|
163 |
{{ macros.row('menu_item_border_colour', 'Link Border colour', 'colour', options, errors, '', 'semi-pro') }}
|
164 |
{{ macros.row('menu_item_border_colour_hover', 'Link Border Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -168,7 +179,7 @@
|
|
168 |
</div>
|
169 |
|
170 |
<div class='panel panel-default'>
|
171 |
-
<div class='panel-body'>Link Colours</div>
|
172 |
<table class='table table-bordered table-hover'>
|
173 |
{{ macros.row('menu_link_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
174 |
{{ macros.row('menu_link_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -178,7 +189,7 @@
|
|
178 |
</div>
|
179 |
|
180 |
<div class='panel panel-default'>
|
181 |
-
<div class='panel-body'>Styling</div>
|
182 |
<table class='table table-bordered table-hover'>
|
183 |
{{ macros.row('menu_font', 'Font', 'input', options, errors) }}
|
184 |
{{ macros.row('menu_font_size', 'Font Size', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
@@ -188,7 +199,7 @@
|
|
188 |
</div>
|
189 |
|
190 |
<div class='panel panel-default'>
|
191 |
-
<div class='panel-body'>Page Overlay</div>
|
192 |
<table class='table table-bordered table-hover'>
|
193 |
{{ macros.row('menu_overlay', 'Enable', 'checkbox', options, errors, '', 'pro') }}
|
194 |
{{ macros.row('menu_overlay_colour', 'Colour', 'colour', options, errors, '', 'pro') }}
|
@@ -196,7 +207,7 @@
|
|
196 |
</div>
|
197 |
|
198 |
<div class='panel panel-default'>
|
199 |
-
<div class='panel-body'>Advanced</div>
|
200 |
<table class='table table-bordered table-hover'>
|
201 |
{{ macros.row('menu_depth', 'Depth', 'select', options, errors, '', '', 'depth') }}
|
202 |
{{ macros.row('menu_disable_scrolling', 'Disable Background Scrolling', 'checkbox', options, errors, '', 'pro') }}
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Here you can turn options on or off and re-arrange them accordingly.<small>Menu</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
<tr{% if errors.items_order %} class='danger'{% endif %}>
|
7 |
<td class='well col-md-3'>
|
43 |
</script>
|
44 |
|
45 |
<div class='panel panel-default'>
|
46 |
+
<div class='panel-body'>Add FontAwesome icons to your menu items.<small>Menu</small></div>
|
47 |
<table class='table table-bordered table-hover'>
|
48 |
<tr{% if errors.menu_font_icons %} class='danger'{% endif %}>
|
49 |
<td class='well col-md-3'>
|
62 |
<tr>
|
63 |
<td>Menu Item ID</td>
|
64 |
<td>Icon</td>
|
65 |
+
<td>Type</td>
|
66 |
+
<td></td>
|
67 |
</tr>
|
68 |
<tr>
|
69 |
<td><input type='text' class='form-control' name='menu[menu_font_icons][id][]' placeholder='32' /></td>
|
70 |
<td><input type='text' class='form-control' name='menu[menu_font_icons][icon][]' placeholder='cog' /></td>
|
71 |
+
<td>
|
72 |
+
<select class='selectpicker show-tick' name='menu[menu_font_icons][type][]'>
|
73 |
+
<option value='font-awesome' selected='selected'>FontAwesome</option>
|
74 |
+
<option value='glyphicon'>GlyphIcon</option>
|
75 |
+
<option value='custom'>Custom</option>
|
76 |
+
</select>
|
77 |
+
</td>
|
78 |
+
<td><span class="label-danger label delete-font-icon-row">x</span></td>
|
79 |
</tr>
|
80 |
</table>
|
81 |
<button id='add-font-icon' class='btn btn-primary' type='button'>Add Font Icon</button>
|
96 |
</script>
|
97 |
|
98 |
<div class='panel panel-default'>
|
99 |
+
<div class='panel-body'>Sizing<small>Menu</small></div>
|
100 |
<table class='table table-bordered table-hover'>
|
101 |
{{ macros.row('menu_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'percentage') }}
|
102 |
{{ macros.row('menu_maximum_width', 'Maximum Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
109 |
</div>
|
110 |
|
111 |
<div class='panel panel-default'>
|
112 |
+
<div class='panel-body'>Background<small>Menu</small></div>
|
113 |
+
<table class='table table-bordered table-hover'>
|
114 |
+
{{ macros.row('menu_background_image', 'Image', 'image', options, errors, '', '', '', '', 'Enabling this will deactivate all other colour options') }}
|
115 |
+
{{ macros.row('menu_background_colour', 'Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
116 |
+
{{ macros.row('menu_container_background_colour', 'Container Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
117 |
+
{{ macros.row('menu_item_background_colour', 'Link Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
118 |
+
{{ macros.row('menu_item_background_hover_colour', 'Link Background Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
119 |
+
{{ macros.row('menu_current_item_background_colour', 'Current Link Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
120 |
+
{{ macros.row('menu_current_item_background_hover_colour', 'Current Link Background Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
121 |
+
</table>
|
122 |
+
</div>
|
123 |
+
|
124 |
+
<div class='panel panel-default'>
|
125 |
+
<div class='panel-body'>Title<small>Menu</small></div>
|
126 |
<table class='table table-bordered table-hover'>
|
127 |
{{ macros.row('menu_title', 'Text', 'input', options, errors) }}
|
128 |
{{ macros.row('menu_title_link', 'Link', 'input', options, errors) }}
|
129 |
{{ macros.row('menu_title_link_location', 'Link Location', 'select', options, errors, '', '', 'link_locations') }}
|
130 |
{{ macros.row('menu_title_font_size', 'Font Size', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
131 |
+
{{ macros.row('menu_title_font_icon', 'Font Icon', 'font-icon', options, errors, '', 'pro') }}
|
132 |
{{ macros.row('menu_title_image', 'Image', 'image', options, errors) }}
|
133 |
{{ macros.row('menu_title_image_alt', 'Alt Text', 'input', options, errors) }}
|
134 |
{{ macros.row('menu_title_background_colour', 'Background Colour', 'colour', options, errors, '', 'semi-pro') }}
|
139 |
</div>
|
140 |
|
141 |
<div class='panel panel-default'>
|
142 |
+
<div class='panel-body'>Additional Content<small>Menu</small></div>
|
143 |
<table class='table table-bordered table-hover'>
|
144 |
{{ macros.row('menu_additional_content', 'Content', 'textarea', options, errors, '', '', '', '', 'HTML and shortcodes can be used here.') }}
|
145 |
{{ macros.row('menu_additional_content_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
147 |
</div>
|
148 |
|
149 |
<div class='panel panel-default'>
|
150 |
+
<div class='panel-body'>Animation<small>Menu</small></div>
|
151 |
<table class='table table-bordered table-hover'>
|
152 |
{{ macros.row('menu_appear_from', 'Appear From', 'select', options, errors, '', '', 'side', '', 'This determines which side the menu slides in from.') }}
|
153 |
{{ macros.row('animation_type', 'Type', 'select', options, errors, '', 'semi-pro', 'animation') }}
|
158 |
</div>
|
159 |
|
160 |
<div class='panel panel-default'>
|
161 |
+
<div class='panel-body'>Search Box<small>Menu</small></div>
|
162 |
<table class='table table-bordered table-hover'>
|
163 |
{{ macros.row('menu_search_box_text', 'Placeholder Text', 'input', options, errors, '', 'pro') }}
|
164 |
{{ macros.row('menu_search_box_text_colour', 'Text Colour', 'colour', options, errors, '', 'semi-pro') }}
|
169 |
</div>
|
170 |
|
171 |
<div class='panel panel-default'>
|
172 |
+
<div class='panel-body'>Link Borders<small>Menu</small></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
<table class='table table-bordered table-hover'>
|
174 |
{{ macros.row('menu_item_border_colour', 'Link Border colour', 'colour', options, errors, '', 'semi-pro') }}
|
175 |
{{ macros.row('menu_item_border_colour_hover', 'Link Border Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
179 |
</div>
|
180 |
|
181 |
<div class='panel panel-default'>
|
182 |
+
<div class='panel-body'>Link Colours<small>Menu</small></div>
|
183 |
<table class='table table-bordered table-hover'>
|
184 |
{{ macros.row('menu_link_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
185 |
{{ macros.row('menu_link_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
189 |
</div>
|
190 |
|
191 |
<div class='panel panel-default'>
|
192 |
+
<div class='panel-body'>Styling<small>Menu</small></div>
|
193 |
<table class='table table-bordered table-hover'>
|
194 |
{{ macros.row('menu_font', 'Font', 'input', options, errors) }}
|
195 |
{{ macros.row('menu_font_size', 'Font Size', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
199 |
</div>
|
200 |
|
201 |
<div class='panel panel-default'>
|
202 |
+
<div class='panel-body'>Page Overlay<small>Menu</small></div>
|
203 |
<table class='table table-bordered table-hover'>
|
204 |
{{ macros.row('menu_overlay', 'Enable', 'checkbox', options, errors, '', 'pro') }}
|
205 |
{{ macros.row('menu_overlay_colour', 'Colour', 'colour', options, errors, '', 'pro') }}
|
207 |
</div>
|
208 |
|
209 |
<div class='panel panel-default'>
|
210 |
+
<div class='panel-body'>Advanced<small>Menu</small></div>
|
211 |
<table class='table table-bordered table-hover'>
|
212 |
{{ macros.row('menu_depth', 'Depth', 'select', options, errors, '', '', 'depth') }}
|
213 |
{{ macros.row('menu_disable_scrolling', 'Disable Background Scrolling', 'checkbox', options, errors, '', 'pro') }}
|
views/admin/sections/single-menu.html.twig
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Use Single Menu</div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('use_single_menu', 'Use Single Menu', 'checkbox', options, errors, '', 'pro', '', '', 'To use this option you must turn the Shortcode option on and use the shortcode in your theme where you want the menu to appear.') }}
|
7 |
</table>
|
8 |
</div>
|
9 |
|
10 |
<div class='panel panel-default'>
|
11 |
-
<div class='panel-body'>Top Level Link Colours</div>
|
12 |
<table class='table table-bordered table-hover'>
|
13 |
{{ macros.row('single_menu_item_background_colour', 'Background', 'colour', options, errors, '', 'pro') }}
|
14 |
{{ macros.row('single_menu_item_background_colour_hover', 'Background Hover', 'colour', options, errors, '', 'pro') }}
|
@@ -18,7 +18,7 @@
|
|
18 |
</div>
|
19 |
|
20 |
<div class='panel panel-default'>
|
21 |
-
<div class='panel-body'>Sub-Menu Link Colours</div>
|
22 |
<table class='table table-bordered table-hover'>
|
23 |
{{ macros.row('single_menu_item_submenu_background_colour', 'Background', 'colour', options, errors, '', 'pro') }}
|
24 |
{{ macros.row('single_menu_item_submenu_background_colour_hover', 'Background Hover', 'colour', options, errors, '', 'pro') }}
|
@@ -28,7 +28,7 @@
|
|
28 |
</div>
|
29 |
|
30 |
<div class='panel panel-default'>
|
31 |
-
<div class='panel-body'>Top Level Styling</div>
|
32 |
<table class='table table-bordered table-hover'>
|
33 |
{{ macros.row('single_menu_font', 'Font', 'input', options, errors, '', 'pro') }}
|
34 |
{{ macros.row('single_menu_font_size', 'Font size', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
@@ -36,7 +36,7 @@
|
|
36 |
</div>
|
37 |
|
38 |
<div class='panel panel-default'>
|
39 |
-
<div class='panel-body'>Sub-Menu Styling</div>
|
40 |
<table class='table table-bordered table-hover'>
|
41 |
{{ macros.row('single_menu_submenu_font', 'Font', 'input', options, errors, '', 'pro') }}
|
42 |
{{ macros.row('single_menu_submenu_font_size', 'Font size', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
@@ -44,14 +44,14 @@
|
|
44 |
</div>
|
45 |
|
46 |
<div class='panel panel-default'>
|
47 |
-
<div class='panel-body'>Top Level Sizing</div>
|
48 |
<table class='table table-bordered table-hover'>
|
49 |
{{ macros.row('single_menu_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
50 |
</table>
|
51 |
</div>
|
52 |
|
53 |
<div class='panel panel-default'>
|
54 |
-
<div class='panel-body'>Sub-Menu Sizing</div>
|
55 |
<table class='table table-bordered table-hover'>
|
56 |
{{ macros.row('single_menu_submenu_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
57 |
</table>
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Use Single Menu<small>Single Menu</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('use_single_menu', 'Use Single Menu', 'checkbox', options, errors, '', 'pro', '', '', 'To use this option you must turn the Shortcode option on and use the shortcode in your theme where you want the menu to appear.') }}
|
7 |
</table>
|
8 |
</div>
|
9 |
|
10 |
<div class='panel panel-default'>
|
11 |
+
<div class='panel-body'>Top Level Link Colours<small>Single Menu</small></div>
|
12 |
<table class='table table-bordered table-hover'>
|
13 |
{{ macros.row('single_menu_item_background_colour', 'Background', 'colour', options, errors, '', 'pro') }}
|
14 |
{{ macros.row('single_menu_item_background_colour_hover', 'Background Hover', 'colour', options, errors, '', 'pro') }}
|
18 |
</div>
|
19 |
|
20 |
<div class='panel panel-default'>
|
21 |
+
<div class='panel-body'>Sub-Menu Link Colours<small>Single Menu</small></div>
|
22 |
<table class='table table-bordered table-hover'>
|
23 |
{{ macros.row('single_menu_item_submenu_background_colour', 'Background', 'colour', options, errors, '', 'pro') }}
|
24 |
{{ macros.row('single_menu_item_submenu_background_colour_hover', 'Background Hover', 'colour', options, errors, '', 'pro') }}
|
28 |
</div>
|
29 |
|
30 |
<div class='panel panel-default'>
|
31 |
+
<div class='panel-body'>Top Level Styling<small>Single Menu</small></div>
|
32 |
<table class='table table-bordered table-hover'>
|
33 |
{{ macros.row('single_menu_font', 'Font', 'input', options, errors, '', 'pro') }}
|
34 |
{{ macros.row('single_menu_font_size', 'Font size', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
36 |
</div>
|
37 |
|
38 |
<div class='panel panel-default'>
|
39 |
+
<div class='panel-body'>Sub-Menu Styling<small>Single Menu</small></div>
|
40 |
<table class='table table-bordered table-hover'>
|
41 |
{{ macros.row('single_menu_submenu_font', 'Font', 'input', options, errors, '', 'pro') }}
|
42 |
{{ macros.row('single_menu_submenu_font_size', 'Font size', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
44 |
</div>
|
45 |
|
46 |
<div class='panel panel-default'>
|
47 |
+
<div class='panel-body'>Top Level Sizing<small>Single Menu</small></div>
|
48 |
<table class='table table-bordered table-hover'>
|
49 |
{{ macros.row('single_menu_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
50 |
</table>
|
51 |
</div>
|
52 |
|
53 |
<div class='panel panel-default'>
|
54 |
+
<div class='panel-body'>Sub-Menu Sizing<small>Single Menu</small></div>
|
55 |
<table class='table table-bordered table-hover'>
|
56 |
{{ macros.row('single_menu_submenu_height', 'Height', 'input', options, errors, 'has-unit', 'pro', '', 'pixel') }}
|
57 |
</table>
|
views/admin/sections/sub-menus.html.twig
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Sub-Menu Trigger Icon</div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
-
{{ macros.row('active_arrow_font_icon', 'Active Font Icon', '
|
7 |
-
{{ macros.row('inactive_arrow_font_icon', 'Inactive Font Icon', '
|
8 |
{{ macros.row('active_arrow_shape', 'Active Shape', 'input', options, errors) }}
|
9 |
{{ macros.row('inactive_arrow_shape', 'Inactive Shape', 'input', options, errors) }}
|
10 |
{{ macros.row('active_arrow_image', 'Active Image', 'image', options, errors) }}
|
@@ -16,7 +16,7 @@
|
|
16 |
</div>
|
17 |
|
18 |
<div class='panel panel-default'>
|
19 |
-
<div class='panel-body'>Sub-Menu Trigger Colours</div>
|
20 |
<table class='table table-bordered table-hover'>
|
21 |
{{ macros.row('menu_sub_arrow_shape_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
22 |
{{ macros.row('menu_sub_arrow_shape_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -26,7 +26,7 @@
|
|
26 |
</div>
|
27 |
|
28 |
<div class='panel panel-default'>
|
29 |
-
<div class='panel-body'>Sub-Menu Trigger Background</div>
|
30 |
<table class='table table-bordered table-hover'>
|
31 |
{{ macros.row('menu_sub_arrow_background_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
32 |
{{ macros.row('menu_sub_arrow_background_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -36,7 +36,7 @@
|
|
36 |
</div>
|
37 |
|
38 |
<div class='panel panel-default'>
|
39 |
-
<div class='panel-body'>Sub-Menu Trigger Border</div>
|
40 |
<table class='table table-bordered table-hover'>
|
41 |
{{ macros.row('menu_sub_arrow_border_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
42 |
{{ macros.row('menu_sub_arrow_border_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
@@ -46,7 +46,7 @@
|
|
46 |
</div>
|
47 |
|
48 |
<div class='panel panel-default'>
|
49 |
-
<div class='panel-body'>Sub-Menu Trigger Sizing</div>
|
50 |
<table class='table table-bordered table-hover'>
|
51 |
{{ macros.row('submenu_arrow_height', 'Height', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
52 |
{{ macros.row('submenu_arrow_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
@@ -54,7 +54,7 @@
|
|
54 |
</div>
|
55 |
|
56 |
<div class='panel panel-default'>
|
57 |
-
<div class='panel-body'>Animations</div>
|
58 |
<table class='table table-bordered table-hover'>
|
59 |
{{ macros.row('accordion_animation', 'Use Accordion', 'checkbox', options, errors) }}
|
60 |
{{ macros.row('auto_expand_all_submenus', 'Auto Expand all Sub-Menus', 'checkbox', options, errors) }}
|
@@ -65,14 +65,14 @@
|
|
65 |
</div>
|
66 |
|
67 |
<div class='panel panel-default'>
|
68 |
-
<div class='panel-body'>Slide Effect Options</div>
|
69 |
<table class='table table-bordered table-hover'>
|
70 |
{{ macros.row('slide_effect_back_to_text', 'Back Text', 'input', options, errors, '', 'pro') }}
|
71 |
</table>
|
72 |
</div>
|
73 |
|
74 |
<div class='panel panel-default'>
|
75 |
-
<div class='panel-body'>Fade in links</div>
|
76 |
<table class='table table-bordered table-hover'>
|
77 |
{{ macros.row('fade_submenus', 'Enabled', 'checkbox', options, errors, '', 'pro') }}
|
78 |
{{ macros.row('fade_submenus_side', 'Side to Fade From', 'select', options, errors, '', 'pro', 'left_right') }}
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Sub-Menu Trigger Icon<small>Sub Menus</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
+
{{ macros.row('active_arrow_font_icon', 'Active Font Icon', 'font-icon', options, errors, '', 'pro') }}
|
7 |
+
{{ macros.row('inactive_arrow_font_icon', 'Inactive Font Icon', 'font-icon', options, errors, '', 'pro') }}
|
8 |
{{ macros.row('active_arrow_shape', 'Active Shape', 'input', options, errors) }}
|
9 |
{{ macros.row('inactive_arrow_shape', 'Inactive Shape', 'input', options, errors) }}
|
10 |
{{ macros.row('active_arrow_image', 'Active Image', 'image', options, errors) }}
|
16 |
</div>
|
17 |
|
18 |
<div class='panel panel-default'>
|
19 |
+
<div class='panel-body'>Sub-Menu Trigger Colours<small>Sub Menus</small></div>
|
20 |
<table class='table table-bordered table-hover'>
|
21 |
{{ macros.row('menu_sub_arrow_shape_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
22 |
{{ macros.row('menu_sub_arrow_shape_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
26 |
</div>
|
27 |
|
28 |
<div class='panel panel-default'>
|
29 |
+
<div class='panel-body'>Sub-Menu Trigger Background<small>Sub Menus</small></div>
|
30 |
<table class='table table-bordered table-hover'>
|
31 |
{{ macros.row('menu_sub_arrow_background_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
32 |
{{ macros.row('menu_sub_arrow_background_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
36 |
</div>
|
37 |
|
38 |
<div class='panel panel-default'>
|
39 |
+
<div class='panel-body'>Sub-Menu Trigger Border<small>Sub Menus</small></div>
|
40 |
<table class='table table-bordered table-hover'>
|
41 |
{{ macros.row('menu_sub_arrow_border_colour', 'Colour', 'colour', options, errors, '', 'semi-pro') }}
|
42 |
{{ macros.row('menu_sub_arrow_border_hover_colour', 'Hover Colour', 'colour', options, errors, '', 'semi-pro') }}
|
46 |
</div>
|
47 |
|
48 |
<div class='panel panel-default'>
|
49 |
+
<div class='panel-body'>Sub-Menu Trigger Sizing<small>Sub Menus</small></div>
|
50 |
<table class='table table-bordered table-hover'>
|
51 |
{{ macros.row('submenu_arrow_height', 'Height', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
52 |
{{ macros.row('submenu_arrow_width', 'Width', 'input', options, errors, 'has-unit', 'semi-pro', '', 'pixel') }}
|
54 |
</div>
|
55 |
|
56 |
<div class='panel panel-default'>
|
57 |
+
<div class='panel-body'>Animations<small>Sub Menus</small></div>
|
58 |
<table class='table table-bordered table-hover'>
|
59 |
{{ macros.row('accordion_animation', 'Use Accordion', 'checkbox', options, errors) }}
|
60 |
{{ macros.row('auto_expand_all_submenus', 'Auto Expand all Sub-Menus', 'checkbox', options, errors) }}
|
65 |
</div>
|
66 |
|
67 |
<div class='panel panel-default'>
|
68 |
+
<div class='panel-body'>Slide Effect Options<small>Sub Menus</small></div>
|
69 |
<table class='table table-bordered table-hover'>
|
70 |
{{ macros.row('slide_effect_back_to_text', 'Back Text', 'input', options, errors, '', 'pro') }}
|
71 |
</table>
|
72 |
</div>
|
73 |
|
74 |
<div class='panel panel-default'>
|
75 |
+
<div class='panel-body'>Fade in links<small>Sub Menus</small></div>
|
76 |
<table class='table table-bordered table-hover'>
|
77 |
{{ macros.row('fade_submenus', 'Enabled', 'checkbox', options, errors, '', 'pro') }}
|
78 |
{{ macros.row('fade_submenus_side', 'Side to Fade From', 'select', options, errors, '', 'pro', 'left_right') }}
|
views/admin/sections/technical.html.twig
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
-
<div class='panel-body'>Scripts</div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('external_files', 'Use external files?', 'checkbox', options, errors, '', '', '', '', 'This will create external files for CSS and JavaScript') }}
|
7 |
{{ macros.row('minify_scripts', 'Minify scripts?', 'checkbox', options, errors, '', '', '', '', 'This will minify the CSS and JavaScript output') }}
|
@@ -10,7 +10,7 @@
|
|
10 |
</div>
|
11 |
|
12 |
<div class='panel panel-default'>
|
13 |
-
<div class='panel-body'>Menu</div>
|
14 |
<table class='table table-bordered table-hover'>
|
15 |
{{ macros.row('custom_walker', 'Custom Walker', 'input', options, errors, '', '', '', '', 'Warning: For extremely advanced use only') }}
|
16 |
{{ macros.row('mobile_only', 'Show on mobile devices only?', 'checkbox', options, errors, '', 'pro', '', '', 'This will make it not a responsive menu but a "mobile menu"') }}
|
@@ -19,7 +19,7 @@
|
|
19 |
</div>
|
20 |
|
21 |
<div class='panel panel-default'>
|
22 |
-
<div class='panel-body'>Animation Speeds</div>
|
23 |
<table class='table table-bordered table-hover'>
|
24 |
{{ macros.row('animation_speed', 'Animation Speed', 'input', options, errors, '', '', '', '', '', 's') }}
|
25 |
{{ macros.row('transition_speed', 'Transition Speed', 'input', options, errors, '', '', '', '', '', 's') }}
|
1 |
{% import 'admin/macros.html.twig' as macros %}
|
2 |
|
3 |
<div class='panel panel-default'>
|
4 |
+
<div class='panel-body'>Scripts<small>Technical</small></div>
|
5 |
<table class='table table-bordered table-hover'>
|
6 |
{{ macros.row('external_files', 'Use external files?', 'checkbox', options, errors, '', '', '', '', 'This will create external files for CSS and JavaScript') }}
|
7 |
{{ macros.row('minify_scripts', 'Minify scripts?', 'checkbox', options, errors, '', '', '', '', 'This will minify the CSS and JavaScript output') }}
|
10 |
</div>
|
11 |
|
12 |
<div class='panel panel-default'>
|
13 |
+
<div class='panel-body'>Menu<small>Technical</small></div>
|
14 |
<table class='table table-bordered table-hover'>
|
15 |
{{ macros.row('custom_walker', 'Custom Walker', 'input', options, errors, '', '', '', '', 'Warning: For extremely advanced use only') }}
|
16 |
{{ macros.row('mobile_only', 'Show on mobile devices only?', 'checkbox', options, errors, '', 'pro', '', '', 'This will make it not a responsive menu but a "mobile menu"') }}
|
19 |
</div>
|
20 |
|
21 |
<div class='panel panel-default'>
|
22 |
+
<div class='panel-body'>Animation Speeds<small>Technical</small></div>
|
23 |
<table class='table table-bordered table-hover'>
|
24 |
{{ macros.row('animation_speed', 'Animation Speed', 'input', options, errors, '', '', '', '', '', 's') }}
|
25 |
{{ macros.row('transition_speed', 'Transition Speed', 'input', options, errors, '', '', '', '', '', 's') }}
|
views/admin/tabs.html.twig
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<ul class='nav nav-tabs'>
|
2 |
-
<li{% if current_page() == 'initial-setup' %} class='active'{% endif %}><a data-toggle='tab' href='#initial-setup'>Initial Setup <span class='badge'>3</span></a></li>
|
3 |
-
<li{% if current_page() == 'menu' %} class='active'{% endif %}><a data-toggle='tab' href='#menu'>Menu <span class='badge'>55</span></a></li>
|
4 |
-
<li{% if current_page() == 'button' %} class='active'{% endif %}><a data-toggle='tab' href='#button'>Button <span class='badge'>28</span></a></li>
|
5 |
-
<li{% if current_page() == 'sub-menus' %} class='active'{% endif %}><a data-toggle='tab' href='#sub-menus'>Sub Menus <span class='badge'>33</span></a></li>
|
6 |
-
<li{% if current_page() == 'technical' %} class='active'{% endif %}><a data-toggle='tab' href='#technical'>Technical <span class='badge'>8</span></a></li>
|
7 |
-
<li{% if current_page() == '
|
8 |
-
<li{% if current_page() == '
|
9 |
-
<li{% if current_page() == '
|
10 |
-
<li{% if current_page() == '
|
11 |
<li class='pull-right'><button type='submit' name='responsive-menu-submit' class='btn btn-primary pull-right'>Update Options</button></li>
|
12 |
<li class='pull-right'><button type='button' id='responsive-menu-preview' name='responsive-menu-preview' class='btn btn-default pull-right'>Preview Changes</button></li>
|
13 |
</ul>
|
1 |
<ul class='nav nav-tabs'>
|
2 |
+
<li{% if current_page() == 'initial-setup' %} class='active'{% endif %} id="initial-setup-tab"><a data-toggle='tab' href='#initial-setup'>Initial Setup <span class='badge'>3</span></a></li>
|
3 |
+
<li{% if current_page() == 'menu' %} class='active'{% endif %} id="menu-tab"><a data-toggle='tab' href='#menu'>Menu <span class='badge'>55</span></a></li>
|
4 |
+
<li{% if current_page() == 'button' %} class='active'{% endif %} id="button-tab"><a data-toggle='tab' href='#button'>Button <span class='badge'>28</span></a></li>
|
5 |
+
<li{% if current_page() == 'sub-menus' %} class='active'{% endif %} id="sub-menus-tab"><a data-toggle='tab' href='#sub-menus'>Sub Menus <span class='badge'>33</span></a></li>
|
6 |
+
<li{% if current_page() == 'technical' %} class='active'{% endif %} id="technical-tab"><a data-toggle='tab' href='#technical'>Technical <span class='badge'>8</span></a></li>
|
7 |
+
<li{% if current_page() == 'import-export' %} class='active'{% endif %} id="import-export-tabZz"><a data-toggle='tab' href='#import-export'>Import/Export <span class='badge'>4</span></a></li>
|
8 |
+
<li{% if current_page() == 'custom-css' %} class='active'{% endif %} id="custom-css-tab"><a data-toggle='tab' href='#custom-css'>Custom CSS <span class='badge progress-bar-danger'>Pro</span></a></li>
|
9 |
+
<li{% if current_page() == 'header-bar' %} class='active'{% endif %} id="header-bar-tab"><a data-toggle='tab' href='#header-bar'>Header Bar <span class='badge progress-bar-danger'>Pro</span></a></li>
|
10 |
+
<li{% if current_page() == 'single-menu' %} class='active'{% endif %} id="single-menu-tab"><a data-toggle='tab' href='#single-menu'>Single Menu <span class='badge progress-bar-danger'>Pro</span></a></li>
|
11 |
<li class='pull-right'><button type='submit' name='responsive-menu-submit' class='btn btn-primary pull-right'>Update Options</button></li>
|
12 |
<li class='pull-right'><button type='button' id='responsive-menu-preview' name='responsive-menu-preview' class='btn btn-default pull-right'>Preview Changes</button></li>
|
13 |
</ul>
|