From a73f018731368b2b11ee718f3ee1ff185e9fa9bc Mon Sep 17 00:00:00 2001 From: Hasan Tareq Date: Fri, 8 Apr 2022 16:21:20 +0600 Subject: [PATCH 01/88] New megamenu item adding started --- assets/js/wpmm-admin.js | 10 +- classes/class.wp-megamenu-base.php | 26 +- views/admin/item_settings.php | 685 ++--------------------------- 3 files changed, 52 insertions(+), 669 deletions(-) diff --git a/assets/js/wpmm-admin.js b/assets/js/wpmm-admin.js index b1a2f22..062f0bc 100644 --- a/assets/js/wpmm-admin.js +++ b/assets/js/wpmm-admin.js @@ -322,7 +322,7 @@ } }); }); - $(document).on('click','.wpmm-isp-close-btn', function(e){ + $(document).on('click','.wpmm-isp-close-btn, #wpmmSettingOverlay', function(e){ e.preventDefault(); $('.wp-megamenu-item-settins-wrap').hide(); $('#wpmmSettingOverlay').hide(); @@ -824,7 +824,7 @@ }); /* - * Export Current Mega Menu Theme + * Export Current Mega Menu Theme */ function download_to_txt(filename, text) { var element = document.createElement("a"); @@ -841,9 +841,9 @@ document.body.removeChild(element); } - + /* - * Export Current Mega Menu Theme + * Export Current Mega Menu Theme */ $(".export-wpmm-theme").on("click", function (e) { @@ -864,7 +864,7 @@ }); /* - * Export Mega Menu + * Export Mega Menu */ $(".wp-megamenu-nav-export").on("click", function (e) { e.preventDefault(); diff --git a/classes/class.wp-megamenu-base.php b/classes/class.wp-megamenu-base.php index 0647249..2846466 100644 --- a/classes/class.wp-megamenu-base.php +++ b/classes/class.wp-megamenu-base.php @@ -122,19 +122,19 @@ public function wpneo_enqueue_frontend_script(){ if ( ! empty($enable_icofont) && $enable_icofont !== 'disable'){ wp_enqueue_style('wpmm_icofont_css', WPMM_URL .'assets/icofont/icofont.min.css', false, '1.0.1'); } - + wp_enqueue_style( 'wpmm_css', WPMM_URL .'assets/css/wpmm.css', array('dashicons'), WPMM_VER ); wp_enqueue_script( 'wpmm_js', WPMM_URL .'assets/js/wpmm.js', array('jquery'), WPMM_VER, true); // For Ajax URL wp_enqueue_script('wpmm_js'); - wp_localize_script( 'wpmm_js', 'ajax_objects', array( + wp_localize_script( 'wpmm_js', 'ajax_objects', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'redirecturl' => home_url('/'), 'loadingmessage' => __('Sending user info, please wait...','patrios') )); - + $responsive_breakpoint = get_wpmm_option('responsive_breakpoint'); if (empty($responsive_breakpoint)){ @@ -453,10 +453,10 @@ public function add_widgets_to_menu( $items, $args ) { $cta_btn_text = get_wpmm_theme_option('cta_btn_text', $theme_id); $cta_btn_link = get_wpmm_theme_option('cta_btn_link', $theme_id); - $login_signup = get_wpmm_theme_option('login_signup', $theme_id); + $login_signup = get_wpmm_theme_option('login_signup', $theme_id); $enable_login_form = get_wpmm_theme_option('enable_login_form', $theme_id); - $enable_woocart = get_wpmm_theme_option('enable_woocart', $theme_id); + $enable_woocart = get_wpmm_theme_option('enable_woocart', $theme_id); if (function_exists('wpmm_pro_init')){ # Woocart Button @@ -582,7 +582,7 @@ public function wpmm_menu_item_option_save(){ $menu_item_id = sanitize_text_field($_POST['menu_item_id']); $get_menu_settings = (array) maybe_unserialize(get_post_meta($menu_item_id, 'wpmm_layout', true)); - + $get_menu_settings['options']['menu_icon_image'] = wpmm_item_settings_input('menu_icon_image'); $get_menu_settings['options']['menu_bg_image'] = wpmm_item_settings_input('menu_bg_image'); $get_menu_settings['options']['disable_link'] = wpmm_item_settings_input('disable_link'); @@ -805,7 +805,7 @@ public function wpmm_generate_css(){ $style = ''; echo wpmm_sanitize_inline_css_output( $style ); diff --git a/views/admin/item_settings.php b/views/admin/item_settings.php index 8a4f8d6..6bda930 100644 --- a/views/admin/item_settings.php +++ b/views/admin/item_settings.php @@ -1,666 +1,49 @@ get_all_registered_widget(); -//Get Menu Name +$widgets = $widgets_manager->get_all_registered_widget(); +// Get Menu Name ?> -
- -
-

-
- -
-

- -
- > - -
- -
- - - -
- -
- - -
-
-
- -
- -
-
    - -
  • -
  • -
-
- -
-
- -
-
- '; - if ( ! empty( $wpmm_layout['layout'] ) && count( $wpmm_layout['layout'] ) ) { - foreach ($wpmm_layout['layout'] as $layout_key => $layout_value) { - echo '
'; - - echo '
'; - echo '

'.esc_html__('Row', 'wp-megamenu').'

'; - echo '

'; - echo '
'; - echo '
'; - if ( ! empty( $layout_value['row'] ) && count( $layout_value['row'] ) ) { - foreach ($layout_value['row'] as $col_key => $layout_col){ - $layout_columns = ! empty( $layout_col['col'] ) ? $layout_col['col'] : 6; - - echo '
'; - - echo '
'; - echo '
'; - echo ' '.esc_html__('Column', 'wp-megamenu').' - '; - echo '
'; - - foreach ($layout_col['items'] as $key => $value){ - if ($value['item_type'] == 'widget'){ - wp_megamenu_widgets()->widget_items($value['widget_id'], $get_menu_settings, $key); - }else{ - wp_megamenu_widgets()->menu_items($value, $key); - } - } - - echo '
'; - - echo '
'; - } - } - echo '
'; - } - } - echo '
'; - - echo '
'; - echo ''; - - $builderLayout = ''; - echo $builderLayout; - - echo '
'; - ?> -
-
- '.esc_html__('WP Megamenu will be work only in top level menu', 'wp-megamenu').'

'; - } ?> -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
- '; - echo ' '; - } - ?> -
- -

-
-
- > -
>
>
>
>
>
- -
- -
- -
- - -

-
- -
- -
- -
- -
- -
- -
- -
- -

-

-
- -
- -
- -
- -
- -
- -
- -
- -

-
-
- -
-
- '; - echo ' '; - } - ?> -
- -

-
-
-
- - -
-
- - - -
- -
- -
- -
- - - - - - - - -

1px solid #dddddd', 'wp-megamenu'); ?>

-

-
- -
- -
- -
- -
- -
- -
- -
- -

-
- -
-
- -
- -
-
- -
-
    -
  • -
  • -
  • -
-
- -
-
- - -
-
- -
-
- -
- -
-  "; - foreach ($dashicons as $dikey => $diname){ - $selected_icon = ($current_icon == 'dashicons '.$dikey) ? 'wpmm-icon-selected' :''; - echo ' - '; - } - ?> -
- -
-  "; - foreach ($font_awesome as $dikey => $diname){ - $selected_icon = ($current_icon == 'fa '.$diname) ? 'wpmm-icon-selected' :''; - echo ' - '; - } - ?> -
- -
-  "; - foreach ($icofont as $diname) { - $selected_icon = ($current_icon == 'icofont-'.$diname) ? 'wpmm-icon-selected' :''; - echo ' - '; - } - ?> -
- -
-
- - -
-
- -
- + From 0fad3c9aef0bb80d308746dac79c3844e0737c45 Mon Sep 17 00:00:00 2001 From: Hasan Tareq Date: Mon, 11 Apr 2022 15:56:10 +0600 Subject: [PATCH 02/88] Menu item popup sidebar item added --- assets/css/wpmm-admin-items.css | 179 +++++++++++++++++++++++++++++ assets/css/wpmm-admin.css | 65 +++++------ classes/class.wp-megamenu-base.php | 2 + views/admin/item_settings.php | 110 +++++++++++++++++- 4 files changed, 314 insertions(+), 42 deletions(-) create mode 100644 assets/css/wpmm-admin-items.css diff --git a/assets/css/wpmm-admin-items.css b/assets/css/wpmm-admin-items.css new file mode 100644 index 0000000..82cfa8c --- /dev/null +++ b/assets/css/wpmm-admin-items.css @@ -0,0 +1,179 @@ + +/* wpmm item input */ +.wpmm-item-row{ + display: flex; +} +.wpmm-space-between{ + justify-content: space-between; +} + +.wpmm-align-center{ + align-items: center; +} + + +.wpmm-item-field{ + margin-bottom: 15px; +} +/* input-group */ +.input-group { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: stretch; + width: 100%; +} +.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { + margin-left: -1px; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3), .input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.form-control { + display: block; + width: 100%; + padding: .375rem .75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: .25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; +} +.form-select { + display: block; + width: 100%; + padding: .375rem 2.25rem .375rem .75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right .75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: .25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.input-group>.form-control, .input-group>.form-select { + position: relative; + flex: 1 1 auto; + width: 1%; + min-width: 0; +} + + +/* wpmm-form-check */ +.wpmm-form-check { + display: block; + min-height: 1.5rem; + padding-left: 1.5em; + margin-bottom: .125rem; +} +input.wpmm-form-check-input[type=checkbox]:checked::before { + display: none; +} +.wpmm-form-check-input { + width: 1em; + height: 1em; + margin-top: .25em; + vertical-align: top; + background-color: #fff; + background-repeat: no-repeat; + background-position: center; + background-size: contain; + border: 1px solid rgba(0,0,0,.25); + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + -webkit-print-color-adjust: exact; + color-adjust: exact; +} +.wpmm-form-check-input:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); +} + +.wpmm-form-switch { + padding-left: 2.5em; +} +.wpmm-form-switch .wpmm-form-check-input { + width: 2.7em!important; + margin-left: -2.5em; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); + background-position: left center; + border-radius: 2em!important; + transition: background-position .15s ease-in-out; + background-repeat: no-repeat; +} +.wpmm-form-switch .wpmm-form-check-input:checked { + background-position: right center; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); +} +.wpmm-form-check-input:checked { + background-color: #2271b1; + border-color: #2271b1!important; +} + +/* modal */ +.wpmm-modal { + background: #f3f6f4; + position: relative; + color: #3c434a; +} +.wpmm-modal, .wpmm-modal-dialog, .wpmm-modal-content{ + height: 100%; +} +.wpmm-modal .wpmm-modal-title{ + margin: 0; + font-size: 18px; +} +.wpmm-modal .wpmm-modal-content{ + display: flex; + flex-direction: column; + justify-content: space-between; +} +.wpmm-modal .wpmm-modal-content .wpmm-modal-header, +.wpmm-modal .wpmm-modal-content .wpmm-modal-footer{ + padding: 16px 20px; + display: flex; + justify-content: space-between; + background: #dedede; +} +.wpmm-modal .wpmm-modal-body{ + flex-grow: 1; + overflow: hidden; + padding: 10px; + display: flex; +} +.wpmm-modal .wpmm-modal-body .wpmm-item-sidebar{ + background: #ffffff; + padding: 10px; + box-shadow: 0px 2px 4px rgb(20 50 80 / 20%); + border-radius: 5px; + width: 230px; + margin-right: 10px; +} +.wpmm-modal .wpmm-modal-body .wpmm-item-content{ + flex-grow: 1; +} +.wpmm-modal-dialog { + +} \ No newline at end of file diff --git a/assets/css/wpmm-admin.css b/assets/css/wpmm-admin.css index 9be71dd..5588c2b 100644 --- a/assets/css/wpmm-admin.css +++ b/assets/css/wpmm-admin.css @@ -13,11 +13,11 @@ img{ :focus { outline: 0; } -.wpmm-item-settings-content input:focus, -.wpmm-item-settings-content textarea:focus, +.wpmm-item-settings-content input:focus, +.wpmm-item-settings-content textarea:focus, .wpmm-item-settings-content select:focus, -.wpmm-theme-settings input:focus, -.wpmm-theme-settings textarea:focus, +.wpmm-theme-settings input:focus, +.wpmm-theme-settings textarea:focus, .wpmm-theme-settings select:focus { outline-offset: 0; outline: 0; @@ -31,9 +31,9 @@ img{ -webkit-box-shadow: none; box-shadow: none; } -.wpmm-item-settings-content input[type=radio], +.wpmm-item-settings-content input[type=radio], .wpmm-item-settings-content input[type=checkbox], -.wpmm-theme-settings input[type=radio], +.wpmm-theme-settings input[type=radio], .wpmm-theme-settings input[type=checkbox] { border: 1px solid #E5E5E5; box-shadow: none; @@ -460,6 +460,7 @@ ul.wpmm-widget-lists li:first-child{ top: 50%; left: 50%; transform: translate(-50%, -50%); + display: flex; } .wpmm-item-settings-title{ @@ -468,9 +469,9 @@ ul.wpmm-widget-lists li:first-child{ width: 240px; float: left; } -.wpmm-item-settings-content{ - position: relative; - height: 100%; +.wpmm-item-settings-content { + flex-grow: 1; + min-height: 100%; } .wpmm-item-settings-top-bar h1 { color: #ffffff; @@ -750,6 +751,7 @@ Choose layout .wpmm-row-right { float: right; } + .wpmmRowDeleteIcon{ cursor: pointer; color: #D0011B; @@ -782,7 +784,7 @@ div[class*="wpmm-col-"] .wpmm-item-wrap { border: 1px solid #eee; margin: 5px; padding: 10px; - + } .wpmm-col-12{ width: 100%; @@ -901,7 +903,7 @@ input.wpmm_theme_title{ width: 60px; line-height: 60px; display: inline-block; - text-align: center; + text-align: center; } .wpmm-main-setting-panel ul li a{ color: #fff; @@ -923,7 +925,7 @@ input.wpmm_theme_title{ .wpmm-main-setting-table th { width: 330px; } -.wpmm-main-setting-table td, +.wpmm-main-setting-table td, .wpmm-main-setting-table th { padding: 22px 25px; vertical-align: middle; @@ -989,13 +991,13 @@ input.wpmm_theme_title{ color: #d07474; } .wpmm-theme-list-tr .text-right a.btn-close:hover { - background: #d07474; - color: #fff; + background: #d07474; + color: #fff; } .wpmm-theme-list-tr a { text-decoration: none; } -.wpmm-theme-list-tr td, +.wpmm-theme-list-tr td, .wpmm-theme-list-tr th { padding: 20px 25px; vertical-align: middle; @@ -1088,7 +1090,7 @@ input.wpmm_theme_title{ .wpmm-settings-wrap .wpmm-settings-tabs-menu ul li a:hover { color: #fff; } -.wpmm-tabs-menu ul li.ui-state-active a:after, +.wpmm-tabs-menu ul li.ui-state-active a:after, .wpmm-settings-wrap .wpmm-settings-tabs-menu ul li.ui-state-active a:after{ position: absolute; content: ""; @@ -1112,7 +1114,7 @@ input.wpmm_theme_title{ .btn-theme-setting-wrap p.submit{ text-align: right; } -.btn-theme-setting-wrap p.submit .button-primary, +.btn-theme-setting-wrap p.submit .button-primary, .wpmm-theme-settings-head p.submit .button-primary{ background: #0073aa; box-shadow: none; @@ -1196,7 +1198,7 @@ input.wpmm_theme_title{ text-decoration: none; color: #C7C7C7; font-weight: 400; - position: relative; + position: relative; } .wpmm-tabs-menu-builder ul li a i { margin-right: 5px; @@ -1212,17 +1214,6 @@ input.wpmm_theme_title{ .menu-layout-list > li a { text-decoration: none; } -.wpmm-modal { - background: #4a90e2; - width: 620px; - border-radius: 5px; - margin: 10px auto; - position: relative; -} -.wpmm-modal-dialog { - margin: 100px auto; - width: 600px; -} .menu-layout-list { margin: 25px 0 10px; padding: 30px 0px 15px; @@ -1260,10 +1251,10 @@ input.wpmm_theme_title{ border-radius: 3px 0 0 3px; } .last-grid { - border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; } .first-grid.last-grid { - border-radius: 3px; + border-radius: 3px; } .grid-design444 { width: 30%; @@ -1322,7 +1313,7 @@ input.wpmm_theme_title{ } @media only screen and (max-width: 500px) { - + } @@ -1439,7 +1430,7 @@ input.wpmm_theme_title{ .wpmm-theme-settings .wpmm_img_delete:hover, .wpmm-menu-builder-settings-panel .wpmm_img_delete:hover { background: #c51c1c; - color: #fff; + color: #fff; } .wpmm_img_delete:hover{ @@ -1520,7 +1511,7 @@ input.wpmm_theme_title{ background: none; } .wpmm-theme-settings-head .left h3 { - color: #4592E8; + color: #4592E8; } } @@ -1572,7 +1563,7 @@ input.wpmm_theme_title{ .wpmm-theme-head .left { font-size: 13px; } - .wpmm-theme-list-tr td, + .wpmm-theme-list-tr td, .wpmm-theme-list-tr th{ display: table-cell; vertical-align: inherit; @@ -1585,7 +1576,7 @@ input.wpmm_theme_title{ .wpmm-settings-wrap .wpmm-settings-tabs-menu { width: 100%; } - .wpmm-tabs-menu ul li.ui-state-active a:after, + .wpmm-tabs-menu ul li.ui-state-active a:after, .wpmm-settings-wrap .wpmm-settings-tabs-menu ul li.ui-state-active a:after { display: none; } @@ -1605,7 +1596,7 @@ input.wpmm_theme_title{ .order_data_column_container .select2-container { z-index: 999 !important; } -span.dashicons.dashicons-arrow-right-alt2.wpmm-right.wpmm-gridcontrol-right.disablebtn, +span.dashicons.dashicons-arrow-right-alt2.wpmm-right.wpmm-gridcontrol-right.disablebtn, span.dashicons.dashicons-arrow-left-alt2.wpmm-left.wpmm-gridcontrol-left.disablebtn, span.dashicons.dashicons-arrow-right-alt2.wpmm-right.wpmm-gridcontrol-right { width: 36px; diff --git a/classes/class.wp-megamenu-base.php b/classes/class.wp-megamenu-base.php index 2846466..9c6b20f 100644 --- a/classes/class.wp-megamenu-base.php +++ b/classes/class.wp-megamenu-base.php @@ -106,6 +106,7 @@ public function wpneo_enqueue_admin_script($hook){ wp_enqueue_style('wpmm_fontawesome_css_admin', WPMM_URL .'assets/font-awesome-4.7.0/css/font-awesome.min.css', false, '4.7.0'); wp_enqueue_style('wpmm_icofont_css_admin', WPMM_URL .'assets/icofont/icofont.min.css', false, '1.0.1'); wp_enqueue_style('wpmm_css_admin', WPMM_URL .'assets/css/wpmm-admin.css', false, WPMM_VER); + wp_enqueue_style('wpmm_css_admin_items', WPMM_URL .'assets/css/wpmm-admin-items.css', false, WPMM_VER); } public function wpneo_enqueue_frontend_script(){ @@ -302,6 +303,7 @@ public function wpmm_item_settings_load(){ update_post_meta($menu_item_id, 'wpmm_layout', $get_layout); } + // include WPMM_DIR.'views/admin/item_settings_x.php'; include WPMM_DIR.'views/admin/item_settings.php'; die(); } diff --git a/views/admin/item_settings.php b/views/admin/item_settings.php index 6bda930..d8ce922 100644 --- a/views/admin/item_settings.php +++ b/views/admin/item_settings.php @@ -32,17 +32,117 @@
-
Modal title
-
-

Modal body text goes here.

+
+
+
+
+ +
+ +
+
+
+
+
+ +
+ + +
+
+
+ +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+
+ +
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ +
+
+
+ One of three columns +
From 4fb44174ceda194edf520f7a91be9ff44be3f75c Mon Sep 17 00:00:00 2001 From: Hasan Tareq Date: Tue, 12 Apr 2022 15:57:51 +0600 Subject: [PATCH 03/88] Sidebar form item added, started to row layout builder --- assets/css/wpmm-admin-items.css | 174 +++++++++++++++---- assets/css/wpmm-admin.css | 13 +- views/admin/item_settings.php | 299 +++++++++++++++++++++++++++++--- 3 files changed, 423 insertions(+), 63 deletions(-) diff --git a/assets/css/wpmm-admin-items.css b/assets/css/wpmm-admin-items.css index 82cfa8c..8c0d258 100644 --- a/assets/css/wpmm-admin-items.css +++ b/assets/css/wpmm-admin-items.css @@ -1,37 +1,80 @@ - /* wpmm item input */ -.wpmm-item-row{ +.wpmm-item-row { display: flex; } -.wpmm-space-between{ + +.wpmm-item-col-3 { + width: 25%; +} + +.wpmm-wrap { + flex-wrap: wrap; +} + +.wpmm-space-between { justify-content: space-between; } -.wpmm-align-center{ +.wpmm-item-row .wpmm-item-field { + flex-grow: 1; +} + +.wpmm-align-center { align-items: center; } +.wpmm-gap-1 { + gap: 1em; +} + +.wpmm-gap-2 { + gap: 2em; +} + +.wpmm-item-field { + margin-bottom: 20px; +} + +.wpmm-item-field label { + display: inline-block; + margin-bottom: 5px; +} -.wpmm-item-field{ - margin-bottom: 15px; +.wpmm-item-field .wpmm-item-row>label { + white-space: nowrap; + margin-right: 5px; } + +.input-sm input[type=text] { + padding-left: 5px; + padding-right: 5px; +} + +.wpmm-text-center { + text-align: center; +} + /* input-group */ .input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; - width: 100%; } + +.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback)>*, .input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; } -.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3), .input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) { + +.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3), +.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) { border-top-right-radius: 0; border-bottom-right-radius: 0; } + .form-control { display: block; width: 100%; @@ -47,8 +90,10 @@ -moz-appearance: none; appearance: none; border-radius: .25rem; - transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; + transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; + margin: 0; } + .form-select { display: block; width: 100%; @@ -63,15 +108,17 @@ background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px 12px; - border: 1px solid #ced4da; + border: 1px solid #8c8c8c; border-radius: .25rem; - transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; + transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; -webkit-appearance: none; -moz-appearance: none; appearance: none; + margin: 0; } -.input-group>.form-control, .input-group>.form-select { +.input-group>.form-control, +.input-group>.form-select { position: relative; flex: 1 1 auto; width: 1%; @@ -82,13 +129,13 @@ /* wpmm-form-check */ .wpmm-form-check { display: block; - min-height: 1.5rem; padding-left: 1.5em; - margin-bottom: .125rem; } + input.wpmm-form-check-input[type=checkbox]:checked::before { display: none; } + .wpmm-form-check-input { width: 1em; height: 1em; @@ -98,38 +145,42 @@ input.wpmm-form-check-input[type=checkbox]:checked::before { background-repeat: no-repeat; background-position: center; background-size: contain; - border: 1px solid rgba(0,0,0,.25); + border: 1px solid #8c8c8c; -webkit-appearance: none; -moz-appearance: none; appearance: none; -webkit-print-color-adjust: exact; color-adjust: exact; } + .wpmm-form-check-input:focus { border-color: #86b7fe; outline: 0; - box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); + box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); } .wpmm-form-switch { padding-left: 2.5em; } + .wpmm-form-switch .wpmm-form-check-input { - width: 2.7em!important; - margin-left: -2.5em; + width: 2.7em !important; + margin-right: 0; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e"); background-position: left center; - border-radius: 2em!important; + border-radius: 2em !important; transition: background-position .15s ease-in-out; background-repeat: no-repeat; } + .wpmm-form-switch .wpmm-form-check-input:checked { background-position: right center; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); } + .wpmm-form-check-input:checked { background-color: #2271b1; - border-color: #2271b1!important; + border-color: #2271b1 !important; } /* modal */ @@ -138,42 +189,105 @@ input.wpmm-form-check-input[type=checkbox]:checked::before { position: relative; color: #3c434a; } -.wpmm-modal, .wpmm-modal-dialog, .wpmm-modal-content{ + +.wpmm-row-column input[type=number] { + max-width: 60px; +} + +.wpmm-modal input[type=number] { + padding-left: 5px; + padding-right: 5px; +} + +.wpmm-modal input, +.wpmm-modal input[type=number], +.wpmm-modal select { + height: 30px; + font-size: 13px; +} + +.wpmm-modal, +.wpmm-modal-dialog, +.wpmm-modal-content { height: 100%; } -.wpmm-modal .wpmm-modal-title{ + +.wpmm-modal .wpmm-modal-title { margin: 0; font-size: 18px; } -.wpmm-modal .wpmm-modal-content{ + +.wpmm-modal .wpmm-modal-content { display: flex; flex-direction: column; justify-content: space-between; } + .wpmm-modal .wpmm-modal-content .wpmm-modal-header, -.wpmm-modal .wpmm-modal-content .wpmm-modal-footer{ +.wpmm-modal .wpmm-modal-content .wpmm-modal-footer { padding: 16px 20px; display: flex; - justify-content: space-between; background: #dedede; } -.wpmm-modal .wpmm-modal-body{ + +.wpmm-space-between { + justify-content: space-between; +} + +.wpmm-justify-end { + justify-content: end; +} + +.wpmm-modal .wpmm-modal-body { flex-grow: 1; overflow: hidden; padding: 10px; display: flex; } -.wpmm-modal .wpmm-modal-body .wpmm-item-sidebar{ + +.wpmm-modal .wpmm-modal-body .wpmm-item-sidebar { background: #ffffff; - padding: 10px; + padding: 16px; box-shadow: 0px 2px 4px rgb(20 50 80 / 20%); border-radius: 5px; width: 230px; margin-right: 10px; + overflow: hidden scroll; } -.wpmm-modal .wpmm-modal-body .wpmm-item-content{ + +.wpmm-modal .wpmm-modal-body .wpmm-item-content { flex-grow: 1; } -.wpmm-modal-dialog { +.wpmm-modal-dialog {} + +.wpmm-ml-3 { + margin-left: 1.5em; +} + +.wpmm-ml-5 { + margin-left: 2em; +} + + +/* content area css */ +.wpmm-add-row { + margin-top: 40px; + text-align: center; +} + +.wpmm-column-layout svg { + fill: #2271b1; +} +.wpmm-add-slots { + background: #fff; + box-shadow: 0px 1px 20px 0px #22222254; + padding: 20px; + border-radius: 10px; + width: 500px; + display: none; + margin: 20px auto 50px; + position: absolute; + left: 0; + right: 0; } \ No newline at end of file diff --git a/assets/css/wpmm-admin.css b/assets/css/wpmm-admin.css index 5588c2b..6e05836 100644 --- a/assets/css/wpmm-admin.css +++ b/assets/css/wpmm-admin.css @@ -35,10 +35,9 @@ img{ .wpmm-item-settings-content input[type=checkbox], .wpmm-theme-settings input[type=radio], .wpmm-theme-settings input[type=checkbox] { - border: 1px solid #E5E5E5; + border: 1px solid #8c8c8c; box-shadow: none; border-radius: 2px; - margin: 0 4px 0 0; padding: 0; width: 20px; height: 20px; @@ -86,7 +85,7 @@ img{ width: 200px;*/ box-shadow: none; - border: 1px solid #f2f2f2; + border: 1px solid #8c8c8c; border-radius: 2px; padding: 2px 15px; /* width: 164px; @@ -125,7 +124,7 @@ img{ line-height: 16px; height: 34px; box-shadow: none; - border: 1px solid #f2f2f2; + border: 1px solid #8c8c8c; border-radius: 2px; margin-right: 10px; width: 200px; @@ -1646,12 +1645,6 @@ Manual Integration Code width: 90px; } - -.wp-core-ui select { - color: #32373c; - border-color: #f2f2f2; -} - .badge_text_style input[type="text"] { float: left; } diff --git a/views/admin/item_settings.php b/views/admin/item_settings.php index d8ce922..29963a2 100644 --- a/views/admin/item_settings.php +++ b/views/admin/item_settings.php @@ -31,7 +31,7 @@