Skip to content

Commit

Permalink
Merge branch 'release/3.7.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
nurul-umbhiya committed Nov 30, 2022
2 parents dbec025 + dab5dfa commit fc97475
Show file tree
Hide file tree
Showing 23 changed files with 1,481 additions and 1,017 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
**Donate Link:** http://tareq.co/donate/
**Tags:** WooCommerce multivendor marketplace, multi vendor marketplace, multi seller store, multi-vendor, multi seller, commissions, multivendor, marketplace, product vendors, woocommerce vendor, commission rate, e-commerce, woocommerce, ebay, ecommerce, yith, yithemes
**Requires at least:** 5.4
**Tested up to:** 6.1
**Tested up to:** 6.1.1
**WC requires at least:** 5.0.0
**WC tested up to:** 7.1.0
**Requires PHP:** 7.2
**Stable tag:** 3.7.6
**Stable tag:** 3.7.7
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -313,6 +313,13 @@ A. Just install and activate the PRO version without deleting the free plugin. A

## Changelog ##

### v3.7.7 ( Nov 30, 2022 ) ###

- **update:** Added date filter - `after/before` for Order REST API
- **update:** Added `dokan_bank_payment_fields_placeholders` Filter to change the label and placeholder of bank payment fields
- **update:** Updated UI/UX of vendor dashboard submenu
- **update:** Added section, sub-section label, description search under Dokan admin settings

### v3.7.6 ( Nov 14, 2022 ) ###

