Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:weDevsOfficial/dokan into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Jul 26, 2017
2 parents 551321b + 28c511d commit 6644da7
Show file tree
Hide file tree
Showing 17 changed files with 148 additions and 121 deletions.
38 changes: 10 additions & 28 deletions assets/js/dokan.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,15 @@ jQuery(function($) {
},

loadSelect2: function() {
$('.dokan-select2').select2();
$('.dokan-select2').select2(
{
"language": {
"noResults": function () {
return dokan.i18n_no_result_found;
}
}
}
);
},

addProductPopup: function (e) {
Expand Down Expand Up @@ -1937,30 +1945,4 @@ jQuery(function($) {
resize_dummy_image();
});

})(jQuery);

;( function ( $ ) {

$( '#cat-drop-stack li.has-children' ).on( 'click', '> a span.caret-icon', function ( e ) {
e.preventDefault();
var self = $( this ),
liHasChildren = self.closest( 'li.has-children' );

if ( !liHasChildren.find( '> ul.children' ).is( ':visible' ) ) {
self.find( 'i.fa' ).addClass( 'fa-rotate-90' );
if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': 'none' } );
}
}

liHasChildren.find( '> ul.children' ).slideToggle( 'fast', function () {
if ( !$( this ).is( ':visible' ) ) {
self.find( 'i.fa' ).removeClass( 'fa-rotate-90' );

if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': '1px solid #eee' } );
}
}
} );
} );
} )( jQuery );
})(jQuery);
10 changes: 9 additions & 1 deletion assets/src/js/product-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,15 @@
},

loadSelect2: function() {
$('.dokan-select2').select2();
$('.dokan-select2').select2(
{
"language": {
"noResults": function () {
return dokan.i18n_no_result_found;
}
}
}
);
},

addProductPopup: function (e) {
Expand Down
28 changes: 1 addition & 27 deletions assets/src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,30 +683,4 @@ jQuery(function($) {
resize_dummy_image();
});

})(jQuery);

;( function ( $ ) {

$( '#cat-drop-stack li.has-children' ).on( 'click', '> a span.caret-icon', function ( e ) {
e.preventDefault();
var self = $( this ),
liHasChildren = self.closest( 'li.has-children' );

if ( !liHasChildren.find( '> ul.children' ).is( ':visible' ) ) {
self.find( 'i.fa' ).addClass( 'fa-rotate-90' );
if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': 'none' } );
}
}

liHasChildren.find( '> ul.children' ).slideToggle( 'fast', function () {
if ( !$( this ).is( ':visible' ) ) {
self.find( 'i.fa' ).removeClass( 'fa-rotate-90' );

if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': '1px solid #eee' } );
}
}
} );
} );
} )( jQuery );
})(jQuery);
1 change: 1 addition & 0 deletions dokan.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ function conditional_localized_args( $default_args ) {
'i18n_edited_variations' => esc_js( __( 'Save changes before changing page?', 'dokan-lite' ) ),
'i18n_variation_count_single' => esc_js( __( '%qty% variation', 'dokan-lite' ) ),
'i18n_variation_count_plural' => esc_js( __( '%qty% variations', 'dokan-lite' ) ),
'i18n_no_result_found' => esc_js( __( 'No Result Found', 'dokan-lite' ) ),
'variations_per_page' => absint( apply_filters( 'dokan_product_variations_per_page', 10 ) ),
'store_banner_dimension' => [ 'width' => $banner_width, 'height' => $banner_height, 'flex-width' => $has_flex_width, 'flex-height' => $has_flex_height ],
'selectAndCrop' => __( 'Select and Crop', 'dokan-lite' ),
Expand Down
27 changes: 27 additions & 0 deletions includes/widgets/menu-category.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,33 @@ function widget( $args, $instance ) {
echo "</ul>";
?>
</div>
<script>
( function ( $ ) {

$( '#cat-drop-stack li.has-children' ).on( 'click', '> a span.caret-icon', function ( e ) {
e.preventDefault();
var self = $( this ),
liHasChildren = self.closest( 'li.has-children' );

if ( !liHasChildren.find( '> ul.children' ).is( ':visible' ) ) {
self.find( 'i.fa' ).addClass( 'fa-rotate-90' );
if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': 'none' } );
}
}

liHasChildren.find( '> ul.children' ).slideToggle( 'fast', function () {
if ( !$( this ).is( ':visible' ) ) {
self.find( 'i.fa' ).removeClass( 'fa-rotate-90' );

if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': '1px solid #eee' } );
}
}
} );
} );
} )( jQuery );
</script>
<?php

