/*! For license information please see rmpMain.js.LICENSE.txt */ (function(){var __webpack_modules__={"./assets/admin/js/rmp-admin.js":function(){eval("/**\n * This is admin scripts file which contain the admin actions.\n *\n * @version 4.0.0\n *\n * @author Expresstech System\n *\n */\njQuery(document).ready(function (jQuery) {\n /**\n * Iframe loader and contents show/hide.\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 /**\n * Save the theme as template.\n *\n * @since 4.0.0\n *\n * @fires Click\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(_error) {\n console.log(_error.statusText);\n },\n success: function success(response) {\n jQuery(e.target).parents('.rmp-dialog-contents').append('
' + response.data.message + '
' + response.data.message + '
' + response.data.message + '