update
This commit is contained in:
@@ -128,6 +128,63 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.products-page .select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.products-page .select2-container--default .select2-selection--single {
|
||||
height: 38px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.products-page .select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height: 36px;
|
||||
padding-left: 12px;
|
||||
padding-right: 36px;
|
||||
font-size: 14px;
|
||||
color: #2d3748;
|
||||
}
|
||||
|
||||
.products-page .select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.products-page .select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 36px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
.products-page .select2-container--default.select2-container--focus .select2-selection--single {
|
||||
border-color: #6690f4;
|
||||
box-shadow: 0 0 0 3px rgba(102, 144, 244, 0.1);
|
||||
}
|
||||
|
||||
.products-page .select2-dropdown {
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.products-page .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 6px;
|
||||
height: 34px;
|
||||
padding: 6px 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.products-page .select2-results__option {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.products-page .select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #6690f4;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
$openai_enabled = \services\GoogleAdsApi::get_setting( 'openai_enabled' ) !== '0';
|
||||
$claude_enabled = \services\GoogleAdsApi::get_setting( 'claude_enabled' ) !== '0';
|
||||
@@ -443,8 +500,36 @@ function products_render_columns_picker( table_instance )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function init_products_scope_select_search()
|
||||
{
|
||||
if ( typeof $.fn.select2 === 'undefined' )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[ '#products_campaign_id', '#products_ad_group_id' ].forEach( function( selector ) {
|
||||
var $select = $( selector );
|
||||
|
||||
if ( !$select.length || $select.data( 'products-select2-ready' ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$select.select2({
|
||||
width: '100%',
|
||||
allowClear: true,
|
||||
placeholder: '- wybierz -'
|
||||
});
|
||||
|
||||
$select.data( 'products-select2-ready', true );
|
||||
} );
|
||||
}
|
||||
|
||||
$( function()
|
||||
{
|
||||
init_products_scope_select_search();
|
||||
|
||||
var products_table = new DataTable( '#products', {
|
||||
stateSave: true,
|
||||
ajax: {
|
||||
@@ -694,6 +779,7 @@ $( function()
|
||||
|
||||
if ( !client_id )
|
||||
{
|
||||
$campaign.trigger( 'change.select2' );
|
||||
return $.Deferred().resolve().promise();
|
||||
}
|
||||
|
||||
@@ -714,6 +800,7 @@ $( function()
|
||||
$campaign.val( selected_campaign_id );
|
||||
}
|
||||
|
||||
$campaign.trigger( 'change.select2' );
|
||||
update_delete_ad_group_button_state();
|
||||
} );
|
||||
}
|
||||
@@ -739,6 +826,7 @@ $( function()
|
||||
|
||||
if ( !campaign_id )
|
||||
{
|
||||
$ad_group.trigger( 'change.select2' );
|
||||
update_delete_ad_group_button_state();
|
||||
return $.Deferred().resolve().promise();
|
||||
}
|
||||
@@ -757,6 +845,7 @@ $( function()
|
||||
$ad_group.val( selected_ad_group_id );
|
||||
}
|
||||
|
||||
$ad_group.trigger( 'change.select2' );
|
||||
update_delete_ad_group_button_state();
|
||||
} );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user