echo $after_widget;
Expand Down
4 changes: 4 additions & 0 deletions includes/widgets/store-location.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function widget( $args, $instance ) {
$title = apply_filters( 'widget_title', $instance['title'] );
$store_info = dokan_get_store_info( get_query_var( 'author' ) );
$map_location = isset( $store_info['location'] ) ? esc_attr( $store_info['location'] ) : '';

if ( empty( $map_location ) ) {
return;
}

echo $before_widget;

Expand Down
31 changes: 31 additions & 0 deletions includes/widgets/store-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,37 @@ function widget( $args, $instance ) {
$seller_id = (int) get_query_var( 'author' );

dokan_store_category_menu( $seller_id, $title );

?>
<script>
( function ( $ ) {

$( '#cat-drop-stack li.has-children' ).on( 'click', '> a span.caret-icon', function ( e ) {
e.preventDefault();
var self = $( this ),
liHasChildren = self.closest( 'li.has-children' );

if ( !liHasChildren.find( '> ul.children' ).is( ':visible' ) ) {
self.find( 'i.fa' ).addClass( 'fa-rotate-90' );
if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': 'none' } );
}
}

liHasChildren.find( '> ul.children' ).slideToggle( 'fast', function () {
if ( !$( this ).is( ':visible' ) ) {
self.find( 'i.fa' ).removeClass( 'fa-rotate-90' );

if ( liHasChildren.find( '> ul.children' ).hasClass( 'level-0' ) ) {
self.closest( 'a' ).css( { 'borderBottom': '1px solid #eee' } );
}
}
} );
} );
} )( jQuery );
</script>

<?php
}