- **fix:** Fixed a sql security issue while searching for products via ajax from vendor dashboard
Expand Down
40 changes: 40 additions & 0 deletions assets/css/rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@
right: 93%;
border-width: 16px 0px 16px 16px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active a {
padding-left: 16px;
padding-right: 0;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active a i.menu-dropdown {
display: none;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover a i.menu-dropdown {
display: none;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover:not(.active).has-submenu:after {
right: 92%;
border-width: 16px 0px 16px 16px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover:not(.active) ul.navigation-submenu {
right: 100%;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover:not(.active) ul.navigation-submenu li {
padding-left: 0;
padding-right: 0.75em;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.back a {
padding-left: 0px;
padding-right: 16px;
Expand All @@ -100,6 +121,7 @@
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a i {
margin-top: 5px;
padding-left: 8px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a i.fa-angle-right {
padding-top: 0px;
Expand All @@ -109,9 +131,27 @@
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a i.menu-dropdown {
transform: translateX(-50%) translateY(0%) rotate(180deg);
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a i.menu-dropdown::before {
padding-left: 0;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.dokan-common-links a {
padding: 5% 5%;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu {
margin-right: 0;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li {
padding-right: 1em;
padding-left: 0;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li:hover:before,
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li.current:before {
right: 1%;
left: auto;
}
.dokan-dashboard .product-edit-new-container .dokan-edit-row .dokan-section-heading h2 {
float: right;
}
Expand Down
112 changes: 110 additions & 2 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,6 @@ article.dokan-notice-single-notice-area span.dokan-single-announcement-date {
width: 17%;
_float: left;
flex: 1 auto;
overflow: hidden;
background-color: #242424;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu {
Expand All @@ -2084,6 +2083,7 @@ article.dokan-notice-single-notice-area span.dokan-single-announcement-date {
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li {
margin: 0;
position: relative;
cursor: pointer;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a {
padding: 10px 0 10px 18px;
Expand All @@ -2097,10 +2097,52 @@ article.dokan-notice-single-notice-area span.dokan-single-announcement-date {
font-size: 17px;
padding-right: 15px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li a i.menu-dropdown::before {
padding-left: 15px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover {
background: #f05025;
color: #fff;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover ul.navigation-submenu {
position: relative;
top: auto;
left: auto;
right: auto;
bottom: auto;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover:not(.active).has-submenu:after {
right: 0;
top: 1.3rem;
border: transparent solid;
content: ' ';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: transparent #242424eb transparent transparent;
border-left-color: #242424eb;
border-width: 16px 16px 16px 0;
margin-top: -16px;
z-index: 990;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover:not(.active) ul.navigation-submenu {
position: absolute;
bottom: 0;
left: 100%;
min-width: 165px;
display: block;
background: #242424eb;
border-bottom: none;
padding: 1.5px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover:not(.active) ul.navigation-submenu li {
display: block;
padding-left: 0.5em;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li:hover a i.menu-dropdown {
display: none;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.dokan-common-links:hover {
background: none !important;
}
Expand All @@ -2117,13 +2159,54 @@ article.dokan-notice-single-notice-area span.dokan-single-announcement-date {
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.dokan-common-links a:last-child {
border-right: none;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu {
list-style: none;
position: absolute;
top: -1000em;
left: 160px;
overflow: visible;
word-wrap: break-word;
z-index: 9999;
box-shadow: 0 3px 5px rgb(0 0 0%);
margin-left: 0;
background: #242424ed;
padding: 3px 0;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li {
padding-left: 1.3em;
line-height: 1;
background: #242424ed;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li a {
font-size: 13px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li:hover,
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li.current {
background: inherit;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li:hover:before,
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li.current:before {
left: 0.75%;
top: 4%;
border: transparent solid;
content: ' ';
height: 90%;
position: absolute;
pointer-events: none;
border-color: #fff;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li:hover a,
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.navigation-submenu li.current a {
font-weight: 800 !important;
color: #fff;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active {
position: relative;
background: #f05025;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active:after {
left: 93%;
top: 50%;
top: 1.3rem;
border: transparent solid;
content: ' ';
height: 0;
Expand All @@ -2135,6 +2218,31 @@ article.dokan-notice-single-notice-area span.dokan-single-announcement-date {
border-width: 16px 16px 16px 0;
margin-top: -16px;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active ul.navigation-submenu {
position: relative;
z-index: 3;
top: auto;
left: auto;
right: auto;
bottom: auto;
border: 0 none;
border-bottom: 0.5px solid #f05025;
margin-top: 0;
box-shadow: none;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active ul.navigation-submenu li:not(.current) a {
font-weight: normal;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active ul.navigation-submenu li a:focus {
outline: none;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active a {
padding-right: 16px;
font-weight: 800;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li.active a i.menu-dropdown {
display: none;
}
.dokan-dashboard .dokan-dash-sidebar ul.dokan-dashboard-menu li ul.sub-menu {
background: #fff;
margin: 0;
Expand Down
81 changes: 80 additions & 1 deletion assets/js/dokan.js
Original file line number Diff line number Diff line change
Expand Up @@ -2936,6 +2936,86 @@ jQuery(function($) {
.css('cursor', 'help');
});
});

// Submenu navigation on vendor dashboard
$( '#dokan-navigation .dokan-dashboard-menu li.has-submenu:not(.active)' )
.on( 'mouseover', (e) => {
dokanNavigateSubmenu(e);
} )
.on( 'mouseout', (e) => {
dokanNavigateSubmenu( e, true );
} );

/**
* Navigates submenu on hovering the parent menu.
*
* @param {event} evt The dom event
* @param {boolean} hide Hide or show sub menu
*
* @return {void}
*/
function dokanNavigateSubmenu( evt, hide ) {
const elem = $( evt.target ).closest( 'li.has-submenu' );

elem.find( '.navigation-submenu' ).each( ( index, subElem ) => {
if ( ! hide ) {
elem.addClass( 'submenu-hovered' );

let elemRect = elem[0].getBoundingClientRect(),
subElemRect = subElem.getBoundingClientRect(),
dashboard = $( '.dokan-dashboard-wrap' ),
dashboardRect = dashboard[0].getBoundingClientRect(),
dashboardHeight = Math.min( dashboardRect.bottom, dashboardRect.height );

if ( dashboardHeight < subElemRect.height ) {
let extendedHeight = subElemRect.height - dashboardHeight;
if ( elemRect.top < elemRect.height ) {
extendedHeight += elemRect.top;
}
dashboard.css( 'height', dashboardRect.height + extendedHeight );
} else {
dashboard.css( 'height', '' );
}

if ( elemRect.top < elemRect.height ) {
$(subElem).css( 'bottom', 'unset' );
$(subElem).css( 'top', 0 );
} else {
$(subElem).css( 'top', 'unset' );

let dist = elemRect.top - subElemRect.height;
if ( dist > 0 ) {
$(subElem).css( 'bottom', 0 );

subElemRect = subElem.getBoundingClientRect();
if ( subElemRect.top < 0 ) {
$(subElem).css( 'bottom', 'unset' );
$(subElem).css( 'top', 0 );
}
} else {
$(subElem).css( 'bottom', dist );

let navRect = $( '.dokan-dash-sidebar' )[0].getBoundingClientRect(),
navElderSiblingRect = $( '.entry-header' )[0].getBoundingClientRect();
subElemRect = subElem.getBoundingClientRect();

if ( subElemRect.bottom > navRect.bottom ) {
dist += subElemRect.bottom - navRect.bottom;
} else if ( subElemRect.bottom - navElderSiblingRect.bottom < subElemRect.height ) {
dist += subElemRect.bottom - navElderSiblingRect.bottom - subElemRect.height - 20;
}

$(subElem).css( 'bottom', dist );
}
}
} else {
elem.removeClass( 'submenu-hovered' );
$( '.dokan-dashboard-wrap' ).css( 'height', '' );
$(subElem).css( 'bottom', 0 );
$(subElem).removeAttr( 'style' );
}
} );
}
})(jQuery);
/**
* Show Delete Button Prompt
Expand Down Expand Up @@ -2964,7 +3044,6 @@ jQuery(function($) {
}
}


;(function($) {
var storeLists = {
/**
Expand Down
Loading

0 comments on commit fc97475

Please sign in to comment.