Version Description
(26th February 2021) = Feature: Bundled all free themes in plugin Feature: Added new option for font weight and font family for menu title Feature: Added home button on preview device Feature: Added border radius as new option for toggle button Feature: Added theme upload feature in wizards Feature: To support the advanced menu themes Enhancement: Improved push animation to work with only body element Enhancement: Added loader to show while uploading and changing theme Enhancement: Show message when theme page is empty Enhancement: Show spinner while deleting theme Enhancement: Redirected user directly to customizer after creating a new menu Enhancement: Prevent deleting a theme if being used by active menu Enhancement: Added color alpha feature and push animation Enhancement: Added custom admin notice to upgrade Enhancement: Added admin notice with doc link if no menu created. Enhancement: Improved the default theme with new UI Enhancement: Improved the wizards UI Enhancement: Added hide menu input in new menu wizard Enhancement: Improved caching and minimize API requests Enhancement: Added support for WordPress core version 5.7 Bug: Prevent to load the customizer screen in preview section Bug: Fixed additional contents to process the shortcode Bug: Fixed Menu item height issue with long text Bug: Fixed default wp menu items Bug: Improved live preview and update required Bug: Fixed PHP warning and errors
Release Info
Developer | expresstech |
Plugin | Responsive Menu |
Version | 4.1.0 |
Comparing to | |
See all releases |
Code changes from version 4.0.4 to 4.1.0
- readme.txt +38 -18
- responsive-menu.php +36 -2
- v4.0.0/.eslintrc.json +2 -1
- v4.0.0/assets/admin/build/css/rmpMain.css +1 -0
- v4.0.0/assets/admin/build/js/rmpMain.js +2 -0
- v4.0.0/assets/admin/js/rmp-admin.js +67 -122
- v4.0.0/assets/admin/js/rmp-editor.js +0 -11
- v4.0.0/assets/admin/js/rmp-icon.js +10 -1
- v4.0.0/assets/admin/js/rmp-menu-wizard.js +224 -0
- v4.0.0/assets/admin/js/rmp-preview.js +1181 -933
- v4.0.0/assets/admin/rmp-main.js +13 -0
- v4.0.0/assets/admin/scss/admin.css +108 -394
- v4.0.0/assets/admin/scss/wizard-ui.scss +525 -0
- v4.0.0/assets/images/default-theme-preview.png +0 -0
- v4.0.0/assets/js/rmp-menu.js +12 -2
- v4.0.0/assets/scss/common.scss +1 -1
- v4.0.0/assets/scss/main.scss +121 -110
- v4.0.0/inc/classes/class-admin.php +16 -5
- v4.0.0/inc/classes/class-assets.php +37 -28
- v4.0.0/inc/classes/class-control-manager.php +1 -1
- v4.0.0/inc/classes/class-plugin.php +98 -1
- v4.0.0/inc/classes/class-rmp-menu.php +68 -11
- v4.0.0/inc/classes/class-style-manager.php +58 -6
- v4.0.0/inc/classes/class-theme-manager.php +493 -156
- v4.0.0/inc/helpers/default-options.php +330 -385
- v4.0.0/package-lock.json +1212 -947
- v4.0.0/package.json +4 -5
- v4.0.0/templates/admin-notices.php +25 -0
- v4.0.0/templates/legacy-settings.php +4 -3
- v4.0.0/templates/menu-elements/title.php +27 -1
- v4.0.0/templates/new-menu-wizard.php +157 -117
- v4.0.0/templates/rmp-editor.php +93 -54
- v4.0.0/templates/rmp-roadmap.php +7 -0
- v4.0.0/templates/rmp-themes.php +25 -6
- v4.0.0/templates/rmp-wizards.php +50 -41
- v4.0.0/themes/electric blue theme/blue-background.png +0 -0
- v4.0.0/themes/electric blue theme/config.json +5 -0
- v4.0.0/themes/electric blue theme/electric-blue-theme.php +69 -0
- v4.0.0/themes/electric blue theme/options.json +302 -0
- v4.0.0/themes/electric blue theme/person.png +0 -0
- v4.0.0/themes/electric blue theme/preview.png +0 -0
- v4.0.0/themes/full-width-theme/config.json +5 -0
- v4.0.0/themes/full-width-theme/full-width-theme.php +68 -0
- v4.0.0/themes/full-width-theme/options.json +302 -0
- v4.0.0/themes/full-width-theme/person.png +0 -0
- v4.0.0/themes/full-width-theme/preview.png +0 -0
- v4.0.0/themes/simple-red-free/config.json +5 -0
- v4.0.0/themes/simple-red-free/options.json +302 -0
- v4.0.0/themes/simple-red-free/person.png +0 -0
- v4.0.0/themes/simple-red-free/preview.png +0 -0
- v4.0.0/themes/simple-red-free/simple-red-theme.php +68 -0
- v4.0.0/webpack.config.js +9 -12
@@ -1,9 +1,9 @@
|
|
1 |
=== Responsive Menu - Create Mobile-Friendly Menu ===
|
2 |
-
Contributors: expresstech,responsivemenu
|
3 |
Tags: responsive, mega menu, navigation, mobile, hamburger
|
4 |
Requires at least: 3.6
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 4.0
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -93,23 +93,43 @@ To view our FAQ, please go to [https://responsive.menu/faq/](https://responsive.
|
|
93 |
|
94 |
== Screenshots ==
|
95 |
|
96 |
-
1.
|
97 |
-
2.
|
98 |
-
3.
|
99 |
-
4.
|
100 |
-
5.
|
101 |
-
6.
|
102 |
-
7.
|
103 |
-
8. Admin Container Section
|
104 |
-
9. Admin Menu Section
|
105 |
-
10. Admin Sub Menus Section
|
106 |
-
11. Admin Button Section
|
107 |
-
12. Admin Technical Section
|
108 |
-
13. Admin Advanced Section
|
109 |
-
14. Admin Header Bar Section
|
110 |
-
15. Admin Desktop Menu Section
|
111 |
|
112 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
= 4.0.4 (19th January 2021) =
|
114 |
* Bug: Fixed security vulnerabilities
|
115 |
|
1 |
=== Responsive Menu - Create Mobile-Friendly Menu ===
|
2 |
+
Contributors: expresstech,responsivemenu,imvarunkmr,surajkumarsingh
|
3 |
Tags: responsive, mega menu, navigation, mobile, hamburger
|
4 |
Requires at least: 3.6
|
5 |
+
Tested up to: 5.7
|
6 |
+
Stable tag: 4.1.0
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
93 |
|
94 |
== Screenshots ==
|
95 |
|
96 |
+
1. Dashboard
|
97 |
+
2. Select theme
|
98 |
+
3. Menu setting
|
99 |
+
4. Mobile view setting
|
100 |
+
5. Desktop view setting
|
101 |
+
6. Toggle button
|
102 |
+
7. Main menu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
== Changelog ==
|
105 |
+
= 4.1.0 (26th February 2021) =
|
106 |
+
Feature: Bundled all free themes in plugin
|
107 |
+
Feature: Added new option for font weight and font family for menu title
|
108 |
+
Feature: Added home button on preview device
|
109 |
+
Feature: Added border radius as new option for toggle button
|
110 |
+
Feature: Added theme upload feature in wizards
|
111 |
+
Feature: To support the advanced menu themes
|
112 |
+
Enhancement: Improved push animation to work with only body element
|
113 |
+
Enhancement: Added loader to show while uploading and changing theme
|
114 |
+
Enhancement: Show message when theme page is empty
|
115 |
+
Enhancement: Show spinner while deleting theme
|
116 |
+
Enhancement: Redirected user directly to customizer after creating a new menu
|
117 |
+
Enhancement: Prevent deleting a theme if being used by active menu
|
118 |
+
Enhancement: Added color alpha feature and push animation
|
119 |
+
Enhancement: Added custom admin notice to upgrade
|
120 |
+
Enhancement: Added admin notice with doc link if no menu created.
|
121 |
+
Enhancement: Improved the default theme with new UI
|
122 |
+
Enhancement: Improved the wizards UI
|
123 |
+
Enhancement: Added hide menu input in new menu wizard
|
124 |
+
Enhancement: Improved caching and minimize API requests
|
125 |
+
Enhancement: Added support for WordPress core version 5.7
|
126 |
+
Bug: Prevent to load the customizer screen in preview section
|
127 |
+
Bug: Fixed additional contents to process the shortcode
|
128 |
+
Bug: Fixed Menu item height issue with long text
|
129 |
+
Bug: Fixed default wp menu items
|
130 |
+
Bug: Improved live preview and update required
|
131 |
+
Bug: Fixed PHP warning and errors
|
132 |
+
|
133 |
= 4.0.4 (19th January 2021) =
|
134 |
* Bug: Fixed security vulnerabilities
|
135 |
|
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://expresstech.io
|
6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
7 |
-
Version: 4.0
|
8 |
Author: ExpressTech
|
9 |
Text Domain: responsive-menu
|
10 |
Author URI: https://responsive.menu
|
@@ -16,7 +16,7 @@ Tags: responsive, menu, responsive menu, mega menu, max mega menu, max menu
|
|
16 |
* Constant as plugin version.
|
17 |
*/
|
18 |
if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) {
|
19 |
-
define( 'RMP_PLUGIN_VERSION', '4.0
|
20 |
}
|
21 |
|
22 |
define('RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
|
@@ -221,4 +221,38 @@ include dirname(__FILE__) . '/config/polylang.php';
|
|
221 |
flush_rewrite_rules();
|
222 |
}
|
223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://expresstech.io
|
6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
7 |
+
Version: 4.1.0
|
8 |
Author: ExpressTech
|
9 |
Text Domain: responsive-menu
|
10 |
Author URI: https://responsive.menu
|
16 |
* Constant as plugin version.
|
17 |
*/
|
18 |
if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) {
|
19 |
+
define( 'RMP_PLUGIN_VERSION', '4.1.0' );
|
20 |
}
|
21 |
|
22 |
define('RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
|
221 |
flush_rewrite_rules();
|
222 |
}
|
223 |
|
224 |
+
/**
|
225 |
+
* Function to include the menu themes templates.
|
226 |
+
*
|
227 |
+
* @since 4.0.5
|
228 |
+
*
|
229 |
+
* @return void
|
230 |
+
*/
|
231 |
+
function rm_includes_menu_theme_template() {
|
232 |
+
|
233 |
+
$theme_manager = \RMP\Features\Inc\Theme_Manager::get_instance();
|
234 |
+
|
235 |
+
//Check class theme manager has this method or not.
|
236 |
+
if ( ! method_exists( $theme_manager, 'get_menu_active_themes' ) ) {
|
237 |
+
return;
|
238 |
+
}
|
239 |
+
|
240 |
+
$active_themes = $theme_manager->get_menu_active_themes();
|
241 |
+
if ( empty( $active_themes ) ) {
|
242 |
+
return;
|
243 |
+
}
|
244 |
+
|
245 |
+
//Include the file from each theme which has php template.
|
246 |
+
foreach( $active_themes as $key => $theme_name ) {
|
247 |
+
|
248 |
+
$theme_index = $theme_manager->get_theme_index_file( $theme_name );
|
249 |
+
|
250 |
+
if ( file_exists( $theme_index ) ) {
|
251 |
+
require_once $theme_index;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
256 |
+
|
257 |
+
rm_includes_menu_theme_template();
|
258 |
}
|
@@ -35,6 +35,7 @@
|
|
35 |
"no-tabs": 0,
|
36 |
"prefer-destructuring": 0,
|
37 |
"no-undef": 0,
|
38 |
-
"no-param-reassign": 0
|
|
|
39 |
}
|
40 |
}
|
35 |
"no-tabs": 0,
|
36 |
"prefer-destructuring": 0,
|
37 |
"no-undef": 0,
|
38 |
+
"no-param-reassign": 0,
|
39 |
+
"linebreak-style": 0
|
40 |
}
|
41 |
}
|
@@ -0,0 +1 @@
|
|
|
1 |
+
.rmp-dialog-overlay{font-family:Product Sans}.rmp-dialog-overlay .rmp-menu-section{display:none}.rmp-dialog-overlay .rmp-menu-section.current{display:block}.rmp-dialog-overlay .rmp-dialog-backdrop{position:fixed;left:-1.25rem;right:0;top:0;bottom:0;background:rgba(13,19,61,.5098039215686274);z-index:999999}.rmp-dialog-overlay .rmp-dialog-wrap{clear:both;position:absolute;top:10%;left:0;right:0;bottom:3%;background:#fff;box-shadow:0 1px 1.25rem .3125rem rgba(0,0,0,.1);z-index:999999;box-sizing:border-box;-webkit-overflow-scrolling:touch;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.rmp-dialog-overlay .rmp-dialog-wrap .rmp-dialog-contents{max-height:36.25rem;overflow-y:overlay}.rmp-dialog-overlay .rmp-dialog-header{height:4rem;border-bottom:1px solid #eee;overflow:hidden;display:flex;justify-content:space-between;align-items:center;box-shadow:0 0 .125rem 0 rgba(0,0,0,.1607843137254902)}.rmp-dialog-overlay .rmp-dialog-header .title{font-size:1rem;height:4rem;display:flex;align-items:center;padding-left:1.25rem;text-transform:capitalize;font-family:Product Sans Medium;color:#7e7e7e}.rmp-dialog-overlay .rmp-dialog-header .close{cursor:pointer;font-size:1.875rem;width:4rem;color:#ccd0d4;height:4rem;border:0;background-color:transparent;border-left:1px solid #ccd0d4}.rmp-dialog-overlay .rmp-dialog-footer{position:relative;text-align:right;bottom:0;left:0;right:0;padding:.625rem 1.25rem;box-sizing:border-box;height:4rem;box-shadow:0 -1px .125rem 0 rgba(0,0,0,.1607843137254902)}.rmp-dialog-overlay .rmp-theme-title .item-controls{top:unset}.rmp-dialog-overlay a{text-decoration:none}.rmp-dialog-overlay a:focus{border:0;outline:unset;box-shadow:unset}#rmp-new-menu-wizard .rmp-page-loader{background-color:hsla(0,0%,100%,.5019607843137255);height:auto;top:4rem;bottom:0}#rmp-new-menu-wizard .rmp-page-loader .rmp-loader-message{font-style:normal;font-size:.875rem;text-align:center;font-weight:600}#rmp-new-menu-wizard .rmp-theme-apply,#rmp-new-menu-wizard .rmp-theme-use{padding:.25rem .75rem;border:1px solid #c8c8c8;border-radius:.3125rem;color:#9d9d9d;letter-spacing:.14px}#rmp-new-menu-wizard .input-group{margin-bottom:.5rem;display:flex;align-items:center;padding:1.4rem 2rem;box-shadow:0 0 .25rem 0 rgba(0,0,0,.1);border:1px solid #dedcdc;background-color:#f6f6f6}#rmp-new-menu-wizard .input-group .input-label{width:35%}#rmp-new-menu-wizard .input-group .input-control{width:65%}#rmp-new-menu-wizard .input-label-title{font-family:PRODUCT SANS MEDIUM;font-size:1rem;font-weight:400;letter-spacing:.16px;color:#303030;margin-bottom:.375rem}#rmp-new-menu-wizard .input-label-description{font-family:PRODUCT SANS;font-size:.875rem;line-height:1.14;letter-spacing:.14px;color:#7b7b7b;margin-right:25%}#rmp-new-menu-wizard .input-label-description a{text-decoration:underline;color:#00adf5}#rmp-new-menu-wizard .rmp-dialog-contents .rmp-new-menu-elements{padding:2% 8%}#rmp-new-menu-wizard .input-control input[type=text],#rmp-new-menu-wizard .input-control select{width:100%;max-width:100%;max-width:34.375rem;box-shadow:0 1px .375rem 0 rgba(0,0,0,.16);border:1px solid #dedcdc;border-radius:0;height:2.625rem}#rmp-new-menu-wizard .rmp-dialog-wrap{top:5%;transition:color .5s linear}#rmp-new-menu-wizard .rmp-dialog-wrap .rmp-dialog-contents{padding:2% 3%;background:#f1f1f1;min-height:26.25rem}#rmp-new-menu-wizard .rmp-dialog-wrap .nav-tab-wrapper{border:0}#rmp-new-menu-wizard .rmp-dialog-wrap .nav-tab-wrapper .nav-tab{color:#6e6e6e;border:0;padding:0;background:unset;margin:0 2rem 0 0;font-size:.875rem;line-height:1.14;letter-spacing:.14px;position:relative;height:1.875rem;font-weight:500}#rmp-new-menu-wizard .rmp-dialog-wrap .nav-tab-wrapper .ui-tabs-active .nav-tab{color:#0085ba}#rmp-new-menu-wizard .rmp-dialog-wrap .rmp-v-divider:after{content:"";position:absolute;height:1.25rem;width:1px;background:#d2d2d2;right:-1rem}#rmp-new-menu-wizard .rmp-dialog-wrap .btn-import-theme{width:5rem;height:2.1875rem;border-radius:.375rem;box-shadow:0 .1875rem .375rem 0 rgba(0,0,0,.16);background-color:#23b507;color:#fff;border:unset}#rmp-new-menu-wizard .rmp-dialog-wrap .rmp-themes{margin:1.25rem 0}#rmp-new-menu-wizard .rmp-dialog-wrap .rmp-item-card_image{line-height:0}#rmp-new-menu-wizard .rmp-dialog-wrap .rmp-item-card_image img{height:15.625rem}#rmp-new-menu-wizard .rmp-dialog-wrap .rmp-item-card_contents{display:inline}#rmp-new-menu-wizard .rmp-dialog-wrap .rmp-item-card-backside{opacity:0;visibility:hidden;display:flex;position:absolute;top:0;left:0;height:calc(100% - .625rem);width:calc(100% - .625rem);margin:.3125rem;background:#000;flex-direction:column;justify-content:center;align-items:center;text-align:center;transform:translate3d(0,50%,0);transition:all .3s ease-in-out}#rmp-new-menu-wizard .rmp-item-card_contents h4{margin:0 .1875rem 1.375rem 0;font-size:1.125rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.17;letter-spacing:.18px;text-align:center;color:#fff}#rmp-new-menu-wizard .rmp-item-card{padding:.3125rem;background:#eaeaea;border:.3125rem solid #eaeaea;transition:border .3s ease-in-out}#rmp-new-menu-wizard .rmp-item-card:hover .rmp-item-card-backside{opacity:1;visibility:visible;transform:translateZ(0)}#rmp-new-menu-wizard #rmp-theme-upload{background:#36bef7;border:.125rem solid #36bef7;font-family:Product Sans Medium;border-radius:.25rem;font-size:.75rem}#rmp-new-menu-wizard .button{width:6.5625rem;height:2.1875rem;border-radius:.3125rem;background-color:#f80668;border:unset;color:#fff}#rmp-new-menu-wizard .button.btn-blue{background-color:#36bef7}#rmp-new-menu-wizard .rmp-theme-option:checked+label{border:.3125rem solid #0085ba!important}#rmp-new-menu-wizard .item-controls .rmp-theme-option:checked+label.rmp-theme-use{background-color:#0085ba;border:1px solid #0085ba!important;color:#fff}#rmp-new-menu-wizard .rmp-new-menu-step-conatiner{margin-right:12%}#rmp-new-menu-wizard .rmp-dialog-header .title span{padding:0 .625rem}#rmp-new-menu-wizard .rmp-dialog-header .rmp-new-menu-steps{display:flex;flex-direction:row;align-items:center}#rmp-new-menu-wizard .rmp-dialog-header .rmp-new-menu-step{font-size:1.25rem;padding:0 .9375rem;height:4rem;line-height:4rem;font-size:20px;color:#000;cursor:pointer;position:relative}#rmp-new-menu-wizard .rmp-dialog-header .rmp-new-menu-step.current:after{content:"";position:absolute;width:100%;height:.3125rem;background:#f80668;bottom:0;left:0}#rmp-new-menu-wizard .rmp-theme-upload-container{display:flex;flex-direction:column;justify-content:center}#rmp-new-menu-wizard .rmp-theme-upload-container p{color:#555d66;font-size:1.125rem;font-style:normal;margin:0;padding:0;text-align:center}#rmp-new-menu-wizard .rmp-theme-upload-container.hide{display:none}#rmp-new-menu-wizard .wp-upload-form{background:#fafafa;border:1px solid #ccd0d4;padding:1.875rem;margin:1.875rem auto;display:inline-flex;justify-content:space-between;align-items:center}#rmp-new-menu-wizard .rmp-dialog-footer #rmp-create-new-menu,#rmp-new-menu-wizard .rmp-dialog-footer #rmp-menu-next-step{width:8.125rem;font-size:1rem;height:2.8125rem;border:1px solid #00adf5;background-color:#36bef7;border-radius:unset}#rmp-new-menu-wizard .default-item{width:11.5rem;height:15.6rem;display:flex;justify-content:center;align-items:center;font-size:1.125rem;border:.3125rem solid #eaeaea}#rmp-new-menu-wizard .rmp_theme_grids,.rmp-theme-page .rmp_theme_grids{display:flex;justify-content:flex-start;flex-wrap:wrap}.rmp-new-menu-themes .rmp-themes .rmp-theme-option{-webkit-appearance:none;-moz-appearance:none;appearance:none;visibility:hidden;display:none}.rmp-new-menu-themes .rmp-themes .rmp-theme-title{position:relative;background:#fff;padding:1rem;line-height:1.55;font-weight:500;color:#6e6e6e;font-weight:400;margin:.3125rem 0;border:1px solid #ddd;font-family:Product Sans;font-size:.875rem;text-transform:capitalize;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media only screen and (min-width:1170px){.rmp-dialog-overlay .rmp-dialog-wrap{width:73.125rem;margin:0 auto}}@media only screen and (max-width:780px){.rmp-dialog-overlay .rmp-dialog-overlay .rmp-dialog-wrap,.rmp-dialog-overlay .rmp-dialog-wrap{top:0;right:0;bottom:0;left:0;border:none;z-index:999999;position:absolute}#rmp-new-menu-wizard .input-group{flex-direction:column}#rmp-new-menu-wizard .input-group .input-control,#rmp-new-menu-wizard .input-group .input-label{width:100%;margin-bottom:.625rem}#rmp-new-menu-wizard .rmp-dialog-contents .rmp-new-menu-elements{padding:0}#rmp-new-menu-wizard .rmp-dialog-overlay .rmp-dialog-contents{flex-direction:column}#rmp-new-menu-wizard .rmp-dialog-contents .rmp-new-menu-themes{width:100%;border-right:unset;margin-bottom:.625rem}#rmp-new-menu-wizard .rmp-dialog-contents .rmp-new-menu-elements{width:auto}#rmp-new-menu-wizard .rmp-mega-menu-dialog .icon-tabs,#rmp-new-menu-wizard .rmp-menu-icons-dialog .icon-tabs{flex-direction:column}.rmp-dialog-contents .rmp-new-menu-elements{padding:0}.rmp-mega-menu-dialog .icon-tabs,.rmp-menu-icons-dialog .icon-tabs{flex-direction:column}}
|
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! For license information please see rmpMain.js.LICENSE.txt */
|
2 |
+
!function(e){var n={};function r(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)r.d(t,i,function(n){return e[n]}.bind(null,i));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=0)}({"./assets/admin/js/rmp-admin.js":function(module,exports){eval("/**\r\n * This is admin scripts file which contain the admin actions.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @author Expresstech System\r\n *\r\n */\njQuery(document).ready(function (jQuery) {\n /**\r\n * Rollback the plugin version.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires Click\r\n */\n jQuery('#rmp-rollback-version').on('click', function (e) {\n e.preventDefault();\n var version = jQuery('#rmp-versions').val();\n\n if ('3.1.30' === version) {\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n action: 'rmp_rollback_version'\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error) {\n jQuery(this).prop('disabled', false);\n },\n success: function success(response) {\n if (response.data.redirect) {\n location.href = response.data.redirect;\n }\n }\n });\n }\n });\n /**\r\n * Iframe loader and contents show/hide.\r\n */\n\n jQuery('#rmp-preview-iframe').on('load', function () {\n jQuery('#rmp-preview-iframe-loader').hide();\n jQuery('#rmp-menu-update-notification').remove();\n jQuery('#rmp-preview-iframe').show();\n jQuery('#rmp-preview-iframe').contents().find('a').on('click', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var url = jQuery(this).attr('href'); // Prevent to load the customizer page on preview aria.\n\n if ('#' == url) {\n return;\n }\n\n if (url.indexOf('?') >= 0) {\n url = url + '&rmp_preview_mode=true';\n } else {\n url = url + '?rmp_preview_mode=true';\n }\n\n jQuery('#rmp-preview-iframe').attr('src', url);\n });\n });\n /**\r\n * Save the theme as template.\r\n *\r\n * @since 4.0.0\r\n *\r\n * @fires Click\r\n */\n\n jQuery('button#rmp-save-theme').on('click', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var themeName = jQuery('#rmp-save-theme-name').val();\n\n if (3 > themeName.length) {\n alert('Please give meaning full name to this theme');\n return;\n }\n\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_theme',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': themeName,\n 'menu_id': jQuery('#menu_id').val(),\n 'form': jQuery('#rmp-editor-form').serialize()\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error2) {\n console.log(_error2.statusText);\n },\n success: function success(response) {\n jQuery(e.target).parents('.rmp-dialog-contents').append('<div class=\"notice notice-success settings-error is-dismissible\"><p>' + response.data.message + '</p></div>');\n }\n });\n });\n /**\r\n * Ajax call to save the menu settings when click on update.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires click\r\n */\n\n jQuery(document).on('click', 'button#rmp-save-menu-options,#rmp-menu-quick-update-button', function (e) {\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_menu_action',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'form': jQuery('#rmp-editor-form').serialize()\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-preview-iframe-loader').show();\n },\n error: function error(_error3) {\n console.log(_error3.statusText);\n jQuery('#rmp-preview-iframe-loader').hide();\n },\n success: function success(response) {\n // If options is updated successfully then reload the iframe.\n if (response.success) {\n var url = jQuery('#rmp-preview-iframe').attr('src');\n jQuery('#rmp-preview-iframe').attr('src', url);\n }\n }\n });\n }); // Initiate the color picker instances.\n\n jQuery('.rmp-color-input').wpColorPicker(); // Fix events glitch on color textbox.\n\n jQuery('.rmp-color-input').removeAttr('style');\n jQuery(document).find('.rmp-color-input').off('focus'); // Initiate the tab elements.\n\n jQuery('.tabs,#rmp-setting-tabs').tabs({\n hide: {\n effect: 'explode',\n duration: 1000\n },\n show: {\n effect: 'explode',\n duration: 800\n },\n active: 0\n }); // Active tabs under ordering elements.\n\n jQuery('.nav-tab-wrapper').on('click', '.nav-tab', function (e) {\n jQuery('.nav-tab-wrapper .nav-tab').removeClass('nav-tab-active');\n jQuery(this).addClass('nav-tab-active');\n });\n /**\r\n * Check open/close of device options switcher.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires click\r\n */\n\n jQuery('.rmp-device-switcher').on('click', function () {\n var isOpen = jQuery(this).hasClass('open');\n\n if (isOpen) {\n jQuery(this).removeClass('open');\n } else {\n jQuery('.rmp-device-switcher').removeClass('open');\n jQuery(this).addClass('open');\n }\n });\n /**\r\n * Change the option when select a device.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires click\r\n */\n\n jQuery('.rmp-device-switcher li').on('click', function () {\n var selectedDevice = jQuery(this).attr('data-device');\n var firstDevice = jQuery('.rmp-device-switcher li:first-child').attr('data-device');\n\n if (selectedDevice != firstDevice) {\n activeDeviceOptions(selectedDevice);\n\n if ('desktop' == selectedDevice) {\n jQuery('#rmp-preview-desktop').trigger('click');\n } else if ('tablet' == selectedDevice) {\n jQuery('#rmp-preview-tablet').trigger('click');\n } else {\n jQuery('#rmp-preview-mobile').trigger('click');\n }\n }\n });\n /**\r\n * Active all the device options in editor.\r\n *\r\n * @version 4.0.0;\r\n * @param {string} selectedDevice This device name which is active.\r\n */\n\n function activeDeviceOptions(selectedDevice) {\n var firstDevice = jQuery('.rmp-device-switcher li:first-child').attr('data-device');\n var selectedIcon = jQuery('.rmp-device-switcher li[data-device=' + selectedDevice + ']').html();\n var firstIcon = jQuery('.rmp-device-switcher li:first-child').html();\n jQuery('.rmp-device-switcher li').each(function () {\n if (jQuery(this).attr('data-device') === selectedDevice) {\n jQuery(this).html(firstIcon);\n jQuery(this).attr('data-device', firstDevice);\n } else if (jQuery(this).attr('data-device') === firstDevice) {\n jQuery(this).html(selectedIcon);\n jQuery(this).attr('data-device', selectedDevice);\n }\n });\n }\n /**\r\n * Close the device switcher when mouseup other places.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires mouseup\r\n */\n\n\n jQuery(document).on('mouseup', function (event) {\n var target = event.target;\n var deviceSwitcher = jQuery('.rmp-device-switcher');\n\n if (!deviceSwitcher.is(target) && 0 === deviceSwitcher.has(target).length) {\n deviceSwitcher.removeClass('open');\n }\n });\n /**\r\n * Active preview as per clicked device.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires Click\r\n */\n\n jQuery('#rmp-editor-footer .rmp-preview-device-wrapper').on('click', 'button', function (e) {\n jQuery('#rmp-editor-footer').find('.rmp-preview-device-wrapper button').removeClass('active');\n jQuery('#rmp-editor-footer').find('.rmp-preview-device-wrapper button').attr('aria-pressed', 'false');\n jQuery(this).addClass('active');\n jQuery(this).attr('aria-pressed', 'true');\n var device = jQuery(this).data('device');\n var deviceEditor = jQuery('#rmp-editor-wrapper');\n var allClasses = deviceEditor.attr('class').split(' ');\n allClasses.forEach(function (value) {\n if (value.includes('rmp-preview-')) {\n deviceEditor.removeClass(value);\n }\n });\n deviceEditor.addClass('rmp-preview-' + device);\n activeDeviceOptions(device);\n });\n /**\r\n * Instantiate the accordion elements.\r\n * @version 4.0.0\r\n */\n\n jQuery('.rmp-accordion-container,.rmp-sub-accordion-container').accordion({\n collapsible: true,\n heightStyle: 'content',\n animate: 200,\n active: 0\n });\n /**\r\n * Instantiate the draggable and sortable menu item order elements.\r\n * \t@version 4.0.0\r\n */\n\n jQuery('#rmp-menu-ordering-items').accordion().sortable({\n placeholder: 'sortable-placeholder',\n opacity: 0.9,\n cursor: 'move',\n delay: 150,\n forcePlaceholderSize: true,\n active: false\n });\n /**\r\n * Stop propagating when click on item control element.\r\n */\n\n jQuery('#tab-container .item-controls, #tab-header-bar .item-controls').on('click', function (event) {\n event.stopPropagation();\n });\n /**\r\n * Show/Hide tooltip for option description.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires click,mouseleave\r\n */\n\n jQuery('.rmp-tooltip-icon').on('click', function (e) {\n if (jQuery(this).hasClass('show-tooltip')) {\n return;\n } else {\n jQuery(this).addClass('show-tooltip');\n }\n\n var toolTipContents = jQuery(this).find('.rmp-tooltip-content');\n toolTipContents.css({\n 'left': e.pageX - toolTipContents.width() / 100 * 60,\n 'position': 'fixed',\n 'top': e.pageY - toolTipContents.height() - 10,\n 'bottom': 'unset'\n });\n toolTipContents.fadeIn();\n }).on('mouseleave', function () {\n jQuery(this).removeClass('show-tooltip');\n jQuery(this).find('.rmp-tooltip-content').fadeOut();\n });\n /**\r\n * Remove image from image picker\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires Click\r\n */\n\n jQuery('.rmp-image-picker ').on('click', '.rmp-image-picker-trash', function (e) {\n e.stopPropagation();\n e.preventDefault();\n jQuery(this).parent('.rmp-image-picker').siblings('input.rmp-image-url-input').val('');\n jQuery(this).parent('.rmp-image-picker').removeAttr('style');\n jQuery(this).remove();\n\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n addUpdateNotification();\n }\n });\n /**\r\n * Show/Hide the theme uploader section in theme page.\r\n */\n\n jQuery('#rmp-upload-new-theme').on('click', function () {\n jQuery('#rmp-menu-library-import').toggleClass('hide');\n });\n /**\r\n * Hide theme uploader section when click on cancel.\r\n */\n\n jQuery('#rmp-menu-library-import-form').on('click', '.cancel', function (e) {\n jQuery('#rmp-menu-library-import').addClass('hide');\n });\n /**\r\n * Upload the theme file using dropzone.\r\n *\r\n * @version 4.0.0\r\n */\n\n jQuery('#rmp-menu-library-import-form').dropzone({\n clickable: true,\n acceptedFiles: '.zip',\n uploadMultiple: false,\n success: function success(file, response) {\n location.reload();\n },\n totaluploadprogress: function totaluploadprogress() {\n jQuery('.rmp-page-loader').css('display', 'flex');\n }\n });\n /**\r\n * Open theme options in editor footer.\r\n */\n\n jQuery('#rmp-theme-action').on('click', function (e) {\n jQuery('#rmp-footer-theme-options').toggleClass('open');\n });\n /**\r\n * Show/Hide the save theme wizard.\r\n */\n\n jQuery('.rmp-theme-save-button, #rmp-menu-save-theme-wizard .rmp-dialog-wrap .close').on('click', function (e) {\n jQuery('#rmp-menu-save-theme-wizard').toggle();\n });\n /**\r\n * Delete the theme from theme page.\r\n */\n\n jQuery('.rmp-theme-delete').on('click', function (e) {\n e.preventDefault();\n /** Ask for delete confirmation */\n\n var isConfirm = confirm('Are you sure, You want to delete this theme ?');\n\n if (!isConfirm) {\n return;\n } //Show the loader on deleting theme.\n\n\n var current_theme = jQuery(this);\n current_theme.append('<span class=\"spinner is-active\"></span>');\n var themeName = jQuery(this).attr('data-theme');\n var themeType = jQuery(this).attr('data-theme-type').toLowerCase();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_theme_delete',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': themeName,\n 'theme_type': themeType\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error4) {\n console.log(_error4.statusText);\n },\n success: function success(response) {\n current_theme.find('.spinner').removeClass('is-active');\n\n if (response.success) {\n location.reload();\n } else {\n alert(response.data.message);\n }\n }\n });\n });\n /**\r\n * Apply the selected theme in current active menu in editor.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @fires click\r\n */\n\n jQuery(document).on('click', '.rmp-theme-apply', function (e) {\n //Show the overlay with loader.\n jQuery('.rmp-page-loader').css('display', 'flex');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_theme_apply',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'theme_name': jQuery(this).attr('theme-name'),\n 'theme_type': jQuery(this).attr('theme-type').toLowerCase(),\n 'menu_id': jQuery('#menu_id').val(),\n 'menu_to_use': jQuery('#rmp-menu-to-use').val()\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error5) {\n console.log(_error5.statusText);\n jQuery('.rmp-page-loader').hide();\n },\n success: function success(response) {\n if (response.success) {\n location.reload();\n } else {\n jQuery('.rmp-page-loader').hide();\n alert(response.data.message);\n }\n }\n });\n });\n /**\r\n * Save the global settings on click.\r\n * \r\n * @version 4.0.0\r\n * \r\n * @fires click\r\n */\n\n jQuery('.rmp-save-global-settings-button').on('click', function (e) {\n e.preventDefault();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_save_global_settings',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'form': jQuery('#rmp-global-settings').serialize()\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(this).prop('disabled', true);\n jQuery('.spinner').addClass('is-active');\n },\n error: function error(_error6) {\n console.log('Internal Error !' + _error6);\n },\n success: function success(response) {\n jQuery('.spinner').removeClass('is-active');\n jQuery(this).prop('disabled', false);\n }\n });\n });\n /**\r\n * Initiate multiple selectize option of editor.\r\n */\n\n jQuery('#rmp-keyboard-shortcut-close-menu,#rmp-keyboard-shortcut-open-menu').selectize({\n maxItems: 2,\n plugins: ['remove_button']\n });\n /**\r\n * Event to linked the group inputs.\r\n * \r\n * @fires Click\r\n */\n\n jQuery(document).on('click', 'button.rmp-group-input-linked', function () {\n jQuery(this).toggleClass('is-linked');\n });\n /**\r\n * Event to type on all sibblings input if linked.\r\n * \r\n * @fires keyup\r\n */\n\n jQuery(document).on('keyup', 'input.rmp-group-input', function (event) {\n var pressedKeys = this.value.toLocaleLowerCase();\n var parent = jQuery(this).parents('.rmp-input-group-control');\n var isLinked = parent.find('.is-linked');\n\n if (isLinked.length) {\n parent.find('input.rmp-group-input').val(pressedKeys);\n } else {\n jQuery(this).val(pressedKeys);\n }\n });\n /**\r\n * Function to add the notification and update button.\r\n */\n\n function addUpdateNotification() {\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n jQuery('#rmp-editor-main').prepend('<div id=\"rmp-menu-update-notification\" class=\"rmp-order-item rmp-order-item-description\">' + '<span> <span class=\"rmp-font-icon dashicons dashicons-warning \"></span> Update Required </span>' + '<a href=\"javascript:void(0)\" id=\"rmp-menu-quick-update-button\">UPDATE</a>' + '</div>');\n }\n }\n\n jQuery('form#rmp-editor-form').on('keyup change paste', 'input, select, textarea, radio, checkbox', function () {\n if (!jQuery(this).hasClass('no-updates')) {\n addUpdateNotification();\n }\n });\n jQuery(document).on('click', '#rmp-icon-dialog-select,.media-button-select,.rmp-icon-picker,.rmp-image-picker', function () {\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n addUpdateNotification();\n }\n });\n /**\r\n * Event to download exported menu settings as json file.\r\n *\r\n * @version 4.0.0 \r\n */\n\n jQuery('#rmp-export-menu-button').on('click', function (e) {\n e.preventDefault();\n var menu_id = jQuery('#rmp_export_menu_list').val();\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_export_menu',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_id': menu_id\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-export-menu-button').prop('disabled', true);\n },\n error: function error(_error7) {\n console.log(_error7.statusText);\n jQuery('#rmp-export-menu-button').prop('disabled', false);\n },\n success: function success(response) {\n jQuery('#rmp-export-menu-button').prop('disabled', false);\n\n if (response.data) {\n var menu_name = jQuery('#rmp_export_menu_list').children(\":selected\").text().trim().toLocaleLowerCase().split(' ').join('-');\n download_file(response.data, menu_name + '.json', 'application/json');\n }\n }\n });\n });\n /**\r\n * Function to download the content as file.\r\n * \r\n * @since 4.0.0\r\n * \r\n * @param {String} content Contents for file\r\n * @param {String} name Name of the file. \r\n * @param {String} type File type\r\n */\n\n function download_file(content, name, type) {\n var link = document.body.appendChild(document.createElement('a'));\n var file = new Blob([content], {\n type: type\n });\n link.href = URL.createObjectURL(file);\n link.download = name;\n link.click();\n }\n /**\r\n * Event to download exported menu settings as json file.\r\n *\r\n * @version 4.0.0 \r\n */\n\n\n jQuery('#rmp-import-menu-button').on('click', function (e) {\n e.preventDefault();\n var menu_id = jQuery('#rmp_import_menu_list').val();\n\n if (!menu_id) {\n alert('Please create menu first ! ');\n return;\n }\n\n var file_data = jQuery('#rmp_input_import_file')[0].files[0];\n\n if (!file_data) {\n alert('Choose export file ! ');\n return;\n }\n\n var form_data = new FormData();\n form_data.append('file', file_data);\n form_data.append('ajax_nonce', rmpObject.ajax_nonce);\n form_data.append('menu_id', menu_id);\n form_data.append('action', 'rmp_import_menu');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: form_data,\n type: 'POST',\n cache: false,\n contentType: false,\n processData: false,\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery('#rmp-import-menu-button').prop('disabled', true);\n },\n error: function error(_error8) {\n console.log(_error8.statusText);\n jQuery('#rmp-import-menu-button').prop('disabled', false);\n },\n success: function success(response) {\n jQuery('#rmp-import-menu-button').prop('disabled', false);\n noticeClass = 'notice-error';\n\n if (response.success) {\n noticeClass = 'notice-success';\n jQuery('#rmp_input_import_file').val('');\n }\n\n jQuery('#rmp-global-settings').before('<div class=\"notice ' + noticeClass + ' settings-error is-dismissible\"> <p>' + response.data.message + '</p></div>');\n setTimeout(function () {\n jQuery('#rmp-global-settings').parent().find('.notice').remove();\n }, 3000);\n }\n });\n });\n /**\r\n * Function to manage menu container animation options.\r\n *\r\n * @param {String} optionValue \r\n */\n\n function updateMenuContainerAnimationOptions(optionValue) {\n if ('push' === optionValue) {\n jQuery('#rmp-page-wrapper').parents('.rmp-input-control-wrapper').fadeIn();\n } else {\n jQuery('#rmp-page-wrapper').parents('.rmp-input-control-wrapper').fadeOut();\n }\n\n if ('fade' === optionValue) {\n jQuery('#rmp-menu-appear-from option[value=\"top\"]').hide();\n jQuery('#rmp-menu-appear-from option[value=\"bottom\"]').hide();\n } else {\n jQuery('#rmp-menu-appear-from option[value=\"top\"]').show();\n jQuery('#rmp-menu-appear-from option[value=\"bottom\"]').show();\n }\n } // Menu container animation type and their options.\n\n\n updateMenuContainerAnimationOptions(jQuery('#rmp-animation-type').val());\n jQuery('#rmp-editor-wrapper').on('change', '#rmp-animation-type', function (e) {\n var optionValue = jQuery(this).val();\n updateMenuContainerAnimationOptions(optionValue);\n });\n /**\r\n * Event to back on home page under preview screen.\r\n *\r\n * @since 4.1.0\r\n *\r\n * @fires click\r\n *\r\n * @return void\r\n */\n\n jQuery('#rmp-preview-wrapper').on('click', function () {\n var url = window.location.href;\n url = url.substring(0, url.indexOf('wp-admin')) + '?rmp_preview_mode=true';\n jQuery('#rmp-preview-iframe-loader').show();\n jQuery('#rmp-preview-iframe').attr('src', url);\n });\n /** Call ajax to hide admin notice permanent. */\n\n jQuery('.notice-responsive-menu').on('click', '.notice-dismiss', function (event) {\n event.preventDefault();\n jQuery.ajax({\n type: \"POST\",\n url: rmpObject.ajaxURL,\n data: 'action=rmp_upgrade_admin_notice_dismiss'\n });\n });\n});\n\n//# sourceURL=webpack:///./assets/admin/js/rmp-admin.js?")},"./assets/admin/js/rmp-editor.js":function(module,exports){eval("/**\r\n * This file container the editor multi level features.\r\n *\r\n * @version 4.0.0\r\n *\r\n * @type {Object}\r\n */\nvar rmpEditor = {\n editorSidebar: '#rmp-editor-wrapper',\n sidebarDrawer: 'button.collapse-sidebar',\n mainForm: '#rmp-editor-form',\n editorContainer: '#rmp-editor-main',\n topParentNav: '#rmp-editor-nav',\n topParentTab: '#rmp-editor-pane',\n childTabs: '.rmp-accordions',\n tabItem: 'li.rmp-tab-item',\n titleLogo: '.rmp-editor-header-logo',\n closeButton: '.rmp-editor-header-close',\n titleText: '.rmp-editor-header-title',\n backButton: '.rmp-editor-header-back',\n tabId: null,\n level: 0,\n triggerBack: function triggerBack() {\n this.level--;\n parentId = jQuery('#' + this.tabId).attr('aria-parent');\n jQuery('#' + parentId).show();\n var title = jQuery('#' + parentId).attr('aria-label');\n this.updateHeader(title);\n jQuery('#' + this.tabId).hide();\n this.tabId = parentId;\n },\n updatePanel: function updatePanel(current) {\n this.tabId = current.attr('aria-owns');\n jQuery('#' + this.tabId).show();\n parentId = current.parent('ul').parent('div').attr('id');\n jQuery('#' + this.tabId).attr('aria-parent', parentId);\n jQuery('#' + parentId).hide();\n },\n updateHeader: function updateHeader(title) {\n if (0 == this.level) {\n jQuery(this.titleLogo).find('img').show();\n jQuery(this.closeButton).show();\n jQuery(this.backButton).hide();\n } else if (1 == this.level) {\n jQuery(this.backButton).css('display', 'flex');\n jQuery(this.titleLogo).find('img').hide();\n jQuery(this.closeButton).hide();\n }\n\n jQuery(this.titleText).text(title);\n },\n init: function init() {\n var self = this; // Move on next panel when click on item.\n\n jQuery(self.editorContainer).on('click', self.tabItem, function (e) {\n e.stopPropagation();\n e.preventDefault();\n current = jQuery(this);\n self.level++;\n self.updateHeader(current.text());\n self.updatePanel(current);\n }); // Back from inner panel when click on back button.\n\n jQuery(self.backButton).on('click', function (e) {\n e.stopPropagation();\n self.triggerBack();\n }); // Open/Close the editor setting sidebar.\n\n jQuery(self.sidebarDrawer).on('click', function (e) {\n jQuery(self.editorSidebar).toggleClass('expanded collapsed');\n });\n }\n};\nrmpEditor.init();\n\n//# sourceURL=webpack:///./assets/admin/js/rmp-editor.js?")},"./assets/admin/js/rmp-icon.js":function(module,exports){eval("/**\r\n * This file contain the script to handle the icon wizard and it's operation.\r\n *\r\n * @version 4.0.0\r\n */\njQuery(document).ready(function () {\n var RMP_Icon = {\n iconSelect: '#rmp-icon-dialog-select',\n iconContainer: '.rmp-menu-icons-dialog',\n clearSelector: '#rmp-icon-dialog-clear',\n closeSelector: '.rmp-menu-icons-dialog .rmp-dialog-header button.close',\n clear: function clear() {\n var self = this;\n jQuery(self.clearSelector).on('click', function () {\n jQuery(self.iconContainer).find('input').prop('checked', false);\n });\n },\n closeDialog: function closeDialog() {\n var self = this;\n jQuery(self.closeSelector).on('click', function () {\n jQuery(self.iconContainer).hide();\n });\n },\n openDialog: function openDialog(iconChooser) {\n var self = this;\n jQuery(iconChooser).on('click', function (e) {\n e.stopPropagation();\n jQuery(self.iconContainer).show();\n jQuery(self.iconSelect).attr('data-click', jQuery(e.target).attr('id'));\n });\n },\n getIconElementWrap: function getIconElementWrap(icon_class) {\n if (icon_class.includes('material-icons')) {\n icon_class = icon_class.replace('material-icons', '');\n return '<span class=\"rmp-font-icon material-icons\">' + icon_class + '</span>';\n }\n\n return '<span class=\"rmp-font-icon ' + icon_class + ' \"></span>';\n },\n removeIcon: function removeIcon(iconChooser) {\n jQuery(iconChooser).on('click', '.rmp-icon-picker-trash', function (e) {\n e.preventDefault();\n e.stopPropagation();\n jQuery(this).parent('.rmp-icon-picker').siblings('input.rmp-icon-hidden-input').val('');\n jQuery(this).siblings('.rmp-font-icon').remove();\n jQuery(this).parent('.rmp-icon-picker').removeAttr('data-icon');\n jQuery(this).remove();\n\n if (!jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length) {\n jQuery('#rmp-editor-main').prepend('<div id=\"rmp-menu-update-notification\" class=\"rmp-order-item rmp-order-item-description\">' + '<span> <span class=\"rmp-font-icon dashicons dashicons-warning \"></span> Update Required </span>' + '<a href=\"javascript:void(0)\" id=\"rmp-menu-quick-update-button\">UPDATE</a>' + '</div>');\n }\n });\n },\n getIcon: function getIcon() {\n var self = this;\n jQuery(document).on('click', this.iconSelect, function () {\n icon_class = jQuery(self.iconContainer).find('input:checked').val();\n clicker = '#' + jQuery(self.iconSelect).attr('data-click');\n icon_wrap = self.getIconElementWrap(icon_class);\n jQuery(clicker).find('.rmp-font-icon').remove();\n jQuery(clicker).prev('input.rmp-icon-hidden-input').val(icon_wrap);\n jQuery(clicker).append(icon_wrap);\n jQuery(clicker).attr('data-icon', true);\n jQuery(clicker).find('.rmp-icon-picker-trash').remove();\n jQuery(clicker).append('<i class=\"rmp-icon-picker-trash dashicons dashicons-trash\" aria-hidden=\"true\"></i>');\n jQuery(self.iconSelect).removeAttr('data-click');\n jQuery(self.closeSelector).click();\n jQuery(clicker).prev('input').first().focus();\n });\n },\n init: function init(iconChooser) {\n this.openDialog(iconChooser);\n this.removeIcon(iconChooser);\n this.getIcon();\n this.clear();\n this.closeDialog();\n jQuery('#rmp-icon-search').on('keyup', _.debounce(this.searchIcon, 500));\n jQuery('#rmp-icon-search').on('keyup', function () {\n var query_string = this.value.toLocaleLowerCase();\n\n if (query_string.length) {\n if (!jQuery('#rmp-icon-search-typing-message').length) {\n jQuery(this).after('<span id=\"rmp-icon-search-typing-message\"> Waiting for more keystrokes... </span>');\n } else {\n jQuery('#rmp-icon-search-typing-message').html('Waiting for more keystrokes...');\n }\n }\n });\n /**\r\n * Create menu item icon selector.\r\n */\n\n jQuery(document).on('click', '.delete-menu-item-icon', function () {\n jQuery(this).closest('.rmp-menu-item-icon-container').remove();\n });\n },\n searchIcon: function searchIcon(e) {\n jQuery('#rmp-icon-search-typing-message').html('Please wait moment..');\n var query_string = this.value.toLocaleLowerCase();\n var activeTab = jQuery('.rmp-menu-icons-dialog').find('.nav-tab-active');\n\n if (!activeTab.length) {\n activeTab = jQuery('.rmp-menu-icons-dialog').find('.nav-tab').first();\n }\n\n icon_container = activeTab.attr('href');\n var icon_selector = jQuery(icon_container + ' .font-icon');\n var is_exist = false;\n icon_selector.each(function () {\n var icon_label = jQuery(this).children('input').val().toLocaleLowerCase();\n\n if (icon_label.includes(query_string)) {\n jQuery(this).show();\n is_exist = true;\n } else {\n jQuery(this).hide();\n }\n });\n\n if (is_exist) {\n jQuery('#rmp-icon-search-typing-message').html('Done, Check results..');\n } else {\n jQuery('#rmp-icon-search-typing-message').html('Sorry, Not found..');\n }\n }\n };\n RMP_Icon.init('.rmp-icon-picker');\n});\n\n//# sourceURL=webpack:///./assets/admin/js/rmp-icon.js?")},"./assets/admin/js/rmp-menu-wizard.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/**\r\n * This is js hook scripts file for responsive menu.\r\n *\r\n * @file This files defines the rmpNewMenuWizard object.\r\n * @author ExpressTech System.\r\n *\r\n * @since 4.1.0\r\n *\r\n * @package responsive-menu-pro\r\n */\n\n/**\r\n * Hooks class.\r\n *\r\n * @type {Object}\r\n *\r\n * @since 4.1.0\r\n */\n\nvar rmpMenuWizard = {\n /**\r\n * Initialize.\r\n *\r\n * @return {void}\r\n */\n init: function init() {\n this.setProps();\n },\n\n /**\r\n * Set properties and selectors.\r\n *\r\n * @return {void}\r\n */\n setProps: function setProps() {\n var _this = this;\n\n //Assign wizard container element id.\n var menuWizardContainer = jQuery('#rmp-new-menu-wizard'); //Open new create menu wizard on click event.\n\n jQuery(document).on('click', 'a.page-title-action', function (e) {\n e.preventDefault();\n menuWizardContainer.show();\n }); //Close the new menu wizard.\n\n jQuery('#rmp-new-menu-wizard .rmp-dialog-header button.close').on('click', function () {\n menuWizardContainer.hide();\n }); //Show/Hide the page selection input control.\n\n menuWizardContainer.on('change', '.rmp-menu-display-option', function (e) {\n var optionValue = jQuery(this).val();\n\n if ('exclude-pages' === optionValue || 'include-pages' === optionValue) {\n jQuery('#rmp-menu-page-selector').show();\n return;\n }\n\n jQuery('#rmp-menu-page-selector').hide();\n }); //Show/Hide change theme wizard in customizer page.\n\n jQuery('.rmp-theme-change-button').on('click', function (e) {\n menuWizardContainer.toggle();\n }); //Multi step form event for next button.\n\n jQuery('#rmp-menu-next-step').on('click', function () {\n _this.nextSection();\n }); //Multi step form event for top item label.\n\n jQuery('li.rmp-new-menu-step').on('click', function (e) {\n var index = jQuery(e.currentTarget).index();\n\n _this.goToSection(index);\n }); //Call ajax to save the new create menu.\n\n jQuery('#rmp-create-new-menu').on('click', function (e) {\n e.preventDefault();\n var menuName = jQuery('#rmp-menu-name');\n var themeName = jQuery('.rmp-theme-option:checked').val();\n\n if (themeName == undefined) {\n themeName = '';\n }\n\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_create_new_menu',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_name': menuName.val(),\n 'menu_to_hide': jQuery('#rmp-hide-menu').val(),\n 'menu_to_use': jQuery('#rmp-menu-to-use').val(),\n 'menu_show_on_pages': jQuery('#rmp-menu-display-on-pages').val(),\n 'menu_show_on': jQuery('.rmp-menu-display-option').val(),\n 'menu_theme': themeName,\n 'theme_type': jQuery('.rmp-theme-option:checked').attr('theme-type')\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(e.currentTarget).prop('disabled', true);\n jQuery('.spinner').addClass('is-active');\n },\n error: function error(_error) {\n console.log('Internal Error !');\n jQuery('#rmp-create-new-menu').prop('disabled', false);\n jQuery('.spinner').removeClass('is-active');\n },\n success: function success(response) {\n jQuery('.spinner').removeClass('is-active');\n jQuery('#rmp-create-new-menu').prop('disabled', false);\n\n if (response.success) {\n window.location.href = response.data.customize_url;\n } else {\n alert(response.data.message);\n }\n }\n });\n }); //Ajax call to upload the theme.\n\n jQuery('#rmp-theme-upload').on('click', function (e) {\n e.preventDefault();\n var formData = new FormData();\n var file = jQuery('#rmp_menu_theme_zip').prop('files')[0];\n formData.append('file', file);\n formData.append('action', 'rmp_menu_theme_upload');\n formData.append('ajax_nonce', rmpObject.ajax_nonce);\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: formData,\n type: 'POST',\n processData: false,\n contentType: false,\n dataType: 'json',\n success: function success(response) {\n jQuery('#rmp_menu_theme_zip').val('');\n alert(response.data.message);\n\n if (response.data.html) {\n jQuery('#rmp-new-menu-wizard').find('#tabs-1').html(response.data.html);\n jQuery('#rmp-menu-library-import').addClass('hide');\n }\n }\n });\n }); //Ajax call to check the recent changes the theme api.\n\n jQuery('.rmp-call-theme-api-button').on('click', function (e) {\n if (!jQuery(e.currentTarget).hasClass('rmp-call-theme-api-button')) {\n return;\n }\n\n jQuery('#rmp-new-menu-wizard').find('.rmp-page-loader').css('display', 'flex');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_call_theme_api',\n 'ajax_nonce': rmpObject.ajax_nonce\n },\n type: 'POST',\n dataType: 'json',\n error: function error(_error2) {\n jQuery('#rmp-new-menu-wizard').find('.rmp-page-loader').hide();\n jQuery('#rmp-new-menu-wizard').find('#tabs-2 .rmp_theme_grids').html('Internal Error !');\n },\n success: function success(response) {\n if (response.data.html) {\n jQuery('#rmp-new-menu-wizard').find('#tabs-2 .rmp_theme_grids').html(response.data.html);\n jQuery(e.currentTarget).removeClass('rmp-call-theme-api-button');\n }\n }\n });\n });\n },\n\n /**\r\n * Jump to the next section of wizard.\r\n *\r\n * @return {void}\r\n */\n nextSection: function nextSection() {\n var currectSectionIndex = jQuery('div.rmp-menu-section.current').index();\n this.goToSection(currectSectionIndex + 1);\n },\n\n /**\r\n * Show the indexed section in wizard.\r\n *\r\n * @return {void}\r\n */\n goToSection: function goToSection(currectSectionIndex) {\n if (1 <= currectSectionIndex) {\n jQuery('#rmp-create-new-menu').show();\n jQuery('#rmp-menu-next-step').hide();\n } else {\n jQuery('#rmp-create-new-menu').hide();\n jQuery('#rmp-menu-next-step').show();\n }\n\n jQuery('div.rmp-menu-section').eq(currectSectionIndex).addClass('current').siblings().removeClass('current');\n jQuery('li.rmp-new-menu-step').eq(currectSectionIndex).addClass('current').siblings().removeClass('current');\n }\n};\nrmpMenuWizard.init();\n/* harmony default export */ __webpack_exports__[\"default\"] = (rmpMenuWizard);\n\n//# sourceURL=webpack:///./assets/admin/js/rmp-menu-wizard.js?")},"./assets/admin/js/rmp-preview.js":function(module,exports){eval("/**\r\n * This is preview scripts file for responsive menu customizer.\r\n *\r\n * @file This files defines the rmpHook object.\r\n * @author ExpressTech System.\r\n * @type {Object}\r\n *\r\n * @since 4.0.0\r\n *\r\n * @package responsive-menu-pro\r\n */\n\n/**\r\n * Hooks class.\r\n *\r\n * @type {Object}\r\n *\r\n * @since 4.0.0\r\n */\nvar rmpHook = {\n hooks: [],\n isBreak: false,\n\n /**\r\n * Function to register the hook.\r\n *\r\n * @since 4.0.0\r\n *\r\n * @param String name Hook Name.\r\n * @param function callback Associated function.\r\n */\n register: function register(name, callback) {\n if ('undefined' == typeof rmpHook.hooks[name]) {\n rmpHook.hooks[name] = [];\n }\n\n rmpHook.hooks[name].push(callback);\n },\n\n /**\r\n * Function to call the hook.\r\n *\r\n * @since 4.0.0\r\n *\r\n * @param String name Hook Name.\r\n * @param function params Paramter list.\r\n */\n call: function call(name, params) {\n if ('undefined' != typeof rmpHook.hooks[name]) {\n for (var i = 0; i < rmpHook.hooks[name].length; ++i) {\n var output = rmpHook.hooks[name][i](params);\n\n if (false == output) {\n rmpHook.isBreak = true;\n return false;\n }\n\n return output;\n }\n }\n\n return true;\n }\n};\n/**\r\n * Register function to color the menu elements.\r\n * \r\n * @since 4.0.0\r\n * \r\n * @param {Object} args List of inputs.\r\n * @return {String}\r\n */\n\nrmpHook.register('rmp_color_style', function (args) {\n if (!args) {\n return false;\n } // Set the state/pseudo class.\n\n\n if ('hover' == args.state) {\n args.outputSelector = args.outputSelector + ':hover';\n } else if ('placeholder' == args.state) {\n args.outputSelector = args.outputSelector + '::placeholder';\n } else if ('before' == args.state) {\n args.outputSelector = args.outputSelector + '::before';\n } else if ('after' == args.state) {\n args.outputSelector = args.outputSelector + '::after';\n } //Prepare css string and return.\n\n\n return args.outputSelector + '{ ' + args.attr + ' : ' + args.value + ';}';\n});\n/**\r\n * rmpPreview class\r\n * \r\n * @since 4.0.0\r\n * \r\n * @type {Object}\r\n */\n\nwindow.RMP_Preview = {\n iframe: '#rmp-preview-iframe',\n menuId: jQuery('#menu_id').val(),\n mobile_breakpoint: jQuery('#rmp-menu-mobile-breakpoint').val() + 'px',\n tablet_breakpoint: jQuery('#rmp-menu-tablet-breakpoint').val() + 'px',\n active_device: jQuery('#rmp_device_mode'),\n menuContainer: '#rmp-container-' + self.menuId,\n onTyping: function onTyping(inputSelector, outputSelector, type) {\n var meta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(inputSelector).on('keyup change paste', function () {\n switch (type) {\n case 'border-radius':\n var value = jQuery(this).val();\n css = outputSelector + '{ border-radius : ' + value + 'px;}';\n self.inlineCssInjector(css);\n break;\n\n case 'section-padding':\n var value = jQuery(this).val();\n var is_linked = jQuery(this).parents('.rmp-input-group-control').find('.rmp-group-input-linked').hasClass('is-linked');\n var attr = 'padding';\n\n if (!is_linked) {\n pos = jQuery(this).attr('data-input');\n attr = attr + '-' + pos;\n }\n\n css = outputSelector + '{ ' + attr + ' : ' + value + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-text':\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).html(this.value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').before('<div class=\"rmp-trigger-label rmp-trigger-label-top\"><span class=\"rmp-trigger-text\">\"' + this.value + '\"</span></div>');\n }\n\n break;\n\n case 'trigger-text-open':\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).html(this.value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').before('<div class=\"rmp-trigger-label rmp-trigger-label-top\"><span class=\"rmp-trigger-text-open\">\"' + this.value + '\"</span></div>');\n }\n\n break;\n\n case 'text':\n iframe.contents().find(outputSelector).html(this.value);\n break;\n\n case 'placeholder':\n iframe.contents().find(outputSelector).attr('placeholder', this.value);\n break;\n\n case 'href':\n iframe.contents().find(outputSelector).attr('href', this.value);\n break;\n\n case 'font-size':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n var value = jQuery(this).val();\n css = outputSelector + '{ font-size : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n css = outputSelector + '{ width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'height':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ height : ' + (this.value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'line-height':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ line-height : ' + (this.value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'min-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ min-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'max-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit.length) {\n unit = 'px';\n }\n\n css = outputSelector + '{ max-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side-position':\n side = jQuery('#rmp-menu-button-left-or-right').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n css = outputSelector + '{ ' + side + ' :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'top':\n value = jQuery(this).val();\n unit = jQuery('#rmp-menu-button-top-unit').val();\n css = outputSelector + '{ top :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'border-width':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n css = outputSelector + '{ border-width : ' + (this.value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'padding':\n var unit = jQuery(this).next('.is-unit').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n if (meta == 'lr') {\n css = outputSelector + '{ padding : 0 ' + (this.value + unit) + ';}';\n }\n\n self.inlineCssInjector(css);\n break;\n }\n });\n },\n bindImage: function bindImage(inputSelector, outputSelector, type) {\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(document).on('click', inputSelector, function (e) {\n e.preventDefault();\n var button = jQuery(this),\n custom_uploader = wp.media({\n title: 'Select image',\n library: {\n type: 'image'\n },\n button: {\n text: 'Use this image'\n },\n multiple: false\n }).on('select', function () {\n var attachment = custom_uploader.state().get('selection').first().toJSON();\n jQuery(e.target).prev('input.rmp-image-url-input').val(attachment.url);\n jQuery(e.target).css('background-image', 'url(' + attachment.url + ')');\n jQuery(e.target).append('<i class=\"rmp-image-picker-trash dashicons dashicons-trash\" aria-hidden=\"true\"></i>');\n\n if (type == 'img-src') {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else if (type == 'background') {\n css = outputSelector + '{ background-image : url(' + attachment.url + ');}';\n self.inlineCssInjector(css);\n } else if (type == 'trigger-icon') {\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<img class=\"rmp-trigger-icon rmp-trigger-icon-inactive\" src=\"' + attachment.url + '\"/>');\n }\n } else if (type == 'trigger-icon-open') {\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).attr('src', attachment.url);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<img class=\"rmp-trigger-icon rmp-trigger-icon-active\" src=\"' + attachment.url + '\"/>');\n }\n }\n }).open();\n });\n },\n toggleElements: function toggleElements(inputSelector, outputSelector) {\n var self = this;\n jQuery(inputSelector).on('change', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n if (jQuery(this).is(':checked')) {\n iframe.contents().find(outputSelector).fadeIn(500);\n } else {\n iframe.contents().find(outputSelector).fadeOut(500);\n }\n } else {\n e.preventDefault();\n var menuId = jQuery('#menu_id').val(),\n toggle_on = jQuery(this).data('toggle');\n jQuery.ajax({\n url: rmpObject.ajaxURL,\n data: {\n 'action': 'rmp_enable_menu_item',\n 'ajax_nonce': rmpObject.ajax_nonce,\n 'menu_id': menuId,\n 'menu_element': toggle_on\n },\n type: 'POST',\n dataType: 'json',\n beforeSend: function beforeSend() {\n jQuery(this).prop('disabled', true);\n jQuery('#iframe-spinner').show();\n },\n error: function error(_error) {\n console.log('Internal Error !');\n jQuery(this).prop('disabled', false);\n jQuery('#iframe-spinner').hide();\n },\n success: function success(response) {\n if (response.data.markup) {\n iframe.contents().find('#rmp-container-' + self.menuId).append(response.data.markup);\n self.orderMenuElements();\n }\n\n jQuery(this).prop('disabled', false);\n jQuery('#iframe-spinner').hide();\n }\n });\n }\n });\n },\n orderMenuElements: function orderMenuElements() {\n var list = [];\n var self = this;\n var iframeContents = jQuery(self.iframe).contents();\n jQuery('#tab-container .item-title').each(function () {\n var val = jQuery(this).text().toLocaleLowerCase().trim();\n\n if (val == 'title') {\n list.push(iframeContents.find(self.menuTitle));\n iframeContents.find(self.menuTitle).remove();\n } else if (val == 'search') {\n list.push(iframeContents.find(self.menuSearch));\n iframeContents.find(self.menuSearch).remove();\n } else if (val == 'menu') {\n list.push(iframeContents.find(self.menuWrap));\n iframeContents.find(self.menuWrap).remove();\n } else {\n list.push(iframeContents.find(self.menuContents));\n iframeContents.find(self.menuContents).remove();\n }\n });\n list.forEach(function (menuElement) {\n iframeContents.find(self.menuContainer).append(menuElement);\n });\n },\n\n /**\r\n * Function to bind the color input with option and elements.\r\n * \r\n * @version 4.0.0\r\n * \r\n * @param {String} inputSelector \r\n * @param {String} outputSelector \r\n * @param {String} attr \r\n * @param {String} state \r\n */\n bindColor: function bindColor(inputSelector, outputSelector, attr, state) {\n var self = this;\n jQuery(inputSelector).wpColorPicker({\n change: function change(event, ui) {\n var value = ui.color.toString();\n var css = rmpHook.call('rmp_color_style', {\n 'outputSelector': outputSelector,\n 'attr': attr,\n 'value': value,\n 'state': state\n });\n\n if (jQuery(inputSelector).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n }\n });\n },\n mediaQuery: function mediaQuery(css) {\n var self = this;\n self.tablet_breakpoint = jQuery('#rmp-menu-tablet-breakpoint').val() + 'px';\n css = '@media screen and (max-width: ' + self.tablet_breakpoint + ' ) {' + css + '}';\n return css;\n },\n inlineCssInjector: function inlineCssInjector(css) {\n var self = this;\n var iframe = jQuery(self.iframe);\n var styleElement = iframe.contents().find('#rmp-inline-css-' + self.menuId);\n\n if (styleElement.length) {\n styleElement.append(css);\n } else {\n style = '<style id=\"rmp-inline-css-' + self.menuId + '\">' + css + '</style>';\n iframe.contents().find('head').append(style);\n }\n },\n changeInput: function changeInput(inputSelector, outputSelector, attr) {\n var meta = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var self = this;\n var iframe = jQuery(self.iframe);\n jQuery(inputSelector).on('change', function (e) {\n switch (attr) {\n case 'height-unit':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ height : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'line-height-unit':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ line-height : ' + (value + unit) + ';}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'width-unit':\n var value = jQuery(this).prev('input').val();\n var unit = jQuery(this).val();\n css = outputSelector + '{ width : ' + (value + unit) + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'font-size':\n value = jQuery(this).prev('input').val();\n unit = jQuery(this).val();\n css = outputSelector + '{ font-size :' + value + unit + ' !important;}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'font-family':\n value = jQuery(this).val();\n css = outputSelector + '{ font-family :' + value + ' !important;}';\n\n if (jQuery(this).attr('multi-device')) {\n css = self.mediaQuery(css);\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'font-weight':\n value = jQuery(this).val();\n css = outputSelector + '{ font-weight :' + value + ';}';\n self.inlineCssInjector(css);\n break;\n\n case 'padding-unit':\n var unit = jQuery(this).val();\n var value = jQuery(this).prev('input').val();\n\n if (!unit) {\n unit = 'px';\n }\n\n if (meta == 'lr') {\n css = outputSelector + '{ padding : 0 ' + (value + unit) + ';}';\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'letter-spacing':\n value = jQuery(this).val();\n css = outputSelector + '{ letter-spacing :' + value + 'px; }';\n self.inlineCssInjector(css);\n break;\n\n case 'position-alignment':\n if (iframe.contents().find(outputSelector).length) {\n position = jQuery(this).val();\n var rmpTriggerBox = iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box');\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').remove();\n\n if (position == 'top' || position == 'left') {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId).append(rmpTriggerBox);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId).prepend(rmpTriggerBox);\n }\n }\n\n break;\n\n case 'trigger-animation':\n value = jQuery(this).val();\n var new_class = 'rmp-menu-trigger-' + value;\n all_class = iframe.contents().find(outputSelector).attr('class').split(\" \");\n all_class.forEach(function (value) {\n if (value.includes('rmp-menu-trigger-')) {\n iframe.contents().find(outputSelector).removeClass(value);\n iframe.contents().find(outputSelector).addClass(new_class);\n }\n });\n break;\n\n case 'top':\n var unit = jQuery(this).val();\n value = jQuery(this).prev('input').val();\n css = outputSelector + '{ top :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side-position':\n side = jQuery('#rmp-menu-button-left-or-right').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n css = outputSelector + '{ ' + side + ' :' + (value + unit) + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-side':\n side = jQuery(this).val();\n value = jQuery('#rmp-menu-button-distance-from-side').val();\n unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();\n\n if (side == 'left') {\n css = outputSelector + '{' + side + ':' + (value + unit) + ' !important;right:unset !important}';\n } else {\n css = outputSelector + '{' + side + ':' + (value + unit) + ' !important;left:unset !important}';\n }\n\n self.inlineCssInjector(css);\n break;\n\n case 'position':\n value = jQuery(this).val();\n css = outputSelector + '{ position :' + value + ' !important;}';\n self.inlineCssInjector(css);\n break;\n\n case 'trigger-background':\n if (jQuery(this).is(':checked')) {\n iframe.contents().find(outputSelector).attr('style', 'background:unset !important;');\n } else {\n iframe.contents().find(outputSelector).removeAttr('style');\n }\n\n break;\n\n case 'target':\n var value = jQuery(this).val();\n\n if (!value.length) {\n value = '_self';\n }\n\n iframe.contents().find(outputSelector).attr('target', value);\n break;\n\n case 'text-align':\n var value = jQuery(this).val();\n iframe.contents().find(outputSelector).css({\n 'text-align': value\n });\n break;\n }\n });\n },\n init: function init() {\n var self = this; //Mobile menu elements.\n\n self.menuContainer = '#rmp-container-' + self.menuId;\n self.menuTitle = '#rmp-menu-title-' + self.menuId;\n self.menuSearch = '#rmp-search-box-' + self.menuId;\n self.menuWrap = '#rmp-menu-wrap-' + self.menuId;\n self.menuContents = '#rmp-menu-additional-content-' + self.menuId; //Menu container background color.\n\n self.bindColor('#rmp-container-background-colour', '#rmp-container-' + self.menuId, 'background', ''); //Menu background.\n\n self.bindColor('#rmp-menu-background-colour', '#rmp-menu-wrap-' + self.menuId, 'background'); //Menu title section background color.\n\n self.bindColor('#rmp-menu-title-background-colour', '#rmp-menu-title-' + self.menuId, 'background'); //Menu title section background hover color.\n\n self.bindColor('#rmp-menu-title-background-hover-colour', '#rmp-menu-title-' + self.menuId, 'background', 'hover'); // Menu item trigger\n\n self.bindColor('#rmp-menu-sub-arrow-shape-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'color');\n self.bindColor('#rmp-menu-sub-arrow-shape-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-shape-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'color');\n self.bindColor('#rmp-menu-sub-arrow-shape-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-color');\n self.bindColor('#rmp-menu-sub-arrow-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow-active', 'border-color');\n self.bindColor('#rmp-menu-sub-arrow-border-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow-active', 'border-color', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active', 'background', 'hover'); //Legacy options\n\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'color');\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour-hover', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-shape-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'color');\n self.bindColor('#rmp-submenu-sub-arrow-shape-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-color');\n self.bindColor('#rmp-submenu-sub-arrow-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active', 'border-color');\n self.bindColor('#rmp-submenu-sub-arrow-border-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-submenu-sub-arrow-background-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-submenu-sub-arrow-background-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-submenu-sub-arrow-background-hover-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow-active', 'background', 'hover');\n self.bindColor('#rmp-menu-title-colour', '#rmp-menu-title-' + self.menuId + ' > a', 'color');\n self.bindColor('#rmp-menu-title-hover-colour', '#rmp-menu-title-' + self.menuId + ' > a', 'color', 'hover');\n self.bindColor('#rmp-menu-additional-content-color', '#rmp-container-' + self.menuId + ' #rmp-menu-additional-content-' + self.menuId, 'color');\n self.bindColor('#rmp-menu-search-box-text-colour', '#rmp-container-' + self.menuId + ' #rmp-search-box-' + self.menuId + ' .rmp-search-box', 'color');\n self.bindColor('#rmp-menu-search-box-background-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'background');\n self.bindColor('#rmp-menu-search-box-border-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'border-color');\n self.bindColor('#rmp-menu-search-box-placeholder-colour', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'color', 'placeholder');\n self.changeInput('#rmp-menu-title-font-weight', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'font-weight');\n self.changeInput('#rmp-menu-title-font-family', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'font-family'); //Menu Trigger\n\n self.bindColor('#rmp-menu-button-background-colour', '#rmp_menu_trigger-' + self.menuId, 'background', '');\n self.bindColor('#rmp-menu-button-background-colour-hover', '#rmp_menu_trigger-' + self.menuId, 'background-color', 'hover');\n self.bindColor('#rmp-menu-button-background-colour-active', '#rmp_menu_trigger-' + self.menuId + '.is-active', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner,#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after,#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour-active', '.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner,.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after,.is-active#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-line-colour-hover', '#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner,#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner:after,#rmp_menu_trigger-' + self.menuId + ':hover .responsive-menu-pro-inner:before', 'background', '');\n self.bindColor('#rmp-menu-button-text-colour', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'color');\n self.onTyping('#rmp-menu-toggle-border-radius', '#rmp_menu_trigger-' + self.menuId, 'border-radius');\n self.onTyping('.rmp-menu-container-padding', '#rmp-container-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-title-section-padding', '#rmp-menu-title-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-section-padding', '#rmp-menu-wrap-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-search-section-padding', '#rmp-search-box-' + self.menuId, 'section-padding');\n self.onTyping('.rmp-menu-additional-section-padding', '#rmp-menu-additional-content-' + self.menuId, 'section-padding'); // CONTENT BASED ELEMENTS.\n\n self.onTyping('#rmp-menu-search-box-height', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'height');\n self.onTyping('#rmp-menu-search-box-border-radius', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'border-radius');\n self.onTyping('#rmp-menu-menu-title', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link span', 'text');\n self.onTyping('#rmp-menu-additional-content', '#rmp-menu-additional-content-' + self.menuId, 'text');\n self.onTyping('#rmp-menu-search-box-text', '#rmp-search-box-' + self.menuId + ' .rmp-search-box', 'placeholder');\n self.onTyping('#rmp-menu-title-link', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'href');\n self.onTyping('#rmp-menu-title-image-alt', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'alt');\n self.onTyping('#rmp-menu-title-font-size', '#rmp-menu-title-' + self.menuId + ' > a', 'font-size');\n self.onTyping('#rmp-menu-title-image-width', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'width');\n self.onTyping('#rmp-menu-title-image-height', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'height');\n self.bindImage('#rmp-menu-title-image-selector', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'img-src');\n self.onTyping('#rmp-menu-additional-content-font-size', '#rmp-menu-additional-content-' + self.menuId, 'font-size');\n self.onTyping('#rmp-menu-container-width', '#rmp-container-' + self.menuId, 'width');\n self.onTyping('#rmp-menu-container-min-width', '#rmp-container-' + self.menuId, 'min-width');\n self.onTyping('#rmp-menu-container-max-width', '#rmp-container-' + self.menuId, 'max-width');\n self.onTyping('#rmp-menu-button-image-alt-when-clicked', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-active', 'alt');\n self.onTyping('#rmp-menu-button-image-alt', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-inactive', 'alt');\n self.onTyping('#rmp-menu-button-title-open', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-text-open', 'trigger-text-open');\n self.onTyping('#rmp-menu-button-title', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-text', 'trigger-text');\n self.onTyping('#rmp-menu-button-font-size', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'font-size');\n self.onTyping('#rmp-menu-button-title-line-height', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'line-height'); //Menu Trigger\n\n self.onTyping('#rmp-menu-button-width', '#rmp_menu_trigger-' + self.menuId, 'width');\n self.onTyping('#rmp-menu-button-height', '#rmp_menu_trigger-' + self.menuId, 'height');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner', 'width');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after', 'width');\n self.onTyping('#rmp-menu-button-line-width', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'width');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner', 'height');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:after', 'height');\n self.onTyping('#rmp-menu-button-line-height', '#rmp_menu_trigger-' + self.menuId + ' .responsive-menu-pro-inner:before', 'height');\n self.bindImage('#rmp-button-title-image', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image', 'img-src');\n self.bindImage('#rmp-menu-background-image-selector', '#rmp-container-' + self.menuId, 'background');\n self.bindImage('#rmp-menu-button-image-when-clicked-selector', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-active', 'trigger-icon-open');\n self.bindImage('#rmp-menu-button-image-selector', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-icon-inactive', 'trigger-icon');\n self.changeInput('#rmp-menu-title-link-location', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link', 'target');\n self.changeInput('.rmp-menu-title-alignment', '#rmp-menu-title-' + self.menuId, 'text-align');\n self.changeInput('.rmp-menu-additional-content-alignment', '#rmp-menu-additional-content-' + self.menuId, 'text-align'); //Top menu item links\n\n self.onTyping('#rmp-menu-links-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'height');\n self.onTyping('#rmp-menu-links-line-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'line-height');\n self.onTyping('#rmp-menu-font-size', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'font-size');\n self.changeInput('#rmp-menu-font', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'font-family');\n self.changeInput('#rmp-menu-font-weight', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'font-weight');\n self.changeInput('.rmp-menu-text-alignment', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-item-link', 'text-align');\n self.changeInput('#rmp-menu-text-letter-spacing', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'letter-spacing');\n self.onTyping('#rmp-menu-depth-level-0', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'padding', 'lr');\n self.onTyping('#rmp-menu-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-width');\n self.onTyping('#rmp-menu-sub-arrow-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'border-width');\n self.onTyping('#rmp-submenu-sub-arrow-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'border-width');\n self.bindColor('#rmp-menu-link-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-menu-link-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-menu-current-link-active-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-menu-current-link-active-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-menu-item-background-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-menu-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-menu-current-item-background-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-menu-current-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-menu-item-border-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-menu-item-border-colour-hover', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-menu-current-item-border-hover-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-menu-item-border-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-current-item .rmp-menu-item-link', 'border-color'); // Trigger of top level\n\n self.bindImage('#rmp-menu-inactive-arrow-image-selector', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background');\n self.bindImage('#rmp-menu-active-arrow-image-selector', '#rmp-container-' + self.menuId + ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background');\n self.onTyping('#rmp-submenu-arrow-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'height');\n self.onTyping('#rmp-submenu-arrow-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow', 'width');\n self.onTyping('#rmp-submenu-child-arrow-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'height');\n self.onTyping('#rmp-submenu-child-arrow-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'width');\n self.changeInput('#rmp-submenu-child-arrow-width-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'width-unit');\n self.changeInput('#rmp-submenu-child-arrow-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow', 'height-unit');\n self.bindColor('#rmp-menu-sub-arrow-background-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow', 'background', 'hover');\n self.bindColor('#rmp-menu-sub-arrow-background-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background');\n self.bindColor('#rmp-menu-sub-arrow-background-hover-colour-active', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-menu-top-level-item .rmp-menu-subarrow-active', 'background', 'hover'); //sub menu item links\n\n self.onTyping('#rmp-submenu-links-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'height');\n self.changeInput('#rmp-submenu-links-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'height-unit');\n self.onTyping('#rmp-submenu-links-line-height', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'line-height');\n self.changeInput('#rmp-submenu-links-line-height-unit', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'line-height-unit');\n self.onTyping('#rmp-submenu-font-size', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-size');\n self.changeInput('#rmp-submenu-font', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-family');\n self.changeInput('#rmp-submenu-font-weight', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'font-weight');\n self.changeInput('.rmp-submenu-text-alignment', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'text-align');\n self.changeInput('#rmp-submenu-text-letter-spacing', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'letter-spacing');\n self.onTyping('#rmp-submenu-border-width', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-width');\n self.bindColor('#rmp-submenu-item-border-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-submenu-item-border-colour-hover', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-item-border-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'border-color');\n self.bindColor('#rmp-submenu-current-item-border-hover-colour', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'border-color', 'hover');\n self.bindColor('#rmp-submenu-link-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-submenu-link-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-submenu-link-colour-active', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'color');\n self.bindColor('#rmp-submenu-link-active-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'color', 'hover');\n self.bindColor('#rmp-submenu-item-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-submenu-item-background-hover-color', ' #rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-item-link', 'background', 'hover');\n self.bindColor('#rmp-submenu-current-item-background-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'background');\n self.bindColor('#rmp-submenu-current-item-background-hover-color', '#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-current-item .rmp-menu-item-link', 'background', 'hover'); //Menu Trigger\n\n self.changeInput('.rmp-menu-button-transparent-background', '#rmp_menu_trigger-' + self.menuId, 'background', '');\n self.changeInput('#rmp-menu-button-position-type', '#rmp_menu_trigger-' + self.menuId, 'position');\n self.changeInput('.rmp-menu-button-left-or-right', '#rmp_menu_trigger-' + self.menuId, 'trigger-side');\n self.onTyping('#rmp-menu-button-distance-from-side', '#rmp_menu_trigger-' + self.menuId, 'trigger-side-position');\n self.onTyping('#rmp-menu-button-top', '#rmp_menu_trigger-' + self.menuId, 'top');\n self.changeInput('#rmp-menu-button-click-animation', '#rmp_menu_trigger-' + self.menuId, 'trigger-animation');\n self.changeInput('#rmp-menu-button-font', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'font-family');\n self.changeInput('.rmp-menu-button-title-position', '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-label', 'position-alignment');\n jQuery(\"#rmp-menu-button-font-icon\").focus(function () {\n var outputSelector = '#rmp_menu_trigger-' + self.menuId + ' span.rmp-trigger-icon-inactive';\n value = jQuery(this).val();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).addClass(value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box img.rmp-trigger-icon').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<span class=\"rmp-trigger-icon rmp-trigger-icon-inactive ' + value + '\"></span>');\n }\n });\n jQuery(\"#rmp-menu-button-font-icon-when-clicked\").focus(function () {\n var outputSelector = '#rmp_menu_trigger-' + self.menuId + ' span.rmp-trigger-icon-active';\n value = jQuery(this).val();\n var iframe = jQuery(self.iframe);\n\n if (iframe.contents().find(outputSelector).length) {\n iframe.contents().find(outputSelector).addClass(value);\n } else {\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box img.rmp-trigger-icon').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner').hide();\n iframe.contents().find('#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box').append('<span class=\"rmp-trigger-icon rmp-trigger-icon-active ' + value + '\"></span>');\n }\n }); // Ordering elements\n\n self.toggleElements('#rmp-item-order-title', '#rmp-menu-title-' + self.menuId);\n self.toggleElements('#rmp-item-order-additional-content', '#rmp-menu-additional-content-' + self.menuId);\n self.toggleElements('#rmp-item-order-search', '#rmp-search-box-' + self.menuId);\n self.toggleElements('#rmp-item-order-menu', '#rmp-menu-wrap-' + self.menuId);\n jQuery('#rmp-menu-ordering-items').sortable({\n update: function update(event, ui) {\n self.orderMenuElements();\n }\n });\n }\n};\nRMP_Preview.init();\n\n//# sourceURL=webpack:///./assets/admin/js/rmp-preview.js?")},"./assets/admin/js/wp-color-alpha.js":function(module,exports){eval("/**!\r\n * wp-color-picker-alpha\r\n *\r\n * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker\r\n * Only run in input and is defined data alpha in true\r\n *\r\n * Version: 2.1.4\r\n * https://github.com/kallookoo/wp-color-picker-alpha\r\n * Licensed under the GPLv2 license or later.\r\n */\n(function ($) {\n // Prevent double-init.\n if ($.wp.wpColorPicker.prototype._hasAlpha) {\n return;\n } // Variable for some backgrounds ( grid )\n\n\n var image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==',\n //Dtml stuff for wpColorPicker copy of the original color-picker.js\n _after = '<div class=\"wp-picker-holder\" />',\n _wrap = '<div class=\"wp-picker-container\" />',\n _before = '<button type=\"button\" class=\"button wp-color-result\" aria-expanded=\"false\"></button>',\n _wrappingLabel = '<label></label>',\n _wrappingLabelText = '<span class=\"screen-reader-text\"></span>';\n /**\r\n * Overwrite Color\r\n * for enable support rbga\r\n */\n\n Color.fn.toString = function () {\n if (this._alpha < 1) return this.toCSS('rgba', this._alpha).replace(/\\s+/g, '');\n var hex = parseInt(this._color, 10).toString(16);\n if (this.error) return '';\n if (hex.length < 6) hex = ('00000' + hex).substr(-6);\n return '#' + hex;\n };\n /**\r\n * Overwrite wpColorPicker\r\n */\n\n\n $.widget('wp.wpColorPicker', $.wp.wpColorPicker, {\n _hasAlpha: true,\n\n /**\r\n * @summary Creates the color picker.\r\n *\r\n * Creates the color picker, sets default values, css classes and wraps it all in HTML.\r\n *\r\n * @since 3.5.0\r\n *\r\n * @access private\r\n *\r\n * @returns {void}\r\n */\n _create: function _create() {\n // Return early if Iris support is missing.\n if (!$.support.iris) {\n return;\n }\n\n var self = this,\n el = self.element; // Override default options with options bound to the element.\n\n $.extend(self.options, el.data()); // Create a color picker which only allows adjustments to the hue.\n\n if (self.options.type === 'hue') {\n return self._createHueOnly();\n } // Bind the close event.\n\n\n self.close = $.proxy(self.close, self);\n self.initialValue = el.val(); // Add a CSS class to the input field.\n\n el.addClass('wp-color-picker');\n /*\r\n \t* Check if there's already a wrapping label, e.g. in the Customizer.\r\n \t* If there's no label, add a default one to match the Customizer template.\r\n \t*/\n\n if (!el.parent('label').length) {\n // Wrap the input field in the default label.\n el.wrap(_wrappingLabel); // Insert the default label text.\n\n self.wrappingLabelText = $(_wrappingLabelText).insertBefore(el).text('Color Picker');\n }\n /*\r\n \t* At this point, either it's the standalone version or the Customizer\r\n \t* one, we have a wrapping label to use as hook in the DOM, let's store it.\r\n \t*/\n\n\n self.wrappingLabel = el.parent(); // Wrap the label in the main wrapper.\n\n self.wrappingLabel.wrap(_wrap); // Store a reference to the main wrapper.\n\n self.wrap = self.wrappingLabel.parent(); // Set up the toggle button and insert it before the wrapping label.\n\n self.toggler = $(_before).insertBefore(self.wrappingLabel).css({\n backgroundColor: self.initialValue\n }); // Set up the Iris container and insert it after the wrapping label.\n\n self.pickerContainer = $(_after).insertAfter(self.wrappingLabel); // Wrap the wrapping label in its wrapper and append the Clear/Default button.\n\n self.wrappingLabel.wrap('<span class=\"wp-picker-input-wrap hidden rmp-color-input-wrap\" />');\n /*\r\n * The input wrapper now contains the label+input+Clear/Default button.\r\n * Store a reference to the input wrapper: we'll use this to toggle\r\n * the controls visibility.\r\n */\n\n self.inputWrapper = el.closest('.wp-picker-input-wrap');\n el.iris({\n target: self.pickerContainer,\n hide: self.options.hide,\n width: 240,\n mode: self.options.mode,\n palettes: self.options.palettes,\n\n /**\r\n * @summary Handles the onChange event if one has been defined in the options.\r\n *\r\n * Handles the onChange event if one has been defined in the options and additionally\r\n * sets the background color for the toggler element.\r\n *\r\n * @since 3.5.0\r\n *\r\n * @param {Event} event The event that's being called.\r\n * @param {HTMLElement} ui The HTMLElement containing the color picker.\r\n *\r\n * @returns {void}\r\n */\n change: function change(event, ui) {\n if (self.options.alpha) {\n self.toggler.css({\n 'background-image': 'url(' + image + ')'\n });\n self.toggler.css({\n 'position': 'relative'\n });\n\n if (self.toggler.find('span.color-alpha').length == 0) {\n self.toggler.append('<span class=\"color-alpha\" />');\n }\n\n self.toggler.find('span.color-alpha').css({\n 'width': '38px',\n 'height': '100%',\n 'position': 'absolute',\n 'top': 0,\n 'left': 0,\n 'background': ui.color.toString()\n });\n } else {\n self.toggler.css({\n backgroundColor: ui.color.toString()\n });\n }\n\n if ($.isFunction(self.options.change)) {\n self.options.change.call(this, event, ui);\n }\n }\n });\n el.val(self.initialValue);\n\n self._addListeners(); // Force the color picker to always be closed on initial load.\n\n\n if (!self.options.hide) {\n self.toggler.click();\n }\n },\n\n /**\r\n * @summary Binds event listeners to the color picker.\r\n *\r\n * @since 3.5.0\r\n *\r\n * @access private\r\n *\r\n * @returns {void}\r\n */\n _addListeners: function _addListeners() {\n var self = this;\n /**\r\n * @summary Prevent any clicks inside this widget from leaking to the top and closing it.\r\n *\r\n * @since 3.5.0\r\n *\r\n * @param {Event} event The event that's being called.\r\n *\r\n * @returs {void}\r\n */\n\n self.wrap.on('click.wpcolorpicker', function (event) {\n event.stopPropagation();\n });\n /**\r\n * @summary Open or close the color picker depending on the class.\r\n *\r\n * @since 3.5\r\n */\n\n self.toggler.click(function () {\n if (self.toggler.hasClass('wp-picker-open')) {\n self.close();\n } else {\n self.open();\n }\n });\n /**\r\n * @summary Checks if value is empty when changing the color in the color picker.\r\n *\r\n * Checks if value is empty when changing the color in the color picker.\r\n * If so, the background color is cleared.\r\n *\r\n * @since 3.5.0\r\n *\r\n * @param {Event} event The event that's being called.\r\n *\r\n * @returns {void}\r\n */\n\n self.element.on('change', function (event) {\n // Empty or Error = clear\n if ($(this).val() === '' || self.element.hasClass('iris-error')) {\n if (self.options.alpha) {\n self.toggler.find('span.color-alpha').css('backgroundColor', '');\n } else {\n self.toggler.css('backgroundColor', '');\n } // fire clear callback if we have one\n\n\n if ($.isFunction(self.options.clear)) self.options.clear.call(this, event);\n }\n });\n }\n });\n /**\r\n * Overwrite iris\r\n */\n\n $.widget('a8c.iris', $.a8c.iris, {\n _create: function _create() {\n this._super(); // Global option for check is mode rbga is enabled\n\n\n this.options.alpha = this.element.data('alpha') || false; // Is not input disabled\n\n if (!this.element.is(':input')) this.options.alpha = false;\n\n if (typeof this.options.alpha !== 'undefined' && this.options.alpha) {\n var self = this,\n el = self.element,\n _html = '<div class=\"iris-strip iris-slider iris-alpha-slider\"><div class=\"iris-slider-offset iris-slider-offset-alpha\"></div></div>',\n aContainer = $(_html).appendTo(self.picker.find('.iris-picker-inner')),\n aSlider = aContainer.find('.iris-slider-offset-alpha'),\n controls = {\n aContainer: aContainer,\n aSlider: aSlider\n };\n\n if (typeof el.data('custom-width') !== 'undefined') {\n self.options.customWidth = parseInt(el.data('custom-width')) || 0;\n } else {\n self.options.customWidth = 100;\n } // Set default width for input reset\n\n\n self.options.defaultWidth = el.width(); // Update width for input\n\n if (self._color._alpha < 1 || self._color.toString().indexOf('rgb') != -1) el.width(parseInt(self.options.defaultWidth + self.options.customWidth)); // Push new controls\n\n $.each(controls, function (k, v) {\n self.controls[k] = v;\n }); // Change size strip and add margin for sliders\n\n self.controls.square.css({\n 'margin-right': '0'\n });\n var emptyWidth = self.picker.width() - self.controls.square.width() - 20,\n stripsMargin = emptyWidth / 6,\n stripsWidth = emptyWidth / 2 - stripsMargin;\n $.each(['aContainer', 'strip'], function (k, v) {\n self.controls[v].width(stripsWidth).css({\n 'margin-left': stripsMargin + 'px'\n });\n }); // Add new slider\n\n self._initControls(); // For updated widget\n\n\n self._change();\n }\n },\n _initControls: function _initControls() {\n this._super();\n\n if (this.options.alpha) {\n var self = this,\n controls = self.controls;\n controls.aSlider.slider({\n orientation: 'vertical',\n min: 0,\n max: 100,\n step: 1,\n value: parseInt(self._color._alpha * 100),\n slide: function slide(event, ui) {\n // Update alpha value\n self._color._alpha = parseFloat(ui.value / 100);\n\n self._change.apply(self, arguments);\n }\n });\n }\n },\n _change: function _change() {\n this._super();\n\n var self = this,\n el = self.element;\n\n if (this.options.alpha) {\n var controls = self.controls,\n alpha = parseInt(self._color._alpha * 100),\n color = self._color.toRgb(),\n gradient = ['rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%', 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'],\n defaultWidth = self.options.defaultWidth,\n customWidth = self.options.customWidth,\n target = self.picker.closest('.wp-picker-container').find('.wp-color-result'); // Generate background slider alpha, only for CSS3 old browser fuck!! :)\n\n\n controls.aContainer.css({\n 'background': 'linear-gradient(to bottom, ' + gradient.join(', ') + '), url(' + image + ')'\n });\n\n if (target.hasClass('wp-picker-open')) {\n // Update alpha value\n controls.aSlider.slider('value', alpha);\n /**\r\n * Disabled change opacity in default slider Saturation ( only is alpha enabled )\r\n * and change input width for view all value\r\n */\n // if ( self._color._alpha < 1 ) {\n // \tcontrols.strip.attr( 'style', controls.strip.attr( 'style' ).replace( /rgba\\(([0-9]+,)(\\s+)?([0-9]+,)(\\s+)?([0-9]+)(,(\\s+)?[0-9\\.]+)\\)/g, 'rgb($1$3$5)' ) );\n // \tel.width( parseInt( defaultWidth + customWidth ) );\n // } else {\n // \tel.width( defaultWidth );\n // }\n }\n }\n\n var reset = el.data('reset-alpha') || false;\n\n if (reset) {\n self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function () {\n self._color._alpha = 1;\n self.active = 'external';\n\n self._change();\n });\n }\n\n el.trigger('change');\n },\n _addInputListeners: function _addInputListeners(input) {\n var self = this,\n debounceTimeout = 100,\n callback = function callback(event) {\n var color = new Color(input.val()),\n val = input.val();\n input.removeClass('iris-error'); // we gave a bad color\n\n if (color.error) {\n // don't error on an empty input\n if (val !== '') input.addClass('iris-error');\n } else {\n if (color.toString() !== self._color.toString()) {\n // let's not do this on keyup for hex shortcodes\n if (!(event.type === 'keyup' && val.match(/^[0-9a-fA-F]{3}$/))) self._setOption('color', color.toString());\n }\n }\n };\n\n input.on('change', callback).on('keyup', self._debounce(callback, debounceTimeout)); // If we initialized hidden, show on first focus. The rest is up to you.\n\n if (self.options.hide) {\n input.on('focus', function () {\n self.show();\n });\n }\n }\n });\n})(jQuery);\n\n//# sourceURL=webpack:///./assets/admin/js/wp-color-alpha.js?")},"./assets/admin/rmp-main.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scss/wizard-ui.scss */ "./assets/admin/scss/wizard-ui.scss");\n/* harmony import */ var _scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scss_wizard_ui_scss__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./js/rmp-admin.js */ "./assets/admin/js/rmp-admin.js");\n/* harmony import */ var _js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_admin_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./js/wp-color-alpha.js */ "./assets/admin/js/wp-color-alpha.js");\n/* harmony import */ var _js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_js_wp_color_alpha_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./js/rmp-editor.js */ "./assets/admin/js/rmp-editor.js");\n/* harmony import */ var _js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_editor_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./js/rmp-icon.js */ "./assets/admin/js/rmp-icon.js");\n/* harmony import */ var _js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_icon_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./js/rmp-preview.js */ "./assets/admin/js/rmp-preview.js");\n/* harmony import */ var _js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_js_rmp_preview_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _js_rmp_menu_wizard_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./js/rmp-menu-wizard.js */ "./assets/admin/js/rmp-menu-wizard.js");\n/**\r\n * Main scripts file.\r\n *\r\n * @package responsive-menu-pro\r\n */\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n//# sourceURL=webpack:///./assets/admin/rmp-main.js?')},"./assets/admin/scss/wizard-ui.scss":function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./assets/admin/scss/wizard-ui.scss?")},0:function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! C:\\xampp\\htdocs\\rmp-menu\\wp-content\\plugins\\responsive-menu\\v4.0.0\\assets\\admin/rmp-main.js */"./assets/admin/rmp-main.js");\n\n\n//# sourceURL=webpack:///multi_./assets/admin/rmp-main.js?')}});
|
@@ -9,114 +9,6 @@
|
|
9 |
|
10 |
jQuery( document ).ready( function( jQuery ) {
|
11 |
|
12 |
-
/**
|
13 |
-
* Open new create menu wizard on click event.
|
14 |
-
*
|
15 |
-
* @since 4.0.0
|
16 |
-
*
|
17 |
-
* @fires Click
|
18 |
-
*/
|
19 |
-
jQuery( document ).on( 'click', 'a.page-title-action', function( e ) {
|
20 |
-
e.preventDefault();
|
21 |
-
jQuery( '#rmp-new-menu-wizard' ).show();
|
22 |
-
} );
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Close the new menu wizard.
|
26 |
-
*
|
27 |
-
* @since 4.0.0
|
28 |
-
*
|
29 |
-
* @fires Click
|
30 |
-
*/
|
31 |
-
jQuery( '#rmp-new-menu-wizard .rmp-dialog-header button.close' ).on( 'click', function() {
|
32 |
-
jQuery( '#rmp-new-menu-wizard' ).hide();
|
33 |
-
} );
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Move on next tab content for theme selection.
|
37 |
-
*/
|
38 |
-
jQuery( '#rmp-create-menu-first-step' ).on( 'click', () => {
|
39 |
-
jQuery( '#rmp-create-menu-first-step' ).hide();
|
40 |
-
jQuery( '#rmp-create-new-menu' ).show();
|
41 |
-
jQuery( 'a[href="#select-themes"]' ).trigger( 'click' );
|
42 |
-
} );
|
43 |
-
|
44 |
-
// Handle next and create button visibility.
|
45 |
-
jQuery( 'a[href="#select-themes"]' ).on( 'click', ()=> {
|
46 |
-
jQuery( '#rmp-create-new-menu' ).show();
|
47 |
-
jQuery( '#rmp-create-menu-first-step' ).hide();
|
48 |
-
} );
|
49 |
-
|
50 |
-
// Handle next and create button visibility.
|
51 |
-
jQuery( 'a[href="#menu-settings"]' ).on( 'click', () => {
|
52 |
-
jQuery( '#rmp-create-new-menu' ).hide();
|
53 |
-
jQuery( '#rmp-create-menu-first-step' ).show();
|
54 |
-
} );
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Call ajax to save the new create menu.
|
58 |
-
*
|
59 |
-
* @version 4.0.0
|
60 |
-
*
|
61 |
-
* @fires Click
|
62 |
-
*/
|
63 |
-
jQuery( '#rmp-create-new-menu' ).on( 'click', function( e ) {
|
64 |
-
e.preventDefault();
|
65 |
-
let menuName = jQuery( '#rmp-menu-name' );
|
66 |
-
let themeName = jQuery( '.rmp-theme-option:checked' ).val();
|
67 |
-
|
68 |
-
if ( themeName == undefined ) {
|
69 |
-
themeName = '';
|
70 |
-
}
|
71 |
-
|
72 |
-
jQuery.ajax( {
|
73 |
-
url: rmpObject.ajaxURL,
|
74 |
-
data: {
|
75 |
-
'action': 'rmp_create_new_menu',
|
76 |
-
'ajax_nonce': rmpObject.ajax_nonce,
|
77 |
-
'menu_name': menuName.val(),
|
78 |
-
'menu_to_use': jQuery( '#rmp-menu-to-use' ).val(),
|
79 |
-
'menu_show_on_pages': jQuery( '#rmp-menu-display-on-pages' ).val(),
|
80 |
-
'menu_show_on': jQuery( '.rmp-menu-display-option' ).val(),
|
81 |
-
'menu_theme': themeName,
|
82 |
-
'theme_type': jQuery( '.rmp-theme-option:checked' ).attr( 'theme-type' )
|
83 |
-
},
|
84 |
-
type: 'POST',
|
85 |
-
dataType: 'json',
|
86 |
-
beforeSend: function() {
|
87 |
-
jQuery( '#rmp-create-new-menu' ).prop( 'disabled', true );
|
88 |
-
jQuery( '.spinner' ).addClass( 'is-active' );
|
89 |
-
},
|
90 |
-
error: function( error ) {
|
91 |
-
console.log( 'Internal Error !' );
|
92 |
-
jQuery( '#rmp-create-new-menu' ).prop( 'disabled', false );
|
93 |
-
jQuery( '.spinner' ).removeClass( 'is-active' );
|
94 |
-
},
|
95 |
-
success: function( response ) {
|
96 |
-
jQuery( '#rmp-create-new-menu' ).prop( 'disabled', false );
|
97 |
-
noticeClass = 'notice-error';
|
98 |
-
if ( true == response.success ) {
|
99 |
-
isSuccess = 'notice-success';
|
100 |
-
}
|
101 |
-
|
102 |
-
jQuery( '.rmp-new-menu-elements' ).prepend(
|
103 |
-
'<div class="notice ' + noticeClass + ' settings-error is-dismissible"> <p>' + response.data.message + '</p></div>'
|
104 |
-
);
|
105 |
-
|
106 |
-
setTimeout( function() {
|
107 |
-
jQuery( '.rmp-new-menu-elements' ).find( '.notice' ).remove();
|
108 |
-
}, 3000 );
|
109 |
-
}
|
110 |
-
} ).always( function( response ) {
|
111 |
-
jQuery( '.spinner' ).removeClass( 'is-active' );
|
112 |
-
} ).done( function( response ) {
|
113 |
-
if ( response.success ) {
|
114 |
-
location.reload();
|
115 |
-
}
|
116 |
-
} );
|
117 |
-
|
118 |
-
} );
|
119 |
-
|
120 |
/**
|
121 |
* Rollback the plugin version.
|
122 |
*
|
@@ -160,6 +52,11 @@ jQuery( document ).ready( function( jQuery ) {
|
|
160 |
e.preventDefault();
|
161 |
var url = jQuery(this).attr('href');
|
162 |
|
|
|
|
|
|
|
|
|
|
|
163 |
if ( url.indexOf('?') >= 0 ) {
|
164 |
url = url + '&rmp_preview_mode=true';
|
165 |
} else {
|
@@ -250,8 +147,8 @@ jQuery( document ).ready( function( jQuery ) {
|
|
250 |
jQuery( '.rmp-color-input' ).wpColorPicker();
|
251 |
|
252 |
// Fix events glitch on color textbox.
|
253 |
-
jQuery('.rmp-color-input').removeAttr( 'style' );
|
254 |
-
jQuery('.rmp-color-input').off( 'focus' );
|
255 |
|
256 |
// Initiate the tab elements.
|
257 |
jQuery( '.tabs,#rmp-setting-tabs' ).tabs( {
|
@@ -449,6 +346,11 @@ jQuery( document ).ready( function( jQuery ) {
|
|
449 |
jQuery( this ).parent( '.rmp-image-picker' ).siblings( 'input.rmp-image-url-input' ).val( '' );
|
450 |
jQuery( this ).parent( '.rmp-image-picker' ).removeAttr( 'style' );
|
451 |
jQuery( this ).remove();
|
|
|
|
|
|
|
|
|
|
|
452 |
} );
|
453 |
|
454 |
/**
|
@@ -476,7 +378,11 @@ jQuery( document ).ready( function( jQuery ) {
|
|
476 |
uploadMultiple: false,
|
477 |
success: function ( file, response ) {
|
478 |
location.reload();
|
|
|
|
|
|
|
479 |
}
|
|
|
480 |
} );
|
481 |
|
482 |
/**
|
@@ -493,13 +399,6 @@ jQuery( document ).ready( function( jQuery ) {
|
|
493 |
jQuery( '#rmp-menu-save-theme-wizard' ).toggle();
|
494 |
} );
|
495 |
|
496 |
-
/**
|
497 |
-
* Show/Hide change theme wizard.
|
498 |
-
*/
|
499 |
-
jQuery( '.rmp-theme-change-button' ).on( 'click', function( e ) {
|
500 |
-
jQuery( '#rmp-new-menu-wizard' ).toggle();
|
501 |
-
} );
|
502 |
-
|
503 |
/**
|
504 |
* Delete the theme from theme page.
|
505 |
*/
|
@@ -507,12 +406,16 @@ jQuery( document ).ready( function( jQuery ) {
|
|
507 |
e.preventDefault();
|
508 |
|
509 |
/** Ask for delete confirmation */
|
510 |
-
const isConfirm = confirm( 'Are you sure,
|
511 |
|
512 |
if ( ! isConfirm ) {
|
513 |
return;
|
514 |
}
|
515 |
|
|
|
|
|
|
|
|
|
516 |
let themeName = jQuery( this ).attr( 'data-theme' );
|
517 |
let themeType = jQuery( this ).attr( 'data-theme-type' ).toLowerCase();
|
518 |
|
@@ -530,7 +433,13 @@ jQuery( document ).ready( function( jQuery ) {
|
|
530 |
console.log( error.statusText );
|
531 |
},
|
532 |
success: function( response ) {
|
533 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
}
|
535 |
} );
|
536 |
|
@@ -541,9 +450,12 @@ jQuery( document ).ready( function( jQuery ) {
|
|
541 |
*
|
542 |
* @version 4.0.0
|
543 |
*
|
544 |
-
* @fires
|
545 |
*/
|
546 |
-
jQuery(
|
|
|
|
|
|
|
547 |
|
548 |
jQuery.ajax( {
|
549 |
url: rmpObject.ajaxURL,
|
@@ -559,9 +471,16 @@ jQuery( document ).ready( function( jQuery ) {
|
|
559 |
dataType: 'json',
|
560 |
error: function( error ) {
|
561 |
console.log( error.statusText );
|
|
|
562 |
},
|
563 |
success: function( response ) {
|
564 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
}
|
566 |
} );
|
567 |
|
@@ -817,4 +736,30 @@ jQuery( document ).ready( function( jQuery ) {
|
|
817 |
updateMenuContainerAnimationOptions( optionValue );
|
818 |
});
|
819 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
820 |
} );
|
9 |
|
10 |
jQuery( document ).ready( function( jQuery ) {
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/**
|
13 |
* Rollback the plugin version.
|
14 |
*
|
52 |
e.preventDefault();
|
53 |
var url = jQuery(this).attr('href');
|
54 |
|
55 |
+
// Prevent to load the customizer page on preview aria.
|
56 |
+
if ( '#' == url ) {
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
|
60 |
if ( url.indexOf('?') >= 0 ) {
|
61 |
url = url + '&rmp_preview_mode=true';
|
62 |
} else {
|
147 |
jQuery( '.rmp-color-input' ).wpColorPicker();
|
148 |
|
149 |
// Fix events glitch on color textbox.
|
150 |
+
jQuery( '.rmp-color-input' ).removeAttr( 'style' );
|
151 |
+
jQuery( document ).find( '.rmp-color-input' ).off( 'focus' );
|
152 |
|
153 |
// Initiate the tab elements.
|
154 |
jQuery( '.tabs,#rmp-setting-tabs' ).tabs( {
|
346 |
jQuery( this ).parent( '.rmp-image-picker' ).siblings( 'input.rmp-image-url-input' ).val( '' );
|
347 |
jQuery( this ).parent( '.rmp-image-picker' ).removeAttr( 'style' );
|
348 |
jQuery( this ).remove();
|
349 |
+
|
350 |
+
if ( ! jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length ) {
|
351 |
+
addUpdateNotification();
|
352 |
+
}
|
353 |
+
|
354 |
} );
|
355 |
|
356 |
/**
|
378 |
uploadMultiple: false,
|
379 |
success: function ( file, response ) {
|
380 |
location.reload();
|
381 |
+
},
|
382 |
+
totaluploadprogress: function() {
|
383 |
+
jQuery('.rmp-page-loader').css( 'display','flex' );
|
384 |
}
|
385 |
+
|
386 |
} );
|
387 |
|
388 |
/**
|
399 |
jQuery( '#rmp-menu-save-theme-wizard' ).toggle();
|
400 |
} );
|
401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
/**
|
403 |
* Delete the theme from theme page.
|
404 |
*/
|
406 |
e.preventDefault();
|
407 |
|
408 |
/** Ask for delete confirmation */
|
409 |
+
const isConfirm = confirm( 'Are you sure, You want to delete this theme ?' );
|
410 |
|
411 |
if ( ! isConfirm ) {
|
412 |
return;
|
413 |
}
|
414 |
|
415 |
+
//Show the loader on deleting theme.
|
416 |
+
const current_theme = jQuery(this);
|
417 |
+
current_theme.append( '<span class="spinner is-active"></span>' );
|
418 |
+
|
419 |
let themeName = jQuery( this ).attr( 'data-theme' );
|
420 |
let themeType = jQuery( this ).attr( 'data-theme-type' ).toLowerCase();
|
421 |
|
433 |
console.log( error.statusText );
|
434 |
},
|
435 |
success: function( response ) {
|
436 |
+
current_theme.find('.spinner').removeClass('is-active');
|
437 |
+
|
438 |
+
if ( response.success ) {
|
439 |
+
location.reload();
|
440 |
+
} else {
|
441 |
+
alert( response.data.message );
|
442 |
+
}
|
443 |
}
|
444 |
} );
|
445 |
|
450 |
*
|
451 |
* @version 4.0.0
|
452 |
*
|
453 |
+
* @fires click
|
454 |
*/
|
455 |
+
jQuery( document ).on( 'click', '.rmp-theme-apply', function( e ) {
|
456 |
+
|
457 |
+
//Show the overlay with loader.
|
458 |
+
jQuery('.rmp-page-loader').css('display','flex');
|
459 |
|
460 |
jQuery.ajax( {
|
461 |
url: rmpObject.ajaxURL,
|
471 |
dataType: 'json',
|
472 |
error: function( error ) {
|
473 |
console.log( error.statusText );
|
474 |
+
jQuery( '.rmp-page-loader' ).hide();
|
475 |
},
|
476 |
success: function( response ) {
|
477 |
+
|
478 |
+
if ( response.success ) {
|
479 |
+
location.reload();
|
480 |
+
} else {
|
481 |
+
jQuery( '.rmp-page-loader' ).hide();
|
482 |
+
alert( response.data.message );
|
483 |
+
}
|
484 |
}
|
485 |
} );
|
486 |
|
736 |
updateMenuContainerAnimationOptions( optionValue );
|
737 |
});
|
738 |
|
739 |
+
/**
|
740 |
+
* Event to back on home page under preview screen.
|
741 |
+
*
|
742 |
+
* @since 4.1.0
|
743 |
+
*
|
744 |
+
* @fires click
|
745 |
+
*
|
746 |
+
* @return void
|
747 |
+
*/
|
748 |
+
jQuery('#rmp-preview-wrapper').on( 'click', () => {
|
749 |
+
let url = window.location.href;
|
750 |
+
url = url.substring( 0, url.indexOf( 'wp-admin' ) ) + '?rmp_preview_mode=true' ;
|
751 |
+
jQuery('#rmp-preview-iframe-loader').show();
|
752 |
+
jQuery('#rmp-preview-iframe').attr('src', url );
|
753 |
+
} );
|
754 |
+
|
755 |
+
/** Call ajax to hide admin notice permanent. */
|
756 |
+
jQuery( '.notice-responsive-menu' ).on( 'click', '.notice-dismiss', function( event ) {
|
757 |
+
event.preventDefault();
|
758 |
+
jQuery.ajax( {
|
759 |
+
type: "POST",
|
760 |
+
url: rmpObject.ajaxURL,
|
761 |
+
data: 'action=rmp_upgrade_admin_notice_dismiss',
|
762 |
+
});
|
763 |
+
});
|
764 |
+
|
765 |
} );
|
@@ -20,11 +20,6 @@ const rmpEditor = {
|
|
20 |
backButton: '.rmp-editor-header-back',
|
21 |
tabId: null,
|
22 |
level: 0,
|
23 |
-
close: function () {
|
24 |
-
jQuery( window ).bind( 'beforeunload', function() {
|
25 |
-
return;
|
26 |
-
} );
|
27 |
-
},
|
28 |
triggerBack: function() {
|
29 |
|
30 |
this.level--;
|
@@ -77,12 +72,6 @@ const rmpEditor = {
|
|
77 |
self.triggerBack();
|
78 |
} );
|
79 |
|
80 |
-
// Close the editor and back to menu admin.
|
81 |
-
jQuery( this.closeButton ).on( 'click', function( e ) {
|
82 |
-
e.stopPropagation();
|
83 |
-
self.close();
|
84 |
-
} );
|
85 |
-
|
86 |
// Open/Close the editor setting sidebar.
|
87 |
jQuery( self.sidebarDrawer ).on( 'click', function(e) {
|
88 |
jQuery( self.editorSidebar ).toggleClass( 'expanded collapsed' );
|
20 |
backButton: '.rmp-editor-header-back',
|
21 |
tabId: null,
|
22 |
level: 0,
|
|
|
|
|
|
|
|
|
|
|
23 |
triggerBack: function() {
|
24 |
|
25 |
this.level--;
|
72 |
self.triggerBack();
|
73 |
} );
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
// Open/Close the editor setting sidebar.
|
76 |
jQuery( self.sidebarDrawer ).on( 'click', function(e) {
|
77 |
jQuery( self.editorSidebar ).toggleClass( 'expanded collapsed' );
|
@@ -9,7 +9,7 @@ jQuery( document ).ready( function() {
|
|
9 |
iconSelect: '#rmp-icon-dialog-select',
|
10 |
iconContainer: '.rmp-menu-icons-dialog',
|
11 |
clearSelector: '#rmp-icon-dialog-clear',
|
12 |
-
closeSelector: '.rmp-menu-icons-dialog .rmp-dialog-header
|
13 |
clear: function () {
|
14 |
var self = this;
|
15 |
jQuery( self.clearSelector ).on( 'click', function() {
|
@@ -47,6 +47,15 @@ jQuery( document ).ready( function() {
|
|
47 |
jQuery(this).siblings('.rmp-font-icon').remove();
|
48 |
jQuery(this).parent('.rmp-icon-picker').removeAttr('data-icon');
|
49 |
jQuery(this).remove();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
});
|
51 |
},
|
52 |
getIcon : function() {
|
9 |
iconSelect: '#rmp-icon-dialog-select',
|
10 |
iconContainer: '.rmp-menu-icons-dialog',
|
11 |
clearSelector: '#rmp-icon-dialog-clear',
|
12 |
+
closeSelector: '.rmp-menu-icons-dialog .rmp-dialog-header button.close',
|
13 |
clear: function () {
|
14 |
var self = this;
|
15 |
jQuery( self.clearSelector ).on( 'click', function() {
|
47 |
jQuery(this).siblings('.rmp-font-icon').remove();
|
48 |
jQuery(this).parent('.rmp-icon-picker').removeAttr('data-icon');
|
49 |
jQuery(this).remove();
|
50 |
+
|
51 |
+
if ( ! jQuery('#rmp-editor-main').find('#rmp-menu-update-notification').length ) {
|
52 |
+
jQuery( '#rmp-editor-main' ).prepend(
|
53 |
+
'<div id="rmp-menu-update-notification" class="rmp-order-item rmp-order-item-description">' +
|
54 |
+
'<span> <span class="rmp-font-icon dashicons dashicons-warning "></span> Update Required </span>' +
|
55 |
+
'<a href="javascript:void(0)" id="rmp-menu-quick-update-button">UPDATE</a>' +
|
56 |
+
'</div>'
|
57 |
+
);
|
58 |
+
}
|
59 |
});
|
60 |
},
|
61 |
getIcon : function() {
|
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This is js hook scripts file for responsive menu.
|
3 |
+
*
|
4 |
+
* @file This files defines the rmpNewMenuWizard object.
|
5 |
+
* @author ExpressTech System.
|
6 |
+
*
|
7 |
+
* @since 4.1.0
|
8 |
+
*
|
9 |
+
* @package responsive-menu-pro
|
10 |
+
*/
|
11 |
+
|
12 |
+
'use strict';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Hooks class.
|
16 |
+
*
|
17 |
+
* @type {Object}
|
18 |
+
*
|
19 |
+
* @since 4.1.0
|
20 |
+
*/
|
21 |
+
const rmpMenuWizard = {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Initialize.
|
25 |
+
*
|
26 |
+
* @return {void}
|
27 |
+
*/
|
28 |
+
init() {
|
29 |
+
this.setProps();
|
30 |
+
},
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Set properties and selectors.
|
34 |
+
*
|
35 |
+
* @return {void}
|
36 |
+
*/
|
37 |
+
setProps() {
|
38 |
+
|
39 |
+
//Assign wizard container element id.
|
40 |
+
const menuWizardContainer = jQuery( '#rmp-new-menu-wizard' );
|
41 |
+
|
42 |
+
//Open new create menu wizard on click event.
|
43 |
+
jQuery( document ).on( 'click', 'a.page-title-action', function( e ) {
|
44 |
+
e.preventDefault();
|
45 |
+
menuWizardContainer.show();
|
46 |
+
} );
|
47 |
+
|
48 |
+
//Close the new menu wizard.
|
49 |
+
jQuery( '#rmp-new-menu-wizard .rmp-dialog-header button.close' ).on( 'click', function() {
|
50 |
+
menuWizardContainer.hide();
|
51 |
+
} );
|
52 |
+
|
53 |
+
//Show/Hide the page selection input control.
|
54 |
+
menuWizardContainer.on( 'change', '.rmp-menu-display-option', function( e ) {
|
55 |
+
const optionValue = jQuery( this ).val();
|
56 |
+
if ( 'exclude-pages' === optionValue || 'include-pages' === optionValue ) {
|
57 |
+
jQuery( '#rmp-menu-page-selector' ).show();
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
|
61 |
+
jQuery( '#rmp-menu-page-selector' ).hide();
|
62 |
+
} );
|
63 |
+
|
64 |
+
|
65 |
+
//Show/Hide change theme wizard in customizer page.
|
66 |
+
jQuery( '.rmp-theme-change-button' ).on( 'click', function( e ) {
|
67 |
+
menuWizardContainer.toggle();
|
68 |
+
} );
|
69 |
+
|
70 |
+
//Multi step form event for next button.
|
71 |
+
jQuery( '#rmp-menu-next-step' ).on( 'click', () => {
|
72 |
+
this.nextSection();
|
73 |
+
} );
|
74 |
+
|
75 |
+
//Multi step form event for top item label.
|
76 |
+
jQuery( 'li.rmp-new-menu-step' ).on( 'click', ( e ) => {
|
77 |
+
const index = jQuery( e.currentTarget ).index();
|
78 |
+
this.goToSection( index );
|
79 |
+
} );
|
80 |
+
|
81 |
+
//Call ajax to save the new create menu.
|
82 |
+
jQuery( '#rmp-create-new-menu' ).on( 'click', ( e ) => {
|
83 |
+
e.preventDefault();
|
84 |
+
|
85 |
+
const menuName = jQuery( '#rmp-menu-name' );
|
86 |
+
let themeName = jQuery( '.rmp-theme-option:checked' ).val();
|
87 |
+
|
88 |
+
if ( themeName == undefined ) {
|
89 |
+
themeName = '';
|
90 |
+
}
|
91 |
+
|
92 |
+
jQuery.ajax( {
|
93 |
+
url: rmpObject.ajaxURL,
|
94 |
+
data: {
|
95 |
+
'action': 'rmp_create_new_menu',
|
96 |
+
'ajax_nonce': rmpObject.ajax_nonce,
|
97 |
+
'menu_name': menuName.val(),
|
98 |
+
'menu_to_hide': jQuery( '#rmp-hide-menu' ).val(),
|
99 |
+
'menu_to_use': jQuery( '#rmp-menu-to-use' ).val(),
|
100 |
+
'menu_show_on_pages': jQuery( '#rmp-menu-display-on-pages' ).val(),
|
101 |
+
'menu_show_on': jQuery( '.rmp-menu-display-option' ).val(),
|
102 |
+
'menu_theme': themeName,
|
103 |
+
'theme_type': jQuery( '.rmp-theme-option:checked' ).attr( 'theme-type' ),
|
104 |
+
},
|
105 |
+
type: 'POST',
|
106 |
+
dataType: 'json',
|
107 |
+
beforeSend: function() {
|
108 |
+
jQuery( e.currentTarget ).prop( 'disabled', true );
|
109 |
+
jQuery( '.spinner' ).addClass( 'is-active' );
|
110 |
+
},
|
111 |
+
error: function( error ) {
|
112 |
+
console.log( 'Internal Error !' );
|
113 |
+
jQuery( '#rmp-create-new-menu' ).prop( 'disabled', false );
|
114 |
+
jQuery( '.spinner' ).removeClass( 'is-active' );
|
115 |
+
},
|
116 |
+
success: function( response ) {
|
117 |
+
jQuery( '.spinner' ).removeClass( 'is-active' );
|
118 |
+
jQuery( '#rmp-create-new-menu' ).prop( 'disabled', false );
|
119 |
+
|
120 |
+
if ( response.success ) {
|
121 |
+
window.location.href = response.data.customize_url;
|
122 |
+
} else {
|
123 |
+
alert( response.data.message );
|
124 |
+
}
|
125 |
+
}
|
126 |
+
} );
|
127 |
+
|
128 |
+
} );
|
129 |
+
|
130 |
+
//Ajax call to upload the theme.
|
131 |
+
jQuery( '#rmp-theme-upload' ).on( 'click', ( e ) => {
|
132 |
+
e.preventDefault();
|
133 |
+
|
134 |
+
let formData = new FormData();
|
135 |
+
let file = jQuery( '#rmp_menu_theme_zip' ).prop( 'files' )[0];
|
136 |
+
formData.append( 'file', file );
|
137 |
+
formData.append( 'action', 'rmp_menu_theme_upload' );
|
138 |
+
formData.append( 'ajax_nonce', rmpObject.ajax_nonce );
|
139 |
+
|
140 |
+
jQuery.ajax( {
|
141 |
+
url: rmpObject.ajaxURL,
|
142 |
+
data: formData,
|
143 |
+
type: 'POST',
|
144 |
+
processData: false,
|
145 |
+
contentType: false,
|
146 |
+
dataType: 'json',
|
147 |
+
success: ( response ) => {
|
148 |
+
jQuery( '#rmp_menu_theme_zip' ).val( '' );
|
149 |
+
alert( response.data.message );
|
150 |
+
if ( response.data.html ) {
|
151 |
+
jQuery( '#rmp-new-menu-wizard' ).find( '#tabs-1' ).html( response.data.html );
|
152 |
+
jQuery( '#rmp-menu-library-import' ).addClass( 'hide' );
|
153 |
+
}
|
154 |
+
}
|
155 |
+
} );
|
156 |
+
|
157 |
+
} );
|
158 |
+
|
159 |
+
//Ajax call to check the recent changes the theme api.
|
160 |
+
jQuery( '.rmp-call-theme-api-button' ).on( 'click', ( e ) => {
|
161 |
+
|
162 |
+
if ( ! jQuery( e.currentTarget ).hasClass( 'rmp-call-theme-api-button' ) ) {
|
163 |
+
return;
|
164 |
+
}
|
165 |
+
|
166 |
+
jQuery( '#rmp-new-menu-wizard' ).find( '.rmp-page-loader' ).css( 'display', 'flex' );
|
167 |
+
|
168 |
+
jQuery.ajax( {
|
169 |
+
url: rmpObject.ajaxURL,
|
170 |
+
data: {
|
171 |
+
'action': 'rmp_call_theme_api',
|
172 |
+
'ajax_nonce': rmpObject.ajax_nonce
|
173 |
+
},
|
174 |
+
type: 'POST',
|
175 |
+
dataType: 'json',
|
176 |
+
error: function( error ) {
|
177 |
+
jQuery( '#rmp-new-menu-wizard' ).find( '.rmp-page-loader' ).hide();
|
178 |
+
jQuery( '#rmp-new-menu-wizard' ).find( '#tabs-2 .rmp_theme_grids' ).html( 'Internal Error !' );
|
179 |
+
},
|
180 |
+
success: ( response ) => {
|
181 |
+
if ( response.data.html ) {
|
182 |
+
jQuery( '#rmp-new-menu-wizard' ).find( '#tabs-2 .rmp_theme_grids' ).html( response.data.html );
|
183 |
+
jQuery( e.currentTarget ).removeClass( 'rmp-call-theme-api-button' );
|
184 |
+
}
|
185 |
+
}
|
186 |
+
} );
|
187 |
+
} );
|
188 |
+
|
189 |
+
},
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Jump to the next section of wizard.
|
193 |
+
*
|
194 |
+
* @return {void}
|
195 |
+
*/
|
196 |
+
nextSection() {
|
197 |
+
var currectSectionIndex = jQuery( 'div.rmp-menu-section.current' ).index();
|
198 |
+
this.goToSection( currectSectionIndex + 1 );
|
199 |
+
},
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Show the indexed section in wizard.
|
203 |
+
*
|
204 |
+
* @return {void}
|
205 |
+
*/
|
206 |
+
goToSection( currectSectionIndex ) {
|
207 |
+
|
208 |
+
if ( 1 <= currectSectionIndex ) {
|
209 |
+
jQuery( '#rmp-create-new-menu' ).show();
|
210 |
+
jQuery( '#rmp-menu-next-step' ).hide();
|
211 |
+
} else {
|
212 |
+
jQuery( '#rmp-create-new-menu' ).hide();
|
213 |
+
jQuery( '#rmp-menu-next-step' ).show();
|
214 |
+
}
|
215 |
+
|
216 |
+
jQuery( 'div.rmp-menu-section' ).eq( currectSectionIndex ).addClass( 'current' ).siblings().removeClass( 'current' );
|
217 |
+
jQuery( 'li.rmp-new-menu-step' ).eq( currectSectionIndex ).addClass( 'current' ).siblings().removeClass( 'current' );
|
218 |
+
}
|
219 |
+
|
220 |
+
};
|
221 |
+
|
222 |
+
rmpMenuWizard.init();
|
223 |
+
|
224 |
+
export default rmpMenuWizard;
|
@@ -1,1008 +1,1256 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
-
*
|
6 |
* @since 4.0.0
|
|
|
|
|
|
|
7 |
*/
|
8 |
-
|
9 |
-
hooks: [ ],
|
10 |
-
is_break: false,
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Function to register the hook.
|
14 |
-
*
|
15 |
-
* @since 4.0.0
|
16 |
-
*
|
17 |
-
* @param String name Hook Name.
|
18 |
-
* @param function callback Associated function.
|
19 |
-
*/
|
20 |
-
register: function( name, callback ) {
|
21 |
-
if ( 'undefined' == typeof ( rmpHook.hooks[name] ) ) {
|
22 |
-
rmpHook.hooks[name] = [ ];
|
23 |
-
}
|
24 |
-
rmpHook.hooks[name].push( callback );
|
25 |
-
},
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Function to call the hook.
|
29 |
-
*
|
30 |
-
* @since 4.0.0
|
31 |
-
*
|
32 |
-
* @param String name Hook Name.
|
33 |
-
* @param function arguments Paramter list.
|
34 |
-
*/
|
35 |
-
call: function( name, arguments ) {
|
36 |
-
if ( 'undefined' != typeof ( rmpHook.hooks[name] ) ) {
|
37 |
-
for ( i = 0; i < rmpHook.hooks[name].length; ++i ) {
|
38 |
-
output = rmpHook.hooks[name][i]( arguments );
|
39 |
-
if ( false == output ) {
|
40 |
-
rmpHook.is_break = true;
|
41 |
-
return false;
|
42 |
-
}
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
}
|
47 |
-
return true;
|
48 |
}
|
49 |
-
|
|
|
|
|
50 |
|
51 |
/**
|
52 |
-
*
|
53 |
-
*
|
54 |
* @since 4.0.0
|
55 |
-
*
|
56 |
-
* @param
|
57 |
-
* @
|
58 |
*/
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
}
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
menuId : jQuery('#menu_id').val(),
|
79 |
-
mobile_breakpoint : jQuery('#rmp-menu-mobile-breakpoint').val() + 'px',
|
80 |
-
tablet_breakpoint : jQuery('#rmp-menu-tablet-breakpoint').val() + 'px',
|
81 |
-
active_device: jQuery('#rmp_device_mode'),
|
82 |
-
menuContainer : '#rmp-container-'+ self.menuId,
|
83 |
-
|
84 |
-
onTyping: function( inputSelector, outputSelector, type) {
|
85 |
-
var self = this;
|
86 |
-
var iframe = jQuery(self.iframe);
|
87 |
-
jQuery(inputSelector).on( 'keyup change paste', function() {
|
88 |
-
switch( type ) {
|
89 |
-
case 'border-radius':
|
90 |
-
var value = jQuery(this).val();
|
91 |
-
css = outputSelector + '{ border-radius : '+ ( value ) +'px;}';
|
92 |
-
self.inlineCssInjector(css);
|
93 |
-
break;
|
94 |
-
case 'section-padding':
|
95 |
-
var value = jQuery(this).val();
|
96 |
-
var is_linked = jQuery(this).parents('.rmp-input-group-control').find('.rmp-group-input-linked').hasClass('is-linked');
|
97 |
-
var attr = 'padding';
|
98 |
-
if( ! is_linked ) {
|
99 |
-
pos = jQuery(this).attr('data-input');
|
100 |
-
attr = attr + '-' + pos;
|
101 |
}
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
self.inlineCssInjector(css);
|
110 |
-
break;
|
111 |
-
case 'trigger-line-height':
|
112 |
-
var unit = jQuery(this).next('.is-unit').val();
|
113 |
-
css = outputSelector + '{ height : '+ ( this.value + unit ) +';}';
|
114 |
-
self.inlineCssInjector(css);
|
115 |
-
break;
|
116 |
-
case 'trigger-text':
|
117 |
-
if ( iframe.contents().find(outputSelector).length ) {
|
118 |
-
iframe.contents().find(outputSelector).html(this.value);
|
119 |
-
} else {
|
120 |
-
iframe.contents().find( '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box' ).before('<div class="rmp-trigger-label rmp-trigger-label-top"><span class="rmp-trigger-text">"'+ this.value + '"</span></div>')
|
121 |
-
}
|
122 |
-
break;
|
123 |
-
|
124 |
-
case 'trigger-text-open':
|
125 |
-
if ( iframe.contents().find(outputSelector).length ) {
|
126 |
-
iframe.contents().find(outputSelector).html(this.value);
|
127 |
-
} else {
|
128 |
-
iframe.contents().find( '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box' ).before('<div class="rmp-trigger-label rmp-trigger-label-top"><span class="rmp-trigger-text-open">"'+ this.value + '"</span></div>')
|
129 |
-
}
|
130 |
-
break;
|
131 |
-
|
132 |
-
case 'text' :
|
133 |
-
iframe.contents().find( outputSelector ).html(this.value);
|
134 |
-
break;
|
135 |
-
|
136 |
-
case 'placeholder' :
|
137 |
-
iframe.contents().find(outputSelector).attr('placeholder', this.value );
|
138 |
-
break;
|
139 |
-
case 'href' :
|
140 |
-
iframe.contents().find(outputSelector).attr('href', this.value );
|
141 |
-
break;
|
142 |
-
|
143 |
-
case 'font-size':
|
144 |
-
var unit = jQuery(this).next( '.is-unit' ).val();
|
145 |
-
|
146 |
-
if ( ! unit.length ) {
|
147 |
-
unit = 'px';
|
148 |
}
|
|
|
149 |
|
150 |
-
|
151 |
-
|
|
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
156 |
|
157 |
-
|
|
|
158 |
|
159 |
-
|
|
|
|
|
160 |
|
161 |
-
|
162 |
-
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
|
168 |
-
|
169 |
-
self.inlineCssInjector(css);
|
170 |
|
171 |
-
|
172 |
|
173 |
-
|
174 |
-
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
|
180 |
-
|
|
|
181 |
|
182 |
-
|
183 |
-
css = self.mediaQuery( css );
|
184 |
-
}
|
185 |
|
186 |
-
|
|
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
|
192 |
-
|
193 |
-
unit = 'px';
|
194 |
-
}
|
195 |
|
196 |
-
|
|
|
|
|
197 |
|
198 |
-
|
199 |
-
css = self.mediaQuery( css );
|
200 |
-
}
|
201 |
|
202 |
-
|
|
|
|
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
|
208 |
-
|
209 |
-
unit = 'px';
|
210 |
-
}
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
|
216 |
-
|
217 |
-
case 'max-width':
|
218 |
-
var unit = jQuery(this).next('.is-unit').val();
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
css = outputSelector + '{ max-width : '+ (this.value + unit) +';}';
|
224 |
-
self.inlineCssInjector(css);
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
},
|
230 |
-
bindImage : function(inputSelector, outputSelector, type ) {
|
231 |
-
var self = this;
|
232 |
-
var iframe = jQuery(self.iframe);
|
233 |
-
jQuery(document).on( 'click', inputSelector, function(e) {
|
234 |
-
e.preventDefault();
|
235 |
-
var button = jQuery(this),
|
236 |
-
|
237 |
-
custom_uploader = wp.media({
|
238 |
-
title: 'Select image',
|
239 |
-
library : {
|
240 |
-
type : 'image'
|
241 |
-
},
|
242 |
-
button: {
|
243 |
-
text: 'Use this image'
|
244 |
-
},
|
245 |
-
multiple: false,
|
246 |
-
}).on('select', function() {
|
247 |
-
var attachment = custom_uploader.state().get('selection').first().toJSON();
|
248 |
-
|
249 |
-
jQuery(e.target).prev('input.rmp-image-url-input').val(attachment.url);
|
250 |
-
jQuery(e.target).css('background-image', 'url(' + attachment.url + ')');
|
251 |
-
jQuery(e.target).append('<i class="rmp-image-picker-trash dashicons dashicons-trash" aria-hidden="true"></i>');
|
252 |
-
|
253 |
-
if ( type == 'img-src') {
|
254 |
-
iframe.contents().find(outputSelector).attr('src', attachment.url );
|
255 |
-
} else if( type == 'background' ) {
|
256 |
-
css = outputSelector + '{ background-image : url('+ attachment.url + ');}';
|
257 |
-
self.inlineCssInjector(css);
|
258 |
-
} else if( type == 'trigger-icon' ) {
|
259 |
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
iframe.contents().find( '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box .responsive-menu-pro-inner' ).hide();
|
264 |
-
iframe.contents().find( '#rmp_menu_trigger-' + self.menuId + ' .rmp-trigger-box' ).append('<img class="rmp-trigger-icon rmp-trigger-icon-inactive" src="'+ attachment.url +'"/>')
|
265 |
-
}
|
266 |
-
} else if( type == 'trigger-icon-open' ) {
|
267 |
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
}
|
275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
if ( jQuery(this).is(':checked') ) {
|
287 |
-
iframe.contents().find(outputSelector).fadeIn(500);
|
288 |
} else {
|
289 |
-
iframe.contents().find(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
}
|
291 |
-
} else {
|
292 |
-
e.preventDefault();
|
293 |
-
var menuId = jQuery('#menu_id').val(),
|
294 |
-
toggle_on = jQuery(this).data('toggle');
|
295 |
-
|
296 |
-
jQuery.ajax({
|
297 |
-
url: rmpObject.ajaxURL,
|
298 |
-
data: {
|
299 |
-
'action' : 'rmp_enable_menu_item',
|
300 |
-
'ajax_nonce' : rmpObject.ajax_nonce,
|
301 |
-
'menu_id' : menuId,
|
302 |
-
'menu_element' : toggle_on,
|
303 |
-
},
|
304 |
-
type: 'POST',
|
305 |
-
dataType: 'json',
|
306 |
-
beforeSend: function(){
|
307 |
-
jQuery(this).prop('disabled' , true);
|
308 |
-
jQuery('#iframe-spinner').show();
|
309 |
-
},
|
310 |
-
error: function( error ) {
|
311 |
-
console.log('Internal Error !');
|
312 |
-
jQuery(this).prop('disabled', false);
|
313 |
-
jQuery('#iframe-spinner').hide();
|
314 |
-
},
|
315 |
-
success: function( response ) {
|
316 |
-
|
317 |
-
if ( response.data.markup ) {
|
318 |
-
iframe.contents().find( '#rmp-container-'+ self.menuId ).append(response.data.markup);
|
319 |
-
self.orderMenuElements();
|
320 |
-
}
|
321 |
-
|
322 |
-
jQuery(this).prop('disabled', false);
|
323 |
-
jQuery('#iframe-spinner').hide();
|
324 |
-
}
|
325 |
-
});
|
326 |
}
|
327 |
-
});
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
list.push( iframeContents.find( self.menuSearch ) );
|
341 |
-
iframeContents.find( self.menuSearch ).remove();
|
342 |
-
} else if( val == 'menu' ) {
|
343 |
-
list.push( iframeContents.find( self.menuWrap ) );
|
344 |
-
iframeContents.find( self.menuWrap ).remove();
|
345 |
} else {
|
346 |
-
|
347 |
-
iframeContents.find( self.menuContents ).remove();
|
348 |
}
|
349 |
-
}
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
'
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
|
|
381 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
|
383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
}
|
385 |
-
});
|
386 |
-
},
|
387 |
-
mediaQuery: function( css ) {
|
388 |
-
|
389 |
-
var self = this;
|
390 |
-
|
391 |
-
self.mobile_breakpoint = jQuery('#rmp-menu-mobile-breakpoint').val() + 'px';
|
392 |
-
self.tablet_breakpoint = jQuery('#rmp-menu-tablet-breakpoint').val() + 'px';
|
393 |
-
self.active_device = jQuery('#rmp_device_mode');
|
394 |
-
|
395 |
-
if( 'desktop' === self.active_device.val() ) {
|
396 |
-
$css = '@media screen and (min-width: '+ self.tablet_breakpoint +' ) {' + css + '}';
|
397 |
-
return $css;
|
398 |
-
} else if( 'tablet' === self.active_device.val() ) {
|
399 |
-
$css = '@media screen and (max-width: '+ self.tablet_breakpoint +') and (min-width : '+ self.mobile_breakpoint +') {' + css + '}';
|
400 |
-
return $css;
|
401 |
-
} else if( 'mobile' === self.active_device.val() ) {
|
402 |
-
$css = '@media screen and (max-width: '+ self.mobile_breakpoint +' ) {' + css + '}';
|
403 |
-
return $css;
|
404 |
-
}
|
405 |
|
406 |
-
|
407 |
-
},
|
408 |
-
inlineCssInjector: function( css ) {
|
409 |
-
var self = this;
|
410 |
-
var iframe = jQuery(self.iframe);
|
411 |
-
var styleElement = iframe.contents().find( '#rmp-inline-css-' + self.menuId );
|
412 |
-
if ( styleElement.length ) {
|
413 |
-
styleElement.append(css);
|
414 |
-
} else {
|
415 |
-
style = '<style id="rmp-inline-css-'+ self.menuId +'">'+ css + '</style>';
|
416 |
-
iframe.contents().find('head').append(style);
|
417 |
}
|
418 |
-
}
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
|
439 |
-
|
440 |
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
break;
|
454 |
-
case 'font-size':
|
455 |
-
value = jQuery(this).prev('input').val();
|
456 |
-
unit = jQuery(this).val();
|
457 |
-
css = outputSelector + '{ font-size :' + value + unit + ' !important;}';
|
458 |
-
|
459 |
-
if ( jQuery(this).attr( 'multi-device') ) {
|
460 |
-
css = self.mediaQuery( css );
|
461 |
-
}
|
462 |
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
css = outputSelector + '{ font-family :' + value +' !important;}';
|
468 |
-
|
469 |
-
if ( jQuery(this).attr( 'multi-device') ) {
|
470 |
-
css = self.mediaQuery( css );
|
471 |
-
}
|
472 |
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
value = jQuery(this).val();
|
477 |
-
css = outputSelector + '{ font-weight :' + value +';}';
|
478 |
-
self.inlineCssInjector(css);
|
479 |
-
break;
|
480 |
-
case 'padding':
|
481 |
-
var unit = jQuery(this).next('.is-unit').val();
|
482 |
-
|
483 |
-
if ( ! unit ) {
|
484 |
-
unit = 'px';
|
485 |
-
}
|
486 |
|
487 |
-
|
488 |
-
|
489 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
if ( position == 'top' || position == 'left' ) {
|
505 |
-
iframe.contents().find( '#rmp_menu_trigger-' + self.menuId ).append(rmpTriggerBox);
|
506 |
-
} else {
|
507 |
-
iframe.contents().find( '#rmp_menu_trigger-' + self.menuId ).prepend(rmpTriggerBox);
|
508 |
-
}
|
509 |
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
value = jQuery(this).val();
|
514 |
-
var new_class = 'rmp-menu-trigger-' + value;
|
515 |
-
all_class = iframe.contents().find( outputSelector ).attr('class').split(" ");
|
516 |
-
all_class.forEach( function( value ) {
|
517 |
-
if ( value.includes( 'rmp-menu-trigger-' ) ) {
|
518 |
-
iframe.contents().find( outputSelector ).removeClass(value);
|
519 |
-
iframe.contents().find( outputSelector ).addClass(new_class);
|
520 |
-
}
|
521 |
-
});
|
522 |
-
break;
|
523 |
-
case 'top':
|
524 |
-
value = jQuery(this).val();
|
525 |
-
unit = jQuery('#rmp-menu-button-top-unit').val();
|
526 |
-
css = outputSelector + '{ top :' + (value + unit) +' !important;}';
|
527 |
-
self.inlineCssInjector(css);
|
528 |
-
break;
|
529 |
-
case 'trigger-side-position':
|
530 |
-
side = jQuery('#rmp-menu-button-left-or-right').val();
|
531 |
-
unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();
|
532 |
-
value = jQuery('#rmp-menu-button-distance-from-side').val();
|
533 |
-
css = outputSelector + '{ '+ side +' :'+ (value + unit) +' !important;}';
|
534 |
-
self.inlineCssInjector(css);
|
535 |
-
break;
|
536 |
-
case 'trigger-side':
|
537 |
-
side = jQuery(this).val();
|
538 |
-
value = jQuery('#rmp-menu-button-distance-from-side').val();
|
539 |
-
unit = jQuery('#rmp-menu-button-distance-from-side-unit').val();
|
540 |
-
|
541 |
-
if( side == 'left' ) {
|
542 |
-
css = outputSelector + '{' + side + ':'+ ( value + unit ) +' !important;right:unset !important}';
|
543 |
-
} else {
|
544 |
-
css = outputSelector + '{' + side + ':'+ ( value + unit ) +' !important;left:unset !important}';
|
545 |
-
}
|
546 |
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
case 'target':
|
563 |
-
if ( jQuery(this).is(':checked') ) {
|
564 |
-
iframe.contents().find(outputSelector).attr('target', '_blank' );
|
565 |
} else {
|
566 |
-
iframe.contents().find(
|
567 |
}
|
568 |
-
break;
|
569 |
-
case 'text-align':
|
570 |
-
var value = jQuery(this).val();
|
571 |
-
iframe.contents().find( outputSelector ).css({
|
572 |
-
'text-align' : value,
|
573 |
-
} );
|
574 |
-
break;
|
575 |
-
case 'border-width':
|
576 |
-
var unit = jQuery(this).next('.is-unit').val();
|
577 |
-
|
578 |
-
if ( ! unit ) {
|
579 |
-
unit = 'px';
|
580 |
-
}
|
581 |
-
|
582 |
-
css = outputSelector + '{ border-width : '+ (this.value + unit) +';}';
|
583 |
-
self.inlineCssInjector(css);
|
584 |
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
'
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
'
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
//Menu title section background hover color.
|
623 |
-
self.bindColor(
|
624 |
-
'#rmp-menu-title-background-hover-colour',
|
625 |
-
'#rmp-menu-title-' + self.menuId ,
|
626 |
-
'background',
|
627 |
-
'hover'
|
628 |
-
);
|
629 |
-
|
630 |
-
// Menu item trigger
|
631 |
-
|
632 |
-
self.bindColor(
|
633 |
-
'#rmp-menu-sub-arrow-shape-colour',
|
634 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow',
|
635 |
-
'color'
|
636 |
-
);
|
637 |
-
|
638 |
-
self.bindColor(
|
639 |
-
'#rmp-menu-sub-arrow-shape-hover-colour',
|
640 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow',
|
641 |
-
'color',
|
642 |
-
'hover'
|
643 |
-
);
|
644 |
-
|
645 |
-
self.bindColor(
|
646 |
-
'#rmp-menu-sub-arrow-shape-colour-active',
|
647 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
648 |
-
'color'
|
649 |
-
);
|
650 |
-
|
651 |
-
self.bindColor(
|
652 |
-
'#rmp-menu-sub-arrow-shape-hover-colour-active',
|
653 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
654 |
-
'color',
|
655 |
-
'hover'
|
656 |
-
);
|
657 |
-
|
658 |
-
self.bindColor(
|
659 |
-
'#rmp-menu-sub-arrow-border-colour',
|
660 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow',
|
661 |
-
'border-color'
|
662 |
-
);
|
663 |
-
|
664 |
-
self.bindColor(
|
665 |
-
'#rmp-menu-sub-arrow-border-hover-colour',
|
666 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow',
|
667 |
-
'border-color',
|
668 |
-
'hover'
|
669 |
-
);
|
670 |
-
|
671 |
-
self.bindColor(
|
672 |
-
'#rmp-menu-sub-arrow-border-colour-active',
|
673 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
674 |
-
'border-color'
|
675 |
-
);
|
676 |
-
|
677 |
-
|
678 |
-
self.bindColor(
|
679 |
-
'#rmp-menu-sub-arrow-border-hover-colour-active',
|
680 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
681 |
-
'border-color',
|
682 |
-
'hover'
|
683 |
-
);
|
684 |
-
|
685 |
-
self.bindColor(
|
686 |
-
'#rmp-menu-sub-arrow-background-color',
|
687 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow',
|
688 |
-
'background'
|
689 |
-
);
|
690 |
-
|
691 |
-
self.bindColor(
|
692 |
-
'#rmp-menu-sub-arrow-background-hover-colour',
|
693 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow',
|
694 |
-
'background',
|
695 |
-
'hover'
|
696 |
-
);
|
697 |
-
|
698 |
-
self.bindColor(
|
699 |
-
'#rmp-menu-sub-arrow-background-colour-active',
|
700 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
701 |
-
'background'
|
702 |
-
);
|
703 |
-
|
704 |
-
self.bindColor(
|
705 |
-
'#rmp-menu-sub-arrow-background-hover-colour-active',
|
706 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
707 |
-
'background',
|
708 |
-
'hover'
|
709 |
-
);
|
710 |
-
|
711 |
-
//Legacy options
|
712 |
-
self.bindColor(
|
713 |
-
'#rmp-submenu-sub-arrow-shape-colour',
|
714 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow',
|
715 |
-
'color'
|
716 |
-
);
|
717 |
-
|
718 |
-
self.bindColor(
|
719 |
-
'#rmp-submenu-item-border-colour-hover',
|
720 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow',
|
721 |
-
'color',
|
722 |
-
'hover'
|
723 |
-
);
|
724 |
-
|
725 |
-
|
726 |
-
self.bindColor(
|
727 |
-
'#rmp-submenu-sub-arrow-shape-colour-active',
|
728 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
729 |
-
'color'
|
730 |
-
);
|
731 |
-
|
732 |
-
|
733 |
-
self.bindColor(
|
734 |
-
'#rmp-submenu-sub-arrow-shape-hover-colour-active',
|
735 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
736 |
-
'color',
|
737 |
-
'hover'
|
738 |
-
);
|
739 |
-
|
740 |
-
self.bindColor(
|
741 |
-
'#rmp-submenu-sub-arrow-border-colour',
|
742 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow',
|
743 |
-
'border-color'
|
744 |
-
);
|
745 |
-
|
746 |
-
self.bindColor(
|
747 |
-
'#rmp-submenu-sub-arrow-border-hover-colour',
|
748 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow',
|
749 |
-
'border-color',
|
750 |
-
'hover'
|
751 |
-
);
|
752 |
-
|
753 |
-
self.bindColor(
|
754 |
-
'#rmp-submenu-sub-arrow-border-colour-active',
|
755 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
756 |
-
'border-color'
|
757 |
-
);
|
758 |
-
|
759 |
-
self.bindColor(
|
760 |
-
'#rmp-submenu-sub-arrow-border-hover-colour-active',
|
761 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
762 |
-
'border-color',
|
763 |
-
'hover'
|
764 |
-
);
|
765 |
-
|
766 |
-
self.bindColor(
|
767 |
-
'#rmp-submenu-sub-arrow-background-color',
|
768 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow',
|
769 |
-
'background'
|
770 |
-
);
|
771 |
-
|
772 |
-
self.bindColor(
|
773 |
-
'#rmp-submenu-sub-arrow-background-hover-colour',
|
774 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow',
|
775 |
-
'background',
|
776 |
-
'hover'
|
777 |
-
);
|
778 |
-
|
779 |
-
self.bindColor(
|
780 |
-
'#rmp-submenu-sub-arrow-background-colour-active',
|
781 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
782 |
-
'background'
|
783 |
-
);
|
784 |
|
785 |
-
|
786 |
-
'#rmp-submenu-sub-arrow-background-hover-colour-active',
|
787 |
-
'#rmp-menu-wrap-' + self.menuId + ' .rmp-submenu .rmp-menu-subarrow.rmp-menu-subarrow-active',
|
788 |
-
'background',
|
789 |
-
'hover'
|
790 |
-
);
|
791 |
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
self.onTyping('.rmp-menu-title-section-padding','#rmp-menu-title-'+ self.menuId , 'section-padding' );
|
812 |
-
self.onTyping('.rmp-menu-section-padding','#rmp-menu-wrap-'+ self.menuId , 'section-padding' );
|
813 |
-
self.onTyping('.rmp-menu-search-section-padding','#rmp-search-box-'+ self.menuId , 'section-padding' );
|
814 |
-
self.onTyping('.rmp-menu-additional-section-padding','#rmp-menu-additional-content-'+ self.menuId , 'section-padding' );
|
815 |
-
|
816 |
-
// CONTENT BASED ELEMENTS.
|
817 |
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
self.onTyping('#rmp-menu-search-box-border-radius','#rmp-search-box-'+ self.menuId + ' .rmp-search-box','border-radius' );
|
823 |
-
|
824 |
-
|
825 |
-
self.onTyping('#rmp-menu-menu-title','#rmp-menu-title-'+ self.menuId +' #rmp-menu-title-link span', 'text' );
|
826 |
-
self.onTyping('#rmp-menu-additional-content','#rmp-menu-additional-content-'+ self.menuId,'text');
|
827 |
-
self.onTyping('#rmp-menu-search-box-text','#rmp-search-box-'+ self.menuId + ' .rmp-search-box','placeholder');
|
828 |
-
self.onTyping('#rmp-menu-title-link', '#rmp-menu-title-' + self.menuId + ' #rmp-menu-title-link','href');
|
829 |
-
self.onTyping('#rmp-menu-title-image-alt', '#rmp-menu-title-' + self.menuId + ' .rmp-menu-title-image','alt');
|
830 |
-
self.onTyping('#rmp-menu-title-font-size', '#rmp-menu-title-' + self.menuId + ' > a','font-size');
|
831 |
-
self.changeInput('#rmp-menu-title-font-size-unit', '#rmp-menu-title-' + self.menuId + ' > a','font-size' );
|
832 |
-
self.changeInput('#rmp-menu-additional-content-font-size-unit', '#rmp-menu-additional-content-' + self.menuId ,'font-size' );
|
833 |
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |