feat: Enhance campaign terms management with keyword addition and match type change functionality
- Added a toolbar for adding keywords in the campaign terms view. - Implemented match type change functionality with a confirmation dialog. - Added delete functionality for keywords with confirmation. - Updated styles for new buttons and icons in the campaign terms view. - Enhanced product view with warning icons for product alerts and corresponding modal display. - Updated product table to include a new column for warnings and adjusted column visibility settings. - Documented project overview, code style conventions, suggested commands, and task completion checklist.
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
<th>Grupa reklam</th>
|
||||
<th>URL</th>
|
||||
<th>Nazwa produktu</th>
|
||||
<th title="Ostrzezenia produktowe"><i class="fa-solid fa-triangle-exclamation"></i></th>
|
||||
<th>Wyśw.</th>
|
||||
<th>Wyśw. (30d)</th>
|
||||
<th>Klik.</th>
|
||||
@@ -119,7 +120,7 @@ var AI_OPENAI_ENABLED = <?= $openai_enabled ? 'true' : 'false'; ?>;
|
||||
var AI_CLAUDE_ENABLED = <?= $claude_enabled ? 'true' : 'false'; ?>;
|
||||
var AI_GEMINI_ENABLED = <?= $gemini_enabled ? 'true' : 'false'; ?>;
|
||||
var PRODUCTS_COLUMNS_STORAGE_KEY = 'products.columns.visibility';
|
||||
var PRODUCTS_LOCKED_COLUMNS = [ 0, 20 ];
|
||||
var PRODUCTS_LOCKED_COLUMNS = [ 0, 21 ];
|
||||
|
||||
function show_toast( message, type )
|
||||
{
|
||||
@@ -347,6 +348,7 @@ $( function()
|
||||
{ width: '200px', name: 'ad_group_name' },
|
||||
{ width: '120px', orderable: false, searchable: false },
|
||||
{ name: 'name' },
|
||||
{ width: '35px', orderable: false, searchable: false, className: 'dt-center' },
|
||||
{ width: '50px', name: 'impressions' },
|
||||
{ width: '80px', name: 'impressions_30' },
|
||||
{ width: '50px', name: 'clicks' },
|
||||
@@ -363,12 +365,12 @@ $( function()
|
||||
{ width: '190px', orderable: false, className: 'dt-center' }
|
||||
],
|
||||
createdRow: function( row, data ) {
|
||||
var cl4Val = $( data[19] ).val();
|
||||
var cl4Val = $( data[20] ).val();
|
||||
if ( cl4Val && cl4Val.toLowerCase() === 'niedostępny' ) {
|
||||
$( row ).addClass( 'product-row-unavailable' );
|
||||
}
|
||||
},
|
||||
order: [ [ 9, 'desc' ] ],
|
||||
order: [ [ 10, 'desc' ] ],
|
||||
language: {
|
||||
processing: 'Ładowanie...',
|
||||
emptyTable: 'Brak produktów do wyświetlenia',
|
||||
@@ -1826,6 +1828,28 @@ $( function()
|
||||
updateSelectedCount();
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.product-warning-icon', function()
|
||||
{
|
||||
var warnings = $( this ).data( 'warnings' ) || '';
|
||||
if ( !warnings ) return;
|
||||
|
||||
var lines = String( warnings ).split( '\n' );
|
||||
var html = '<ul style="text-align:left;padding-left:18px;margin:0;">';
|
||||
for ( var i = 0; i < lines.length; i++ )
|
||||
{
|
||||
if ( $.trim( lines[i] ) !== '' )
|
||||
html += '<li style="margin-bottom:6px;">' + $('<span>').text( lines[i] ).html() + '</li>';
|
||||
}
|
||||
html += '</ul>';
|
||||
|
||||
$.alert({
|
||||
title: 'Ostrzezenia produktu',
|
||||
columnClass: 'col-md-5 col-md-offset-4',
|
||||
content: html,
|
||||
type: 'orange'
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'change', '.products-col-toggle', function()
|
||||
{
|
||||
var col_index = Number( $( this ).data( 'col-index' ) );
|
||||
|
||||
Reference in New Issue
Block a user