/**
Expand Down
8 changes: 4 additions & 4 deletions templates/emails/contact-seller.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From: %from_name% (%from_email%)
IP: %user_ip%
User Agent: %user_agent%
<?php _e( 'From:', 'dokan-lite') ?>%from_name% (%from_email%)
<?php _e( 'IP:', 'dokan-lite' ) ?> %user_ip%
<?php _e( 'User Agent:', 'dokan-lite' ); ?> %user_agent%

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

Expand All @@ -10,5 +10,5 @@


---
Sent from %site_name%
<?php _e( 'Sent from', 'dokan-lite' ); ?> %site_name%
%site_url%
18 changes: 9 additions & 9 deletions templates/emails/new-product-pending.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Hello there,
<?php _e( 'Hello there,', 'dokan-lite' ); ?>

A new product has been submitted to your site (%site_url%).
<?php _e( 'A new product has been submitted to your site', 'dokan-lite' ); ?> (%site_url%).

Summary of the product:
<?php _e( 'Summary of the product:', 'dokan-lite' ); ?>
------------------------

Title: %title%
Price: %price%
Vendor: %seller_name% (%seller_url%)
Category: %category%
<?php _e( 'Title:', 'dokan-lite' ); ?> %title%
<?php _e( 'Price:', 'dokan-lite' ); ?> %price%
<?php _e( 'Vendor:', 'dokan-lite' ); ?>%seller_name% (%seller_url%)
<?php _e( 'Category:', 'dokan-lite' ); ?> %category%

The product is currently in "pending" state. Please review this product before it goes public.
<?php _e( 'The product is currently in "pending" state. Please review this product before it goes public.', 'dokan-lite' ); ?>

Moderate: %product_link%
<?php _e( 'Moderate:', 'dokan-lite' ); ?> %product_link%

---
%site_name%
Expand Down
18 changes: 9 additions & 9 deletions templates/emails/new-product.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Hello there,
<?php _e( 'Hello there,', 'dokan-lite' ); ?>

A new product has been submitted to your site (%site_url%).
<?php _e( 'A new product has been submitted to your site', 'dokan-lite' ); ?> (%site_url%).

Summary of the product:
<?php _e( 'Summary of the product:', 'dokan-lite' ); ?>
------------------------

Title: %title%
Price: %price%
Vendor: %seller_name% (%seller_url%)
Category: %category%
<?php _e( 'Title:', 'dokan-lite' ); ?> %title%
<?php _e( 'Price:', 'dokan-lite' ); ?> %price%
<?php _e( 'Vendor:', 'dokan-lite' ); ?> %seller_name% (%seller_url%)
<?php _e( 'Category:', 'dokan-lite' ); ?> %category%

The product is currently in "publish" state. So everyone can view the product.
<?php _e( 'The product is currently in "publish" state. So everyone can view the product.', 'dokan-lite' ); ?>

In case it needs to be moderated:
<?php _e( 'In case it needs to be moderated:', 'dokan-lite' ); ?>
%product_link%

---
Expand Down
12 changes: 6 additions & 6 deletions templates/emails/new-seller-registered.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Hello there,
<?php _e( 'Hello there,', 'dokan-lite' ); ?>

A new vendor has been registered to your site (%site_url%).
<?php _e( 'A new vendor has been registered to your site ', 'dokan-lite' ); ?>(%site_url%).

Vendor Details:
<?php _e( 'Vendor Details:', 'dokan-lite' ); ?>
------------------------

Vendor: %seller_name%
Vendor Store: %store_url%
<?php _e( 'Vendor:', 'dokan-lite' ); ?> %seller_name%
<?php _e( 'Vendor Store:', 'dokan-lite' ); ?> %store_url%

To edit vendor access and details visit - %seller_edit%
<?php _e( 'To edit vendor access and details visit', 'dokan-lite' ); ?> - %seller_edit%

---
%site_name%
Expand Down
10 changes: 5 additions & 5 deletions templates/emails/product-published.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Hello %seller_name%,
<?php _e( 'Hello', 'dokan-lite' ); ?> %seller_name%,

Your product "%title%" has been approved by one of our admin, congrats!
<?php _e( 'Your product', 'dokan-lite' ); ?> "%title%" <?php _e( 'has been approved by one of our admin, congrats!', 'dokan-lite' ); ?>

View product: %product_link%
Update: %product_edit_link%
<?php _e( 'View product:', 'dokan-lite' ); ?> %product_link%
<?php _e( 'Update:', 'dokan-lite' ); ?> %product_edit_link%

---
Sent from %site_name%
<?php _e( 'Sent from', 'dokan-lite' ); ?> %site_name%
%site_url%
14 changes: 7 additions & 7 deletions templates/emails/refund-seller-mail.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Hi,
<?php _e( 'Hi,', 'dokan-lite' ); ?>

Your refund request has been %status%.
<?php _e( 'Your refund request has been', 'dokan-lite' ); ?> %status%.

Order ID: %order_id%
Refund Amount: %amount%
Refund Reason: %reason%
<?php _e( 'Order ID:', 'dokan-lite' ); ?> %order_id%
<?php _e( 'Refund Amount:', 'dokan-lite' ); ?> %amount%
<?php _e( 'Refund Reason:', 'dokan-lite' ); ?> %reason%

You can view the order details by going here:
<?php _e( 'You can view the order details by going here:', 'dokan-lite' ); ?>
%order_page%

---
Sent from %site_name%
<?php _e( 'Sent from', 'dokan-lite' ); ?> %site_name%
%site_url%
8 changes: 4 additions & 4 deletions templates/emails/refund_request.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Hi,
<?php _e( 'Hi', 'dokan-lite' ); ?>,

New refund request for order # %order_id%.
<?php _e( 'New refund request for order', 'dokan-lite' ); ?> # %order_id%.

You can process the request by going here:
<?php _e( 'You can process the request by going here:', 'dokan-lite' ); ?>
%refund_page%

---
Sent from %site_name%
<?php _e( 'Sent from', 'dokan-lite' ); ?> %site_name%
%site_url%
14 changes: 7 additions & 7 deletions templates/emails/withdraw-approve.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Hi %username%,
<?php _e( 'Hi', 'dokan-lite' ); ?> %username%,

Your withdraw request has been approved, congrats!
<?php _e( 'Your withdraw request has been approved, congrats!', 'dokan-lite' ); ?>

You sent a withdraw request of:
<?php _e( 'You sent a withdraw request of:', 'dokan-lite' ); ?>

Amount: %amount%
Method: %method%
<?php _e( 'Amount:', 'dokan-lite' ); ?> %amount%
<?php _e( 'Method:', 'dokan-lite' ); ?> %method%

We'll transfer this amount to your preferred destination shortly.
<?php _e( 'We\'ll transfer this amount to your preferred destination shortly.', 'dokan-lite' ); ?>

Thanks for being with us.
<?php _e( 'Thanks for being with us.', 'dokan-lite' ); ?>

---
%site_name%
Expand Down
12 changes: 6 additions & 6 deletions templates/emails/withdraw-cancel.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Hi %username%,
<?php _e( 'Hi', 'dokan-lite' ); ?> %username%,

Your withdraw request has been cancelled!
<?php _e( 'Your withdraw request has been cancelled!', 'dokan-lite' ); ?>

You sent a withdraw request of:
<?php _e( 'You sent a withdraw request of:', 'dokan-lite' ); ?>

Amount: %amount%
Method: %method%
<?php _e( 'Amount:', 'dokan-lite' ); ?> %amount%
<?php _e( 'Method:', 'dokan-lite' ); ?> %method%

Here's the reason, why:
<?php _e( 'Here\'s the reason, why:', 'dokan-lite' ); ?>
%notes%

---
Expand Down
Loading

0 comments on commit 6644da7

Please sign in to comment.