Skip to content

Commit

Permalink
Merge branch 'release/2.6.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Sep 7, 2017
2 parents cb3d161 + a581616 commit aad265f
Show file tree
Hide file tree
Showing 62 changed files with 6,363 additions and 1,067 deletions.
3 changes: 1 addition & 2 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4156,7 +4156,6 @@ div.media-sidebar a.edit-attachment {
background-color: #fff;
color: #444;
border: 1px solid #ededed;
height: 255px;
}
.dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper .profile-info-summery {
width: 100%;
Expand Down Expand Up @@ -4213,7 +4212,7 @@ div.media-sidebar a.edit-attachment {
margin-left: 8px;
}
.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout1 .profile-info-summery-wrapper {
height: 175px;
height: 275px;
padding: 0 8px;
}
.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout1 .profile-info-summery-wrapper .profile-info-summery {
Expand Down
67 changes: 67 additions & 0 deletions assets/js/dokan.js
Original file line number Diff line number Diff line change
Expand Up @@ -1954,4 +1954,71 @@ jQuery(function($) {
resize_dummy_image();
});

// Ajax product search box
$( ':input.dokan-product-search' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = {
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
escapeMarkup: function( m ) {
return m;
},
ajax: {
url: dokan.ajaxurl,
dataType: 'json',
delay: 250,
data: function( params ) {
console.log( params );
return {
term: params.term,
action: $( this ).data( 'action' ) || 'dokan_json_search_products_and_variations',
security: dokan.search_products_nonce,
exclude: $( this ).data( 'exclude' ),
user_ids: $( this ).data( 'user_ids' ),
include: $( this ).data( 'include' ),
limit: $( this ).data( 'limit' )
};
},
processResults: function( data ) {
var terms = [];

console.log( data );

if ( data ) {
$.each( data, function( id, text ) {
terms.push( { id: id, text: text } );
});
}
return {
results: terms
};
},
cache: true
}
};

// select2_args = $.extend( select2_args, {} );

$( this ).select2( select2_args ).addClass( 'enhanced' );

if ( $( this ).data( 'sortable' ) ) {
var $select = $(this);
var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );

$list.sortable({
placeholder : 'ui-state-highlight select2-selection__choice',
forcePlaceholderSize: true,
items : 'li:not(.select2-search__field)',
tolerance : 'pointer',
stop: function() {
$( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function() {
var id = $( this ).data( 'data' ).id;
var option = $select.find( 'option[value="' + id + '"]' )[0];
$select.prepend( option );
} );
}
});
}
});

})(jQuery);
67 changes: 67 additions & 0 deletions assets/src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,4 +683,71 @@ jQuery(function($) {
resize_dummy_image();
});

// Ajax product search box
$( ':input.dokan-product-search' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = {
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
escapeMarkup: function( m ) {
return m;
},
ajax: {
url: dokan.ajaxurl,
dataType: 'json',
delay: 250,
data: function( params ) {
console.log( params );
return {
term: params.term,
action: $( this ).data( 'action' ) || 'dokan_json_search_products_and_variations',
security: dokan.search_products_nonce,
exclude: $( this ).data( 'exclude' ),
user_ids: $( this ).data( 'user_ids' ),
include: $( this ).data( 'include' ),
limit: $( this ).data( 'limit' )
};
},
processResults: function( data ) {
var terms = [];

console.log( data );

if ( data ) {
$.each( data, function( id, text ) {
terms.push( { id: id, text: text } );
});
}
return {
results: terms
};
},
cache: true
}
};

// select2_args = $.extend( select2_args, {} );

$( this ).select2( select2_args ).addClass( 'enhanced' );

if ( $( this ).data( 'sortable' ) ) {
var $select = $(this);
var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );

$list.sortable({
placeholder : 'ui-state-highlight select2-selection__choice',
forcePlaceholderSize: true,
items : 'li:not(.select2-search__field)',
tolerance : 'pointer',
stop: function() {
$( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function() {
var id = $( this ).data( 'data' ).id;
var option = $select.find( 'option[value="' + id + '"]' )[0];
$select.prepend( option );
} );
}
});
}
});

})(jQuery);
3 changes: 1 addition & 2 deletions assets/src/less/store.less
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,6 @@
background-color: #fff;
color: #444;
border: 1px solid @borderColor;
height: 255px;

.profile-info-summery {
width: 100%;
Expand Down Expand Up @@ -882,7 +881,7 @@
&.profile-layout-layout1 {

.profile-info-summery-wrapper {
height: 175px;
height: 275px;
padding: 0 8px;

.profile-info-summery {
Expand Down
4 changes: 2 additions & 2 deletions assets/vendors/font-awesome/font-awesome.min.css

Large diffs are not rendered by default.

Binary file modified assets/vendors/fonts/FontAwesome.otf
Binary file not shown.
Binary file modified assets/vendors/fonts/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit aad265f

Please sign in to comment.