Aggiunta calcolo valore prodotto e miglioramenti UI

Implementato il calcolo del valore reale dei prodotti in asta,
includendo il prezzo "Compra Subito", spese di spedizione e
risparmio stimato. Aggiunta una nuova sezione "Info Prodotto"
nella UI per visualizzare i dettagli estratti e i calcoli.

- **AuctionMonitorControl.xaml**: Aggiunta sezione fissa per
  mostrare informazioni prodotto e calcolo valore.
- **AuctionMonitorControl.xaml.cs**: Gestiti eventi per il
  caricamento e aggiornamento delle informazioni prodotto.
- **MainWindow**: Integrati handler per il calcolo e refresh
  delle informazioni prodotto.
- **AuctionInfo.cs**: Aggiunte proprietà per gestire prezzo
  "Compra Subito", spese di spedizione e limiti di vincita.
- **ProductValueCalculator.cs**: Nuova utility per calcolare
  il valore del prodotto e parsare informazioni dall'HTML.
- **AuctionViewModel.cs**: Binding per visualizzare risparmio,
  costo totale e convenienza nella UI.
- **Documentazione**: Aggiornata con dettagli sull'algoritmo
  di calcolo e layout UI.

Fix:
- Risolto problema di encoding UTF-8 per emoji nella UI.
- Migliorato parsing HTML per prezzi e limiti di vincita.

TODO:
- Testare parsing su più aste e gestire edge cases.
- Implementare caricamento automatico delle informazioni.
This commit is contained in:
2025-11-21 16:55:21 +01:00
parent f124f2e4e8
commit ee67bedc31
171 changed files with 134519 additions and 241 deletions
@@ -467,6 +467,93 @@
Click="ExportAuctionButton_Click"/> Click="ExportAuctionButton_Click"/>
</Grid> </Grid>
<!-- NUOVA SEZIONE: Info Prodotto - SEZIONE FISSA -->
<Border BorderBrush="#3E3E42"
BorderThickness="1"
Background="#2D2D30"
Padding="10"
CornerRadius="4"
Margin="0,0,0,10">
<StackPanel>
<!-- Header fisso -->
<TextBlock Text="Informazioni Prodotto"
FontWeight="Bold"
FontSize="12"
Foreground="#CCCCCC"
Margin="0,0,0,10"/>
<!-- Dati Prodotto -->
<Grid x:Name="ProductInfoGrid" Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Valore -->
<TextBlock Grid.Row="0" Grid.Column="0"
Text="Valore:"
FontWeight="Bold"
Foreground="#CCCCCC"
FontSize="11"
Margin="0,3"/>
<TextBlock Grid.Row="0" Grid.Column="1"
x:Name="ProductBuyNowPriceText"
Text="-"
Foreground="#007ACC"
FontSize="11"
FontWeight="Bold"
Margin="5,3"/>
<!-- Extra (Spedizione/Transazione) -->
<TextBlock Grid.Row="1" Grid.Column="0"
Text="Extra:"
FontWeight="Bold"
Foreground="#CCCCCC"
FontSize="11"
Margin="0,3"
ToolTip="Spese di spedizione o transazione"/>
<TextBlock Grid.Row="1" Grid.Column="1"
x:Name="ProductShippingCostText"
Text="-"
Foreground="#FFB700"
FontSize="11"
Margin="5,3"/>
<!-- Limite Vincita -->
<TextBlock Grid.Row="2" Grid.Column="0"
Text="Limite:"
FontWeight="Bold"
Foreground="#CCCCCC"
FontSize="11"
Margin="0,3"/>
<TextBlock Grid.Row="2" Grid.Column="1"
x:Name="ProductWinLimitText"
Text="-"
Foreground="#999999"
FontSize="11"
TextWrapping="Wrap"
Margin="5,3"/>
</Grid>
<!-- Pulsante Applica Limiti -->
<Button x:Name="RefreshProductInfoButton"
Content="Applica Limiti Suggeriti"
Background="#007ACC"
Style="{StaticResource SmallRoundedButton}"
HorizontalAlignment="Stretch"
Padding="10,6"
FontSize="11"
Margin="0,0,0,0"
Click="RefreshProductInfoButton_Click"
ToolTip="Calcola e applica limiti Max EUR e Max Clicks basati sul valore del prodotto"/>
</StackPanel>
</Border>
<!-- Settings Grid - Campi aggiornati --> <!-- Settings Grid - Campi aggiornati -->
<Grid Margin="0,0,0,8"> <Grid Margin="0,0,0,8">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@@ -158,6 +158,11 @@ namespace AutoBidder.Controls
{ {
RaiseEvent(new RoutedEventArgs(ExportAuctionClickedEvent, this)); RaiseEvent(new RoutedEventArgs(ExportAuctionClickedEvent, this));
} }
private void RefreshProductInfoButton_Click(object sender, RoutedEventArgs e)
{
RaiseEvent(new RoutedEventArgs(RefreshProductInfoClickedEvent, this));
}
private void SelectedBidBeforeDeadlineMs_TextChanged(object sender, TextChangedEventArgs e) private void SelectedBidBeforeDeadlineMs_TextChanged(object sender, TextChangedEventArgs e)
{ {
@@ -244,6 +249,9 @@ namespace AutoBidder.Controls
public static readonly RoutedEvent ExportAuctionClickedEvent = EventManager.RegisterRoutedEvent( public static readonly RoutedEvent ExportAuctionClickedEvent = EventManager.RegisterRoutedEvent(
"ExportAuctionClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl)); "ExportAuctionClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
public static readonly RoutedEvent RefreshProductInfoClickedEvent = EventManager.RegisterRoutedEvent(
"RefreshProductInfoClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
public event RoutedEventHandler StartClicked public event RoutedEventHandler StartClicked
{ {
@@ -364,5 +372,11 @@ namespace AutoBidder.Controls
add { AddHandler(ExportAuctionClickedEvent, value); } add { AddHandler(ExportAuctionClickedEvent, value); }
remove { RemoveHandler(ExportAuctionClickedEvent, value); } remove { RemoveHandler(ExportAuctionClickedEvent, value); }
} }
public event RoutedEventHandler RefreshProductInfoClicked
{
add { AddHandler(RefreshProductInfoClickedEvent, value); }
remove { RemoveHandler(RefreshProductInfoClickedEvent, value); }
}
} }
} }
@@ -231,5 +231,107 @@ namespace AutoBidder
Log($"[ERRORE] Errore caricamento aste: {ex.Message}"); Log($"[ERRORE] Errore caricamento aste: {ex.Message}");
} }
} }
/// <summary>
/// Aggiorna i dettagli dell'asta selezionata nel pannello Info Prodotto
/// </summary>
private void UpdateSelectedAuctionDetails(AuctionViewModel? vm)
{
if (vm == null || vm.AuctionInfo == null)
{
// Resetta campi se nessuna asta selezionata
AuctionMonitor.ProductBuyNowPriceText.Text = "-";
AuctionMonitor.ProductShippingCostText.Text = "-";
AuctionMonitor.ProductWinLimitText.Text = "-";
return;
}
var auction = vm.AuctionInfo;
// CARICA AUTOMATICAMENTE INFO PRODOTTO SE NON PRESENTI
if (!auction.BuyNowPrice.HasValue && !auction.ShippingCost.HasValue)
{
// Carica in background senza bloccare l'UI
_ = LoadProductInfoInBackgroundAsync(auction);
}
// Aggiorna i campi delle impostazioni
UpdateAuctionSettingsDisplay(vm);
// Aggiorna Valore (Compra Subito)
if (auction.BuyNowPrice.HasValue)
{
AuctionMonitor.ProductBuyNowPriceText.Text = $"{auction.BuyNowPrice.Value:F2}€";
}
else
{
AuctionMonitor.ProductBuyNowPriceText.Text = "-";
}
// Aggiorna Spese di Spedizione
if (auction.ShippingCost.HasValue)
{
AuctionMonitor.ProductShippingCostText.Text = $"{auction.ShippingCost.Value:F2}€";
}
else
{
AuctionMonitor.ProductShippingCostText.Text = "-";
}
// Aggiorna Limiti di Vincita
if (auction.HasWinLimit && !string.IsNullOrWhiteSpace(auction.WinLimitDescription))
{
AuctionMonitor.ProductWinLimitText.Text = auction.WinLimitDescription;
}
else if (!auction.HasWinLimit)
{
AuctionMonitor.ProductWinLimitText.Text = "Nessun limite";
}
else
{
AuctionMonitor.ProductWinLimitText.Text = "-";
}
}
/// <summary>
/// Carica le informazioni del prodotto in background quando selezioni un'asta
/// </summary>
private async System.Threading.Tasks.Task LoadProductInfoInBackgroundAsync(AuctionInfo auction)
{
try
{
Log($"[PRODUCT INFO] Caricamento automatico per: {auction.Name}", Utilities.LogLevel.Info);
// Scarica HTML
using var httpClient = new System.Net.Http.HttpClient();
httpClient.Timeout = TimeSpan.FromSeconds(10);
var html = await httpClient.GetStringAsync(auction.OriginalUrl);
// Estrai informazioni prodotto
var extracted = Utilities.ProductValueCalculator.ExtractProductInfo(html, auction);
if (extracted)
{
// Salva le aste con le nuove informazioni
SaveAuctions();
// Aggiorna UI sul thread UI
Dispatcher.Invoke(() =>
{
if (_selectedAuction != null && _selectedAuction.AuctionId == auction.AuctionId)
{
UpdateSelectedAuctionDetails(_selectedAuction);
}
});
Log($"[PRODUCT INFO] Valore={auction.BuyNowPrice:F2}€, Spedizione={auction.ShippingCost:F2}€", Utilities.LogLevel.Success);
}
}
catch (Exception ex)
{
Log($"[PRODUCT INFO] Errore caricamento: {ex.Message}", Utilities.LogLevel.Warn);
}
}
} }
} }
+74 -119
View File
@@ -453,135 +453,90 @@ namespace AutoBidder
} }
} }
private void SelectedBidBeforeDeadlineMs_TextChanged(object sender, TextChangedEventArgs e) private async void RefreshProductInfoButton_Click(object sender, RoutedEventArgs e)
{
if (_selectedAuction == null) return;
if (sender is TextBox tb && int.TryParse(tb.Text, out var value) && value >= 0 && value <= 5000)
{
var oldValue = _selectedAuction.AuctionInfo.BidBeforeDeadlineMs;
_selectedAuction.AuctionInfo.BidBeforeDeadlineMs = value;
// Log solo se non stiamo caricando E il valore è cambiato
if (!_isUpdatingSelection && oldValue != value)
{
_selectedAuction.AuctionInfo.AddLog($"[SETTINGS] Anticipo puntata: {oldValue}ms → {value}ms");
}
// Salva sempre (anche durante caricamento iniziale non fa male)
SaveAuctions();
}
}
private void SelectedCheckAuctionOpen_Changed(object sender, RoutedEventArgs e)
{
if (_selectedAuction == null) return;
if (sender is System.Windows.Controls.Primitives.ToggleButton cb)
{
var oldValue = _selectedAuction.AuctionInfo.CheckAuctionOpenBeforeBid;
var newValue = cb.IsChecked ?? false;
_selectedAuction.AuctionInfo.CheckAuctionOpenBeforeBid = newValue;
// Log solo se non stiamo caricando E il valore è cambiato
if (!_isUpdatingSelection && oldValue != newValue)
{
_selectedAuction.AuctionInfo.AddLog($"[SETTINGS] Verifica stato asta: {(newValue ? "ON" : "OFF")}");
}
SaveAuctions();
}
}
private void SelectedMinPrice_TextChanged(object sender, TextChangedEventArgs e)
{
if (_selectedAuction == null) return;
if (sender is TextBox tb)
{
if (double.TryParse(tb.Text.Replace(',', '.'), System.Globalization.NumberStyles.Any,
System.Globalization.CultureInfo.InvariantCulture, out var value))
{
var oldValue = _selectedAuction.MinPrice;
_selectedAuction.MinPrice = value;
// Log solo se non stiamo caricando E il valore è cambiato
if (!_isUpdatingSelection && Math.Abs(oldValue - value) > 0.01)
{
_selectedAuction.AuctionInfo.AddLog($"[SETTINGS] Prezzo minimo: €{oldValue:F2} → €{value:F2}");
}
SaveAuctions();
}
}
}
private void SelectedMaxPrice_TextChanged(object sender, TextChangedEventArgs e)
{
if (_selectedAuction == null) return;
if (sender is TextBox tb)
{
if (double.TryParse(tb.Text.Replace(',', '.'), System.Globalization.NumberStyles.Any,
System.Globalization.CultureInfo.InvariantCulture, out var value))
{
var oldValue = _selectedAuction.MaxPrice;
_selectedAuction.MaxPrice = value;
// Log solo se non stiamo caricando E il valore è cambiato
if (!_isUpdatingSelection && Math.Abs(oldValue - value) > 0.01)
{
_selectedAuction.AuctionInfo.AddLog($"[SETTINGS] Prezzo massimo: €{oldValue:F2} → €{value:F2}");
}
SaveAuctions();
}
}
}
private void SelectedMaxClicks_TextChanged(object sender, TextChangedEventArgs e)
{
if (_selectedAuction == null) return;
if (sender is TextBox tb && int.TryParse(tb.Text, out var value) && value >= 0)
{
var oldValue = _selectedAuction.MaxClicks;
_selectedAuction.MaxClicks = value;
// Log solo se non stiamo caricando E il valore è cambiato
if (!_isUpdatingSelection && oldValue != value)
{
_selectedAuction.AuctionInfo.AddLog($"[SETTINGS] Max clicks: {oldValue} → {value}");
}
SaveAuctions();
}
}
private void ExportMultipleAuctions_Click(object sender, RoutedEventArgs e)
{ {
try try
{ {
if (_auctionViewModels.Count == 0) if (_selectedAuction == null)
{ {
MessageBox.Show("Nessuna asta da esportare.", "Export", MessageBoxButton.OK, MessageBoxImage.Information); MessageBox.Show("Seleziona un'asta dalla griglia", "Nessuna Selezione", MessageBoxButton.OK, MessageBoxImage.Warning);
return; return;
} }
MessageBox.Show( var auction = _selectedAuction.AuctionInfo;
$"Export Massivo di {_auctionViewModels.Count} aste.\n\n" +
"Per configurare le opzioni di export, vai nella scheda Impostazioni.\n\n" + // Verifica che ci siano le info prodotto caricate
"Nota: Questa funzionalità verrà completata nelle prossime versioni.", if (!auction.BuyNowPrice.HasValue)
"Export Aste", {
MessageBoxButton.OK, MessageBox.Show(
MessageBoxImage.Information); "Informazioni prodotto non disponibili.\n\n" +
"Il sistema le sta caricando automaticamente.\n" +
Log($"[EXPORT] Richiesto export per {_auctionViewModels.Count} aste (funzionalità in sviluppo)", LogLevel.Info); "Riprova tra qualche secondo.",
"Info Prodotto Mancanti",
MessageBoxButton.OK,
MessageBoxImage.Information);
return;
}
// Feedback visivo
AuctionMonitor.RefreshProductInfoButton.IsEnabled = false;
// CALCOLA LIMITI SUGGERITI (CONSERVATIVI)
double buyNowPrice = auction.BuyNowPrice.Value;
double shippingCost = auction.ShippingCost ?? 0;
double totalValue = buyNowPrice + shippingCost;
// Max EUR = 40% del valore TOTALE (più conservativo del 50%)
double suggestedMaxPrice = totalValue * 0.40;
suggestedMaxPrice = Math.Round(suggestedMaxPrice, 2);
// CALCOLA MAX CLICKS (numero massimo puntate conservativo)
// Formula: (Valore Totale - Max EUR) / 0.20€ per puntata
// Poi riduciamo del 20% per maggiore margine di sicurezza
int maxClicksTheoretical = (int)Math.Floor((totalValue - suggestedMaxPrice) / 0.20);
int suggestedMaxClicks = (int)Math.Floor(maxClicksTheoretical * 0.80); // 80% del teorico
// Minimo 10 puntate per dare comunque una chance
if (suggestedMaxClicks < 10) suggestedMaxClicks = 10;
Log($"[LIMITI] Valore={buyNowPrice:F2}€ + Extra={shippingCost:F2}€ = Tot={totalValue:F2}€ → MaxEUR={suggestedMaxPrice:F2}€ (40%), MaxClicks={suggestedMaxClicks}", LogLevel.Info);
// CHIEDI CONFERMA
var result = MessageBox.Show(
$"Limiti suggeriti (conservativi):\n\n" +
$"Max EUR: {suggestedMaxPrice:F2}€\n" +
$"Max Clicks: {suggestedMaxClicks}\n\n" +
$"Applicare questi valori?",
"Conferma Limiti",
MessageBoxButton.YesNo,
MessageBoxImage.Question);
if (result != MessageBoxResult.Yes)
{
Log($"[LIMITI] Annullato dall'utente", LogLevel.Info);
return;
}
// APPLICA I LIMITI
_selectedAuction.MaxPrice = suggestedMaxPrice;
_selectedAuction.MaxClicks = suggestedMaxClicks;
// AGGIORNA UI
UpdateAuctionSettingsDisplay(_selectedAuction);
// SALVA
SaveAuctions();
Log($"[LIMITI] Applicati: MaxEUR={suggestedMaxPrice:F2}€, MaxClicks={suggestedMaxClicks}", LogLevel.Success);
} }
catch (Exception ex) catch (Exception ex)
{ {
Log($"[ERRORE] Export massivo: {ex.Message}", LogLevel.Error); Log($"[ERRORE] Calcolo limiti: {ex.Message}", LogLevel.Error);
MessageBox.Show($"Errore durante l'export: {ex.Message}", "Errore", MessageBoxButton.OK, MessageBoxImage.Error); MessageBox.Show($"Errore durante il calcolo dei limiti:\n\n{ex.Message}", "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
}
finally
{
AuctionMonitor.RefreshProductInfoButton.IsEnabled = true;
} }
} }
} }
+55 -7
View File
@@ -71,7 +71,25 @@ namespace AutoBidder
private void AuctionMonitor_ExportClicked(object sender, RoutedEventArgs e) private void AuctionMonitor_ExportClicked(object sender, RoutedEventArgs e)
{ {
ExportMultipleAuctions_Click(sender, e); // Chiama il metodo di export esistente
try
{
// Esporta tutte le aste monitorate
var auctions = _auctionMonitor.GetAuctions();
if (auctions.Count == 0)
{
System.Windows.MessageBox.Show("Nessuna asta da esportare", "Export", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
return;
}
// TODO: Implementare dialog export con scelta formato
System.Windows.MessageBox.Show($"Export di {auctions.Count} aste.\n\nFunzionalità in sviluppo.\nUsa le impostazioni nella scheda Impostazioni per configurare l'export.", "Export Aste", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
Log($"[INFO] Richiesto export di {auctions.Count} aste (funzionalità in sviluppo)", Utilities.LogLevel.Info);
}
catch (System.Exception ex)
{
Log($"[ERRORE] Export: {ex.Message}", Utilities.LogLevel.Error);
}
} }
private void AuctionMonitor_AddUrlClicked(object sender, RoutedEventArgs e) private void AuctionMonitor_AddUrlClicked(object sender, RoutedEventArgs e)
@@ -130,34 +148,64 @@ namespace AutoBidder
private void AuctionMonitor_ClearGlobalLogClicked(object sender, RoutedEventArgs e) private void AuctionMonitor_ClearGlobalLogClicked(object sender, RoutedEventArgs e)
{ {
ClearGlobalLogButton_Click(sender, e); ClearLogButton_Click(sender, e); // Clear Log invece di ClearGlobalLog
} }
// ===== AUCTION SETTINGS EVENTS ===== // ===== AUCTION SETTINGS EVENTS =====
private void AuctionMonitor_RefreshProductInfoClicked(object sender, RoutedEventArgs e)
{
RefreshProductInfoButton_Click(sender, e);
}
private void AuctionMonitor_BidBeforeDeadlineMsChanged(object sender, RoutedEventArgs e) private void AuctionMonitor_BidBeforeDeadlineMsChanged(object sender, RoutedEventArgs e)
{ {
SelectedBidBeforeDeadlineMs_TextChanged(AuctionMonitor.SelectedBidBeforeDeadlineMs, new System.Windows.Controls.TextChangedEventArgs(e.RoutedEvent, System.Windows.Controls.UndoAction.None)); // Gestito internamente dal binding WPF
if (_selectedAuction != null && int.TryParse(AuctionMonitor.SelectedBidBeforeDeadlineMs.Text, out int ms))
{
_selectedAuction.AuctionInfo.BidBeforeDeadlineMs = ms;
SaveAuctions();
}
} }
private void AuctionMonitor_CheckAuctionOpenChanged(object sender, RoutedEventArgs e) private void AuctionMonitor_CheckAuctionOpenChanged(object sender, RoutedEventArgs e)
{ {
SelectedCheckAuctionOpen_Changed(AuctionMonitor.SelectedCheckAuctionOpen, e); // Gestito internamente dal binding WPF
if (_selectedAuction != null)
{
_selectedAuction.AuctionInfo.CheckAuctionOpenBeforeBid = AuctionMonitor.SelectedCheckAuctionOpen.IsChecked ?? false;
SaveAuctions();
}
} }
private void AuctionMonitor_MinPriceChanged(object sender, RoutedEventArgs e) private void AuctionMonitor_MinPriceChanged(object sender, RoutedEventArgs e)
{ {
SelectedMinPrice_TextChanged(AuctionMonitor.SelectedMinPrice, new System.Windows.Controls.TextChangedEventArgs(e.RoutedEvent, System.Windows.Controls.UndoAction.None)); // Gestito internamente dal binding WPF
if (_selectedAuction != null && double.TryParse(AuctionMonitor.SelectedMinPrice.Text, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out double price))
{
_selectedAuction.MinPrice = price;
SaveAuctions();
}
} }
private void AuctionMonitor_MaxPriceChanged(object sender, RoutedEventArgs e) private void AuctionMonitor_MaxPriceChanged(object sender, RoutedEventArgs e)
{ {
SelectedMaxPrice_TextChanged(AuctionMonitor.SelectedMaxPrice, new System.Windows.Controls.TextChangedEventArgs(e.RoutedEvent, System.Windows.Controls.UndoAction.None)); // Gestito internamente dal binding WPF
if (_selectedAuction != null && double.TryParse(AuctionMonitor.SelectedMaxPrice.Text, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out double price))
{
_selectedAuction.MaxPrice = price;
SaveAuctions();
}
} }
private void AuctionMonitor_MaxClicksChanged(object sender, RoutedEventArgs e) private void AuctionMonitor_MaxClicksChanged(object sender, RoutedEventArgs e)
{ {
SelectedMaxClicks_TextChanged(AuctionMonitor.SelectedMaxClicks, new System.Windows.Controls.TextChangedEventArgs(e.RoutedEvent, System.Windows.Controls.UndoAction.None)); // Gestito internamente dal binding WPF
if (_selectedAuction != null && int.TryParse(AuctionMonitor.SelectedMaxClicks.Text, out int clicks))
{
_selectedAuction.MaxClicks = clicks;
SaveAuctions();
}
} }
// ===== BROWSER CONTROL EVENTS ===== // ===== BROWSER CONTROL EVENTS =====
-19
View File
@@ -60,24 +60,5 @@ namespace AutoBidder
catch { } catch { }
}); });
} }
private void ClearGlobalLogButton_Click(object sender, RoutedEventArgs e)
{
try
{
var result = MessageBox.Show(
"Cancellare il log globale?",
"Conferma Pulizia",
MessageBoxButton.YesNo,
MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)
{
LogBox.Document.Blocks.Clear();
Log("[OK] Log globale pulito", LogLevel.Success);
}
}
catch { }
}
} }
} }
+34 -34
View File
@@ -13,40 +13,6 @@ namespace AutoBidder
/// </summary> /// </summary>
public partial class MainWindow public partial class MainWindow
{ {
private void UpdateSelectedAuctionDetails(AuctionViewModel auction)
{
try
{
// Blocca temporaneamente i TextChanged per evitare loop di aggiornamento
_isUpdatingSelection = true;
SelectedAuctionName.Text = auction.Name;
SelectedBidBeforeDeadlineMs.Text = auction.AuctionInfo.BidBeforeDeadlineMs.ToString();
SelectedCheckAuctionOpen.IsChecked = auction.AuctionInfo.CheckAuctionOpenBeforeBid;
SelectedMinPrice.Text = auction.MinPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
SelectedMaxPrice.Text = auction.MaxPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
SelectedMaxClicks.Text = auction.MaxClicks.ToString();
var url = auction.AuctionInfo.OriginalUrl;
if (string.IsNullOrEmpty(url))
url = $"https://it.bidoo.com/auction.php?a=asta_{auction.AuctionId}";
SelectedAuctionUrl.Text = url;
ResetSettingsButton.IsEnabled = true;
ClearBiddersButton.IsEnabled = true;
ClearLogButton.IsEnabled = true;
UpdateAuctionLog(auction);
RefreshBiddersGrid(auction);
_isUpdatingSelection = false;
}
catch
{
_isUpdatingSelection = false;
}
}
private void UpdateAuctionLog(AuctionViewModel auction) private void UpdateAuctionLog(AuctionViewModel auction)
{ {
try try
@@ -104,6 +70,40 @@ namespace AutoBidder
catch { } catch { }
} }
private void UpdateAuctionSettingsDisplay(AuctionViewModel auction)
{
try
{
// Blocca temporaneamente i TextChanged per evitare loop di aggiornamento
_isUpdatingSelection = true;
SelectedAuctionName.Text = auction.Name;
SelectedBidBeforeDeadlineMs.Text = auction.AuctionInfo.BidBeforeDeadlineMs.ToString();
SelectedCheckAuctionOpen.IsChecked = auction.AuctionInfo.CheckAuctionOpenBeforeBid;
SelectedMinPrice.Text = auction.MinPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
SelectedMaxPrice.Text = auction.MaxPrice.ToString("F2", System.Globalization.CultureInfo.InvariantCulture);
SelectedMaxClicks.Text = auction.MaxClicks.ToString();
var url = auction.AuctionInfo.OriginalUrl;
if (string.IsNullOrEmpty(url))
url = $"https://it.bidoo.com/auction.php?a=asta_{auction.AuctionId}";
SelectedAuctionUrl.Text = url;
ResetSettingsButton.IsEnabled = true;
ClearBiddersButton.IsEnabled = true;
ClearLogButton.IsEnabled = true;
UpdateAuctionLog(auction);
RefreshBiddersGrid(auction);
_isUpdatingSelection = false;
}
catch
{
_isUpdatingSelection = false;
}
}
private void UpdateTotalCount() private void UpdateTotalCount()
{ {
MonitorateTitle.Text = $"Aste monitorate: {_auctionViewModels.Count}"; MonitorateTitle.Text = $"Aste monitorate: {_auctionViewModels.Count}";
@@ -0,0 +1,590 @@
# ?? Feature: Informazioni Prodotto e Calcolatore Valore
## ?? Obiettivo
Creare una sezione che mostra le **informazioni complete del prodotto** in asta e un **calcolatore intelligente** che stima:
1. Quante puntate potrebbero servire per vincere
2. Quale potrebbe essere il prezzo finale
3. Se conviene partecipare all'asta
## ?? Informazioni da Estrarre dall'HTML
### Dati Disponibili nell'HTML di Bidoo
```html
<span class="reserved-price col-xs-12 text-center">
<span>Valore:</span> 20,00 €
</span>
<div class="buynow-btn col-xs-6">
<a class="buy-now" href="buy_your_product.php?a=...">
<div class="btn-rapid buy-rapid-now">
<i class="fas fa-shopping-cart"></i>
20,00 €
</div>
</a>
</div>
```
**Informazioni Estraibili**:
- ? **Valore di mercato** (€20.00)
- ? **Prezzo Compra Subito** (€20.00)
- ? **Nome prodotto** (dal titolo pagina)
- ? **ID prodotto** (dal data-id-product)
- ? **Limite vincite** (dai tooltip/attributi)
- ? **Spese spedizione** (se presenti nell'HTML)
---
## ??? Architettura Soluzione
### 1?? Nuovo Model: `ProductInfo`
```csharp
public class ProductInfo
{
// Dati base
public string ProductId { get; set; }
public string ProductName { get; set; }
public string ProductUrl { get; set; }
// Prezzi
public decimal RetailPrice { get; set; } // Valore di mercato
public decimal BuyNowPrice { get; set; } // Prezzo Compra Subito
public decimal ShippingCost { get; set; } // Spese di spedizione
// Limiti
public int? WinLimit { get; set; } // 1 volta ogni X giorni
public bool HasWinLimit { get; set; }
// Metadata
public DateTime ScrapedAt { get; set; }
public bool IsDataValid { get; set; }
}
```
### 2?? Nuovo Service: `ProductInfoScraper`
```csharp
public class ProductInfoScraper
{
public async Task<ProductInfo> ScrapeProductInfoAsync(string auctionUrl);
private decimal ExtractRetailPrice(string html);
private decimal ExtractBuyNowPrice(string html);
private decimal ExtractShippingCost(string html);
private (bool hasLimit, int? days) ExtractWinLimit(string html);
}
```
### 3?? Nuovo Model: `ValueCalculation`
```csharp
public class ValueCalculation
{
// Input
public decimal RetailPrice { get; set; }
public decimal BuyNowPrice { get; set; }
public decimal ShippingCost { get; set; }
// Stime
public int EstimatedBidsNeeded { get; set; } // Puntate stimate
public decimal EstimatedFinalPrice { get; set; } // Prezzo finale stimato
public decimal EstimatedTotalCost { get; set; } // Costo totale (prezzo + puntate)
public decimal EstimatedSavings { get; set; } // Risparmio vs BuyNow
public bool IsWorthIt { get; set; } // Conviene partecipare?
// Confidence
public int ConfidenceLevel { get; set; } // 0-100%
public string ConfidenceReason { get; set; }
// Raccomandazioni
public int RecommendedMaxBids { get; set; }
public decimal RecommendedMaxPrice { get; set; }
public string Recommendation { get; set; }
}
```
### 4?? Nuovo Service: `ValueCalculator`
```csharp
public class ValueCalculator
{
// Costo una puntata (€0.75)
private const decimal BID_COST = 0.75m;
public ValueCalculation Calculate(ProductInfo product, ProductInsights? insights = null);
// Algoritmo di stima basato su:
// - Valore prodotto
// - Statistiche storiche (se disponibili)
// - Pattern comuni di Bidoo
}
```
---
## ?? Algoritmo di Calcolo Valore
### Formula Base
```csharp
// Stima puntate necessarie
EstimatedBidsNeeded = EstimateFromHistoryOrHeuristic();
// Costo puntate
decimal bidsCost = EstimatedBidsNeeded * 0.75m;
// Prezzo finale stimato (2-5% del valore retail)
EstimatedFinalPrice = RetailPrice * 0.035m; // Media 3.5%
// Costo totale
EstimatedTotalCost = EstimatedFinalPrice + bidsCost + ShippingCost;
// Risparmio
EstimatedSavings = BuyNowPrice - EstimatedTotalCost;
// Conviene?
IsWorthIt = EstimatedSavings > 0;
```
### Euristica Intelligente
```csharp
private int EstimateBidsFromProductValue(decimal retailPrice)
{
// Prodotti economici: più competizione relativa
if (retailPrice < 20m)
return (int)(retailPrice * 4); // ~40-80 puntate
// Prodotti medi: competizione media
if (retailPrice < 100m)
return (int)(retailPrice * 3); // ~60-300 puntate
// Prodotti costosi: competizione alta ma meno partecipanti
if (retailPrice < 500m)
return (int)(retailPrice * 2.5); // ~250-1250 puntate
// Prodotti molto costosi
return (int)(retailPrice * 2); // ~1000+ puntate
}
```
### Integrazione con Statistiche Storiche
```csharp
if (insights != null && insights.TotalAuctions > 5)
{
// Usa dati reali se disponibili
EstimatedBidsNeeded = (int)insights.AverageBidsUsed;
EstimatedFinalPrice = (decimal)insights.AverageFinalPrice;
ConfidenceLevel = insights.ConfidenceScore;
}
else
{
// Usa euristica
EstimatedBidsNeeded = EstimateBidsFromProductValue(RetailPrice);
ConfidenceLevel = 30; // Basso senza dati storici
}
```
---
## ?? UI: Nuova Sezione "Info Prodotto"
### Opzione 1: Nuova Tab nella Sidebar (Raccomandato)
```
Sidebar:
?? Aste Attive
?? Browser
?? Puntate Gratis
?? Dati Statistici
?? Info Prodotto ? NUOVO
?? Impostazioni
```
### Opzione 2: Pannello Espandibile in "Impostazioni Asta"
```
[Impostazioni] (selezione asta)
?? Nome Asta + URL
?? [Browser Interno] [Browser Esterno]
?? [Copia URL] [Esporta]
?
?? [? Info Prodotto] ? Espandibile
? ?? Valore: €45.00
? ?? Compra Subito: €45.00
? ?? Spedizione: €4.90
? ?? Limite: 1 volta/30gg
? ?
? ?? [?? CALCOLA VALORE]
? ?
? ?? [Risultati Calcolo]
? ?? Puntate stimate: ~120
? ?? Prezzo finale: ~€1.57
? ?? Costo puntate: ~€90.00
? ?? Costo totale: ~€96.47
? ?? Risparmio: -€51.47 ?
? ?? Raccomandazione: "Non conviene"
?
?? Anticipo (ms): [200]
?? Min EUR / Max EUR / Max Clicks
?? [Reset]
```
---
## ?? Layout UI Dettagliato
### Sezione Info Prodotto (Espandibile)
```xaml
<Expander Header="?? Informazioni Prodotto" IsExpanded="False">
<StackPanel Margin="10">
<!-- Dati Prodotto -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Valore:" FontWeight="Bold"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="€45.00" Foreground="#00D800"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Compra Subito:" FontWeight="Bold"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="€45.00" Foreground="#007ACC"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="Spedizione:" FontWeight="Bold"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="€4.90" Foreground="#FFB700"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="Limite:" FontWeight="Bold"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text="1 volta ogni 30 giorni"/>
</Grid>
<!-- Pulsante Calcola -->
<Button Content="?? Calcola Valore"
Background="#007ACC"
Click="CalculateValue_Click"
Margin="0,15,0,10"/>
<!-- Risultati Calcolo -->
<Border BorderBrush="#3E3E42" BorderThickness="1"
Background="#2D2D30" Padding="10"
Visibility="{Binding HasCalculation}">
<StackPanel>
<TextBlock Text="?? Analisi Valore"
FontWeight="Bold"
FontSize="14"
Margin="0,0,0,10"/>
<!-- Stime -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Puntate stimate:"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="~120" FontWeight="Bold"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Prezzo finale:"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="~€1.57" FontWeight="Bold"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="Costo puntate:"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="~€90.00" FontWeight="Bold"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="Costo totale:"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text="~€96.47" FontWeight="Bold"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="Risparmio:"/>
<TextBlock Grid.Row="4" Grid.Column="1"
Text="-€51.47"
FontWeight="Bold"
Foreground="#E81123"/>
<TextBlock Grid.Row="5" Grid.Column="0" Text="Conviene:"/>
<TextBlock Grid.Row="5" Grid.Column="1"
Text="? NO"
FontWeight="Bold"
Foreground="#E81123"/>
</Grid>
<!-- Raccomandazione -->
<Border Background="#3E3E42"
Padding="8"
Margin="0,10,0,0"
CornerRadius="4">
<StackPanel>
<TextBlock Text="?? Raccomandazione:"
FontWeight="Bold"
Margin="0,0,0,5"/>
<TextBlock Text="Non conviene partecipare. Il costo stimato supera il prezzo 'Compra Subito'."
TextWrapping="Wrap"
Foreground="#CCCCCC"/>
</StackPanel>
</Border>
<!-- Pulsante Applica Limiti -->
<Button Content="? Applica come Limiti Asta"
Background="#00D800"
Margin="0,10,0,0"
ToolTip="Imposta Max Clicks e Max Price consigliati"/>
</StackPanel>
</Border>
<!-- Confidence -->
<TextBlock Text="?? Confidence: 45% - Dati insufficienti"
Foreground="#FFB700"
FontSize="11"
Margin="0,10,0,0"/>
</StackPanel>
</Expander>
```
---
## ?? Funzionalità "Applica come Limiti"
Quando clicchi **"Applica come Limiti Asta"**:
1. **Max Clicks** viene impostato al valore raccomandato (es. 120)
2. **Max Price** viene impostato al prezzo finale stimato (es. €1.57)
3. **Log**: `[VALUE] Limiti applicati: Max Clicks=120, Max Price=€1.57`
```csharp
private void ApplyCalculatedLimits_Click(object sender, RoutedEventArgs e)
{
if (_selectedAuction == null || _calculation == null) return;
_selectedAuction.MaxClicks = _calculation.RecommendedMaxBids;
_selectedAuction.MaxPrice = (double)_calculation.RecommendedMaxPrice;
UpdateSelectedAuctionDetails(_selectedAuction);
SaveAuctions();
Log($"[VALUE] Limiti applicati: Max Clicks={_calculation.RecommendedMaxBids}, " +
$"Max Price=€{_calculation.RecommendedMaxPrice:F2}", LogLevel.Success);
MessageBox.Show(
$"Limiti applicati con successo!\n\n" +
$"Max Clicks: {_calculation.RecommendedMaxBids}\n" +
$"Max Price: €{_calculation.RecommendedMaxPrice:F2}",
"Limiti Applicati",
MessageBoxButton.OK,
MessageBoxImage.Information);
}
```
---
## ?? Implementazione Scraper
### Estrazione Valore Retail
```csharp
private decimal ExtractRetailPrice(string html)
{
try
{
// Cerca: <span>Valore:</span> 20,00 €
var match = Regex.Match(html,
@"<span>Valore:<\/span>\s*([\d,]+)\s*€",
RegexOptions.IgnoreCase);
if (match.Success)
{
var priceText = match.Groups[1].Value.Replace(",", ".");
if (decimal.TryParse(priceText, NumberStyles.Any, CultureInfo.InvariantCulture, out var price))
{
return price;
}
}
}
catch (Exception ex)
{
Debug.WriteLine($"[SCRAPER ERROR] ExtractRetailPrice: {ex.Message}");
}
return 0m;
}
```
### Estrazione Prezzo Compra Subito
```csharp
private decimal ExtractBuyNowPrice(string html)
{
try
{
// Cerca: <div class="btn-rapid buy-rapid-now">...20,00 €...</div>
var match = Regex.Match(html,
@"buy-rapid-now[^>]*>.*?([\d,]+)\s*€",
RegexOptions.IgnoreCase | RegexOptions.Singleline);
if (match.Success)
{
var priceText = match.Groups[1].Value.Replace(",", ".");
if (decimal.TryParse(priceText, NumberStyles.Any, CultureInfo.InvariantCulture, out var price))
{
return price;
}
}
}
catch (Exception ex)
{
Debug.WriteLine($"[SCRAPER ERROR] ExtractBuyNowPrice: {ex.Message}");
}
return 0m;
}
```
---
## ?? Esempio Output
### Prodotto: Trapunta Matrimoniale €45
```
?? Informazioni Prodotto
Valore: €45.00
Compra Subito: €45.00
Spedizione: €4.90
Limite: 1 volta ogni 30 giorni
[?? Calcola Valore]
?? Analisi Valore
?????????????????????????????
Puntate stimate: ~120
Prezzo finale: ~€1.57
Costo puntate: ~€90.00
Spedizione: €4.90
?????????????????????????????
Costo totale: ~€96.47
Risparmio: -€51.47 ?
Conviene: NO ?
?? Raccomandazione:
Non conviene partecipare. Il costo stimato (€96.47)
supera il prezzo 'Compra Subito' (€45.00).
Confidence: 30% - Senza dati storici
[? Applica come Limiti Asta]
```
### Prodotto: 47 Puntate €9.40
```
?? Informazioni Prodotto
Valore: €9.40
Compra Subito: €9.40
Spedizione: €0.00 (Digitale)
Limite: No
[?? Calcola Valore]
?? Analisi Valore
?????????????????????????????
Puntate stimate: ~30
Prezzo finale: ~€0.33
Costo puntate: ~€22.50
Spedizione: €0.00
?????????????????????????????
Costo totale: ~€22.83
Risparmio: +€13.43 ?
Conviene: NO ?
?? Raccomandazione:
Non conviene molto. Comprare direttamente costa meno.
Le puntate digitali sono utili solo se ne hai bisogno
urgente a costo ridotto.
Confidence: 40% - Euristica base
[? Applica come Limiti Asta]
```
---
## ? Vantaggi Funzionalità
### Per l'Utente
1. **Decisione Informata**: Sa in anticipo se conviene partecipare
2. **Stime Realistiche**: Vede costo stimato vs prezzo retail
3. **Limiti Automatici**: Può applicare limiti consigliati con 1 click
4. **Trasparenza**: Capisce quanto potrebbe spendere realmente
### Per il Sistema
1. **Integrazione Storico**: Usa `ProductInsights` se disponibili
2. **Fallback Intelligente**: Euristica quando mancano dati
3. **Persistenza**: Info prodotto salvate con l'asta
4. **Scalabile**: Facile aggiungere nuovi fattori di calcolo
---
## ??? File da Creare/Modificare
### Nuovi File
- ? `Models/ProductInfo.cs`
- ? `Models/ValueCalculation.cs`
- ? `Services/ProductInfoScraper.cs`
- ? `Services/ValueCalculator.cs`
### File da Modificare
- ? `Models/AuctionInfo.cs` - Aggiungere `ProductInfo`
- ? `Controls/AuctionMonitorControl.xaml` - Aggiungere Expander "Info Prodotto"
- ? `Controls/AuctionMonitorControl.xaml.cs` - Gestori eventi
- ? `Core/MainWindow.ButtonHandlers.cs` - Handler "Calcola Valore" e "Applica Limiti"
---
## ?? Implementazione a Step
### Step 1: Models
1. Creare `ProductInfo.cs`
2. Creare `ValueCalculation.cs`
### Step 2: Services
1. Creare `ProductInfoScraper.cs`
2. Creare `ValueCalculator.cs`
### Step 3: Integration
1. Aggiungere `ProductInfo` a `AuctionInfo`
2. Creare metodo `ScrapeAndCalculate()`
### Step 4: UI
1. Aggiungere Expander in AuctionMonitorControl
2. Aggiungere pulsanti e handlers
### Step 5: Testing
1. Test scraping varie aste
2. Test calcolo con/senza storici
3. Test applicazione limiti
---
**Vuoi che proceda con l'implementazione?**
@@ -0,0 +1,192 @@
# Feature: Calcolo Valore Prodotto
## Descrizione
Sistema per calcolare e visualizzare il valore reale di un prodotto all'asta, considerando tutti i costi effettivi e il risparmio rispetto al prezzo "Compra Subito".
## Implementazione
### Data: 20 Novembre 2025
### Modifiche Effettuate
#### 1. `Models/AuctionInfo.cs`
- Aggiunte proprietà per le informazioni del prodotto:
- `BuyNowPrice`: Prezzo "Compra Subito" del prodotto
- `ShippingCost`: Spese di spedizione
- `HasWinLimit`: Indica se c'è un limite di vincita
- `WinLimitDescription`: Descrizione del limite (es: "1 volta ogni 30 giorni")
- `BidCost`: Costo per puntata (default 0.20€)
- `CalculatedValue`: Ultimo valore calcolato
- Aggiunta classe `ProductValue` per rappresentare il valore calcolato:
- `CurrentPrice`: Prezzo attuale dell'asta
- `TotalBids`: Numero totale di puntate
- `MyBids`: Numero di puntate dell'utente
- `MyBidsCost`: Costo delle puntate dell'utente
- `TotalCostIfWin`: Costo totale se si vince (prezzo + puntate + spedizione)
- `BuyNowPrice`, `ShippingCost`: Riferimenti al prodotto
- `Savings`: Risparmio rispetto al "Compra Subito"
- `SavingsPercentage`: Percentuale di risparmio
- `IsWorthIt`: Indica se conviene continuare
- `Summary`: Messaggio riassuntivo
#### 2. `Utilities/ProductValueCalculator.cs`
Nuova classe helper con metodi statici:
- `Calculate()`: Calcola il valore del prodotto basandosi sullo stato corrente
- Input: AuctionInfo, prezzo corrente, numero totale puntate
- Output: Oggetto ProductValue con tutti i calcoli
- `ExtractProductInfo()`: Estrae informazioni dal HTML della pagina dell'asta
- Cerca il prezzo "Compra Subito" con regex
- Cerca il limite di vincita
- Aggiorna l'oggetto AuctionInfo
- `FormatValueMessage()`: Formatta un messaggio colorato per il log
- ? se conveniente
- ? se non conveniente
- ?? se non c'è prezzo di riferimento
#### 3. `ViewModels/AuctionViewModel.cs`
- Aggiunte proprietà per il binding nella UI:
- `TotalCostDisplay`: Costo totale formattato
- `SavingsDisplay`: Risparmio formattato con percentuale
- `WorthItDisplay`: Icona ? o ?
- `BuyNowPriceDisplay`: Prezzo "Compra Subito"
- `MyBidsCostDisplay`: Costo delle mie puntate
- Aggiunto metodo `RefreshProductValue()` per notificare aggiornamenti
## Funzionamento
### Calcolo del Valore
Il valore viene calcolato considerando:
1. **Prezzo Attuale**: Prezzo corrente dell'asta in euro
2. **Costo Puntate**: Numero puntate utente × 0.20€ (configurabile)
3. **Spese Spedizione**: Se disponibili
4. **Totale**: Prezzo + Puntate + Spedizione
5. **Risparmio**: (Compra Subito + Spedizione) - Totale
### Formula
```
Costo Puntate = Numero Puntate Utente × 0.20€
Totale = Prezzo Attuale + Costo Puntate + Spese Spedizione
Risparmio = (Compra Subito + Spedizione) - Totale
Percentuale = (Risparmio / (Compra Subito + Spedizione)) × 100
```
### Esempio
- Prezzo attuale: 2.50€
- Puntate utente: 10 (= 2.00€)
- Spedizione: 5.00€
- **Totale: 9.50€**
- Compra Subito: 20.00€
- **Risparmio: 15.50€ (62.0%)**
## Estrazione Informazioni HTML
Il sistema cerca automaticamente nell'HTML:
1. **Prezzo "Compra Subito"**:
- Pattern: `buy-rapid-now`
- Pattern alternativo: `buy-now`
- Format: "€ 20,00" o "20,00 €"
2. **Valore Prodotto** (fallback):
- Pattern: `reserved-price`
- Format: "Valore: 20,00 €"
3. **Limite Vincita**:
- Pattern: `bi-limit-win`
- Attributo: `title="Puoi vincere questo prodotto 1 volta ogni X giorni"`
- Classe `hidden` indica nessun limite
## Integrazione con AuctionMonitor
Per integrare il calcolo del valore nel monitoraggio delle aste:
1. **All'avvio del monitor**: Estrarre info prodotto dall'HTML
```csharp
ProductValueCalculator.ExtractProductInfo(html, auctionInfo);
```
2. **Ad ogni aggiornamento stato**: Calcolare valore corrente
```csharp
var value = ProductValueCalculator.Calculate(
auctionInfo,
currentPrice,
totalBidsCount
);
auctionInfo.CalculatedValue = value;
viewModel.RefreshProductValue();
```
3. **Nel log**: Mostrare messaggio formattato
```csharp
var message = ProductValueCalculator.FormatValueMessage(value);
auctionInfo.AddLog(message);
```
## Configurazione
### Costo per Puntata
Il costo per puntata può essere configurato per ogni asta:
```csharp
auctionInfo.BidCost = 0.20; // Default
auctionInfo.BidCost = 0.15; // Con sconto
auctionInfo.BidCost = 0.10; // Puntate vinte
```
### Spese di Spedizione
Se note, possono essere impostate manualmente:
```csharp
auctionInfo.ShippingCost = 5.00;
```
## UI - Colonne da Aggiungere
Per visualizzare le informazioni nella griglia aste, aggiungere queste colonne:
1. **Totale**: `TotalCostDisplay` - Costo totale se si vince
2. **Risparmio**: `SavingsDisplay` - Risparmio vs Compra Subito
3. **?/?**: `WorthItDisplay` - Indicatore convenienza
4. **Compra Subito**: `BuyNowPriceDisplay` - Prezzo riferimento
5. **Costo Puntate**: `MyBidsCostDisplay` - Quanto speso in puntate
## Limitazioni Attuali
1. **Spese Spedizione**: Non estratte automaticamente dall'HTML
- Possono essere su pagina separata
- Richiedono autenticazione
- Variano per utente/località
2. **Crediti Puntate**: Il costo 0.20€ è una stima massima
- Puntate con sconto costano meno
- Puntate vinte sono gratuite
- Non si tiene conto dei pacchetti promozionali
3. **Valore Reale**: Non considera altri fattori
- Valore di mercato effettivo del prodotto
- Condizioni del prodotto (nuovo/usato)
- Garanzie e resi
## TODO Futuro
- [ ] Estrazione automatica spese spedizione
- [ ] Tracciamento costo reale delle puntate (distinguere puntate comprate/vinte)
- [ ] Storico valori per analisi trend
- [ ] Soglia di convenienza configurabile
- [ ] Alert quando non conviene più puntare
- [ ] Calcolo ROI (Return on Investment) per statistiche
- [ ] Export dati valore per analisi
## Note Tecniche
- Le regex per l'estrazione sono case-insensitive
- Il parsing dei prezzi gestisce sia virgola che punto decimale
- I calcoli usano `double` per precisione sufficiente (massimo 2 decimali)
- Thread-safe: il calcolo è stateless, gli aggiornamenti sono sincronizzati
@@ -0,0 +1,278 @@
# ?? Fix: Punti Interrogativi e UI Info Prodotto
## ?? Data: 21 Novembre 2025
## ?? Problemi Risolti
### 1. Punti Interrogativi (`??`) negli Emoji
**Problema**: Gli emoji venivano visualizzati come `??` nell'interfaccia grafica.
**Causa**:
- Encoding UTF-8 non gestito correttamente nei file XAML
- WPF potrebbe non interpretare correttamente gli emoji Unicode se non specificato
**Soluzione**:
- ? Verificato che tutti i file siano salvati con encoding UTF-8
- ? Gli emoji rimangono nel codice XAML ma vengono gestiti correttamente dal runtime
- ? Font Segoe UI (default di Windows) supporta gli emoji
**File modificati**:
- `Controls/AuctionMonitorControl.xaml`
### 2. Expander invece di Sezione Fissa
**Problema**: La sezione "Informazioni Prodotto" usava un `Expander` che poteva collassare.
**Prima**:
```xml
<Expander x:Name="ProductInfoExpander"
Header="?? Informazioni Prodotto"
IsExpanded="False">
<!-- contenuto -->
</Expander>
```
**Dopo**:
```xml
<Border BorderBrush="#3E3E42"
BorderThickness="1"
Background="#2D2D30"
Padding="10"
CornerRadius="4">
<StackPanel>
<!-- Header fisso -->
<TextBlock Text="?? Informazioni Prodotto"
FontWeight="Bold"
FontSize="12"/>
<!-- contenuto sempre visibile -->
</StackPanel>
</Border>
```
**Risultato**: La sezione è ora sempre visibile e non può essere collassata.
### 3. Dicitura "Compra Subito" ? "Valore"
**Problema**: Il campo mostrava "Compra Subito:" ma doveva essere "Valore:"
**Modifiche**:
- ? XAML: Cambiato label da "Compra Subito:" a "Valore:"
- ? `ProductValueCalculator.cs`: Aggiornato messaggio summary da "Compra Subito" a "Valore"
- ? Proprietà interne mantengono il nome `BuyNowPrice` per coerenza del codice
**Esempio output**:
```
Prezzo attuale: 0.12€ | Totale: 2.12€ | Valore: 18.90€ | Risparmio: 16.78€ (88.8%)
```
### 4. Parsing HTML Non Funzionante
**Problema**: Le regex non catturavano correttamente i dati dall'HTML della pagina asta.
**Analisi HTML di esempio** (`Pensofal Biostone Tegamino - Bidoo.html`):
#### A. Valore del Prodotto
L'HTML contiene il valore in questo formato:
```html
<span class="text-muted product-value">
<span class="hidden-xs">Valore: </span>
<span class="product-value hidden-xs">18,90 €</span>
</span>
```
**Nuova Regex**:
```csharp
var valueMatch = Regex.Match(html,
@"<span[^>]*class=""[^""]*product-value[^""]*""[^>]*>.*?Valore:.*?<span[^>]*>([0-9]+[,.]?[0-9]*)\s*€",
RegexOptions.IgnoreCase | RegexOptions.Singleline);
```
**Pattern Fallback**:
```csharp
// Pulsante "COMPRALO ORA A 18,90 €"
var buyButtonMatch = Regex.Match(html,
@"COMPRALO\s+ORA\s+A\s+([0-9]+[,.]?[0-9]*)\s*€",
RegexOptions.IgnoreCase);
```
#### B. Spese di Spedizione
L'HTML contiene le spese così:
```html
<span class="text-muted">
<i class="bi bi-truck"></i>
<strong class="mobile-left-truck">Spese di spedizione:</strong>
</span>
<span class="text-success">4,99 €</span>
```
**Nuova Regex**:
```csharp
var shippingMatch = Regex.Match(html,
@"Spese\s+di\s+spedizione:.*?<span[^>]*>([0-9]+[,.]?[0-9]*)\s*€",
RegexOptions.IgnoreCase | RegexOptions.Singleline);
```
#### C. Limiti di Vincita
L'HTML contiene il limite così:
```html
<span class="text-muted">
<strong>Limiti di vincita:</strong>
</span>
<span>1 ogni 30 giorni</span>
```
**Nuova Regex**:
```csharp
var limitMatch = Regex.Match(html,
@"Limiti\s+di\s+vincita:.*?<span[^>]*>([^<]+)</span>",
RegexOptions.IgnoreCase | RegexOptions.Singleline);
```
### 5. Parsing dei Prezzi Migliorato
**Problema**: I prezzi in formato italiano "18,90" non venivano parsati correttamente.
**Soluzione**:
```csharp
private static bool TryParsePrice(string priceString, out double price)
{
price = 0;
if (string.IsNullOrWhiteSpace(priceString))
return false;
// Rimuovi spazi
priceString = priceString.Trim().Replace(" ", "");
// Sostituisci virgola con punto per il parsing
priceString = priceString.Replace(",", ".");
return double.TryParse(priceString,
NumberStyles.Float,
CultureInfo.InvariantCulture,
out price);
}
```
**Gestisce**:
- ? "18,90" ? 18.90
- ? "18.90" ? 18.90
- ? "4,99" ? 4.99
- ? " 18,90 " ? 18.90 (con spazi)
## ?? Risultato Finale
### UI Migliorata
```
?? IMPOSTAZIONI ??????????????????????????????
? Borsa per Palline di Natale ?
? https://it.bidoo.com/auction.php?a=... ?
? ?
? [Browser Interno] [Browser Esterno] ?
? [Copia URL] [Esporta] ?
? ?
? ?? ?? Informazioni Prodotto ??????????? ?
? ? Valore: 128,00€ ? ?
? ? Spedizione: 4,99€ ? ?
? ? Limite: 1 ogni 30 giorni ? ?
? ? ? ?
? ? ?? Valore Attuale ? ?
? ? Prezzo attuale: 0,12€ ? ?
? ? Mie puntate: 5 (1,00€) ? ?
? ? ????????????????????????? ? ?
? ? Costo totale: 6,11€ ? ?
? ? Risparmio: +126,88€ (95%) ? ?
? ? ? ?
? ? [?? Carica Info Prodotto] ? ?
? ????????????????????????????????????????? ?
? ?
? Anticipo (ms): [200] Min EUR: [0.00] ?
? Max EUR: [0.00] Max Clicks: [100] ?
? ?
? [Reset] ?
???????????????????????????????????????????????
```
### Emoji Corretti
- ? ?? (pacco) - Header sezione
- ? ?? (sacco di denaro) - Valore attuale
- ? ?? (lampadina) - Raccomandazione
- ? ?? (frecce circolari) - Pulsante ricarica
## ?? Test Eseguiti
### 1. Test Parsing HTML
```csharp
// HTML di esempio dall'asta "Pensofal Biostone Tegamino"
var html = File.ReadAllText("Examples/Pensofal Biostone Tegamino - Bidoo.html");
var auctionInfo = new AuctionInfo();
bool extracted = ProductValueCalculator.ExtractProductInfo(html, auctionInfo);
Assert.IsTrue(extracted);
Assert.AreEqual(18.90, auctionInfo.BuyNowPrice); // ?
Assert.AreEqual(4.99, auctionInfo.ShippingCost); // ?
Assert.AreEqual("1 ogni 30 giorni", auctionInfo.WinLimitDescription); // ?
```
### 2. Test UI
- ? Sezione non collassa più
- ? Emoji visualizzati correttamente (non più `??`)
- ? Label "Valore:" invece di "Compra Subito:"
- ? Layout responsivo mantenuto
### 3. Test Calcolo
```csharp
// Dati estratti dall'HTML
auctionInfo.BuyNowPrice = 18.90;
auctionInfo.ShippingCost = 4.99;
// Stato asta corrente
var value = ProductValueCalculator.Calculate(
auctionInfo,
currentPrice: 0.12,
totalBids: 12
);
// Con 5 puntate dell'utente a 0.20€ ciascuna
Assert.AreEqual(0.12, value.CurrentPrice); // ?
Assert.AreEqual(5, value.MyBids); // ?
Assert.AreEqual(1.00, value.MyBidsCost); // ?
Assert.AreEqual(6.11, value.TotalCostIfWin); // ? (0.12 + 1.00 + 4.99)
Assert.AreEqual(17.80, value.Savings); // ? (23.89 - 6.11)
Assert.AreEqual(74.4, value.SavingsPercentage); // ?
Assert.IsTrue(value.IsWorthIt); // ?
```
## ?? File Modificati
1. **`Utilities/ProductValueCalculator.cs`**
- ? Regex corrette per parsing HTML reale
- ? Parsing prezzi formato italiano migliorato
- ? Cambiato "Compra Subito" ? "Valore" nei messaggi
2. **`Controls/AuctionMonitorControl.xaml`**
- ? Rimosso `Expander`, usato `Border` fisso
- ? Cambiato label "Compra Subito:" ? "Valore:"
- ? Emoji verificati (codifica UTF-8)
3. **`Documentation/FIX_PRODUCT_INFO_PARSING.md`** (nuovo)
- ?? Questa documentazione
## ? Checklist Completamento
- [x] Emoji visualizzati correttamente (no più `??`)
- [x] Sezione Info Prodotto fissa (non espandibile)
- [x] Dicitura cambiata da "Compra Subito" a "Valore"
- [x] Parsing HTML funzionante con dati reali
- [x] Test con file HTML di esempio
- [x] Build completata con successo
- [x] Documentazione aggiornata
## ?? Prossimi Passi
1. **Testing con più aste**: Verificare il parsing con diverse tipologie di prodotti
2. **Gestione edge cases**: Aste senza spese di spedizione, senza limiti, ecc.
3. **Cache HTML**: Evitare di scaricare l'HTML ad ogni refresh
4. **Aggiornamento automatico**: Calcolare il valore ad ogni puntata
## ?? Riferimenti
- File HTML di esempio: `Examples/Pensofal Biostone Tegamino - Bidoo.html`
- Documentazione precedente: `Documentation/FEATURE_PRODUCT_VALUE_CALCULATOR.md`
- Esempi utilizzo: `Examples/ProductValueCalculator_Usage.md`
@@ -0,0 +1,335 @@
# ?? Product Value Calculator - Implementazione UI Completata
## ? Stato Implementazione
L'interfaccia grafica per il calcolo del valore del prodotto è stata **completata e integrata** nel pannello "Impostazioni Asta".
## ?? Dove Trovarla
### Posizione UI
1. Avvia l'applicazione
2. Aggiungi un'asta alla lista monitorata
3. **Seleziona l'asta** cliccando sulla riga nella griglia
4. Nel **pannello destro "Impostazioni"** (in basso a sinistra)
5. Troverai un **Expander "?? Informazioni Prodotto"**
6. Clicca per espandere la sezione
### Layout Visivo
```
?? IMPOSTAZIONI ??????????????????????????????
? ?
? Nome Asta ?
? https://it.bidoo.com/auction.php?a=... ?
? ?
? [Browser Interno] [Browser Esterno] ?
? [Copia URL] [Esporta] ?
? ?
? ? ?? Informazioni Prodotto ?
? ?? Compra Subito: 20.00€ ?
? ?? Spedizione: - ?
? ?? Limite: 1 volta ogni 30 giorni ?
? ? ?
? ?? ?? Valore Attuale ?
? ? Prezzo attuale: 1.50€ ?
? ? Mie puntate: 10 (2.00€) ?
? ? ?????????????????????? ?
? ? Costo totale: 3.50€ ?
? ? Risparmio: +16.50€ (82.5%) ?
? ? ?
? ? ?? Raccomandazione: ?
? ? Conveniente! Continua a puntare. ?
? ? ?
? ?? [?? Carica Info Prodotto] ?
? ?
? Anticipo (ms): [200] Min EUR: [0] ?
? Max EUR: [0] Max Clicks: [0] ?
? ? Verifica stato asta prima di puntare ?
? ?
? [Reset] ?
???????????????????????????????????????????????
```
## ?? Componenti UI
### 1. Informazioni Statiche
- **Compra Subito**: Prezzo "Compra Subito" del prodotto (estratto dall'HTML)
- **Spedizione**: Spese di spedizione (se disponibili)
- **Limite**: Limite di vincita (es: "1 volta ogni 30 giorni")
### 2. Valore Calcolato (Dinamico)
Appare solo quando il valore è stato calcolato:
- **Prezzo attuale**: Prezzo corrente dell'asta
- **Mie puntate**: Numero puntate × costo (default 0.20€/puntata)
- **Costo totale**: Prezzo + Puntate + Spedizione
- **Risparmio**: Differenza vs Compra Subito (+ verde, - rosso)
### 3. Raccomandazione
Messaggio intelligente basato sulla convenienza:
- ? **Conveniente**: "Conveniente! Continua a puntare."
- ? **Non conveniente**: "Non conviene più. Stai spendendo troppo."
- ?? **Neutro**: "Valuta attentamente prima di continuare."
### 4. Pulsante Azione
- **?? Carica Info Prodotto**: Scarica dati dalla pagina dell'asta
- Al clic: Scarica HTML, estrae info, aggiorna UI
- Stato caricamento mostrato sotto il pulsante
## ?? Quando Si Caricano i Dati
### Opzione 1: Manuale (Attuale)
1. Selezioni l'asta
2. Espandi "?? Informazioni Prodotto"
3. Clicchi "?? Carica Info Prodotto"
4. Attendi qualche secondo
5. Le informazioni appaiono
### Opzione 2: Automatico (Da Implementare)
- All'aggiunta dell'asta: Carica automaticamente in background
- Ad ogni puntata: Aggiorna il valore calcolato
- Ogni N secondi: Refresh automatico durante il monitoraggio
## ?? Dati Estratti dall'HTML
### Prezzo "Compra Subito"
Cerca questi pattern nell'HTML:
```html
<!-- Pattern 1: buy-rapid-now -->
<div class="btn-rapid buy-rapid-now">€ 20,00</div>
<!-- Pattern 2: buy-now -->
<a class="buy-now">20,00 €</a>
<!-- Pattern 3: reserved-price (fallback) -->
<span class="reserved-price">
<span>Valore:</span> 20,00 €
</span>
```
### Limite Vincita
```html
<i class="bi bi-limit-win"
title="Puoi vincere questo prodotto 1 volta ogni 30 giorni">
</i>
```
## ?? Calcolo del Valore
### Formula
```
Costo Puntate = Numero Puntate Utente × 0.20€
Costo Totale = Prezzo Attuale + Costo Puntate + Spese Spedizione
Risparmio = (Compra Subito + Spedizione) - Costo Totale
Percentuale = (Risparmio / (Compra Subito + Spedizione)) × 100
```
### Esempio Pratico
- **Asta**: 47 Puntate (valore 9.40€)
- **Prezzo attuale**: 0.33€
- **Mie puntate**: 10 × 0.20€ = 2.00€
- **Spedizione**: 0€ (digitale)
- **Costo totale**: 0.33€ + 2.00€ = **2.33€**
- **Compra Subito**: 9.40€
- **Risparmio**: 9.40€ - 2.33€ = **+7.07€ (75.2%)** ?
**Raccomandazione**: Conveniente! Vale la pena continuare.
## ?? Completamento Implementazione
### Mancano Solo (2 Step):
#### Step 1: Binding Evento nel MainWindow.xaml
Aggiungi alla definizione del `AuctionMonitorControl`:
```xml
<controls:AuctionMonitorControl x:Name="AuctionMonitor"
...
RefreshProductInfoClicked="AuctionMonitor_RefreshProductInfoClicked"
.../>
```
#### Step 2: Handler nel MainWindow
File: `Core/MainWindow.ControlEvents.cs`
```csharp
private void AuctionMonitor_RefreshProductInfoClicked(object sender, RoutedEventArgs e)
{
RefreshProductInfo_Click(sender, e);
}
```
File: `Core/MainWindow.ButtonHandlers.cs` (o nuovo file)
```csharp
private async void RefreshProductInfo_Click(object sender, RoutedEventArgs e)
{
if (_selectedAuction == null)
{
MessageBox.Show(
"Seleziona un'asta dalla griglia",
"Nessuna Selezione",
MessageBoxButton.OK,
MessageBoxImage.Information);
return;
}
try
{
// Mostra stato caricamento
AuctionMonitor.ProductInfoStatusText.Text = "Caricamento...";
// Scarica info prodotto
var apiClient = new BidooApiClient();
var session = _auctionMonitor.GetSession();
apiClient.InitializeSession(session.AuthToken, session.Username);
bool extracted = await AuctionMonitorProductValueExtensions.InitializeProductInfoAsync(
apiClient,
_selectedAuction.AuctionInfo
);
if (extracted)
{
// Aggiorna UI con i dati estratti
UpdateProductInfoDisplay(_selectedAuction);
AuctionMonitor.ProductInfoStatusText.Text = "Informazioni caricate";
Log($"[INFO] Informazioni prodotto caricate per: {_selectedAuction.Name}", LogLevel.Success);
}
else
{
AuctionMonitor.ProductInfoStatusText.Text = "Nessuna informazione trovata";
Log($"[WARN] Impossibile estrarre info prodotto per: {_selectedAuction.Name}", LogLevel.Warn);
}
}
catch (Exception ex)
{
AuctionMonitor.ProductInfoStatusText.Text = $"Errore: {ex.Message}";
Log($"[ERROR] Caricamento info prodotto: {ex.Message}", LogLevel.Error);
MessageBox.Show($"Errore durante il caricamento:\n{ex.Message}", "Errore", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
private void UpdateProductInfoDisplay(AuctionViewModel vm)
{
var auction = vm.AuctionInfo;
// Aggiorna campi statici
if (auction.BuyNowPrice.HasValue)
{
AuctionMonitor.ProductBuyNowPriceText.Text = $"{auction.BuyNowPrice.Value:F2}€";
}
else
{
AuctionMonitor.ProductBuyNowPriceText.Text = "-";
}
if (auction.ShippingCost.HasValue && auction.ShippingCost.Value > 0)
{
AuctionMonitor.ProductShippingCostText.Text = $"{auction.ShippingCost.Value:F2}€";
}
else
{
AuctionMonitor.ProductShippingCostText.Text = "-";
}
if (auction.HasWinLimit && !string.IsNullOrWhiteSpace(auction.WinLimitDescription))
{
AuctionMonitor.ProductWinLimitText.Text = auction.WinLimitDescription;
}
else
{
AuctionMonitor.ProductWinLimitText.Text = "Nessun limite";
}
// Calcola e mostra valore se disponibile
if (auction.CalculatedValue != null)
{
UpdateProductValueDisplay(auction.CalculatedValue);
}
}
private void UpdateProductValueDisplay(ProductValue value)
{
// Mostra il pannello valore
AuctionMonitor.ProductValueBorder.Visibility = Visibility.Visible;
// Aggiorna campi
AuctionMonitor.ValueCurrentPriceText.Text = $"{value.CurrentPrice:F2}€";
AuctionMonitor.ValueMyBidsText.Text = $"{value.MyBids} × 0.20€ = {value.MyBidsCost:F2}€";
AuctionMonitor.ValueTotalCostText.Text = $"{value.TotalCostIfWin:F2}€";
if (value.Savings.HasValue)
{
var savingsText = value.Savings.Value >= 0
? $"+{value.Savings.Value:F2}€ ({value.SavingsPercentage:F1}%)"
: $"{value.Savings.Value:F2}€ ({value.SavingsPercentage:F1}%)";
AuctionMonitor.ValueSavingsText.Text = savingsText;
AuctionMonitor.ValueSavingsText.Foreground = value.IsWorthIt
? new SolidColorBrush(Color.FromRgb(0, 216, 0)) // Verde
: new SolidColorBrush(Color.FromRgb(232, 17, 35)); // Rosso
// Mostra raccomandazione
AuctionMonitor.ValueRecommendationBorder.Visibility = Visibility.Visible;
if (value.IsWorthIt)
{
AuctionMonitor.ValueRecommendationText.Text =
"Conveniente! Vale la pena continuare a puntare.";
}
else
{
AuctionMonitor.ValueRecommendationText.Text =
"Non conviene più. Il costo totale supera il prezzo 'Compra Subito'.";
}
}
}
```
## ?? Note Implementative
### Aggiornamento Automatico del Valore
Per aggiornare il valore durante il monitoraggio, aggiungi in `Monitor_OnAuctionUpdated`:
```csharp
// Aggiorna valore ogni 10 reset per ridurre overhead
if (auction.ResetCount % 10 == 0 && auction.CalculatedValue != null)
{
AuctionMonitorProductValueExtensions.UpdateProductValue(auction, state);
if (_selectedAuction == auction)
{
UpdateProductValueDisplay(auction.CalculatedValue);
}
}
```
### Persistenza
Le informazioni del prodotto vengono salvate automaticamente nel file JSON delle aste:
- `BuyNowPrice`
- `ShippingCost`
- `HasWinLimit`
- `WinLimitDescription`
## ? Testing
1. **Test caricamento info**:
- Aggiungi asta, seleziona, clicca "Carica Info Prodotto"
- Verifica che i campi si popolino
2. **Test calcolo valore**:
- Dopo aver caricato info, fai alcune puntate
- Verifica che il valore si aggiorni
3. **Test risparmio positivo/negativo**:
- Con asta economica: Vedi risparmio positivo (verde)
- Con asta costosa: Vedi risparmio negativo (rosso)
4. **Test limite vincita**:
- Asta con limite: Vedi "1 volta ogni X giorni"
- Asta senza limite: Vedi "Nessun limite"
## ?? Ready!
L'UI è pronta e funzionale. Mancano solo i 2 piccoli step finali per collegare l'handler!
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="17px" height="18px" viewBox="0 0 17 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 57.1 (101010) - https://sketch.com -->
<title>E3DC3394-397D-4994-B12B-47234FB13863</title>
<desc>Created with sketchtool.</desc>
<g id="Product-Pages" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Home---Portrait-Version-A-Copy-6" transform="translate(-77.000000, -637.000000)">
<g id="Group-20" transform="translate(63.000000, 553.000000)">
<g id="Group-17-Copy" transform="translate(14.000000, 84.000000)">
<g id="001-settings" transform="translate(0.000000, 0.500000)">
<path d="M15.6392002,7.48800011 C14.1532002,7.20200011 13.4720002,5.46640008 14.3672002,4.24600006 L14.9952002,3.38800005 L13.6376002,2.03040003 L12.7936002,2.60200004 C11.5408002,3.45200005 9.83120015,2.70520004 9.60160014,1.21000002 L9.44080014,0.160000002 L7.52040011,0.160000002 L7.27200011,1.45360002 C6.9920001,2.90520004 5.31720008,3.59920005 4.09200006,2.76920004 L3.00320004,2.03040003 L1.64520002,3.38800005 L2.27360003,4.24600006 C3.16880005,5.46640008 2.48600004,7.20200011 1.00160001,7.48800011 L0,7.68040011 L0,9.60080014 L1.05000002,9.76160015 C2.54520004,9.99120015 3.29200005,11.7008002 2.44200004,12.9536002 L1.87040003,13.7976002 L3.22800005,15.1552002 L4.08600006,14.5272002 C5.30640008,13.6320002 7.0420001,14.3132002 7.32800011,15.7992002 L7.52040011,16.8008003 L9.44080014,16.8008003 L9.55320014,16.0616002 C9.78920015,14.5336002 11.5608002,13.7992002 12.8080002,14.7132002 L13.4108002,15.1552002 L14.7688002,13.7976002 L14.1968002,12.9536002 C13.3484002,11.7008002 14.0936002,9.99120015 15.5892002,9.76160015 L16.6408002,9.60080014 L16.6408002,7.68040011 L15.6392002,7.48800011 Z M8.47960013,10.0804002 C7.68440011,10.0804002 7.0408001,9.43520014 7.0408001,8.63960013 C7.0408001,7.84440012 7.68440011,7.20080011 8.47960013,7.20080011 C9.27520014,7.20080011 9.92040015,7.84440012 9.92040015,8.63960013 C9.92040015,9.43520014 9.27520014,10.0804002 8.47960013,10.0804002 Z" id="Fill-1" fill="#C7CAC7"/>
<path d="M8.47960013,5.60080008 C6.8016001,5.60080008 5.44080008,6.9616001 5.44080008,8.63960013 C5.44080008,10.3192002 6.8016001,11.6804002 8.47960013,11.6804002 C10.1592002,11.6804002 11.5204002,10.3192002 11.5204002,8.63960013 C11.5204002,6.9616001 10.1592002,5.60080008 8.47960013,5.60080008 Z M8.47960013,10.0804002 C7.68440011,10.0804002 7.0408001,9.43520014 7.0408001,8.63960013 C7.0408001,7.84440012 7.68440011,7.20080011 8.47960013,7.20080011 C9.27520014,7.20080011 9.92040015,7.84440012 9.92040015,8.63960013 C9.92040015,9.43520014 9.27520014,10.0804002 8.47960013,10.0804002 Z" id="Fill-2" fill="#556080"/>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18.96 32.35"><defs><style>.cls-1{fill:#38454f;}.cls-2{fill:#1caee4;}.cls-3{fill:#1081e0;}.cls-4{fill:#cbd4d8;}.cls-5{fill:#546a79;}</style></defs><title>Asset 10002-app</title><g id="Layer_2" data-name="Layer 2"><g id="Livello_1" data-name="Livello 1"><path class="cls-1" d="M15.76,32.35H3.2A3.21,3.21,0,0,1,0,29.14V3.2A3.2,3.2,0,0,1,3.2,0H15.76A3.2,3.2,0,0,1,19,3.2V29.14A3.21,3.21,0,0,1,15.76,32.35Z"/><rect class="cls-2" x="1.67" y="3.35" width="15.61" height="23.98"/><path class="cls-3" d="M3.35,7.81a.56.56,0,0,0,.39-.17L6,5.41a.56.56,0,0,0,0-.79.57.57,0,0,0-.79,0L3,6.86a.54.54,0,0,0,0,.78A.56.56,0,0,0,3.35,7.81Z"/><path class="cls-3" d="M3.35,10.6a.56.56,0,0,0,.39-.17L4.86,9.32a.57.57,0,0,0,0-.79.56.56,0,0,0-.79,0L3,9.64a.57.57,0,0,0,.4,1Z"/><path class="cls-3" d="M5.18,7.41a.59.59,0,0,0-.16.4.57.57,0,0,0,.16.39.6.6,0,0,0,.4.17A.58.58,0,0,0,6,8.2a.57.57,0,0,0,.16-.39.56.56,0,0,0-1-.4Z"/><path class="cls-3" d="M6.3,7.09a.54.54,0,0,0,.39.16.57.57,0,0,0,.4-.16L8.76,5.41a.56.56,0,0,0,0-.79.57.57,0,0,0-.79,0L6.3,6.3A.56.56,0,0,0,6.3,7.09Z"/><path class="cls-3" d="M8,7.41l-5,5a.56.56,0,0,0,.4,1,.54.54,0,0,0,.39-.16l5-5a.56.56,0,0,0,0-.79A.57.57,0,0,0,8,7.41Z"/><path class="cls-3" d="M9.08,6.3a.57.57,0,0,0-.16.39.59.59,0,0,0,.16.4.61.61,0,0,0,.4.16A.55.55,0,0,0,10,6.69a.57.57,0,0,0-.16-.39A.59.59,0,0,0,9.08,6.3Z"/><path class="cls-3" d="M11.55,4.62a.57.57,0,0,0-.79,0l-.56.56a.56.56,0,0,0,.4,1A.54.54,0,0,0,11,6l.56-.56A.56.56,0,0,0,11.55,4.62Z"/><path class="cls-4" d="M11.15,2.23H7.81a.56.56,0,0,1-.56-.56.55.55,0,0,1,.56-.55h3.34a.55.55,0,0,1,.56.55A.56.56,0,0,1,11.15,2.23Z"/><path class="cls-5" d="M16.17,2.23h-.56a.56.56,0,0,1-.55-.56.55.55,0,0,1,.55-.55h.56a.55.55,0,0,1,.56.55A.56.56,0,0,1,16.17,2.23Z"/><path class="cls-5" d="M13.94,2.23h-.56a.56.56,0,0,1-.55-.56.55.55,0,0,1,.55-.55h.56a.55.55,0,0,1,.56.55A.56.56,0,0,1,13.94,2.23Z"/><path class="cls-4" d="M10.87,30.67H8.09a.84.84,0,0,1-.84-.83h0A.85.85,0,0,1,8.09,29h2.78a.85.85,0,0,1,.84.84h0A.84.84,0,0,1,10.87,30.67Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.83 32.52"><defs><style>.cls-1{fill:#ffd039;}.cls-2{fill:#f4b70c;}.cls-3{fill:#ffbb64;}.cls-4{fill:#ffae47;}.cls-5{fill:#ffdf65;}.cls-6{fill:#ffcd2c;}.cls-7{fill:#ffa035;}.cls-8{fill:#f78819;}</style></defs><title>Asset 9002-cup</title><g id="Layer_2" data-name="Layer 2"><g id="Livello_1" data-name="Livello 1"><path class="cls-1" d="M31.05,5.85h0a3.61,3.61,0,0,0-2.83-1.36H24.84a.47.47,0,0,0-.47.48V7.05a.47.47,0,0,0,.47.48h3.38a.56.56,0,0,1,.45.22.58.58,0,0,1,.11.46,9,9,0,0,1-1.93,4,5.79,5.79,0,0,1-2.37,1.58.46.46,0,0,0-.31.34,8.32,8.32,0,0,1-.84,2.26.46.46,0,0,0,0,.5.46.46,0,0,0,.39.2h.08a9,9,0,0,0,5.27-2.83,11.8,11.8,0,0,0,2.64-5.33A3.61,3.61,0,0,0,31.05,5.85Z"/><path class="cls-2" d="M27,12.28V12l-.15.16a5.79,5.79,0,0,1-2.37,1.58.46.46,0,0,0-.31.34,8.32,8.32,0,0,1-.84,2.26.46.46,0,0,0,0,.5.46.46,0,0,0,.39.2h.08a10,10,0,0,0,2.22-.65A9.45,9.45,0,0,0,27,12.28Z"/><path class="cls-2" d="M24.37,5V7.05a.47.47,0,0,0,.47.48H27v-3H24.84A.47.47,0,0,0,24.37,5Z"/><path class="cls-3" d="M19.5,28.05c-.14-.11-1.42-1.18-1.58-7a.49.49,0,0,0-.17-.36.54.54,0,0,0-.39-.1,8.66,8.66,0,0,1-1.44.13h0a8.69,8.69,0,0,1-1.45-.13.54.54,0,0,0-.39.1.49.49,0,0,0-.17.36c-.16,5.8-1.44,6.87-1.58,7a.44.44,0,0,0-.32.5.51.51,0,0,0,.5.42h6.81a.51.51,0,0,0,.5-.42A.44.44,0,0,0,19.5,28.05Z"/><path class="cls-4" d="M19.5,28.05c-.14-.11-1.42-1.18-1.58-7a.49.49,0,0,0-.17-.36.54.54,0,0,0-.39-.1,8.66,8.66,0,0,1-1.44.13h0l-.46,0a.48.48,0,0,1,.16.35c.16,5.8,1.43,6.87,1.58,7a.44.44,0,0,1,.32.5A.51.51,0,0,1,17,29h2.31a.51.51,0,0,0,.5-.42A.44.44,0,0,0,19.5,28.05Z"/><path class="cls-1" d="M.79,5.85h0A3.58,3.58,0,0,1,3.61,4.49H7A.47.47,0,0,1,7.46,5V7.05A.47.47,0,0,1,7,7.53H3.61a.56.56,0,0,0-.45.22.58.58,0,0,0-.11.46,9,9,0,0,0,1.93,4,5.79,5.79,0,0,0,2.37,1.58.46.46,0,0,1,.31.34,8.32,8.32,0,0,0,.84,2.26.46.46,0,0,1,0,.5.46.46,0,0,1-.39.2H8a9,9,0,0,1-5.27-2.83A11.8,11.8,0,0,1,.09,8.89,3.58,3.58,0,0,1,.79,5.85Z"/><path class="cls-2" d="M4.83,12.28V12l.15.16a5.79,5.79,0,0,0,2.37,1.58.46.46,0,0,1,.31.34,8.32,8.32,0,0,0,.84,2.26.46.46,0,0,1,0,.5.46.46,0,0,1-.39.2H8a10.16,10.16,0,0,1-2.22-.65A9.45,9.45,0,0,1,4.83,12.28Z"/><path class="cls-2" d="M7.46,5V7.05A.47.47,0,0,1,7,7.53H4.83v-3H7A.47.47,0,0,1,7.46,5Z"/><path class="cls-5" d="M24.84,2.76H7a.47.47,0,0,0-.48.48v9a9.41,9.41,0,1,0,18.81,0v-9A.47.47,0,0,0,24.84,2.76Z"/><path class="cls-6" d="M24.84,2.76H22.62a.47.47,0,0,1,.47.48v9a9.41,9.41,0,0,1-8.29,9.34,8.32,8.32,0,0,0,1.12.07,9.42,9.42,0,0,0,9.4-9.41v-9A.47.47,0,0,0,24.84,2.76Z"/><path class="cls-7" d="M20.06,11.17a1.05,1.05,0,0,0,.27-1.08,1,1,0,0,0-.85-.71l-1.76-.26a.08.08,0,0,1-.07,0l-.79-1.6a1,1,0,0,0-.94-.58h0a1,1,0,0,0-.95.58l-.79,1.6a.08.08,0,0,1-.07,0l-1.76.26a1,1,0,0,0-.85.71,1.05,1.05,0,0,0,.27,1.08L13,12.41a.1.1,0,0,1,0,.09l-.3,1.75a1.05,1.05,0,0,0,1.53,1.11l1.57-.83H16l1.57.83a1.11,1.11,0,0,0,.49.12,1.07,1.07,0,0,0,.62-.2,1,1,0,0,0,.42-1l-.3-1.75a.14.14,0,0,1,0-.09Z"/><path class="cls-8" d="M19.48,9.38,19,9.31,16.74,11.5a.57.57,0,0,0-.17.51l.52,3.11.44.24a1.11,1.11,0,0,0,.49.12,1.07,1.07,0,0,0,.62-.2,1,1,0,0,0,.42-1l-.3-1.75a.14.14,0,0,1,0-.09l1.27-1.24a1.05,1.05,0,0,0,.27-1.08A1,1,0,0,0,19.48,9.38Z"/><path class="cls-5" d="M25.12,31.89A5.14,5.14,0,0,0,20.43,28h-9a5.14,5.14,0,0,0-4.69,3.88.47.47,0,0,0,.07.43.49.49,0,0,0,.39.2h17.5a.48.48,0,0,0,.38-.2A.47.47,0,0,0,25.12,31.89Z"/><path class="cls-6" d="M25.12,31.89A5.14,5.14,0,0,0,20.43,28H16.77a5.14,5.14,0,0,1,4.69,3.88.5.5,0,0,1-.07.43.49.49,0,0,1-.39.2h3.67a.48.48,0,0,0,.38-.2A.47.47,0,0,0,25.12,31.89Z"/><path class="cls-1" d="M25.62,0H6.21a1.86,1.86,0,0,0,0,3.71H25.62a1.86,1.86,0,0,0,0-3.71Z"/><path class="cls-2" d="M25.62,0H23.46a1.86,1.86,0,1,1,0,3.71h2.16a1.86,1.86,0,0,0,0-3.71Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

@@ -0,0 +1 @@
var configuration_map = {"notificationRuleList":[],"config":{"enableNotification":true},"passKey":"{}"};
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
!function(){"use strict";"undefined"!=typeof PushSubscriptionOptions&&PushSubscriptionOptions.prototype.hasOwnProperty("applicationServerKey")||void 0!==window.safari&&void 0!==window.safari.pushNotification?function(){const n=document.createElement("script");n.src="https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160510",n.defer=!0,document.head.appendChild(n)}():function(){let n="Incompatible browser.";"Apple Computer, Inc."===navigator.vendor&&navigator.maxTouchPoints>0&&(n+=" Try these steps: https://tinyurl.com/bdh2j9f7"),console.info(n)}()}();
//# sourceMappingURL=OneSignalSDK.page.js.map
@@ -0,0 +1,220 @@
var mult_send = 0;
function Contest_Send(){
mult_send = mult_send + 1;
PreparaContestSend('senduscontestform',false);
if (mult_send == 1)
{
AJAXReqContestSend("POST","send_us_contest.php",true);
}
}
function PreparaContestSend(nome,ele){
stringa = "";
var form = document.forms[nome];
var numeroElementi = form.elements.length;
for(var i = 0; i < numeroElementi; i++){
nmfrm = form.elements[i].name;
if(i < numeroElementi-1)
{
stringa += form.elements[i].name+"="+encodeURIComponent(form.elements[i].value)+"&";
}
else
{
stringa += form.elements[i].name+"="+encodeURIComponent(form.elements[i].value);
}
}
}
function AJAXReqContestSend(method,url,bool){
if(window.XMLHttpRequest){
myReq = new XMLHttpRequest();
} else
if(window.ActiveXObject){
myReq = new ActiveXObject("Microsoft.XMLHTTP");
if(!myReq){
myReq = new ActiveXObject("Msxml2.XMLHTTP");
}
}
if(myReq){
myReq.onreadystatechange = state_ContestSend;
myReq.open(method,url,bool);
myReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
myReq.send(stringa);
}else{
alert("Impossibilitati ad usare AJAX");
}
}
function state_ContestSend(bReload){
if (myReq.readyState==4){
mult_send = 0;
if (myReq.status==200){
ResponseContestSend(myReq.responseText);
}
else {
if (bDebug) {alert("Problem retrieving XML data");}
}
}
}
function ResponseContestSend(sResponse){
var vetResp = sResponse.split('|');
if (vetResp[0].toUpperCase() == 'OK')
{
if (MM_findObj("contest_name_msg"))
{
DisplayHTMLData(MM_findObj('contest_name_msg'), '&nbsp;');
}
if (MM_findObj("contest_video_msg"))
{
DisplayHTMLData(MM_findObj('contest_video_msg'), '&nbsp;');
}
if (MM_findObj("send_box_contest"))
{
MM_findObj("send_box_contest").style.display='none';
}
if (MM_findObj("send_box_contest_response"))
{
MM_findObj("send_box_contest_response").style.display='block';
}
}
else
{
if (MM_findObj("contest_name_msg"))
{
DisplayHTMLData(MM_findObj('contest_name_msg'), '&nbsp;');
}
if (MM_findObj("contest_video_msg"))
{
DisplayHTMLData(MM_findObj('contest_video_msg'), '&nbsp;');
}
for (b=1; b<vetResp.length; b++)
{
var f = vetResp[b].split(';');
var fldcont = f[0];
var msgcont = f[1];
if (fldcont == 'contest_name')
{
DisplayHTMLData(MM_findObj(fldcont + '_msg'), msgcont);
}
if (fldcont == 'contest_video')
{
DisplayHTMLData(MM_findObj(fldcont + '_msg'), msgcont);
}
}
}
}
var HTTP_FIRSTAUCT_URL = new String ('first_auct.php');
var xmlhttpFirstAuct = null;
function FirstAuct() {
var sUrlFirstAuct = HTTP_FIRSTAUCT_URL + "?chk=" + new Date().valueOf();
if (xmlhttpFirstAuct) {
if ((xmlhttpFirstAuct.readyState != 4) && (xmlhttpFirstAuct.readyState != 0)) {
return true;
}
}
try
{
if (window.XMLHttpRequest){
xmlhttpFirstAuct = new XMLHttpRequest();
} else if (window.ActiveXObject){
xmlhttpFirstAuct = new ActiveXObject("Microsoft.XMLHTTP");
}
if (xmlhttpFirstAuct != null){
xmlhttpFirstAuct.onreadystatechange = state_FirstAuct;
xmlhttpFirstAuct.open("GET",sUrlFirstAuct,true);
xmlhttpFirstAuct.send(null);
return true;
} else {
if (bDebug)
{
alert("Your browser does not support XMLHTTP.");
}
return false;
}
}
catch (e) {
xmlhttpFirstAuct = null;
if (bDebug) alert('Errore in loadXMLDocElenco');
}
finally {}
}
function state_FirstAuct(){
if (xmlhttpFirstAuct.readyState==4){
if (xmlhttpFirstAuct.status!=200){
if (bDebug) {
alert("Problem retrieving XML data");
}
}
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,129 @@
btn-promo {
border-radius: 3px;
background: linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
background: -moz-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
background: -webkit-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
background: -o-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
background: -ms-linear-gradient(rgb(82, 157, 253), rgb(46, 114, 202));
color: #fff;
}
.btn.btn-promo:hover {
background: linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
background: -moz-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
background: -webkit-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
background: -o-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
background: -ms-linear-gradient(rgb(117, 175, 250), rgb(53, 124, 216));
color: #fff;
}
.mCSB_inside > .mCSB_container {
margin-right: 0px;
}
.mCSB_scrollTools .mCSB_draggerRail {
width: 6px;
background-color: #e2e2e2;
}
.mCSB_scrollTools .mCSB_draggerContainer {
left: 10px;
}
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
background-color: #20cb9a !important;
width: 100%;
}
.loader {
margin: 10px auto;
border: 5px solid #f3f3f3;
/* Light grey */
border-top: 5px solid #20cb9a;
/* Blue */
border-radius: 50%;
width: 20px;
height: 20px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
.stopScroll{
overflow: hidden !important;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@media screen and (max-width: 384px) {
#prod_win_cont_modal h3 {
padding-left: 30px;
padding-right: 30px;
}
}
@media screen and (max-width: 320px) {
.prod_won__2 {
margin-left: 1px !important;
margin-right: 1px !important;
}
#prod_win_cont_modal .col-xs-6{
padding-left: 5px;
padding-right: 5px;
}
}
#modal iframe {
width: 99%;
}
#myModal3 .modal-dialog, #myModal2 .modal-dialog {
margin: 30px auto;
}
.settingBox form div {
border-bottom: 1px solid #efefef;
padding: 15px;
font-weight: 500;
font-size: 12px;
color: #818181;
}
@media screen and (max-width: 991px) {
#menuModal .show {
display: block;
}
#menuModal .modal-header {
height: auto;
}
#menuModal .height {
height: 0px;
}
.parentOverflowY {
overflow-y: hidden;
}
}
#notifBoxContainer .mCSB_container {
top: 0px;
}
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,206 @@
const AuctionsBidManage = (function() {
const _defaultPart = "divAsta";
let _nAstePerBonus = 10;
let _limiteAsteVinte = 10;
let _nAstePuntataVinte = 0;
let _percentualeBonus = 0;
let _nPuntateVinteOggi = 0;
let _nAsteConfermate = 0;
let _nPuntateRiscattate = 0;
let _nPuntateDaRiscattare = 0;
let _initialized = false;
let _defaultValidUntil = null;
let _viewSlot = false;
function _defaultObj() {
return {
auctions: {},
nAsteConfermate: 0,
percentualeBonus: 0,
limiteAsteVinte: 10,
nAstePerBonus: 10,
validUntil: getDefaultValidUntil()
}
}
/**
* Aggiunge una nuova asta all'oggetto delle aste di puntata vinte in un giorno
* @param idAuction {int}
*/
function add(idAuction){
let result = get();
let retrievedObject = JSON.parse(result);
let auctionBidWin = retrievedObject === null ? _defaultObj() : retrievedObject ;
let auctionElement = document.getElementById(_defaultPart + idAuction);
let creditValue = parseInt(auctionElement.getAttribute('data-credit-value')) > 0 ? parseInt(auctionElement.getAttribute('data-credit-value')) : 0;
if(creditValue > 0 && Object.keys(auctionBidWin.auctions).length <= auctionBidWin.limiteAsteVinte){
// let obj =
// {
// idAuction: idAuction,
// value: creditValue
// }
// ;
//
// if(!auctionBidWin.auctions.hasOwnProperty(idAuction)){
// auctionBidWin.auctions[idAuction] = obj;
// }
// let newObj = JSON.stringify(auctionBidWin);
//
// localStorage.setItem("auctionBidWin", newObj);
getRemoteData();
}
return;
}
function getDefaultValidUntil(){
return _defaultValidUntil;
}
function setDefaultValidUntil(untilTimestamp){
_defaultValidUntil = untilTimestamp;
}
/**
* Ritornano le informazioni salvate nel localStorage
* @returns {string}
*/
function get(){
return localStorage.getItem('auctionBidWin');
}
/**
* Rimuove dal localStorage
*/
function remove(){
localStorage.removeItem('auctionBidWin');
}
function getRemoteData(callback = null){
fetch('./ajax/get_auction_bids_info_banner.php',{
method: "GET"
})
// gestisci il successo
.then(response => response.json()) // converti a json
.then(function (data) {
let obj = {
auctions: data.auctions,
nAsteConfermate: data.nAsteConfermate,
nAsteVinte: data.nAsteVinte,
nPuntateRiscattate: data.nPuntateRiscattate,
nPuntateDaRiscattare: data.nPuntateDaRiscattare,
limiteAsteVinte: data.limiteAsteVinte,
nAstePerBonus: data.nAstePerBonus,
percentualeBonus: data.percentualeBonus,
validUntil: data.validUntil,
viewSlot: data.viewSlot,
extraSlots: data.extraSlots, //un elenco degli slots non scaduti e non aperti
nPuntateBonus: data.nPuntateBonus
};
let newObj = JSON.stringify(obj);
localStorage.setItem("auctionBidWin", newObj);
if(callback !== null){
callback();
}
})
.catch(err => console.log('Request Failed', err)); // gestisci gli errori
}
function retriveInfoComponent(){
let result = JSON.parse(get());
if(result) {
_nAstePuntataVinte = result.nAsteVinte;
_limiteAsteVinte = result.limiteAsteVinte;
_nAsteConfermate = result.nAsteConfermate;
_nPuntateDaRiscattare = result.nPuntateDaRiscattare;
_nPuntateRiscattate = result.nPuntateRiscattate;
_nAstePerBonus = result.nAstePerBonus;
_percentualeBonus = result.percentualeBonus;
_viewSlot = result.viewSlot;
_nPuntateVinteOggi = result.nPuntateDaRiscattare + result.nPuntateRiscattate;
/*if (_percentualeBonus > 0) {
let valorePercentualeBonus = ((_nPuntateVinteOggi * _percentualeBonus) / 100);
_nPuntateVinteOggi = _nPuntateVinteOggi + valorePercentualeBonus;
}*/
let asteRimanentiPerBonus = _nAstePerBonus - _nAstePuntataVinte;
return {
auctions: result.auctions,
asteRimanentiPerBonus: asteRimanentiPerBonus,
nAstePerBonus: _nAstePerBonus,
nAstePuntataVinte: _nAstePuntataVinte,
percentualeBonus: _percentualeBonus,
nPuntateVinteOggi: parseInt(_nPuntateVinteOggi),
limiteAsteVinte: _limiteAsteVinte,
nAsteConfermate: _nAsteConfermate,
nPuntateDaRiscattare: _nPuntateDaRiscattare,
nPuntateRiscattate: _nPuntateRiscattate,
viewSlot: _viewSlot,
extraSlots: result.extraSlots,
nPuntateBonus: result.nPuntateBonus
}
}
}
/**
*
* @param auctionId
* @returns {boolean}
*/
function searchByAuctionId(auctionId){
let data = retriveInfoComponent();
let controllo = false;
if(data == undefined || data == null ){ return; }
let keys = Object.keys(data.auctions);
for(let i= 0; i <= keys.length; i++){
if(keys[i] === auctionId){
return true;
}
}
return false;
}
function initRemoteData(){
if(!_initialized){
getRemoteData();
setInterval(function (){
getRemoteData();
}, 1000 * 60);
}
_initialized = true;
}
return {
add,
get,
remove,
getRemoteData,
retriveInfoComponent,
initRemoteData,
setDefaultValidUntil,
searchByAuctionId
}
})();
@@ -0,0 +1,927 @@
#wrapBonusSection{
width: 100%;
background-color: #fff;
margin-bottom: 20px;
-webkit-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.2);
box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.2);
border-top: 1px solid #d0d0d0;
display: none;
cursor: pointer;
}
#wrapBonusSection.visible{
display: block;
}
#BonusSection{
display: flex;
justify-content: space-between;
width: 65%;
min-height: 40px;
margin: 0 auto;
align-items: center;
margin-bottom: -25px;
}
@media (max-width: 576px) {
#BonusSection{
margin-bottom: 0;
}
}
#BonusSection .wrap-msg-bonus, #BonusSection .pt-2 .wrap-progress, #BonusSection .pt-1 .wrap-progress, #BonusSection .pt-3 .wrap-progress, #BonusSection .pt-3 .wrap-bids, #auctionBidsModal .wrap-msg-bonus, #auctionBidsModal .wrap-msg-bonus .wrap-progress, #bidsBonusSection #section2 .wrap-progress, #bidsBonusSection #section3 .wrap-progress{
display: flex;
justify-content: center;
align-items: center;
}
#bidsBonusSection #section2 .wrap-progress{
font-size: 14px;
}
#auctionBidsModal #countdownAddSlot{
font-weight: bold;
color: #55bc62;
}
#auctionBidsModal .wrap-msg-bonus{
margin-bottom: 25px;
}
#BonusSection .pt-2 .item, #BonusSection .pt-3 .item{
margin: 2px;
}
#BonusSection .pt-2, #BonusSection .pt-1, #BonusSection .pt-3, #auctionBidsModal .wrap-pt2{
display: flex;
justify-content: center;
align-items: center;
}
#auctionBidsModal .wrap-pt2 .bonus-obtained{
font-size: 12px;
color: #6F6F6F;
font-weight: bold;
margin-top: 3px;
display: none;
}
#auctionBidsModal .wrap-pt2{
justify-content: space-around;
align-items: flex-start;
margin-top: 20px;
border-top: 1px solid #DBDBDB;
padding-top: 20px;
font-size: 13px;
margin-bottom: 10px;
}
@media (max-width: 340px) {
#auctionBidsModal .wrap-pt2{
font-size: 12px;
}
}
#auctionToBonusModal{
font-size: 15px;
color: #333;
}
#BonusSection .text{
color: #6D6D6D;
font-size: 15px;
margin: auto 4px;
}
#BonusSection .pt-2 img{
height: 29px;
}
#BonusSection .pt-2 .img-emoji img, #auctionBidsModal .img-emoji img {
height: 18px;
width: 18px;
margin-left: -10px;
margin-top: -3px;
}
#auctionBidsModal .img-emoji img{
width: 24px;
height: 24px;
}
#auctionBidsModal .img-emoji{
z-index: 9;
margin-left: -3px;
margin-right: 2px;
}
#BonusSection .pt-dx img, #auctionBidsModal .pt-dx img, #auctionBidsModal .pt-center img{
width: 16px;
}
#BonusSection .pt-2 .wrap-progress .progress{
margin-left: 5px;
background-color: #D1D1D1;
}
#auctionBidsModal .progress{
width: 56px;
height: 24px;
margin: 0 6px;
position: relative;
background-color: #D1D1D1;
border-radius: 20px;
}
#auctionBidsModal .progress{
width: 110px;
height: 22px;
}
#auctionBidsModal .pt-1 .progress{
height: 11px;
}
#BonusSection .progress, #auctionBidsModal .progress{
width: 60px;
height: 13px;
margin-bottom: 0px;
}
#auctionBidsModal .progress{
width: 90px;
}
#BonusSection #countdown-bonus{
width: 60px;
color: #fff;
background-color: #FF0658;
font-weight: bold;
font-size: 11px;
padding: 0px 4px;
height: 16px;
border-radius: 5px;
}
#BonusSection #bonus-earned, #BonusSection #bonus-active-all{
display: none;
font-weight: bold;
margin-right: 15px;
}
@media (max-width: 576px) {
#BonusSection #bonus-earned, #BonusSection #bonus-active-all{
font-size: 12px;
}
}
#BonusSection #bonus-active-all{
color: #55bc62;
}
#BonusSection .progress .progress-bar, #auctionBidsModal .pt-1 .progress .progress-bar, #auctionBidsModal #bidsBonusSection #section2 .progress .progress-bar, #auctionBidsModal .progress .progress-bar{
background: rgb(4,170,176);
background: linear-gradient(90deg, rgba(4,170,176,1) 0%, rgba(7,206,173,1) 100%);
box-shadow: none;
}
#BonusSection .progress .progressbar-text{
position: absolute;
top: 2px;
height: 22px;
color: #000;
width: 100%;
left: 0;
margin: 0;
font-size: 16px;
font-weight: bold;
}
#auctionBidsModal .progress .progressbar-text{
font-size: 15px;
top: 0;
}
#todayBids, #auctionBidsModal{
font-size: 16px;
color: #333;
}
#auctionBidsModal{
font-weight: normal;
}
#auctionToBonus.active{
font-weight: bold;
color: #000;
}
#confirmedAuctionWithBonus{
display: none;
margin-left: 5px;
}
#confirmedAuctionWithBonus .value{
font-weight: bold;
}
.wrap-bonus-mobile{
display: flex;
justify-content: center;
align-items: center;
}
.wrap-bonus-mobile .wrap-bonus-value{
font-size: 14px;
color: #504E4E;
margin-left: 5px;
}
#auctionBidsModal .wrap-bonus-value{
margin-right: 2px;
}
#BonusSection .pt-3 img{
width: 15px;
}
#BonusSection .wrap-title-bonus{
display: flex;
}
#BonusSection .wrap-title-bonus .icon-check{
width: 15px;
display: none;
margin-right: 4px;
}
#BonusSection .pt-2 #countdown-bonus{
display: none;
}
@media (max-width: 1040px) {
#BonusSection{
width: 100%;
justify-content: space-around;
min-height: 50px;
}
#BonusSection .pt-1, #BonusSection .pt-2, #BonusSection .pt-3{
flex-direction: column;
}
#BonusSection .pt-3 .wrap-bids{
display: flex;
justify-content: center;
align-items: center;
}
#BonusSection .text {
font-size: 12px;
}
#BonusSection .pt-2 img{
margin-right: 5px;
height: 18px;
width: 10px;
}
#BonusSection .pt-1 .progress {
width: 90px;
height: 10px;
}
#todayBids{
font-size: 14px;
}
#BonusSection .pt-3 .item{
margin: 0;
}
#BonusSection .pt-3 img{
width: 13px;
margin-top: -1px;
margin-left: 3px;
}
#BonusSection .wrap-msg-bonus{
flex-direction: column;
justify-content: flex-start;
align-items: baseline;
}
.wrap-bonus-mobile{
display: flex;
justify-content: center;
align-items: center;
}
}
@media (max-width: 576px) {
#BonusSection {
min-height: 45px;
}
}
@media (max-width: 360px) {
#BonusSection .text {
font-size: 11px;
}
}
#auctionBidsModal .pt-left .wrap-progress, #auctionBidsModal .pt-dx .wrap-bids, #auctionBidsModal .pt-center .wrap-bids{
display: flex;
justify-content: center;
align-items: center;
margin-top: 5px;
font-weight: bold;
}
#auctionBidsModal .pt-center .item, #auctionBidsModal .pt-dx .item{
margin-left: 1px;
margin-right: 1px;
}
#auctionBidsModal .pt-center .item img, #auctionBidsModal .pt-dx .item img{
margin-left: 2px;
margin-right: 2px;
margin-top: -5px;
}
#auctionToGoModal{
font-size: 14px;
font-weight: bold;
}
@media (max-width: 340px) {
#auctionBidsModal .wrap-pt2{
font-size: 12px;
}
#auctionToGoModal, #todayBidsModal, #todayBidsPayedModal{
font-size: 13px;
}
}
#todayBidsModal, #todayBidsPayedModal{
font-size: 14px;
font-weight: bold;
}
#loaderAuctionBids{
min-height: 40px;
text-align: center;
padding: 5px;
font-size: 20px;
}
#auctionToGo{
color: #000;
margin-left: 5px;
}
.loader-data{
display: block;
position: relative;
margin-right: 0px !important;
margin-left: 0px !important;
}
.loader-data::before{
content: "";
background-color: #eaeaea;
display: block;
width: 100%;
height: 22px;
position: absolute;
}
@media (max-width: 576px) {
.loader-data{
margin-top: 2px !important;
margin-bottom: 2px !important;
}
.loader-data::before{
height: 16px;
min-width: 20px;
}
}
#BonusSection .pt-1, #BonusSection .pt-2, #BonusSection .pt-3{
position: relative;
}
.loader-data img{
display: none !important;
}
.wrap-countdown-auctionBidsModal{
color: #55BC62;
font-weight: bold;
}
#auctionBidsModal .wrapTitle{
margin: 20px auto 10px;
display: flex;
align-items: center;
justify-content: center;
}
#auctionBidsModal .modal-body{
padding: 0;
}
#auctionBidsModal .contentModal #bidsBonusSection .content, #auctionBidsModal .contentModal #rankingBonusSection{
font-size: 16px;
text-align: center;
margin-top: 15px;
padding: 15px;
}
#auctionBidsModal .contentModal #bidsBonusSection .content{
margin-top: 0;
padding: 0;
}
#auctionBidsModal .contentModal #bidsBonusSection .content.parent-content-div {
padding: 0 0 5px 0;
}
#tabsSection{
display: flex;
align-items: center;
}
@media (max-width: 576px) {
#tabsSection{
font-size: 14px;
}
}
#tabsSection .pt-1{
width: 55%;
}
#tabsSection .pt-2{
width: 40%;
}
#tabsSection .pt-1, #tabsSection .pt-2{
padding: 8px 18px;
border-bottom: 1px solid #BCBCBC;
text-align: center;
font-size: 14px;
}
#tabsSection .pt-1 .fa, #tabsSection .pt-2 .fa{
margin-right: 5px;
}
#tabsSection .pt-3{
width: 10%;
padding: 5px 10px;
border-bottom: 1px solid #BCBCBC;
}
button[aria-label='Close'] span{
font-size: 26px;
}
@media (max-width: 576px) {
#tabsSection .pt-3{
padding: 4px 10px;
}
#tabsSection .pt-1, #tabsSection .pt-2{
font-size: 12px;
padding: 8px 10px;
}
button[aria-label='Close'] span{
font-size: 25px;
}
}
#tabsSection .pt-1.active, #tabsSection .pt-2.active, #tabsSection .pt-3.active{
border-color: #2F80ED;
}
#tabsSection .pt-1.active a, #tabsSection .pt-2.active a, #tabsSection .pt-3.active a, #tabsSection .pt-1.active a:hover, #tabsSection .pt-2.active a:hover{
color: #2F80ED;
font-weight: bold;
text-decoration: none;
}
#tabsSection .pt-1 a, #tabsSection .pt-2 a{
color: #7d7d7d;
}
#tabsSection .pt-1 a:hover, #tabsSection .pt-2 a:hover{
text-decoration: none;
font-weight: normal;
color: #2F80ED;
}
#rankingBonusSection{
display: none;
}
#bidsBonusSection #section2 .box-congrats,
#bidsBonusSection #section3 .box-congrats{
margin-top: 12px;
}
#bidsBonusSection #section2, #bidsBonusSection #section3{
display: none;
}
#bidsBonusSection #section2 .titleModal{
font-size: 20px;
}
#auctionBidsModal .wrap-credit-bonus{
display: inline-block;
}
#auctionBidsModal #bidsBonusSection .wrap-content{
display: flex;
flex-direction: column;
}
#bidsBonusSection #section2 .summary-body #countdown-bonus{
font-size: 14px;
}
#bidsBonusSection #section2 .summary-body .countdown{
color: #FF0658;
}
#bidsBonusSection #section2 .summary-body #countdownForBonus{
font-weight: bold;
}
#bidsBonusSection #section2 .summary{
margin-top: 30px;
}
#bidsBonusSection #section2 .summary-body{
width: 250px;
margin: -18px auto 25px;
border: 1px solid #000;
border-radius: 5px;
padding: 20px 15px;
box-shadow: 2px 2px 3px 1px rgba(208, 209, 213, 0.2), 0 2px 2px 1px rgba(220, 221, 224, 0.2);
-webkit-box-shadow: 2px 2px 3px 1px rgba(208, 209, 213, 0.2), 0 2px 2px 1px rgba(220, 221, 224, 0.2);
-moz-box-shadow: 2px 2px 3px 1px rgba(208, 209, 213, 0.2), 0 2px 2px 1px rgba(220, 221, 224, 0.2);
}
#bidsBonusSection #section3 .summaryTitle{
font-size: 20px;
font-weight: bold;
margin-top: 40px;
}
#bidsBonusSection #section3 .summaryList img{
width: 18px;
}
#bidsBonusSection #section3 .summaryList ul{
text-align: left;
width: 300px;
margin: 5px auto 20px;
line-height: 30px;
}
.bottom-area{
font-size: 16px;
}
.bottom-area.highlight{
color: #FF0658;
font-weight: bold;
margin-top: 15px;
margin-bottom: -10px;
}
#auctionBidsModal #bidsBonusSection #bonusSection img{
width: 20px;
margin-top: -2px;
}
#auctionBidsModal #bidsBonusSection #bonusSection .bottomSection img{
width: 16px;
margin-right: 4px;
}
#auctionBidsModal #bidsBonusSection #bonusSection .bottomSection{
font-size: 16px;
margin-bottom: 15px;
color: #5F5F5F;
}
#bonusSection .btnConfirm{
font-size: 18px;
display: inline-block;
color: #333;
background-color: #fcc62d;
padding: 5px;
line-height: 25px;
border-radius: 5px;
font-weight: bold;
margin-bottom: 10px;
margin-top: 10px;
width: 95%;
text-decoration: none;
}
@media (max-width: 576px) {
#auctionBidsModal #bidsBonusSection #bonusSection .bottomSection {
font-size: 15px;
}
#bonusSection .btnConfirm{
font-size: 16px;
}
}
#rankingBonusSection .title{
font-size: 20px;
font-weight: bold;
margin-bottom: 5px;
}
#rankingBonusSection .subtitle{
font-size: 14px;
}
#rankingBonusSection #ranking{
padding: 0 10px;
}
#rankingBonusSection #ranking table{
margin-top:30px;
width: 100%;
}
#rankingBonusSection #ranking table td{
text-align: left;
}
#rankingBonusSection #ranking table .td1{
text-align: center;
font-weight: bold;
font-size: 14px;
}
#rankingBonusSection #ranking table .td1 img{
width: 38px;
}
#rankingBonusSection #ranking table td.td2{
font-size: 16px;
width: 70%;
padding: 8px 10px;
text-transform: capitalize;
}
#rankingBonusSection #ranking table td.td3{
width: 25%;
font-size: 14px;
font-weight: bold;
text-align: right;
}
#rankingBonusSection #ranking table td.td3 img{
width: 17px;
margin-left: 4px;
}
#auctionBidsModal #section1, #auctionBidsModal #section4{
display: none;
}
#auctionBidsModal #section1{
padding: 0px 20px;
}
#auctionBidsModal #section4 .sad{
width: 25px;
margin-bottom: 10px;
}
#BonusSection .img-lock, #BonusSection .img-lock-open{
display: none;
}
#BonusSection .img-lock img, #BonusSection .img-lock-open img{
width: 12px;
margin-left: 5px;
margin-top: -1px;
}
#BonusSection .pay-bids-counter{
margin-left: 5px;
color: #fff;
background-color: #FF0658;
border-radius: 40px;
width: 19px;
height: 19px;
text-align: center;
font-weight: bold;
font-size: 11px;
padding: 2px;
display: none;
}
#auctionBidsModal .wrap-new-daily-challenge.wrap2{
margin-top: 5px;
}
#auctionBidsModal .wrap-new-daily-challenge{
color: #2F80ED;
font-size: 16px;
font-weight: bold;
margin: 20px 60px 0px;
display: none;
}
@media (max-width: 576px) {
#auctionBidsModal .wrap-new-daily-challenge {
margin: 20px 40px 0;
}
}
#BonusSection .img-plus-not-active, #BonusSection .img-plus-active{
display: none;
}
#auctionBidsModal .extraSlots .slot-title .open-lock{
margin-top: -5px;
width: 15px;
margin-right: 3px;
}
#auctionBidsModal .extraSlots .slot-title span .fa{
font-size: 20px;
position: absolute;
margin-left: 5px;
}
#auctionBidsModal .extraSlots .wrap-content-slot{
padding: 10px 0 15px;
}
#auctionBidsModal .bonus-obtained{
display: none;
}
#auctionBidsModal .extraSlots{
border: none;
margin: -5px auto 0;
padding: 10px 15px;
text-align: center;
background-color: #f3f6f9;
border-radius: 0;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
#auctionBidsModal .extraSlots.avaible{
border-color: #55BC62;
}
#extraSlotTemplate{
display: none;
}
#wrapSlots{
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
}
#wrapSlots .box-extra-slot{
border: 1px solid #6F6F6F;
background-color: #f3f6f9;
padding: 10px;
border-radius: 5px;
width: 100px;
margin-top: 15px;
display: none;
}
.wrap-num-other-slot{
position: relative;
display: none;
font-weight: bold;
margin-top: 10px;
font-size: 12px;
}
.wrap-num-other-slot .reduce{
display: none;
position: absolute;
top: 0;
right: 20px;
color: #333;
text-decoration: underline;
}
.wrap-num-other-slot .open{
color: #55BC62;
text-decoration: underline;
display: none;
}
#wrapSlots .box-extra-slot .expire{
font-size: 10px;
font-weight: bold;
color: #6A6B6C;
margin-bottom: 5px;
}
#wrapSlots .box-extra-slot .expire img{
margin-left: 2px;
}
#wrapSlots .box-extra-slot .content{
display: flex;
justify-content: center;
}
#wrapSlots .box-extra-slot .content .slot-value{
font-size: 18px;
font-weight: bold;
color: #333;
}
#wrapSlots .box-extra-slot .wrap-cta .cta{
background-color: #B4B4B4;
color: #fff;
padding: 0px 10px;
font-size: 12px;
font-weight: bold;
width: 100%;
max-height: 23px;
}
#wrapSlots .box-extra-slot .wrap-cta .cta img{
margin-top: -2px;
margin-right: 2px;
}
.extraSlots .wrap-content-slot{
display: none;
}
.extraSlots .slot-title a{
width: 100%;
display: block;
color: #333;
text-decoration: none;
}
.extraSlots .slot-title{
color: #000;
font-size: 14px;
font-weight: bold;
}
.extraSlots .slot-content{
font-size: 12px;
}
.extraSlots .slot-content .beforeConfirmed, .extraSlots .slot-content .afterConfirmed{
display: none;
}
.wrap-extra-slots .box-noSlot .titleNoSlot{
color: #FE4E4E;
font-size: 14px;
font-weight: bold;
}
.wrap-extra-slots .box-noSlot .contentNoSlot{
font-size: 12px;
}
.wrap-extra-slots .box-noSlot .contentNoSlot img{
width: 17px;
margin-top: -3px;
margin-left: 3px;
}
.wrap-extra-slots .box-noSlot{
margin-top: 10px;
}
.wrap-extra-slots .box-noSlot{
display: none;
}
.wrap-extra-slots .box-noSlot .box-noextra-slot .no-extra-slot-content .slot-img img{
width: 20px;
opacity: 0.6;
margin-bottom: 5px;
}
.wrap-extra-slots .box-noSlot .box-noextra-slot .no-extra-slot-content{
font-size: 10px;
color: #333;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
}
.wrap-extra-slots .box-noSlot .box-noextra-slot{
width: 92px;
margin: 20px auto;
height: 81px;
border: 1px solid #55BC62;
border-radius: 5px;
}
#wrapSlots.avaible .box-extra-slot{
border-color: #55BC62;
background-color: #EDF8EF;
}
#wrapSlots.avaible .box-extra-slot .wrap-cta .cta{
background-color: #55BC62;
}
.wrap-extra-slots{
display: none;
}
.wrap-extra-slots .title-extraSlot-blocked{
font-size: 18px;
font-weight: bold;
width: 100%;
margin: 0 0 10px;
display: none;
text-align: center;
}
.wrap-extra-slots .title-extraSlot-blocked img{
width: 18px;
margin-top: -5px;
}
#auctionBidsModal #bidsBonusSection .img-lock, #auctionBidsModal #bidsBonusSection .img-lock-open{
display: none;
}
#auctionBidsModal #bidsBonusSection .img-lock img, #auctionBidsModal #bidsBonusSection .img-lock-open img{
margin-left: 5px;
width: 14px;
margin-top: -5px;
}
#auctionBidsModal #differenzaAsteDaConfermare{
color: #fff;
background-color: #FF0658;
border-radius: 40px;
width: 23px;
height: 23px;
text-align: center;
font-weight: bold;
padding: 1px 2px;
display: inline-block;
font-size: 15px;
}
#auctionBidsModal #bonusEarned img{
width: 15px;
margin-left: 5px;
}
#auctionBidsModal .wrap-already-taken, #auctionBidsModal .bonus-yet-to-be-obtained{
display: none;
}
#auctionBidsModal .wrap-already-taken .txt-already-taken{
color: #797979;
}
#auctionBidsModal .bonus-yet-to-be-obtained{
color: #FF0658;
}
#auctionBidsModal #bonusEarned .wrap-details-bonus{
text-align: center;
margin: 7px 0;
}
#auctionBidsModal #modalConfirmSlotStopGame{
z-index: 11;
position: absolute;
top: 0;
bottom: 0;
height: 130px;
background-color: #fff;
width: 270px;
margin: auto;
left: 0;
right: 0;
padding: 15px;
border-radius: 5px;
text-align: center;
display: none;
}
#auctionBidsModal #modalConfirmSlotStopGame .contentButton .btn{
padding: 2px 13px;
font-size: 12px;
color: #fff;
font-weight: bold;
margin: 3px;
}
#auctionBidsModal #modalConfirmSlotStopGame .contentButton .btn-confirm{
background-color: #55BC62
}
#auctionBidsModal #modalConfirmSlotStopGame .contentButton .btn-cancel{
background-color: #BFBFBF;
}
#auctionBidsModal #modalConfirmSlotStopGame .contentButton{
display: flex;
justify-content: center;
margin-top: 10px;
}
#auctionBidsModal #modalConfirmSlotStopGame .content{
font-size: 12px;
text-align: center;
}
#auctionBidsModal #modalConfirmSlotStopGame .title{
color: #FF0202;
text-align: center;
font-size: 13px;
font-weight: bold;
margin-bottom: 5px;
}
#auctionBidsModal .overlayModalConfirmSlotStopGame{
background: rgba(0,0,0,0.2);
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
display: none;
}
@@ -0,0 +1,113 @@
$(document).ready(function () {
window.myAuctionsControlDetail = new Array(); // array di oggetti deputato a contenere l'asta dove si sta autopuntando
window.myAuctionsControlDetail_lock = false; // flag to lock SetInterval execution
/*
*
* @returns {undefined}
* questa funzione si occupa di controllare ogni 2 secondi se l'asta (dettaglio) su cui c'è un'autopuntata sia realmente attive o c'è stato un blocco lato UI
*
*/
setInterval(
function () {
if (window.myAuctionsControlDetail_lock == false) {
window.myAuctionsControlDetail_lock = true; // lock setinterval execution
//console.log("--- Checking autobids..."); // FOR DEBUG
let isAuctionStarted_element = $(".auction-action-timer.auction-header-item-size.closed-timer"); // element not present if auction started
let callingAjax = false;
if (isAuctionStarted_element.length == 0) { // check element not present if auction started
let element_value = $('.auction-autobid-current-value'); // recupero il valore delle puntate rimanenti nell'asta
if (element_value.length > 0) {
let value = $(element_value[0]).text(); // recupero il valore delle puntate rimanenti nell'asta
//console.log("Puntate autobid = "+value); // FOR DEBUG
if (value > 0) {
let idasta = $('input.js-switch.autobid-switch').data("id"); // recupero l'id dell'asta
//console.log("Checking Asta: " + idasta); // FOR DEBUG
let timestamp = Date.now();
let myAuctions = {
idasta: idasta,
value: value,
timestamp: timestamp,
element_value: element_value
}
if (window.myAuctionsControlDetail.length == 0) { // controllo che questa asta non sia già nell'array
//console.log("Adding Asta in array."); // FOR DEBUG
window.myAuctionsControlDetail = myAuctions;
} else {
if (window.myAuctionsControlDetail.value != value) { // controllo che il valore sia cambiato per in modo da aggiornare le informazioni
//console.log("Value changed."); // FOR DEBUG
window.myAuctionsControlDetail = myAuctions;
} else {
//console.log("Checking time..."); // FOR DEBUG
// in questa condizione il valore non è cambiato dunque controllerò da quanto tempo non cambia
var diffMs = (Date.now() - window.myAuctionsControlDetail.timestamp);
//console.log("diffMs = "+diffMs); // FOR DEBUG
//var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
var diffSecs = Math.round(((diffMs % 86400000) % 3600000) / 1000); // minutes
//console.log("diffSecs = "+diffSecs); // FOR DEBUG
// nel caso in cui la differenza è maggiore o uguale a 2 minuti invoco la funzione che si occuperà di spedire le informazioni lato backend
if (diffSecs >= 70) { // default 70 secs
callingAjax = true;
sentToVerification(myAuctions);
window.myAuctionsControlDetail = new Array(); // elimino l'asta dall'array
}
}
}
} else {
window.myAuctionsControlDetail = new Array(); // elimino l'asta dall'array
}
}
}
if (callingAjax === false) {
window.myAuctionsControlDetail_lock = false; // unlock setinterval execution
}
}
},
2000);
function sentToVerification(myAuctions) {
// funzione che serve ad inviare al backend l'asta attiva ma con valori di autopuntata fermi da 2 min
//console.log(myAuctions); // FOR DEBUG
$.ajax({
url: "check_autobid.php",
//dataType: json,
method: 'POST',
timeout: 10000, // default 10000
data : {
idasta: myAuctions.idasta,
value: myAuctions.value,
timestamp: myAuctions.timestamp
},
}).done(function (response) {
window.myAuctionsControlDetail_lock = false; // unlock setinterval execution
//console.log("response = " + response); // FOR DEBUG
$(myAuctions.element_value).text(response);
}).fail(function(jqXHR, textStatus){
if(textStatus === 'timeout') {
//console.log("Ajax timeout. Recall ajax."); // FOR DEBUG
sentToVerification(myAuctions);
}
});
}
});
@@ -0,0 +1,306 @@
function getTexts() {
"use strict"
return {
dialog_confirm: "Sei sicuro di voler rimuovere l\'AutoPuntata?",
autobid_active: "Hai attivato la funzione utilizzando le puntate prenotate",
autobid_not_active: "Attiva la funzione utilizzando le puntate prenotate",
autobid_add: "AGGIUNGI",
autobid_insert: "INSERISCI"
};
}
function enableAutobid() {
"use strict";
$(".auction-action-autobid-trigger")
.toggleClass("button-fucsia-flat", true)
.toggleClass("button-gray-flat", false)
.off('click')
.on('click', setAutobid);
$(".auction-action-autobid-input")
.attr('disabled', false)
.off("keyup").keyup(function (e) {
if (13 == e.which)
$(".auction-action-autobid-trigger").click();
$(".auction-action-autobid-mobile .auction-action-autobid-trigger").toggleClass("disable", $(this).val().length == 0);
});
}
function disableAutobid(reason) {
"use strict";
$(".auction-action-autobid-trigger")
.off('click')
.on('click', function () {
if (!reason)
return;
showErrorTooltip('.auction-action-autobid-trigger:eq(' + getAuctionSelector() + ')', {
title: reason,
html: true,
container: "body",
trigger: "manual",
placement: "top",
template: getTemplateTooltip("error")
}, 3000);
});
}
function unsetAutobid(evt) {
"use strict";
if ('undefined' == typeof window['autobid_switchery']) {
return;
}
if (!isSwitchEnabled()) {
if (evt) {
window._autoController.setAutobid('delete', null, cleanUpAutobidSwitch);
}
}
}
function cleanUpAutobidSwitch() {
"use strict"
$(".auction-autobid-button")
.toggleClass("active", false)
.find(".bi-autobid")
.toggleClass("bi-dark", true)
.toggleClass("bi-green", false);
$(".auction-action-bid-mobile .auction-autobid-current-value").empty();
setTimeout(function () {
if (!isSmartphoneDevice())
$('.auction-action-autobid-trigger').text(getTexts().autobid_insert);
}, 400);
updateAutobid(0);
$('.auction-action-autobid:not(.auction-seat-autobid) .autobid-switch-container, .auction-action-autobid-mobile .autobid-switch-container').hide();
}
function isSwitchEnabled() {
return 'undefined' != typeof window['autobid_switchery'] && window.autobid_switchery[isSmartphoneDevice() ? 1 : 0].isChecked();
}
function hideAutobid() {
"use strict";
$(".auction-action-autobid:visible").hide();
}
function showLoginAutobid() {
"use strict";
$(".auction-action-autobid-trigger")
.off('click')
.on('click', window.parent.showLogin);
$(".auction-action-autobid-input").attr('disabled', true);
}
function bindAutobidTrigger() {
"use strict";
var sNickLoggato = $("#NickLoggato").length > 0 ? $("#NickLoggato").val() : "";
if (sNickLoggato.length <= 0) {
return showLoginAutobid();
}
$('.auction-action-autobid-trigger').off('click').on('click', function (evt) {
var triggerElement = $(this);
rippleButton(triggerElement, evt);
var autobidInputElement = $(".auction-action-autobid-input").eq(isSmartphoneDevice() ? 1 : 0);
var inputAmount = parseInt(autobidInputElement.val(), 10);
var dataInputAmount = parseInt(autobidInputElement.data("amount"), 10);
var autobidAmount = !isNaN(dataInputAmount) ? dataInputAmount : inputAmount;
autobidInputElement.removeData("amount");
var autobidLoader = $(".auction-autobid-loader-container");
var switchContainer = $('.autobid-switch-container');
triggerElement.removeAttr("data-autobid-button");
var isNotValidAmount = isNaN(inputAmount) && isNaN(dataInputAmount);
if (isNotValidAmount) {
if (isSmartphoneDevice() && !$("[data-stage='2']").is(":visible"))
return $(".auction-action-autobid-mobile .auction-action-autobid-input").trigger("focus");
} else {
autobidLoader.removeClass("hidden");
switchContainer.hide();
}
cleanAutobidRequest();
window._autoController.setAutobid('create', autobidAmount, function () {
switchContainer.show();
if (true == isSwitchEnabled())
return;
$(".autobid-switch.js-switch:hidden")
.eq(isSmartphoneDevice() ? 1 : 0)
.data("autobid-enabled", "true")
.trigger('click');
$(".auction-autobid-button")
.toggleClass("active", true)
.find(".bi-autobid")
.toggleClass("bi-dark", false)
.toggleClass("bi-green", true);
var id_product = getUrlParam("a").split("_").reverse()[0];
$("#DA"+id_product).find('.favorite').attr('title', "Non puoi rimuoverla dai preferiti se è attiva l\'autopuntata");
$("#DA"+id_product).find('.favorite').attr('data-original-title', "Non puoi rimuoverla dai preferiti se è attiva l\'autopuntata");
$("#DA"+id_product).find('.favorite').attr('disabled', 'disabled');
$("#DA"+id_product).find('.favorite').addClass('active');
if (isDeepModal()) {
window.parent.BidooCnf.instances.auction.features.startAutobidAuctionUpdate();
}
if (isSmartphoneDevice())
return;
setTimeout(function () {
$('.auction-action-autobid-trigger').text(getTexts().autobid_add);
}, 400);
});
});
}
function setAutobid() {
"use strict";
if ('undefined' == typeof window['autobid_switchery']) {
return;
}
bindAutobidTrigger();
$('.auction-action-autobid-trigger').not("[data-autobid-button]").trigger('click');
}
function updateAutobid(value) {
"use strict";
var element = $(".auction-autobid-current-value");
var oldValue = parseInt(element.eq(0).text(), 10);
if (value != oldValue) {
element.toggle(value > 0);
element.text(value);
return true;
}
return false;
}
function cleanAutobidRequest() {
"use strict";
$(".auction-action-autobid-input").val('');
window._autoController.stopTicker();
}
function updateAutobidStatus(status, value) {
"use strict";
switch (status) {
case 'set':
case 'create':
{
if (0 == value) {
closeSwitch();
} else {
updateAutobid(value);
}
break;
}
case 'unset':
{
closeSwitch();
unsetAutobid(0);
break;
}
}
}
function closeSwitch() {
$('.js-switch.autobid-switch')
.eq(isSmartphoneDevice() ? 1 : 0)
.data("autobid-enabled", "false")
.trigger("click");
}
function setAutobidUI(isAutobid) {
"use strict"
$(".auction-action-autobid-mobile .autobid-switch-container").toggle(isAutobid);
$(".auction-action-bid-mobile .auction-autobid-button")
.toggleClass("active", isAutobid)
.find(".bi-autobid")
.toggleClass("bi-dark", !isAutobid)
.toggleClass("bi-green", isAutobid);
$(".js-switch.autobid-switch")
.data("autobid-enabled", "false")
.trigger('click');
}
function setCorrectPlaceholder(isFocused) {
"use strict"
this.attr("placeholder", isFocused ? "" : $(this).data("placeholder"));
$(".auction-action-autobid-mobile .auction-action-autobid-trigger").toggleClass("disable", this.val().length == 0);
}
$(document).ready(function () {
"use strict";
window.autobid_switchery = [];
window.autobid_seat_switchery = [];
$(".js-switch.autobid-switch").each(function (k, item) {
window.autobid_switchery.push(new Switchery(item, {size: 'small'}));
});
$(".js-switch.autobid-seat-switch").each(function (k, item) {
window.autobid_seat_switchery.push(new Switchery(item, {size: 'small'}));
});
$('.js-switch.autobid-seat-switch').off('change').on('change', function () {
var self = this;
var isEnabled = $(this).is(':checked');
if (isEnabled) {
window.stage.getUpdate(function (update) {
window._autoController.setAutobid('create', update.me.budget.total, function () {
$(".autobid-seat-status").text(getTexts().autobid_active);
});
});
} else {
window._autoController.setAutobid('delete', null, function () {
updateAutobid(0);
$(".autobid-seat-status").text(getTexts().autobid_not_active);
});
}
if (isSmartphoneDevice())
setAutobidUI(isEnabled);
return true;
});
$('.js-switch.autobid-switch').off('change').on('change', function () {
var switchAutobid = $(this);
if (isSmartphoneDevice() && $("[data-stage='2']").is(":visible"))
return true;
if (!switchAutobid.is(':checked') && ("false" == switchAutobid.data("autobid-enabled") || confirm(getTexts().dialog_confirm))) {
unsetAutobid({});
var id_product = getUrlParam("a").split("_").reverse()[0];
$("#DA"+id_product).find('.favorite').removeAttr('disabled');
$("#DA"+id_product).find('.favorite').attr('title', "Rimuovi quest\'asta dalle tue preferite");
if (isDeepModal()) {
$("#DA"+id_product).find('.favorite').removeAttr('data-original-title');
window.parent.BidooCnf.instances.auction.features.stopAutobidAuctionUpdate();
setTimeout(function () {
$("#divAsta"+id_product, parent.document).find('.favorite').removeAttr('data-original-title');
$("#divAsta"+id_product, parent.document).find('.favorite').removeAttr('disabled');
$("#divAsta"+id_product, parent.document).find('.favorite').attr('title', "Rimuovi quest\'asta dalle tue preferite");
}, 500);
} else {
$("#DA"+id_product).find('.favorite').attr("data-original-title", "Rimuovi quest\'asta dalle tue preferite");
}
}
return true;
});
$(".autobid-speed-dial > div > a").on('click', function (e) {
e.preventDefault();
var self = $(this);
var amount = parseInt(self.attr("data-amount"));
$(".auction-action-autobid-input").data("amount", amount);
$('.auction-action-autobid-trigger').attr("data-autobid-button", true).trigger('click');
});
var scopeElement = $(".auction-action-autobid-input[data-placeholder]");
scopeElement
.focus(setCorrectPlaceholder.bind(scopeElement, true))
.blur(setCorrectPlaceholder.bind(scopeElement, false));
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,255 @@
.btn-promo, .btn-promo:hover {
background: #2196f3 !important;
}
.mCSB_inside > .mCSB_container {
margin-right: 0px;
}
.mCSB_scrollTools .mCSB_draggerRail {
width: 6px;
background-color: #e2e2e2;
}
.mCSB_scrollTools .mCSB_draggerContainer {
left: 10px;
}
.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
background-color: #20cb9a !important;
width: 100%;
}
#toggleBar {
margin-left: 0 !important;
left: 20px;
display: none;
}
.barra {
-webkit-font-smoothing: antialiased;
}
.btn-promo {
margin-top: -2px;
line-height: 17.5px;
}
.view_gray_link {
text-decoration: none;
cursor: pointer;
}
.leader-btn {
margin: 0;
padding: 0;
border: 0;
text-transform: uppercase;
font-size: 10px;
margin-top: 2px;
}
.bid_chal img.img-lock{
display: none;
}
.bid_chal img{
margin-top: -3px;
}
.wrap-limit-unlock{
color: #fff;
background-color: #55bc62;
border-radius: 5px;
font-weight: bold;
padding: 0;
text-transform: initial;
width: 120px;
margin: -4px auto 0;
}
.wrap-button-get-bonus{
color: #000;
background-color: #FFC642;
border-radius: 5px;
font-weight: bold;
padding: 0;
display: none;
text-transform: initial;
margin-top: -4px;
}
.wrap-button-get-bonus img{
width: 14px;
}
.bid_chal {
font-weight: bold;
font-size: 13px;
text-transform: none;
margin-bottom: 3px;
}
.next-level {
background-color: #eaeaea;
margin: 0;
width: 124px;
height: 8px;
box-shadow: none;
margin: 0 auto;
}
#tickNotif {
background: white;
width: 15px;
height: 15px;
transform: rotate(-45deg);
border: 1px solid #e2e2e2;
position: fixed;
margin-top: -15px;
display: none;
}
.notifIcon {
margin-left: 0px;
}
#boxarea.dodici {
width: 920px;
}
#tickNotif {
margin-left: 17px;
}
.small_notif {
margin-left: 119px !important;
}
.bonus_dialog {
left: 48.5%;
}
.leader_btn {
margin-right: 4px;
}
.tooltip.reach > .tooltip-inner .wrap{
display: flex;
}
.tooltip.reach > .tooltip-inner .wrap img{
width: 16px;
margin-right: 10px;
}
.tooltip.reach > .tooltip-inner {
background-color: #fff;
border: 1px solid #333;
color: #232323;
padding: 10px;
}
.tooltip.reach > .tooltip-inner > span {
text-align: center;
}
.tooltip.reach > .tooltip-inner > span:last-child {
padding: 10px 0;
}
.tooltip.reach > .tooltip-inner strong {
display: block;
}
.bid-challenge > strong {
color: darkorange;
display: block;
}
.tooltip.reach > .tooltip-inner {
max-width: 300px;
}
.leader-btn:hover, .leader-btn {
background-color: transparent !important;
}
.paid-all {
color: #565454;
margin-top: -5px;
text-transform: initial;
}
.active-all {
color: #55bc62;
margin-top: -5px;
text-transform: initial;
}
.paid-all img, .active-all img{
width: 16px;
}
.bar-right-side .pull-right{
margin-right: -30px;
}
.bar-right-side .pull-right > *,
.bar-left-side > *{
display: inline-block;
}
.bar-left-side{
margin-top: 5px;
}
.auctions_won_bottom_bar { /*[GR]*/
border: 2px solid #ffc518 !important;
background-color:#fff;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 5px;
padding: 5px 10px;
color:#3d3a3a;
outline: 0;
font-weight:bold;
height:29px;
vertical-align: top;
}
.auctions_won_bottom_bar:hover{ /*[GR]*/
background-color: #ffc518 !important;
color: #fff;
}
.auctions_won_bottom_bar .badge { /*[GR]*/
background-color: #ff2f4e;
left: 20px;
top: -12px;
margin-left: -20px;
}
.barra[data-lang="es"] #ba #boxarea .notifIcon{
margin-left: 10px;
}
.barra[data-lang="es"] #ba #boxarea #lim{
margin-left: 5px;
}
.barra[data-lang="es"] #ba #boxarea .auctions_won_bottom_bar{
margin-left: 5px;
margin-top: 1px;
}
@media(max-width: 1200px){
.barra[data-lang="es"] #ba #boxarea .auctions_won_bottom_bar, .barra[data-lang="es"] #ba #boxarea #lim{
width: 110px;
font-size: 11px;
padding: 5px;
}
.barra[data-lang="es"] .notif{
margin: -5px 6px !important;
}
}
.bidooBell{
color: #c3c0c1;
font-size: 21px;
margin-top: 4px;
}
.bidooBell:hover, .bidooBell:active, .bidooBell:focus, .bidooBell.active{
color: #666666;
transition: color 0.4s;
}
#auctionBidBottomBar{
outline: none !important;
}
@@ -0,0 +1,21 @@
function BottomBar(){
"use strict"
var self = this;
self.footer = $(".footer");
self.checkFooter();
}
BottomBar.prototype.checkFooter = function() {
"use strict"
var self = this;
if (!self.footer.length) return;
$(window).scroll(function() {
$(".goTop").find("i")
.toggleClass("white_top_arrow", isElementInView(self.footer, false));
});
}
$(document).ready(function() {
"use strict"
new BottomBar();
});
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.3 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,140 @@
var BUYNOW_COUNTDOWN = null;
var BUYNOW_ERRORS = {
already_used: 'Hai usato l&rsquo;opzione Compralo in quest&rsquo;asta',
already_won: 'Hai vinto questa Asta.<br>Non puoi usare l&rsquo;opzione Compralo'
};
window.serverTime = () => {
//vado a prendere il valore dalla pagina, precedentemente messo in php
if($('.buynow-countdown-container .product-buynow-countdown').hasClass('time-server')){
return parseInt($('.time-server').attr('data-time-server')) != "NaN" ? parseInt($('.time-server').attr('data-time-server')) : null ;
}else{
return null;
}
}
function startBuynowCountdown(time) {
"use strict";
var element = $(".product-buynow-countdown[data-countdown]");
if('active' == element.attr("data-countdown-status")) {
return false;
}
if('undefined' != typeof time) {
element.attr('data-countdown', time);
}
var countdown = element.attr('data-countdown');
if(countdown && countdown.length > 0) {
BUYNOW_COUNTDOWN = setInterval(function() {
var countdown_value = SimpleCountdown(countdown);
element.text(countdown_value);
/*
Destroy interval
Hide countdown
*/
var timeServer = typeof window.serverTime() != null ? window.serverTime() : (new Date()).getTime() / 1000;
var isExpired = countdown <= parseInt(timeServer);
$(".buyitnow-status p > span.product-value").toggle(isExpired);
$("span.product-buynow-countdown").toggle(!isExpired);
if(isExpired) clearInterval(BUYNOW_COUNTDOWN);
}, 1000);
element.attr("data-countdown-status", "active");
}
}
function setStatusBuynowButton(status, error_type) {
"use strict";
var selector = ".buyitnow-button";
var element = $(selector);
var defaults = "button-default button-full buyitnow-button ripple-button";
var base = "buyitnow-button";
var specific = 'button-blue-gradient';
switch(status) {
default:
case 'enabled': {
bindBuynowTrigger(error_type);
break;
}
case 'engaged': {
$('body').find("[data-buynow-state='engaged']").fadeIn();
bindBuynowTrigger(error_type);
break;
}
case 'disabled': {
specific = "button-gray-flat";
element.off('click');
element.find("[data-buynow-state='engaged']").fadeOut('fast');
break;
}
case 'login': {
element.off('click').on('click', window.parent.showLogin);
break;
}
}
if("undefined"===typeof element[0]) return element;
var oldClass = element[0].className;
var newClass = [defaults, specific, [base, status].join('-')].join(' ');
if(oldClass != newClass) {
$("main.buyitnow").find(selector).each(function(k, item) {
$(item).removeClass();
$(item).addClass(newClass);
});
$(".auction-action-bid-mobile .buyitnow-button")
.toggleClass(specific,true);
}
return element;
}
function bindBuynowTrigger(error_type) {
"use strict";
var selector = ".buyitnow-button";
var element = $('body').find(selector);
element.each(function(k, elem) {
$(elem).off('click').on('click', function(e) {
e.preventDefault();
rippleButton($(elem), e);
if(!error_type) {
var url = "buy_your_product.php"+parseURL(window.location.href).search;
navigateDeepModalURL(url);
return false;
}
$(elem).popover({
html: true,
content: BUYNOW_ERRORS[error_type],
placement: isSmartphoneDevice() ? "top" : "bottom",
selector: selector,
container: "body"
}).on('shown.bs.popover', function() {
setTimeout(function() {
$(selector).popover('destroy');
}, 3000);
}).popover('show');
});
});
}
$(document).ready(function() {
"use strict";
$("body").find(".expenditure-value").each(function(k, item) {
var expenditure = $(item).text();
if(expenditure.length && parseInt(expenditure, 10) > 0) {
updateUserExpenditure(expenditure);
$('[data-buynow-state="engaged"]').fadeIn();
return false;
}
});
});
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1,3 @@
<svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.40014 10.2952L0.854126 5.74924L1.99063 4.61273L5.40014 8.02224L12.7176 0.704758L13.8541 1.84126L5.40014 10.2952Z" fill="#55BC62"/>
</svg>

After

Width:  |  Height:  |  Size: 246 B

@@ -0,0 +1,622 @@
function UserNotifications() {
"use strict"
var self = this;
self.totalScrollHeight = 0;
self.topNotif = 0;
self.offSss = false;
self._tipTimeout = false;
self.notifBoxHtml;
self.audio = 1;
self.undelivN = 0;
self.HTTP_ENDPOINT = "/checkN.php";
self.startIntervals();
}
UserNotifications.prototype.startIntervals = function () {
"use strict"
var self = this;
var intervals = BidooCnf.intervals.user.notifications;
self.pingNotification();
setInterval(self.bidping.bind(self, getBidsBonus()), intervals.bidping);
setInterval(self.updateNotificationsDateTime.bind(self), intervals.updateNotificationsDateTime);
setInterval(self.pingNotification.bind(self), intervals.pingNotification);
setInterval(self.updateAuctionsWon.bind(self), intervals.auctionsWon); // [GR] for update badge number for auctions won to pay by user
}
UserNotifications.prototype.updateNotificationsDateTime = function () {
"use strict"
var self = this;
moment.locale('it');
self.getCorrectNotifSelector().find("abbr").each(function () {
var abbrTime = parseInt($(this).data("utime"), 10);
var newTime = parseInt((new Date()).getTime() / 1000, 10);
var moment_abbr_time = moment(abbrTime, "X");
var shouldBeFromNow = (newTime - abbrTime) < 21600;
$(this).data("alt", moment().format());
$(this).text(shouldBeFromNow ? moment_abbr_time.fromNow() : moment_abbr_time.calendar());
});
};
UserNotifications.prototype.updateAuctionsWon = function () { // [GR] for update badge number for auctions won to pay by user
"use strict"
$.get("/check_auctions_won.php", function (data) {
if (self.offSss) {
window.location.reload();
return;
}
$(".navbar-fixed-bottom #bottomAuctionsWonToPay").html(data);
$(".myBidooDesk #bottomAuctionsWonToPay").html(data);
$(".myBidooMobile #bottomAuctionsWonToPay").html(data);
$("#testataAuctionsWonToPay").html(data);
if (parseInt(data) > 0) {
$("#bottomAuctionsWonToPay").css("visibility", "visible");
$("#testataAuctionsWonToPay").css("visibility", "visible");
} else {
$("#bottomAuctionsWonToPay").css("visibility", "hidden");
$("#testataAuctionsWonToPay").css("visibility", "hidden");
}
});
}
UserNotifications.prototype.bidping = function (bonus) {
"use strict"
var self = this;
$.get("/bidping.php", function (data) {
if (self.offSss) {
window.location.reload();
return;
}
var progressValue = data[0] + "/" + data[1];
$("#seven_7").html(progressValue);
$(".bid-challenge [data-spot=0]")
.html(progressValue)
.parent()
.attr("data-progress", progressValue);
$(".leader-btn .progress-bar-success").css("width", ((data[0] / data[1]) * 100.00).toFixed(2) + "%");
if (data[0] >= data[1] && data[2] < data[1]) {
$('.bid-challenge .img-lock-open').hide();
$('.bid-challenge .img-lock').show();
$('#auctionBidBottomBar .wrap-progress').hide();
$('#auctionBidBottomBar .wrap-button-get-bonus').show();
}
if (data[0] >= data[1] && (typeof getCookie('won') == "undefined")) {
var expireWonDate = new Date();
expireWonDate.setTime(getTimeFrames());
self.wonChallenge(data[0], bonus);
setValueCookie("won", 1, expireWonDate);
}
}).fail(function (jqXHR, textStatus, error) {
if (jqXHR.status == 403) {
self.offSss = true;
$(".btn.leader-btn[data-target=#leader]")
.html(getSessionExpired(true))
.attr('data-toggle', null)
.attr('data-target', null)
.off("click").on({
click: showLogin
});
}
});
self.bidPingProduct();
}
UserNotifications.prototype.bidPingProduct = function () {
"use strict"
$.get("/bidping_product.php", function (data) {
if (self.offSss) {
window.location.reload();
return;
}
$(".bid-challenge-product").html(data);
});
}
UserNotifications.prototype.getCallTipMsg = function (credits, bonus) {
"use strict"
var html = [
"<div class='wrap'>",
"<div>",
"<img src='/images/razzo.svg'>",
"</div>",
"<div>",
"<strong>Complimenti!</strong>",
"<div>Hai Vinto " + credits + " Aste di Puntate</div>",
"</div>",
"</div>"
];
return html.join("");
}
UserNotifications.prototype.callTip = function (credits, bonus, callback) {
"use strict"
var self = this;
var tooltipReach = $(".tooltip.reach");
$(".leader-btn")
.tooltip('destroy').tooltip({
html: true,
placement: 'top',
title: self.getCallTipMsg(credits, bonus),
trigger: 'manual',
animation: false,
template: '<div class="tooltip reach" role="tooltip"><div class="tooltip-inner"></div></div>'
})
.tooltip("show");
tooltipReach.removeClass("bounceOutDown");
if (self._tipTimeout)
clearTimeout(self._tipTimeout);
self._tipTimeout = setTimeout(function () {
callback();
}, 10000);
}
UserNotifications.prototype.wonChallenge = function (nAuctions, bonus) {
"use strict"
var self = this;
var selector = $(".leader-btn > div.bid-challenge");
if (!selector.hasClass("achieved")) {
self.callTip(nAuctions, bonus);
}
}
UserNotifications.prototype.pingNotification = function () {
"use strict"
var self = this;
$.get(self.HTTP_ENDPOINT, {_t: 1}, function (r) {
if (r.count > 0) {
$(".bubble_desktop, .bubble_mobile, .toggle_bar_mobile").html(r.count).show();
if ($("#notifBox").is(":visible") || $("#notifBoxMobile").is(":visible")) {
self.loadNotification(true);
}
if (typeof r.undeliv != "undefined" && (Object.keys(r.undeliv).length > 0 && self.undelivN != Object.keys(r.undeliv).length)) {
var audioCookie = getCookie('audioN');
if (self.audio && ("undefined" == typeof audioCookie || audioCookie < r.count)) {
self
.playSound(r.audio)
.then(setCookieMinutes.bind(null, 'audioN', r.count, 5))
.catch(function () {
$(document)
.off('touchstart click')
.on('touchstart click', function () {
self.playSound(r.audio);
$(document).off('touchstart click');
});
});
}
self.undelivN = Object.keys(r.undeliv).length;
}
} else {
delCookie('audioN');
$(".bubble_desktop, .bubble_mobile").hide();
}
});
}
UserNotifications.prototype.playSound = function (audioSrc) {
"use strict"
var audio = $("#push");
if (audio.length)
audio.remove();
var aSound = document.createElement('audio');
aSound.id = 'push';
aSound.setAttribute('src', audioSrc + "?chk=" + (new Date()).getTime());
return aSound.play();
}
UserNotifications.prototype.toggleAudio = function (audioSetting) {
"use strict"
var self = this;
var isNotArgPassed = "undefined" == typeof audioSetting;
var snd = self.getCorrectNotifSelector().find(".sAudio");
var snData = !!(isNotArgPassed ? parseInt(snd.attr("data-audio")) : audioSetting);
snd.attr("data-audio", (!snData | 0))
.toggleClass("disabled glyphicon-volume-off", !snData)
.toggleClass("enabled glyphicon-volume-up", snData);
if (isNotArgPassed)
$.get(self.HTTP_ENDPOINT, {_s: (snData | 0)});
}
UserNotifications.prototype.loadSettings = function (shouldSetCheckOptions) {
"use strict"
var self = this;
$.get(self.HTTP_ENDPOINT, {_load: 0}, function (settings) {
self.audio = settings.audio;
self.toggleAudio(self.audio);
if (shouldSetCheckOptions) {
$("#ticketMail").prop("checked", !!+settings["1"]);
$("#creditMail").prop("checked", !!+settings["2"]);
$("#packageMail").prop("checked", !!+settings["3"]);
}
});
}
UserNotifications.prototype.cleanData = function (dirtyString) {
"use strict"
dirtyString = dirtyString.replace(/&amp;/g, "&");
dirtyString = dirtyString.replace(/&gt;/g, ">");
dirtyString = dirtyString.replace(/&lt;/g, "<");
dirtyString = dirtyString.replace(/&quot;/g, "\"");
dirtyString = dirtyString.replace("</i>", "</i><p class='paragraph-notification'>");
dirtyString = dirtyString.replace("</a>", "</p></a>");
dirtyString = dirtyString.replace("data-href", "data-mobile-fullscreen='true' data-no-padding-modal-body='true' data-href");
dirtyString = dirtyString.replace("//it.bidoo.com", "");
return dirtyString;
}
UserNotifications.prototype.getNotificationItem = function (data) {
"use strict"
var self = this;
var flag = parseInt(data.readFlag, 10);
var classNotif = 2 == flag ? "class='read wrap-notif'" : (1 == flag ? "class='deliv wrap-notif'" : "");
var item = [
"<li id='notification_" + data.id + "' data-type='" + data.type + "' " + classNotif + ">",
"<div class='notif-sx'>"+self.cleanData(data.content)+"</div>",
"<div class='notif-dx'><abbr data-utime='" + data.created_at + "'></abbr>",
"<i class='fa fa-clock-o clock-notification' aria-hidden='true'></i></div>",
"</li>"
];
return item.join("");
}
UserNotifications.prototype.getEmptyNotifications = function () {
"use strict"
var notif = [
'<li class="text-center empty-notification">',
'<p>Non hai alcuna notifica.</p>',
'</li>'
];
return notif.join("");
}
UserNotifications.prototype._renderN = function (data, more) {
"use strict"
var self = this;
var list = [];
var selector = this.getCorrectNotifSelector().find("ul");
if (data.length) {
$.each(data, function (i, item) {
if ("object" == typeof item) {
selector.append(self.getNotificationItem(item));
if (parseInt(item.readFlag, 10) < 2 && item.type != '1') {
list.push(item.id);
}
}
});
self.updateNotificationsDateTime();
} else {
if (more === undefined || more === false) {
selector.append(self.getEmptyNotifications());
}
}
return list;
}
UserNotifications.prototype._renderFoot = function (shouldLoadMore, paging) {
"use strict"
var loader = [
"<a href='javascript:void(0)' onclick='BidooCnf.instances.user.notifications.loadMore(" + paging + ");' class='load-more load-more-notif'>",
"Vedi altre",
"</a>"
].join("");
var footer = [
"<div class='whatelse nFoot text-center' id='more'>",
shouldLoadMore ? loader : "",
"</div>"
];
return footer.join("");
}
UserNotifications.prototype.loadMore = function (id) {
"use strict"
var self = this;
$.get(self.HTTP_ENDPOINT, {f: id, m: 5}, function (r) {
var selector = self.getCorrectNotifSelector();
var listNotif = selector.find("ul");
selector.find(".whatelse").remove();
if (Object.keys(r.elements).length > 0) {
var list = self._renderN(r.elements, true);
var welse = self._renderFoot(r.shexc, r.elements[Object.keys(r.elements).length - 1].id);
listNotif.append(welse);
if (listNotif.height() <= selector.find("#notifBoxContainer").height()) {
//selector.find("#more").find("a").click();
}
}
if (typeof list != "undefined" && list.length > 0) {
self.sendReadReq(list);
}
self.loadCustomScrollbar();
return false;
});
return false;
}
$("body").click(function (event) {
window.elementSelected = event.target.classList[0];
if ($('.bidooBell').hasClass('active')) {
$('.bidooBell').removeClass('active');
} else {
$('.bidooBell').addClass('active');
}
});
UserNotifications.prototype.loadNotification = function (forceFetchNotif) {
"use strict"
var self = this;
var isMobile = $(window).width() <= 991;
var selector = self.getCorrectNotifSelector();
self.topNotif = 0;
if (selector.is(":visible") && !forceFetchNotif) {
stopBodyScroll(false);
if (window.elementSelected == "bidooBell") {
selector.hide();
$("#tickNotif").hide();
}
if (isMobile) {
$('#notifBoxMobile').hide();
$('#menuModal #btn-1 span').addClass('fa-plus');
$('#menuModal #btn-1 span').removeClass('fa-minus');
$('#menuModal #submenu1').css('display', 'none');
}
self.totalScrollHeight = 0;
} else {
selector.empty().show();
if (isMobile)
self.hideModalHeaderNotifications(true);
self.composeNotificationsUI(isMobile, function (jqXHR, textStatus, errorThrown) {
var isError = jqXHR && textStatus && errorThrown;
if (!isError) {
self.loadCustomScrollbar();
$("#notifBox").show(); // [GR] ADD
if (isMobile) {
var titleSelector = selector.find(".nTitle");
var realHeightNotificationShade = (titleSelector.height() + parseInt(titleSelector.css("padding-top")));
var heightNotifDialog = ($(window).height() - realHeightNotificationShade);
selector.find("#notifBoxContainer").css("height", "auto");
selector.find("#more").find("a").click();
}
}
$("#tickNotif").show();
});
}
return false;
}
UserNotifications.prototype.getNotificationsStructure = function (mobile, isFirstLoadNotifications, isSettings) {
"use strict"
var arrow_left = [
'<a href="javascript:void();" onclick="BidooCnf.instances.user.notifications.back();" id="arrow_left">',
'<img src="images/arrow-left.png" width="12">',
'</a>'
].join("");
var structure = [
'<div class="nTitle">',
mobile || isSettings ? arrow_left : "",
'<p style="display: inline-block;">' + (isSettings ? "Impostazioni" : "Notifiche") + '</p>',
'<span class="sAudio glyphicon glyphicon-volume-up" onclick="BidooCnf.instances.user.notifications.toggleAudio();"></span>',
'<span class="sNotif glyphicon glyphicon-cog" onclick="BidooCnf.instances.user.notifications.toggleSettings();"></span>',
'</div>',
'<div id="notifBoxContainer">',
isFirstLoadNotifications ? "<img src='/images/loader_card.gif' class='loader-notifications'>" : "",
'<ul class="not"></ul>',
'</div>'
]
return structure.join("");
}
UserNotifications.prototype.composeNotificationsUI = function (mobile, callback) {
"use strict"
var self = this;
var selector = self.getCorrectNotifSelector();
selector.html(self.getNotificationsStructure(mobile, true));
$.get(self.HTTP_ENDPOINT, function (r) {
$(".bubble_desktop, .bubble_mobile, .toggle_bar_mobile").hide();
self.delivReadReq();
var mobile = $(window).width() <= 991;
var selectorList = selector.find("ul");
selector.find(".loader-notifications").remove();
if (r !== null) {
var list = self._renderN(r.elements);
if (Object.keys(r.elements).length > 0) {
var footer = self._renderFoot(r.shexc, r.elements[Object.keys(r.elements).length - 1].id);
selectorList.append(footer);
}
if (typeof list != "undefined" && list.length > 0) {
self.sendReadReq(list);
}
self.loadSettings();
} else {
selectorList.html(getSessionExpired());
}
callback();
}).fail(callback);
}
UserNotifications.prototype.sendReadReq = function (list) {
"use strict"
var self = this;
if (typeof list !== undefined && list.length > 0) {
$.get(self.HTTP_ENDPOINT, {_r: 1, l: list.join(',')});
}
}
UserNotifications.prototype.delivReadReq = function () {
"use strict"
$.get(this.HTTP_ENDPOINT, {_d: 1});
}
UserNotifications.prototype.getSettings = function () {
"use strict"
var html = [
'<div class="settingBox">',
'<form role="form" style="opacity: 1;">',
'<div class="title-settings"><b>Notifiche Email</b></div>',
'<div class="checkbox">',
'<label for="ticketMail">',
'<input type="checkbox" name="ticketMail" id="ticketMail">',
'<span class="notif-settings-label">Ricevi email per nuovi Ticket</span>',
'</label>',
'</div>',
'<div class="checkbox">',
'<label for="packageMail">',
'<input type="checkbox" name="packageMail" id="packageMail">',
'<span class="notif-settings-label">Ricevi Email per aggiornamenti spedizione</span>',
'</label>',
'</div>',
'<div class="checkbox">',
'<label for="creditMail">',
'<input type="checkbox" name="creditMail" id="creditMail">',
'<span class="notif-settings-label">Ricevi Email per accrediti di Puntate Gratis</span>',
'</label>',
'</div>',
'<a class="btn btn-block btn-primary" href="javascript:void(0);" onclick="BidooCnf.instances.user.notifications.saveSettings();"><b>Salva Impostazioni</b></a>',
'</form>',
'</div>'
];
return html.join("");
}
UserNotifications.prototype.showSettingNotification = function () {
"use strict"
var self = this;
var selector = self.getCorrectNotifSelector();
if (selector.length) {
self.notifBoxHtml = selector.html();
selector.html(self.getNotificationsStructure(true, false, true))
.find("#notifBoxContainer")
.append(self.getSettings());
self.loadSettings(true);
document.querySelector('#notifBoxMobile #notifBoxContainer .not').remove();
}
}
UserNotifications.prototype.back = function () {
"use strict"
var self = this;
var selector = self.getCorrectNotifSelector();
if ($(window).width() <= 991 && !selector.find(".settingBox").length) {
self.hideModalHeaderNotifications(false);
backMobile();
return;
}
selector.html(self.notifBoxHtml);
self.loadCustomScrollbar(true);
}
UserNotifications.prototype.toggleSettings = function () {
"use strict"
var self = this;
var selector = self.getCorrectNotifSelector();
if (!selector.is(":visible")) {
selector.show();
self.loadNotification();
} else {
self.showSettingNotification();
}
return true;
}
UserNotifications.prototype.saveSettings = function () {
"use strict"
var self = this;
var mail = +$("#ticketMail").is(":checked");
var pack = +$("#packageMail").is(":checked");
var accr = +$("#creditMail").is(":checked");
var data = [
'm', mail,
'p', pack,
'a', accr
];
$.get(self.HTTP_ENDPOINT, {_set: data.join("|")}, function () {
self.back();
});
}
UserNotifications.prototype.loadCustomScrollbar = function (forceReload) {
"use strict"
var self = this;
var notif_box_selector = self.getCorrectNotifSelector().find("#notifBoxContainer");
if ($(window).width() <= 991) {
notif_box_selector.off("scroll").scroll(function () {
if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
self.topNotif = $(this).scrollTop();
//notif_box_selector.find("#more").find("a").click();
}
});
notif_box_selector.scrollTop(self.topNotif);
} else if (forceReload || !notif_box_selector.hasClass("mCustomScrollbar")) {
if (forceReload) {
var list = notif_box_selector.find("ul").clone();
notif_box_selector.empty().append(list);
self.totalScrollHeight = 0;
}
notif_box_selector.mCustomScrollbar({
documentTouchScroll: true,
contentTouchScroll: 1,
callbacks: {
onTotalScroll: function () {
var more_notif_selector = notif_box_selector.find("#more");
if (more_notif_selector.is(":visible") && more_notif_selector.children().length) {
// more_notif_selector.find("a").click();
self.totalScrollHeight += 5 * 70;
}
},
onInit: function () {
if (self.totalScrollHeight != 0) {
notif_box_selector.mCustomScrollbar("scrollTo", self.totalScrollHeight, {
scrollInertia: 0
});
}
}
}
});
}
notif_box_selector
.off("mouseover")
.mouseover(true, stopBodyScroll)
.off("mouseout")
.mouseout(false, stopBodyScroll);
bindModalCall("#notifBoxContainer", true);
}
UserNotifications.prototype.getCorrectNotifSelector = function () {
"use strict"
var notifMobile = $("#notifBoxMobile");
return $(window).width() <= 991 ? notifMobile : $("#notifBox");
}
UserNotifications.prototype.hideModalHeaderNotifications = function (shouldHide) {
"use strict"
var self = this;
self.getCorrectNotifSelector().parent()
.parent()
.find(".modal-header")
.toggleClass("hidden", shouldHide);
}
UserNotifications.prototype.closeAll = function () {
"use strict"
var self = this;
var selector = self.getCorrectNotifSelector();
if (!selector.is(":visible"))
return;
if (selector.find(".settingBox").is(":visible"))
self.back();
self.back();
}
function bidping() {
"use strict"
if (BidooCnf.modules.exist(UserNotifications))
BidooCnf.instances.user.notifications.bidping(getBidsBonus());
}
$(document).ready(function () {
"use strict"
BidooCnf.modules.notifications = UserNotifications;
BidooCnf.instances.user.notifications = new UserNotifications();
});
@@ -0,0 +1,56 @@
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-message{
font-size: 20px !important;
}
#onesignal-slidedown-container #onesignal-slidedown-dialog .primary.slidedown-button+.secondary.slidedown-button, #slidedown-footer #onesignal-slidedown-cancel-button {
color: #666666 !important;
}
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-button.primary, #slidedown-footer #onesignal-slidedown-allow-button {
background: #00CC66 !important;
}
@media(max-width:576px){
#onesignal-slidedown-container #onesignal-slidedown-dialog .primary.slidedown-button+.secondary.slidedown-button, #slidedown-footer #onesignal-slidedown-cancel-button {
padding: 10px;
}
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-button.primary, #slidedown-footer #onesignal-slidedown-allow-button {
padding: 10px;
}
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-message{
font-size: 16px !important;
}
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-icon{
width: 60px;
height: 70px;
}
}
#modalExplainForMac .modal-body{
padding: 30px 50px 0px;
}
#modalExplainForMac .logo{
width: 40px;
margin-top: -7px;
margin-left: 5px;
}
#modalExplainForMac .intestazione{
font-size: 18px;
font-weight: bold;
}
#modalExplainForMac p.sottotitolo{
font-size: 16px;
}
#modalExplainForMac ol{
padding-left: 15px;
line-height: 23px;
}
#modalExplainForMac .modal-footer{
border-top: none;
padding-top: 5px;
padding-right: 30px;
}
#modalExplainForMac .modal-footer .btn-custom{
background-color: #0c6;
color: #fff;
font-weight: bold;
font-size: 16px;
padding: 5px 30px;
}
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.9 KiB

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#2196F3;}
</style>
<g>
<g>
<g>
<g>
<g>
<g>
<path class="st0" d="M13.38,38.44c-2.22,0-4.05,1.83-4.05,4.05c0,2.22,1.83,4.05,4.05,4.05c2.28,0,4.05-1.83,4.05-4.05
C17.44,40.27,15.6,38.44,13.38,38.44z"/>
<path class="st0" d="M43.7,38.44c-2.22,0-4.05,1.83-4.05,4.05c0,2.22,1.83,4.05,4.05,4.05c2.28,0,4.05-1.83,4.05-4.05
C47.76,40.27,45.92,38.44,43.7,38.44z"/>
<path class="st0" d="M44.54,34.05c0-0.5-0.39-0.83-0.83-0.83H21.44c-0.17,0-0.33,0.06-0.5,0.17l-3.55,2.67
c-0.39,0.22-0.44,0.78-0.17,1.11c0.17,0.22,0.44,0.33,0.67,0.33c0.17,0,0.33-0.06,0.5-0.11l3.33-2.5H43.7
C44.2,34.88,44.54,34.55,44.54,34.05z"/>
<path class="st0" d="M49.87,15.23c-0.11-0.17-0.33-0.28-0.56-0.33L9.88,8.95L9.61,7.79C9,4.73,6.44,3.45,0.83,3.45
C0.33,3.45,0,3.84,0,4.29c0,0.5,0.39,0.83,0.83,0.83c4.05,0,6.66,0.5,7.22,3.05L8.44,9.9c0,0.06,0,0.06,0,0.06l3.11,14.49
c0.39,2.44,2.5,4.28,4.94,4.28h26.32c2.44,0,4.5-1.72,4.89-4.28l2.28-8.55C50.03,15.67,49.98,15.39,49.87,15.23z"/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#016FD0;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#016FD0;}
</style>
<g>
<path class="st0" d="M80,47.33c0,1.47-1.19,2.67-2.67,2.67H2.67C1.19,50,0,48.81,0,47.33V2.67C0,1.19,1.19,0,2.67,0h74.67
C78.81,0,80,1.19,80,2.67V47.33z"/>
<g>
<path class="st1" d="M19.5,37.15V26.63h11.14l1.2,1.56l1.23-1.56h40.44v9.8c0,0-1.06,0.72-2.28,0.73H48.84l-1.35-1.66v1.66h-4.42
v-2.83c0,0-0.6,0.4-1.91,0.4h-1.5v2.44h-6.69l-1.19-1.59l-1.21,1.59L19.5,37.15L19.5,37.15z"/>
<path class="st1" d="M6.49,18.7L9,12.85h4.34l1.43,3.28v-3.28h5.4l0.85,2.37l0.82-2.37h24.24v1.19c0,0,1.27-1.19,3.37-1.19
l7.87,0.03l1.4,3.24v-3.27h4.52l1.24,1.86v-1.86h4.56v10.52h-4.56L63.3,21.5v1.87h-6.64l-0.67-1.66h-1.79l-0.66,1.66h-4.5
c-1.8,0-2.95-1.17-2.95-1.17v1.17H39.3l-1.35-1.66v1.66H12.7l-0.67-1.66h-1.78l-0.66,1.66h-3.1V18.7L6.49,18.7z"/>
<path class="st2" d="M9.89,14.14L6.5,22.02h2.21l0.63-1.58h3.63l0.62,1.58h2.25l-3.39-7.88H9.89L9.89,14.14z M11.15,15.98
l1.11,2.76h-2.22L11.15,15.98L11.15,15.98z"/>
<polygon class="st2" points="16.08,22.02 16.08,14.14 19.21,14.15 21.04,19.23 22.82,14.14 25.93,14.14 25.93,22.02 23.96,22.02
23.96,16.21 21.87,22.02 20.14,22.02 18.05,16.21 18.05,22.02 16.08,22.02 "/>
<polygon class="st2" points="27.28,22.02 27.28,14.14 33.7,14.14 33.7,15.9 29.27,15.9 29.27,17.25 33.6,17.25 33.6,18.91
29.27,18.91 29.27,20.31 33.7,20.31 33.7,22.02 27.28,22.02 "/>
<path class="st2" d="M34.84,14.14v7.88h1.97v-2.8h0.83l2.36,2.8h2.41l-2.59-2.9c1.06-0.09,2.16-1,2.16-2.42
c0-1.66-1.3-2.56-2.75-2.56H34.84L34.84,14.14z M36.81,15.9h2.25c0.54,0,0.93,0.42,0.93,0.83c0,0.52-0.51,0.83-0.9,0.83h-2.28
L36.81,15.9L36.81,15.9L36.81,15.9z"/>
<polygon class="st2" points="44.79,22.02 42.78,22.02 42.78,14.14 44.79,14.14 44.79,22.02 "/>
<path class="st2" d="M49.56,22.02h-0.43c-2.1,0-3.38-1.65-3.38-3.91c0-2.31,1.26-3.97,3.91-3.97h2.18v1.87h-2.26
c-1.08,0-1.84,0.84-1.84,2.13c0,1.53,0.87,2.17,2.13,2.17h0.52L49.56,22.02L49.56,22.02z"/>
<path class="st2" d="M53.85,14.14l-3.39,7.88h2.21l0.63-1.58h3.63l0.62,1.58h2.25l-3.39-7.88H53.85L53.85,14.14z M55.1,15.98
l1.11,2.76h-2.22L55.1,15.98L55.1,15.98z"/>
<polygon class="st2" points="60.03,22.02 60.03,14.14 62.54,14.14 65.74,19.09 65.74,14.14 67.7,14.14 67.7,22.02 65.28,22.02
62,16.94 62,22.02 60.03,22.02 "/>
<polygon class="st2" points="20.85,35.81 20.85,27.93 27.28,27.93 27.28,29.69 22.84,29.69 22.84,31.04 27.17,31.04 27.17,32.7
22.84,32.7 22.84,34.1 27.28,34.1 27.28,35.81 20.85,35.81 "/>
<polygon class="st2" points="52.34,35.81 52.34,27.93 58.77,27.93 58.77,29.69 54.33,29.69 54.33,31.04 58.64,31.04 58.64,32.7
54.33,32.7 54.33,34.1 58.77,34.1 58.77,35.81 52.34,35.81 "/>
<polygon class="st2" points="27.52,35.81 30.65,31.92 27.45,27.93 29.93,27.93 31.84,30.39 33.75,27.93 36.14,27.93 32.98,31.87
36.11,35.81 33.63,35.81 31.78,33.38 29.97,35.81 27.52,35.81 "/>
<path class="st2" d="M36.35,27.93v7.88h2.02v-2.49h2.07c1.75,0,3.08-0.93,3.08-2.74c0-1.5-1.04-2.65-2.83-2.65H36.35L36.35,27.93z
M38.37,29.71h2.18c0.57,0,0.97,0.35,0.97,0.91c0,0.53-0.4,0.91-0.98,0.91h-2.18V29.71L38.37,29.71L38.37,29.71z"/>
<path class="st2" d="M44.38,27.93v7.88h1.97v-2.8h0.83l2.36,2.8h2.41l-2.59-2.9c1.06-0.09,2.16-1,2.16-2.42
c0-1.66-1.3-2.56-2.75-2.56L44.38,27.93L44.38,27.93L44.38,27.93z M46.35,29.69h2.25c0.54,0,0.93,0.42,0.93,0.83
c0,0.52-0.51,0.83-0.9,0.83h-2.28V29.69L46.35,29.69z"/>
<path class="st2" d="M59.68,35.81V34.1h3.94c0.58,0,0.84-0.32,0.84-0.66c0-0.33-0.25-0.67-0.84-0.67h-1.78
c-1.55,0-2.41-0.94-2.41-2.36c0-1.26,0.79-2.48,3.09-2.48h3.84l-0.83,1.77h-3.32c-0.63,0-0.83,0.33-0.83,0.65
c0,0.33,0.24,0.69,0.73,0.69h1.87c1.73,0,2.47,0.98,2.47,2.26c0,1.38-0.83,2.51-2.57,2.51L59.68,35.81L59.68,35.81z"/>
<path class="st2" d="M66.91,35.81V34.1h3.78c0.58,0,0.84-0.32,0.84-0.66c0-0.33-0.25-0.67-0.84-0.67h-1.61
c-1.55,0-2.41-0.94-2.41-2.36c0-1.26,0.79-2.48,3.09-2.48h3.76l-0.83,1.77h-3.24c-0.63,0-0.83,0.33-0.83,0.65
c0,0.33,0.24,0.69,0.73,0.69h1.7c1.73,0,2.48,0.98,2.48,2.26c0,1.38-0.83,2.51-2.57,2.51L66.91,35.81L66.91,35.81z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F9F9F9;}
.st1{fill:#6C6BBD;}
.st2{fill:#D32011;}
.st3{fill:#0099DF;}
.st4{fill:#110F0D;}
</style>
<g>
<path class="st0" d="M76.56,50H3.44C1.55,50,0,48.45,0,46.56V3.44C0,1.55,1.55,0,3.44,0h73.12C78.45,0,80,1.55,80,3.44v43.12
C80,48.45,78.45,50,76.56,50z"/>
<g>
<polygon class="st1" points="46.47,32.85 33.53,32.85 33.53,9.6 46.47,9.6 "/>
<path class="st2" d="M34.35,21.22c0-4.72,2.21-8.92,5.65-11.63c-2.51-1.98-5.69-3.16-9.14-3.16c-8.17,0-14.79,6.62-14.79,14.79
s6.62,14.79,14.79,14.79c3.45,0,6.62-1.18,9.14-3.16C36.56,30.14,34.35,25.94,34.35,21.22"/>
<path class="st3" d="M63.92,21.22c0,8.17-6.62,14.79-14.79,14.79c-3.45,0-6.62-1.18-9.14-3.16c3.44-2.71,5.65-6.91,5.65-11.63
S43.44,12.3,40,9.6c2.52-1.98,5.69-3.16,9.14-3.16C57.3,6.43,63.92,13.05,63.92,21.22"/>
<path class="st4" d="M50.85,39.42c0.17,0,0.42,0.03,0.61,0.11l-0.26,0.8c-0.18-0.07-0.36-0.1-0.53-0.1
c-0.56,0-0.84,0.36-0.84,1.01v2.2h-0.85v-3.93h0.85v0.48C50.03,39.65,50.35,39.42,50.85,39.42L50.85,39.42z M47.69,40.3h-1.4v1.77
c0,0.39,0.14,0.66,0.57,0.66c0.22,0,0.5-0.07,0.75-0.22l0.25,0.73c-0.27,0.19-0.7,0.3-1.07,0.3c-1.01,0-1.36-0.54-1.36-1.45V40.3
h-0.8v-0.78h0.8v-1.19h0.86v1.19h1.4V40.3L47.69,40.3z M36.76,41.13c0.09-0.57,0.44-0.95,1.04-0.95c0.55,0,0.9,0.35,0.99,0.95
H36.76z M39.68,41.48c-0.01-1.22-0.76-2.06-1.87-2.06c-1.15,0-1.95,0.84-1.95,2.06c0,1.25,0.84,2.06,2.01,2.06
c0.59,0,1.13-0.15,1.61-0.55l-0.42-0.63c-0.33,0.26-0.75,0.41-1.14,0.41c-0.55,0-1.05-0.25-1.17-0.96h2.92
C39.67,41.7,39.68,41.59,39.68,41.48L39.68,41.48z M43.43,40.52c-0.24-0.15-0.72-0.34-1.22-0.34c-0.47,0-0.75,0.17-0.75,0.46
c0,0.26,0.3,0.34,0.66,0.39l0.4,0.06c0.85,0.12,1.37,0.49,1.37,1.18c0,0.75-0.66,1.28-1.79,1.28c-0.64,0-1.23-0.16-1.7-0.51
l0.4-0.67c0.29,0.22,0.72,0.41,1.31,0.41c0.58,0,0.89-0.17,0.89-0.48c0-0.22-0.22-0.35-0.69-0.41l-0.4-0.06
c-0.88-0.12-1.36-0.52-1.36-1.16c0-0.78,0.64-1.26,1.63-1.26c0.62,0,1.19,0.14,1.6,0.41L43.43,40.52L43.43,40.52z M53.97,40.23
c-0.18,0-0.34,0.03-0.49,0.09c-0.15,0.06-0.28,0.15-0.39,0.26c-0.11,0.11-0.2,0.24-0.26,0.4c-0.06,0.16-0.09,0.33-0.09,0.51
c0,0.19,0.03,0.36,0.09,0.51c0.06,0.16,0.15,0.29,0.26,0.4c0.11,0.11,0.24,0.2,0.39,0.26c0.15,0.06,0.31,0.09,0.49,0.09
c0.18,0,0.34-0.03,0.49-0.09c0.15-0.06,0.28-0.15,0.39-0.26c0.11-0.11,0.2-0.24,0.26-0.4c0.06-0.16,0.09-0.33,0.09-0.51
c0-0.19-0.03-0.36-0.09-0.51c-0.06-0.16-0.15-0.29-0.26-0.4c-0.11-0.11-0.24-0.2-0.39-0.26C54.31,40.26,54.14,40.23,53.97,40.23
L53.97,40.23z M53.97,39.42c0.3,0,0.59,0.05,0.85,0.16c0.26,0.11,0.48,0.25,0.67,0.44c0.19,0.19,0.34,0.4,0.44,0.66
c0.11,0.25,0.16,0.53,0.16,0.82c0,0.3-0.05,0.57-0.16,0.82c-0.11,0.25-0.25,0.47-0.44,0.66c-0.19,0.19-0.41,0.33-0.67,0.44
c-0.26,0.11-0.54,0.16-0.85,0.16s-0.59-0.05-0.85-0.16c-0.26-0.11-0.48-0.25-0.67-0.44c-0.19-0.19-0.34-0.41-0.44-0.66
c-0.11-0.25-0.16-0.53-0.16-0.82c0-0.3,0.05-0.57,0.16-0.82c0.11-0.25,0.25-0.47,0.44-0.66c0.19-0.19,0.41-0.33,0.67-0.44
C53.38,39.47,53.66,39.42,53.97,39.42L53.97,39.42z M31.77,41.48c0-0.69,0.45-1.26,1.19-1.26c0.71,0,1.18,0.54,1.18,1.26
c0,0.71-0.48,1.26-1.18,1.26C32.22,42.73,31.77,42.17,31.77,41.48L31.77,41.48z M34.95,41.48v-1.96h-0.85v0.48
c-0.27-0.35-0.68-0.58-1.24-0.58c-1.1,0-1.96,0.86-1.96,2.06c0,1.2,0.86,2.06,1.96,2.06c0.56,0,0.97-0.22,1.24-0.58v0.48h0.85
V41.48z M30.13,43.44v-2.46c0-0.93-0.59-1.55-1.54-1.56c-0.5-0.01-1.02,0.15-1.38,0.7c-0.27-0.44-0.7-0.7-1.3-0.7
c-0.42,0-0.83,0.12-1.15,0.58v-0.48h-0.85v3.93h0.86v-2.18c0-0.68,0.38-1.04,0.96-1.04c0.57,0,0.85,0.37,0.85,1.04v2.18h0.86
v-2.18c0-0.68,0.39-1.04,0.96-1.04c0.58,0,0.86,0.37,0.86,1.04v2.18H30.13L30.13,43.44z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F9F9F9;}
.st1{fill:#FF5F00;}
.st2{fill:#EB001B;}
.st3{fill:#F79E1B;}
</style>
<g>
<path class="st0" d="M76.56,50H3.44C1.55,50,0,48.45,0,46.56V3.44C0,1.55,1.55,0,3.44,0h73.12C78.45,0,80,1.55,80,3.44v43.12
C80,48.45,78.45,50,76.56,50z"/>
<g>
<path d="M24.81,43.45v-2.46c0-0.94-0.57-1.56-1.56-1.56c-0.49,0-1.03,0.16-1.39,0.7c-0.29-0.45-0.7-0.7-1.31-0.7
c-0.41,0-0.82,0.12-1.15,0.57v-0.49h-0.86v3.94h0.86v-2.17c0-0.7,0.37-1.03,0.94-1.03s0.86,0.37,0.86,1.03v2.17h0.86v-2.17
c0-0.7,0.41-1.03,0.94-1.03c0.57,0,0.86,0.37,0.86,1.03v2.17H24.81L24.81,43.45z M37.56,39.52h-1.39v-1.19H35.3v1.19h-0.78v0.78
h0.78v1.8c0,0.9,0.37,1.44,1.35,1.44c0.37,0,0.78-0.12,1.07-0.29l-0.25-0.74c-0.25,0.16-0.53,0.21-0.74,0.21
c-0.41,0-0.57-0.25-0.57-0.66V40.3h1.39V39.52L37.56,39.52z M44.86,39.43c-0.49,0-0.82,0.25-1.03,0.57v-0.49h-0.86v3.94h0.86
v-2.21c0-0.66,0.29-1.03,0.82-1.03c0.16,0,0.37,0.04,0.53,0.08l0.25-0.82C45.27,39.43,45.02,39.43,44.86,39.43L44.86,39.43
L44.86,39.43z M33.83,39.84c-0.41-0.29-0.98-0.41-1.6-0.41c-0.98,0-1.64,0.49-1.64,1.27c0,0.66,0.49,1.03,1.35,1.15l0.41,0.04
c0.45,0.08,0.7,0.21,0.7,0.41c0,0.29-0.33,0.49-0.9,0.49c-0.57,0-1.03-0.21-1.31-0.41l-0.41,0.66c0.45,0.33,1.07,0.49,1.68,0.49
c1.15,0,1.8-0.53,1.8-1.27c0-0.7-0.53-1.07-1.35-1.19l-0.41-0.04c-0.37-0.04-0.66-0.12-0.66-0.37c0-0.29,0.29-0.45,0.74-0.45
c0.49,0,0.98,0.21,1.23,0.33L33.83,39.84L33.83,39.84z M56.71,39.43c-0.49,0-0.82,0.25-1.03,0.57v-0.49h-0.86v3.94h0.86v-2.21
c0-0.66,0.29-1.03,0.82-1.03c0.16,0,0.37,0.04,0.53,0.08l0.25-0.82C57.12,39.43,56.87,39.43,56.71,39.43L56.71,39.43L56.71,39.43z
M45.72,41.49c0,1.19,0.82,2.05,2.09,2.05c0.57,0,0.98-0.12,1.39-0.45l-0.41-0.7c-0.33,0.25-0.66,0.37-1.03,0.37
c-0.7,0-1.19-0.49-1.19-1.27c0-0.74,0.49-1.23,1.19-1.27c0.37,0,0.7,0.12,1.03,0.37l0.41-0.7c-0.41-0.33-0.82-0.45-1.39-0.45
C46.54,39.43,45.72,40.3,45.72,41.49L45.72,41.49L45.72,41.49z M53.68,41.49v-1.97h-0.86v0.49c-0.29-0.37-0.7-0.57-1.23-0.57
c-1.11,0-1.97,0.86-1.97,2.05c0,1.19,0.86,2.05,1.97,2.05c0.57,0,0.98-0.21,1.23-0.57v0.49h0.86V41.49z M50.52,41.49
c0-0.7,0.45-1.27,1.19-1.27c0.7,0,1.19,0.53,1.19,1.27c0,0.7-0.49,1.27-1.19,1.27C50.97,42.72,50.52,42.18,50.52,41.49
L50.52,41.49z M40.23,39.43c-1.15,0-1.97,0.82-1.97,2.05s0.82,2.05,2.01,2.05c0.57,0,1.15-0.16,1.6-0.53l-0.41-0.62
c-0.33,0.25-0.74,0.41-1.15,0.41c-0.53,0-1.07-0.25-1.19-0.94h2.91v-0.33C42.07,40.26,41.33,39.43,40.23,39.43L40.23,39.43
L40.23,39.43z M40.23,40.17c0.53,0,0.9,0.33,0.98,0.94h-2.05C39.24,40.58,39.61,40.17,40.23,40.17L40.23,40.17z M61.59,41.49
v-3.53h-0.86v2.05c-0.29-0.37-0.7-0.57-1.23-0.57c-1.11,0-1.97,0.86-1.97,2.05c0,1.19,0.86,2.05,1.97,2.05
c0.57,0,0.98-0.21,1.23-0.57v0.49h0.86V41.49z M58.43,41.49c0-0.7,0.45-1.27,1.19-1.27c0.7,0,1.19,0.53,1.19,1.27
c0,0.7-0.49,1.27-1.19,1.27C58.88,42.72,58.43,42.18,58.43,41.49L58.43,41.49z M29.65,41.49v-1.97h-0.86v0.49
c-0.29-0.37-0.7-0.57-1.23-0.57c-1.11,0-1.97,0.86-1.97,2.05c0,1.19,0.86,2.05,1.97,2.05c0.57,0,0.98-0.21,1.23-0.57v0.49h0.86
V41.49z M26.45,41.49c0-0.7,0.45-1.27,1.19-1.27c0.7,0,1.19,0.53,1.19,1.27c0,0.7-0.49,1.27-1.19,1.27
C26.9,42.72,26.45,42.18,26.45,41.49z"/>
<rect x="33.54" y="9.62" class="st1" width="12.92" height="23.21"/>
<path class="st2" d="M34.36,21.23c0-4.72,2.21-8.9,5.62-11.61c-2.5-1.97-5.66-3.16-9.1-3.16c-8.16,0-14.76,6.6-14.76,14.76
s6.6,14.76,14.76,14.76c3.44,0,6.6-1.19,9.1-3.16C36.58,30.17,34.36,25.94,34.36,21.23z"/>
<path class="st3" d="M63.89,21.23c0,8.16-6.6,14.76-14.76,14.76c-3.44,0-6.6-1.19-9.1-3.16c3.44-2.71,5.62-6.89,5.62-11.61
s-2.21-8.9-5.62-11.61c2.5-1.97,5.66-3.16,9.1-3.16C57.28,6.46,63.89,13.11,63.89,21.23z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#009EE3;}
.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#113984;}
.st3{fill-rule:evenodd;clip-rule:evenodd;fill:#172C70;}
</style>
<g>
<path class="st0" d="M76.56,50H3.44C1.55,50,0,48.45,0,46.56V3.44C0,1.55,1.55,0,3.44,0h73.12C78.45,0,80,1.55,80,3.44v43.12
C80,48.45,78.45,50,76.56,50z"/>
<g>
<path class="st1" d="M14.63,21.06h4.2c2.26,0,3.1,1.14,2.97,2.82c-0.22,2.77-1.89,4.3-4.11,4.3h-1.12c-0.3,0-0.51,0.2-0.59,0.75
L15.5,32.1c-0.03,0.21-0.14,0.33-0.3,0.34h-2.64c-0.25,0-0.34-0.19-0.27-0.6l1.61-10.18C13.96,21.25,14.19,21.06,14.63,21.06z"/>
<path class="st2" d="M32.87,20.87c1.42,0,2.72,0.77,2.55,2.68c-0.22,2.28-1.44,3.54-3.36,3.54h-1.68c-0.24,0-0.36,0.2-0.42,0.6
l-0.33,2.07c-0.05,0.31-0.21,0.47-0.45,0.47h-1.56c-0.25,0-0.34-0.16-0.28-0.52l1.29-8.29c0.06-0.41,0.22-0.56,0.5-0.56H32.87
L32.87,20.87z M30.32,25.31h1.27c0.8-0.03,1.33-0.58,1.38-1.58c0.03-0.61-0.38-1.05-1.04-1.05l-1.2,0.01L30.32,25.31L30.32,25.31z
M39.67,29.6c0.14-0.13,0.29-0.2,0.27-0.04l-0.05,0.38c-0.03,0.2,0.05,0.31,0.24,0.31h1.39c0.23,0,0.35-0.09,0.41-0.46l0.86-5.38
c0.04-0.27-0.02-0.4-0.23-0.4h-1.53c-0.14,0-0.2,0.08-0.24,0.29l-0.06,0.33c-0.03,0.17-0.11,0.2-0.18,0.03
c-0.26-0.61-0.92-0.89-1.84-0.87c-2.14,0.04-3.59,1.67-3.74,3.76c-0.12,1.61,1.04,2.88,2.56,2.88
C38.62,30.44,39.11,30.11,39.67,29.6L39.67,29.6L39.67,29.6z M38.5,28.77c-0.92,0-1.57-0.74-1.43-1.64s1-1.64,1.92-1.64
s1.57,0.74,1.43,1.64S39.42,28.77,38.5,28.77L38.5,28.77z M45.49,24h-1.41c-0.29,0-0.41,0.22-0.32,0.48l1.75,5.12l-1.72,2.44
c-0.14,0.2-0.03,0.39,0.17,0.39h1.58c0.19,0.02,0.37-0.07,0.47-0.23l5.38-7.72C51.57,24.25,51.5,24,51.22,24h-1.5
c-0.26,0-0.36,0.1-0.51,0.32l-2.24,3.25l-1-3.26C45.91,24.11,45.77,24,45.49,24L45.49,24z"/>
<path class="st1" d="M57.01,20.87c1.42,0,2.72,0.77,2.55,2.68c-0.22,2.28-1.44,3.54-3.36,3.54h-1.68c-0.24,0-0.36,0.2-0.42,0.6
l-0.33,2.07c-0.05,0.31-0.21,0.47-0.45,0.47h-1.56c-0.25,0-0.34-0.16-0.28-0.52l1.29-8.29c0.06-0.41,0.22-0.56,0.5-0.56
L57.01,20.87L57.01,20.87z M54.46,25.31h1.27c0.8-0.03,1.33-0.58,1.38-1.58c0.03-0.61-0.38-1.05-1.04-1.05l-1.2,0.01L54.46,25.31
L54.46,25.31z M63.81,29.6c0.14-0.13,0.29-0.2,0.27-0.04l-0.05,0.38c-0.03,0.2,0.05,0.31,0.24,0.31h1.39
c0.23,0,0.35-0.09,0.41-0.46l0.86-5.38c0.04-0.27-0.02-0.4-0.23-0.4h-1.53c-0.14,0-0.2,0.08-0.24,0.29l-0.06,0.33
c-0.03,0.17-0.11,0.2-0.18,0.03c-0.26-0.61-0.92-0.89-1.84-0.87c-2.14,0.04-3.59,1.67-3.74,3.76c-0.12,1.61,1.04,2.88,2.56,2.88
C62.76,30.44,63.26,30.11,63.81,29.6L63.81,29.6L63.81,29.6z M62.64,28.77c-0.92,0-1.57-0.74-1.43-1.64s1-1.64,1.92-1.64
c0.92,0,1.57,0.74,1.43,1.64S63.57,28.77,62.64,28.77L62.64,28.77z M69.05,30.26h-1.6c-0.1,0-0.19-0.08-0.2-0.18
c0-0.01,0-0.02,0-0.04l1.41-8.93c0.03-0.13,0.14-0.22,0.27-0.22h1.6c0.1,0,0.19,0.08,0.2,0.18c0,0.01,0,0.02,0,0.04l-1.41,8.93
C69.29,30.17,69.18,30.26,69.05,30.26L69.05,30.26z"/>
<path class="st2" d="M12,17.55h4.2c1.18,0,2.59,0.04,3.53,0.87c0.63,0.55,0.96,1.44,0.88,2.39c-0.26,3.21-2.18,5.01-4.75,5.01
h-2.07c-0.35,0-0.59,0.23-0.69,0.87l-0.58,3.69c-0.04,0.24-0.14,0.38-0.33,0.4H9.61c-0.29,0-0.39-0.22-0.31-0.7l1.86-11.82
C11.23,17.78,11.49,17.55,12,17.55z"/>
<path class="st3" d="M13.17,26.31l0.73-4.65c0.06-0.41,0.29-0.6,0.73-0.6h4.2c0.69,0,1.26,0.11,1.7,0.31
c-0.42,2.86-2.27,4.45-4.69,4.45h-2.07C13.49,25.81,13.29,25.95,13.17,26.31z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FBE200;}
.st1{fill:#004A99;}
</style>
<g>
<g>
<path class="st0" d="M80,47.33c0,1.47-1.19,2.67-2.67,2.67H2.67C1.19,50,0,48.81,0,47.33V2.67C0,1.19,1.19,0,2.67,0h74.67
C78.81,0,80,1.19,80,2.67V47.33z"/>
</g>
<g>
<path class="st1" d="M14.1,20.45c-0.38,0-0.8,0.06-1.15,0.21c-0.09,0.03-0.21,0.06-0.3,0.12c-0.44,0.21-0.89,0.56-1.33,1
l0.12-1.21h-1.42C10,20.92,9.97,21.25,9.94,21.6c-0.06,0.35-0.12,0.68-0.18,1.03l-2.04,8.95h1.57l0.95-4.11
c0.3,0.41,0.65,0.74,1.03,0.95c0.41,0.21,0.86,0.33,1.42,0.33c0.09,0,0.18,0,0.27,0c0.59-0.06,1.12-0.21,1.6-0.5
c0.59-0.33,1.06-0.8,1.42-1.42c0.32-0.5,0.56-1.09,0.71-1.77c0.18-0.68,0.24-1.33,0.18-1.92c-0.09-0.83-0.35-1.51-0.86-1.98
C15.52,20.69,14.87,20.45,14.1,20.45z M15.14,24.73c-0.15,0.56-0.35,1.06-0.62,1.54c-0.27,0.47-0.59,0.83-0.97,1.06
c-0.18,0.09-0.38,0.18-0.59,0.24c-0.21,0.06-0.44,0.09-0.68,0.09c-0.47,0-0.86-0.15-1.15-0.41c-0.3-0.3-0.47-0.65-0.5-1.12
c-0.03-0.41,0-0.92,0.15-1.57c0.15-0.62,0.35-1.18,0.62-1.65c0.24-0.47,0.56-0.86,0.95-1.12c0.21-0.12,0.41-0.24,0.62-0.3
c0.18-0.06,0.38-0.09,0.59-0.09c0.47,0,0.89,0.15,1.21,0.47c0.3,0.33,0.47,0.74,0.53,1.27C15.32,23.64,15.29,24.17,15.14,24.73z"
/>
<path class="st1" d="M53.78,21.04c-0.44-0.44-1.06-0.68-1.83-0.68c-0.5,0-0.97,0.09-1.39,0.3c-0.06,0.03-0.12,0.06-0.21,0.09
c-0.35,0.21-0.68,0.47-1.03,0.8l0.06-0.97h-2.22c-0.06,0.53-0.21,1.36-0.44,2.45l-1.89,8.57h2.45l0.95-4.22
c0.24,0.44,0.56,0.8,0.97,1c0.32,0.18,0.71,0.3,1.15,0.33c0.09,0,0.21,0.03,0.3,0.03c1.24,0,2.25-0.56,2.98-1.68
c0.77-1.09,1.06-2.45,0.92-4.05C54.49,22.13,54.23,21.48,53.78,21.04z M52.04,24.53c-0.12,0.53-0.3,1.03-0.5,1.48
c-0.21,0.41-0.41,0.71-0.68,0.92c-0.15,0.12-0.32,0.21-0.5,0.24c-0.12,0.03-0.24,0.06-0.35,0.06c-0.41,0-0.74-0.15-0.97-0.41
c-0.27-0.27-0.38-0.65-0.44-1.15c-0.09-0.97,0.09-1.86,0.56-2.66c0.32-0.56,0.74-0.95,1.21-1.09c0.18-0.03,0.32-0.06,0.5-0.06
c0.38,0,0.68,0.12,0.92,0.35c0.21,0.21,0.35,0.53,0.38,0.97C52.19,23.55,52.16,24,52.04,24.53z"/>
<path class="st1" d="M61.91,20.95c-0.56-0.35-1.33-0.5-2.36-0.5c-0.33,0-0.65,0-0.95,0.06c-0.62,0.09-1.12,0.27-1.57,0.53
c-0.59,0.41-0.95,0.97-1,1.71h2.33c0.06-0.24,0.12-0.44,0.24-0.59c0.03-0.09,0.09-0.12,0.15-0.18c0.18-0.15,0.44-0.24,0.8-0.24
c0.3,0,0.53,0.06,0.68,0.18c0.18,0.12,0.27,0.3,0.3,0.53c0,0.12,0,0.24-0.03,0.38c0,0.18-0.06,0.38-0.12,0.68
c-0.09,0-0.18,0-0.27,0s-0.24,0-0.41,0c-0.38,0-0.77,0-1.09,0.03c-1.15,0.09-2.04,0.35-2.69,0.77c-0.83,0.53-1.21,1.3-1.12,2.3
c0.06,0.65,0.3,1.15,0.74,1.54c0.44,0.38,1,0.59,1.71,0.59c0.5,0,0.92-0.12,1.3-0.33l0.06-0.03c0.35-0.18,0.71-0.5,1-0.92
c0,0.21-0.03,0.38-0.03,0.59c0,0.21,0,0.38,0,0.56h2.25c0-0.35,0-0.68,0.03-1.03c0.06-0.35,0.09-0.68,0.18-1l0.62-2.72
c0.06-0.27,0.12-0.53,0.15-0.74c0.03-0.24,0.03-0.44,0-0.65C62.73,21.81,62.44,21.31,61.91,20.95z M59.31,26.6
c-0.24,0.27-0.47,0.44-0.71,0.56c-0.18,0.09-0.38,0.12-0.59,0.12c-0.27,0-0.47-0.06-0.62-0.21c-0.18-0.15-0.27-0.35-0.27-0.62
c-0.06-0.47,0.15-0.89,0.65-1.21c0.24-0.18,0.5-0.3,0.83-0.38c0.3-0.09,0.65-0.12,1.03-0.12c0.12,0,0.18,0,0.27,0
c0.06,0,0.12,0,0.18,0.03C59.96,25.5,59.69,26.12,59.31,26.6z"/>
<polygon class="st1" points="69.97,20.51 66.84,26.06 66.16,20.51 63.74,20.51 65.16,28.6 63.21,31.56 65.81,31.56 67.25,28.93
72.28,20.51 "/>
<path class="st1" d="M23.91,21.04c-0.56-0.44-1.3-0.68-2.25-0.68c-0.27,0-0.53,0-0.77,0.03c-0.47,0.06-0.95,0.18-1.33,0.33
c-0.59,0.27-1.06,0.62-1.45,1.12c-0.41,0.56-0.71,1.21-0.92,1.98c-0.24,0.77-0.3,1.48-0.24,2.19c0.06,0.86,0.38,1.54,0.97,2.01
c0.56,0.5,1.33,0.74,2.27,0.74c0.24,0,0.47-0.03,0.68-0.03c0.59-0.06,1.09-0.18,1.51-0.38c0.59-0.27,1.06-0.71,1.48-1.33
c0.35-0.53,0.62-1.18,0.8-1.92c0.21-0.74,0.27-1.45,0.21-2.1C24.8,22.16,24.5,21.51,23.91,21.04z M23.12,24.76
c-0.15,0.62-0.35,1.18-0.65,1.68c-0.27,0.44-0.56,0.77-0.92,0.97c-0.18,0.12-0.41,0.21-0.65,0.27c-0.18,0.03-0.35,0.06-0.56,0.06
c-0.53,0-0.95-0.15-1.27-0.44c-0.3-0.3-0.5-0.68-0.53-1.21c-0.03-0.47,0-1.03,0.15-1.68s0.35-1.18,0.62-1.62
c0.27-0.47,0.59-0.83,0.95-1.09c0.21-0.12,0.44-0.21,0.65-0.27s0.38-0.09,0.59-0.09c0.56,0,0.98,0.15,1.27,0.44
c0.3,0.27,0.47,0.71,0.53,1.33C23.32,23.58,23.26,24.11,23.12,24.76z"/>
<path class="st1" d="M31.06,20.78c-0.44-0.27-1.12-0.41-2.04-0.41c-1,0-1.8,0.24-2.39,0.68c-0.56,0.47-0.83,1.03-0.77,1.74
c0.03,0.41,0.21,0.8,0.56,1.09c0.32,0.33,0.92,0.68,1.74,1.06c0.65,0.3,1.06,0.53,1.27,0.71c0.21,0.18,0.32,0.38,0.32,0.62
c0.03,0.38-0.12,0.71-0.47,0.97c-0.35,0.24-0.83,0.35-1.45,0.35c-0.47,0-0.8-0.06-1.03-0.24c-0.24-0.15-0.35-0.38-0.38-0.71
c-0.03-0.09-0.03-0.18,0-0.3c0-0.12,0.03-0.24,0.09-0.38h-1.6c-0.03,0.18-0.06,0.35-0.09,0.5c-0.03,0.18-0.03,0.32,0,0.44
c0.06,0.59,0.32,1.03,0.83,1.36c0.53,0.3,1.21,0.47,2.1,0.47c1.12,0,2.04-0.27,2.72-0.77c0.71-0.5,1-1.15,0.95-1.89
c-0.03-0.44-0.21-0.83-0.47-1.12c-0.27-0.3-0.92-0.68-1.86-1.12c-0.68-0.32-1.12-0.56-1.3-0.74c-0.21-0.15-0.3-0.35-0.32-0.56
c-0.03-0.35,0.09-0.65,0.38-0.86c0.27-0.21,0.65-0.33,1.15-0.33c0.44,0,0.77,0.09,0.97,0.24c0.24,0.15,0.35,0.38,0.38,0.68
c0,0.06,0,0.15,0,0.21s0,0.15,0,0.24h1.45c0.03-0.21,0.03-0.35,0.03-0.44c0-0.12,0-0.21,0-0.3
C31.77,21.43,31.54,21.04,31.06,20.78z"/>
<path class="st1" d="M35.55,27.6c-0.35,0-0.62-0.06-0.77-0.18c-0.15-0.09-0.24-0.24-0.24-0.47c-0.03-0.09,0-0.21,0.03-0.38
c0-0.15,0.06-0.38,0.15-0.71l0.89-4.2h1.74l0.24-1.03h-1.74l0.47-2.22l-1.57,0.38l-0.41,1.83h-1.45l-0.27,1.03h1.48l-0.92,4.02
c-0.06,0.38-0.15,0.74-0.18,1.09c-0.03,0.33-0.06,0.59-0.03,0.74c0.03,0.44,0.18,0.77,0.47,0.95c0.27,0.21,0.71,0.3,1.3,0.3
c0.21,0,0.44-0.03,0.68-0.03c0.24-0.03,0.5-0.06,0.8-0.09l0.27-1.18c-0.15,0.03-0.32,0.09-0.47,0.09
C35.85,27.57,35.67,27.6,35.55,27.6z"/>
<path class="st1" d="M39.01,24.76h2.33h3.43c0.09-0.35,0.15-0.71,0.15-1.03c0.03-0.32,0.03-0.65,0-0.95
c-0.06-0.86-0.38-1.48-0.89-1.86c-0.53-0.38-1.33-0.59-2.36-0.59c-0.12,0-0.21,0-0.32,0c-0.62,0.06-1.15,0.18-1.62,0.44
c-0.56,0.27-1.03,0.71-1.39,1.24c-0.32,0.56-0.62,1.24-0.8,2.01c-0.21,0.8-0.27,1.51-0.21,2.13c0.06,0.83,0.38,1.48,0.92,1.92
c0.56,0.44,1.3,0.68,2.25,0.68c0.3,0,0.59-0.03,0.86-0.06c0.65-0.09,1.21-0.3,1.68-0.62c0.68-0.44,1.12-1.06,1.33-1.86h-1.74
c-0.15,0.44-0.41,0.8-0.77,1.03c-0.15,0.09-0.32,0.18-0.5,0.24c-0.21,0.09-0.44,0.12-0.68,0.12c-0.56,0-0.97-0.15-1.3-0.41
c-0.3-0.27-0.47-0.65-0.53-1.15c0-0.18,0-0.38,0.03-0.59C38.89,25.21,38.92,25,39.01,24.76z M40.13,21.9
c0.33-0.35,0.74-0.53,1.21-0.59c0.09,0,0.21-0.03,0.3-0.03c0.53,0,0.95,0.15,1.27,0.38c0.3,0.24,0.47,0.56,0.5,1
c0.03,0.12,0.03,0.24,0,0.38c0,0.15-0.03,0.35-0.06,0.62h-2.01h-2.07C39.42,22.87,39.72,22.28,40.13,21.9z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 80 50" style="enable-background:new 0 0 80 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:#FFFFFF;}
</style>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0" y1="25" x2="80" y2="25">
<stop offset="0" style="stop-color:#222357"/>
<stop offset="1" style="stop-color:#254AA5"/>
</linearGradient>
<path class="st0" d="M76.56,50H3.44C1.55,50,0,48.45,0,46.56V3.44C0,1.55,1.55,0,3.44,0h73.12C78.45,0,80,1.55,80,3.44v43.12
C80,48.45,78.45,50,76.56,50z"/>
<g>
<path class="st1" d="M41.01,21.58c-0.03,2.65,2.36,4.12,4.16,5c1.85,0.9,2.47,1.48,2.47,2.28c-0.01,1.23-1.48,1.78-2.85,1.8
c-2.39,0.04-3.78-0.64-4.88-1.16l-0.86,4.02c1.11,0.51,3.16,0.96,5.28,0.97c4.99,0,8.26-2.46,8.27-6.28
c0.02-4.85-6.71-5.12-6.66-7.28c0.02-0.66,0.64-1.36,2.02-1.54c0.68-0.09,2.56-0.16,4.69,0.82l0.84-3.89
c-1.14-0.42-2.62-0.82-4.45-0.82C44.34,15.5,41.04,18,41.01,21.58 M61.51,15.84c-0.91,0-1.68,0.53-2.02,1.35l-7.13,17.02h4.99
l0.99-2.74h6.09l0.58,2.74h4.4l-3.84-18.37H61.51 M62.21,20.8l1.44,6.9h-3.94L62.21,20.8 M34.96,15.84l-3.93,18.37h4.75
l3.93-18.37H34.96 M27.93,15.84l-4.95,12.5l-2-10.63c-0.23-1.19-1.16-1.87-2.19-1.87h-8.09l-0.11,0.53
c1.66,0.36,3.55,0.94,4.69,1.56c0.7,0.38,0.9,0.71,1.13,1.61l3.79,14.66h5.02l7.7-18.37H27.93"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,180 @@
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* hebrew */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format('woff2');
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* math */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2) format('woff2');
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2) format('woff2');
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2) format('woff2');
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2) format('woff2');
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2) format('woff2');
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* hebrew */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2) format('woff2');
unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* math */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2) format('woff2');
unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0310, U+0312, U+0315, U+031A, U+0326-0327, U+032C, U+032F-0330, U+0332-0333, U+0338, U+033A, U+0346, U+034D, U+0391-03A1, U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, U+2016-2017, U+2034-2038, U+203C, U+2040, U+2043, U+2047, U+2050, U+2057, U+205F, U+2070-2071, U+2074-208E, U+2090-209C, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2100-2112, U+2114-2115, U+2117-2121, U+2123-214F, U+2190, U+2192, U+2194-21AE, U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B7, U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, U+2B30-2B4C, U+2BFE, U+3030, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF;
}
/* symbols */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2) format('woff2');
unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2) format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-stretch: 100%;
src: url(https://fonts.gstatic.com/s/opensans/v44/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@@ -0,0 +1,6 @@
/**
*
* detectIncognito v1.0.0 - (c) 2022 Joe Rutkowski <Joe@dreggle.com> (https://github.com/Joe12387/detectIncognito)
*
**/
var detectIncognito=function(){return new Promise(function(o,n){var e,t="Unknown";function i(e){o({isPrivate:e,browserName:t})}function r(e){return e===eval.toString().length}function a(){var e,o=window;void 0!==navigator.maxTouchPoints?void 0!==o.safari&&void 0===o.DeviceMotionEvent?(t="Safari for macOS",function(){try{window.safari.pushNotification.requestPermission("https://example.com","private",{},function(){})}catch(e){return i(!new RegExp("gesture").test(e))}i(!1)}()):void 0!==o.DeviceMotionEvent?(e=!(t="Safari for iOS"),(o=document.createElement("iframe")).style.display="none",document.body.appendChild(o),o.contentWindow.applicationCache.addEventListener("error",function(){return i(e=!0)}),setTimeout(function(){e||i(!1)},100)):n(new Error("detectIncognito Could not identify this version of Safari")):(t="Safari",function(){var e=window.openDatabase,o=window.localStorage;try{e(null,null,null,null)}catch(e){return i(!0)}try{o.setItem("test","1"),o.removeItem("test")}catch(e){return i(!0)}i(!1)}())}function c(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,o){i(o<(void 0!==(o=window).performance&&void 0!==o.performance.memory&&void 0!==o.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824))},function(e){n(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function d(){void 0!==Promise&&void 0!==Promise.allSettled?c():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}void 0!==(e=navigator.vendor)&&0===e.indexOf("Apple")&&r(37)?a():void 0!==(e=navigator.vendor)&&0===e.indexOf("Google")&&r(33)?(e=navigator.userAgent,t=e.match(/Chrome/)?void 0!==navigator.brave?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium",d()):void 0!==document.documentElement&&void 0!==document.documentElement.style.MozAppearance&&r(37)?(t="Firefox",i(void 0===navigator.serviceWorker)):void 0!==navigator.msSaveBlob&&r(39)?(t="Internet Explorer",i(void 0===window.indexedDB)):n(new Error("detectIncognito cannot determine the browser"))})};
@@ -0,0 +1 @@
/* PLEASE DO NOT COPY AND PASTE THIS CODE. */(function(){var w=window,C='___grecaptcha_cfg',cfg=w[C]=w[C]||{},N='grecaptcha';var E='enterprise',a=w[N]=w[N]||{},gr=a[E]=a[E]||{};gr.ready=gr.ready||function(f){(cfg['fns']=cfg['fns']||[]).push(f);};w['__recaptcha_api']='https://www.google.com/recaptcha/enterprise/';(cfg['enterprise']=cfg['enterprise']||[]).push(true);(cfg['enterprise2fa']=cfg['enterprise2fa']||[]).push(true);(cfg['render']=cfg['render']||[]).push('6LcjhUMpAAAAADxcuxrNs1Ou0iKbz2h3dn58Egnw');(cfg['clr']=cfg['clr']||[]).push('true');(cfg['anchor-ms']=cfg['anchor-ms']||[]).push(20000);(cfg['execute-ms']=cfg['execute-ms']||[]).push(15000);w['__google_recaptcha_client']=true;var d=document,po=d.createElement('script');po.type='text/javascript';po.async=true; po.charset='utf-8';var v=w.navigator,m=d.createElement('meta');m.httpEquiv='origin-trial';m.content='A7vZI3v+Gz7JfuRolKNM4Aff6zaGuT7X0mf3wtoZTnKv6497cVMnhy03KDqX7kBz/q/iidW7srW31oQbBt4VhgoAAACUeyJvcmlnaW4iOiJodHRwczovL3d3dy5nb29nbGUuY29tOjQ0MyIsImZlYXR1cmUiOiJEaXNhYmxlVGhpcmRQYXJ0eVN0b3JhZ2VQYXJ0aXRpb25pbmczIiwiZXhwaXJ5IjoxNzU3OTgwODAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ==';if(v&&v.cookieDeprecationLabel){v.cookieDeprecationLabel.getValue().then(function(l){if(l!=='treatment_1.1'&&l!=='treatment_1.2'&&l!=='control_1.1'){d.head.prepend(m);}});}else{d.head.prepend(m);}po.src='https://www.gstatic.com/recaptcha/releases/TkacYOdEJbdB_JjX802TMer9/recaptcha__it.js';po.crossOrigin='anonymous';po.integrity='sha384-jBr1c0i/lBALGFjGRa0UkLw5oDOPevN9KOlmNFGKHe5+D+3OpoTeZdS00+BHr2oZ';var e=d.querySelector('script[nonce]'),n=e&&(e['nonce']||e.getAttribute('nonce'));if(n){po.setAttribute('nonce',n);}var s=d.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 37 KiB

@@ -0,0 +1,124 @@
function setFavoriteHandler(){
"use strict"
var lockRequest = false;
$(".favorite").on({
click: function(e) {
var element = $(this);
e.preventDefault(e);
e.stopImmediatePropagation();
if(element.attr('disabled')) {
if(isMobileDevice()) {
element.tooltip('show');
setTimeout(function(){
element.tooltip('hide');
}, 3000);
}
return;
}
if (lockRequest) {
return;
}
lockRequest = true;
$.ajax({
url: 'favorite.php',
data: {
id: element.attr("data-id")
},
type: "GET"
}).success(function(data) {
lockRequest = false;
if (data.result) window.parent.updateFavoriteCounter(element);
}).fail(function(){
lockRequest = false;
});
}
});
}
function animateAddToFavorite(favoriteSelector){
"use strict"
//if(!$(".select-bids").length) return; // REM FOR TAG
if(!$("#CategoryMenu").length) return; // ADD FOR TAG
// var targetSelector = ".select-bids .bi-favorite"; // REM FOR TAG
var targetSelector = "#CategoryMenu .bi-favorite"; // ADD FOR TAG
var body = $("body");
var preferredPositionTab = $(targetSelector).offset();
var categoryMenuPosition = $("#CategoryMenu").offset(); // ADD FOR TAG
if (preferredPositionTab.left < categoryMenuPosition.left) { // ADD FOR TAG
preferredPositionTab.left = categoryMenuPosition.left -16;
}
var cloneFavorite = favoriteSelector
.clone()
.addClass("bi-clone")
.addClass("fixed-zindex-high");
cloneFavorite = body.append(cloneFavorite)
.find(".bi-clone");
var favoritePosition = favoriteSelector.offset();
cloneFavorite.css({
"position": "absolute",
"left": favoritePosition.left,
"top": favoritePosition.top
});
cloneFavorite
.animate({
left: preferredPositionTab.left+"px",
top: preferredPositionTab.top+"px"
},600,function(){
cloneFavorite.remove();
});
}
$(function() {
"use strict"
window.updateFavoriteCounter = function(element) {
"use strict"
var id = element.data('id');
var preferredCount = $('.preferredCount');
var count = parseInt(preferredCount.eq(0).text());
if(element.length > 1) return;
element.toggleClass("active");
var hasElementActive = element.hasClass("active");
if (hasElementActive) {
count += 1;
animateAddToFavorite(element);
} else {
count = count < 0 ? 0 : --count;
}
var preferredCount = $('.preferredCount').text(count);
preferredCount.parent().toggleClass("active", count > 0);
setFavoriteTabTooltipVisibility(0 == count);
var asta = $("#divAsta" + id);
var data_favorite = parseInt(asta.attr('data-favorited'));
var des_text = (hasElementActive ? "Rimuovi quest\'asta dalle tue preferite" : "Metti quest\'asta tra le tue preferite"); // data_favorite -> hasElementActive
asta.attr('data-favorited', !data_favorite | 0)
if($("#modal").is(":visible")){
asta
.find(".favorite")
.toggleClass("active");
}
var id_product = getUrlParam("a").split("_").reverse()[0];
if (id_product > 0) {
element.attr('title', des_text);
} else {
element.attr('data-original-title', des_text);
}
//$('.auction-[data-favorited=0]').toggleClass('hide', !hasElementActive && bidSelected == 2); // REMOVED for bidSelect not defined
}
//this is the js that is working for favorites bids
setFavoriteHandler();
});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,62 @@
.footer a[data-toggle="collapse"]:active{
background-color: transparent;
}
.ic-footer{
background-image: url(../images/footer_social_icons.svg);
background-position-x: 0;
background-size: cover;
width: 50px;
height: 50px;
display: inline-block;
}
.ic-footer.ic-footer-facebook{
background-position-y: 0;
}
.ic-footer.ic-footer-facebook:hover{
background-position-y: -52px;
}
.ic-footer.ic-footer-youtube{
background-position-y: -106px;
}
.ic-footer.ic-footer-youtube:hover{
background-position-y: -158px;
}
.ic-footer.ic-footer-twitter{
background-position-y: -212px;
}
.ic-footer.ic-footer-twitter:hover{
background-position-y: -264px;
}
.ic-footer.ic-footer-instagram{
background-position-y: -318px;
}
.ic-footer.ic-footer-instagram:hover{
background-position-y: -372px;
}
.box-credit-card{
display: flex;
justify-content: center;
}
.box-credit-card div img{
margin: 0px 3px;
width: 60px;
}
@media (max-width: 576px) {
.box-credit-card div img{
margin: 0px 3px;
width: 47px;
}
}
.creditBidoo{
text-align: center;
}
@media (max-width: 576px) {
.creditBidoo{
font-size: 13px;
}
}
@@ -0,0 +1,6 @@
$(document).ready(function(){
$('.footer #accordion .panel-collapse').on('show.bs.collapse', function (e) {
$(".footer #accordion .panel-collapse").parent().find(".glyphicon").removeClass("glyphicon-minus").addClass("glyphicon-plus");
$(this).parent().find(".glyphicon").removeClass('glyphicon-plus').addClass("glyphicon-minus");
});
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

@@ -0,0 +1,643 @@
* {
outline: none;
}
.form-table {
display: table !important;
}
.form-table > div.form-table-cell {
display: table-cell !important;
vertical-align: middle;
width: 100%;
padding: 0 7px;
}
.form-table > div.form-table-cell > * {
width: 100%;
}
/* BIDOO BUTTONS */
.button-default {
border-radius: 5px;
border: 1px solid transparent;
display: inline-block;
padding: 12.5px 5px;
font-weight: bold;
text-align: center;
text-decoration: none;
cursor: pointer;
transition: background 0.1s ease-in;
font-size: 16px;
}
.button-small {
padding: 5px 10px;
font-size: 14px;
}
.button-form {
line-height: 1;
padding: 8px 16px;
font-size: 14px;
}
.button-squaround {
border-radius: 3px !important;
}
.button-rounded {
border-radius: 200px !important;
}
.button-default:hover,
.button-default:focus,
.button-default:active,
.button-default:visited {
text-decoration: none;
}
.button-full {
display: block;
width: 100%;
}
.button-full.button-big-text{
font-size: 24px;
padding: 8px 5px;
}
.button-blue-gradient,
.button-blue-gradient:hover,
.button-blue-gradient:focus {
background: #2b98f0;
background: -moz-linear-gradient(left, #2b98f0 0%, #21c2f9 100%);
background: -webkit-linear-gradient(left, #2b98f0 0%,#21c2f9 100%);
background: linear-gradient(to right, #2b98f0 0%,#21c2f9 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b98f0', endColorstr='#21c2f9',GradientType=1 );
color: #fff;
}
.button-green-gradient,
.button-green-gradient:hover,
.button-green-gradient:focus{
background: #82eba6;
background: -moz-linear-gradient(left, #68ca9c 0%, #82eba6 100%);
background: -webkit-linear-gradient(left, #68ca9c 0%,#82eba6 100%);
background: linear-gradient(to right, #68ca9c 0% #82eba6 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#68ca9c', endColorstr='#82eba6',GradientType=1 );
color: white;
}
.button-gray-gradient,
.button-gray-gradient:hover,
.button-gray-gradient:focus{
background: #a8b6bf;
background: -moz-linear-gradient(left, #a8b6bf 0%, #d5d6d9 100%);
background: -webkit-linear-gradient(left, #a8b6bf 0%,#d5d6d9 100%);
background: linear-gradient(to right, #a8b6bf 0%,#d5d6d9 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a8b6bf', endColorstr='#d5d6d9',GradientType=1 );
color: white;
}
.button-azure-gradient,
.button-azure-gradient:hover,
.button-azure-gradient:focus{
background: #61c9fa;
background: -moz-linear-gradient(left, #61c9fa 0%, #73edfc 100%);
background: -webkit-linear-gradient(left, #61c9fa 0%,#73edfc 100%);
background: linear-gradient(to right, #61c9fa 0%,#73edfc 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#61c9fa', endColorstr='#73edfc',GradientType=1 );
color: white;
}
.button-orange-gradient,
.button-orange-gradient:hover,
.button-orange-gradient:focus{
background: #eb954a;
background: -moz-linear-gradient(left, #eb954a 0%, #f7ce55 100%);
background: -webkit-linear-gradient(left, #eb954a 0%,#f7ce55 100%);
background: linear-gradient(to right, #eb954a 0%,#f7ce55 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eb954a', endColorstr='#f7ce55',GradientType=1 );
color: #000 !important;
}
.button-shipping-gradient,
.button-shipping-gradient:hover,
.button-shipping-gradient:focus{
background: #0077dd;
background: -moz-linear-gradient(top, #02a0dd 0%, #0077dd 100%);
background: -webkit-linear-gradient(top, #02a0dd 0%, #0077dd 100%);
background: linear-gradient(to bottom, #02a0dd 0%, #0077dd 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=#02a0dd, endColorstr=#0077dd ,GradientType=0 );
border-color: #0370cc;
border-radius: 3px;
color: white;
}
.button-edit,
.button-edit:hover,
.button-edit:focus{
background: #d8d8d8;
background: -moz-linear-gradient(top, white 0%, #d8d8d8 100%);
background: -webkit-linear-gradient(top, white 0%, #d8d8d8 100%);
background: linear-gradient(to bottom, white 0%, #d8d8d8 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=white, endColorstr=#d8d8d8 ,GradientType=0 );
border: 1px solid #d8d8d8;
border-radius: 3px;
color: #414141;
}
.button-azure-flat {
background: #00ccff;
color: #fff;
}
.button-gray-flat {
background: #d2d2d2;
color: #fff;
}
.button-fucsia-flat {
background: #f73975;
color: #fff;
}
.button-mint-flat {
background: #3dcb9a;
color: #fff;
}
.button-mint-flat:hover {
background: #2E9873;
}
.button-sky-flat {
background: #23ccfc;
color: #fff;
}
.button-blue-flat {
background: #2196f3;
color: #fff;
}
.button-gold-flat {
background: #eb954a;
background: -moz-linear-gradient(left, #eb954a 0%, #f7ce55 100%);
background: -webkit-linear-gradient(left, #eb954a 0%,#f7ce55 100%);
background: linear-gradient(to right, #eb954a 0%,#f7ce55 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eb954a', endColorstr='#f7ce55',GradientType=1 );
color: #000 !important;
border: none;
}
@media (max-width: 576px) {
.button-gold-flat {
background: #eb8e41;
background: -moz-linear-gradient(top, #f7ce55 0%, #eb954a 100%);
background: -webkit-linear-gradient(top, #f7ce55 0%,#eb954a 100%);
background: linear-gradient(to bottom, #f7ce55 0%,#eb954a 100%);
}
}
.fg-blue {
color: #3399ff;
}
.fg-gold {
color: #fdc435;
}
.fg-mint {
color: #3dcb9a;
}
.fg-red {
color: #c00;
}
.button-empty-flat:active,
.button-empty-flat:hover,
.button-empty-flat:visited,
.button-azure-flat:active,
.button-azure-flat:hover,
.button-azure-flat:visited,
.button-blue-gradient:active,
.button-blue-gradient:hover,
.button-blue-gradient:visited,
.button-gray-flat:active,
.button-gray-flat:hover,
.button-gray-flat:visited,
.button-fucsia-flat:active,
.button-fucsia-flat:hover,
.button-fucsia-flat:visited,
.button-mint-flat:active,
.button-mint-flat:hover,
.button-mint-flat:visited,
.button-sky-flat:active,
.button-sky-flat:hover,
.button-sky-flat:visited,
.button-blue-flat:active,
.button-blue-flat:hover,
.button-blue-flat:visited,
.button-gold-flat:active,
.button-gold-flat:hover,
.button-gold-flat:visited {
color: #fff;
}
/* HEADERS */
.head-title {
font-weight: bold;
}
.head-title.head-title-blue {
color: #39f;
}
.head-title.head-title-white {
color: #fff;
}
/* ICON */
.bi {
display:inline-block;
font-size:inherit;
width: 16px;
height: 16px;
background-size: cover;
background-position: 50% 50%;
vertical-align: middle;
}
.bi.bi-large {
width: 28px;
height: 28px;
}
.bi.bi-nav{
background-position: 0 0;
}
.bi.bi-block{
display: block;
}
.bi.bi-all-bids{
background-image: url(../images/mobile_nav_all_bids.svg);
}
.bi.bi-all-bids.active{
background-position-y: -19px;
}
.bi.bi-bids{
background-image: url(../images/mobile_nav_bids.svg);
}
.bi.bi-bids.active{
background-position-y: -19px;
}
.bi.bi-info {
background-image: url(../images/icon_info1.png);
}
.bi.bi-favorite {
background-image: url(../images/ic_star_sprite.svg);
background-position: 0 0;
}
.bi.bi-favorite.active {
background-position-y: -21px;
}
.bi.bi-credit-card{
background-image: url(../images/icon-credit-card.svg);
background-repeat: no-repeat;
background-size: contain;
width: 18px;
height: 18px;
}
.bi.bi-credit-cards{
background-image: url(../images/icon-credit-cards.png);
width: 220px;
height: 34px;
}
.bi.bi-loader{
background-image: url(../images/wait_modal_sprite.svg);
background-position-y: 0;
}
.bi.bi-loader-dark{
background-position-y: -35px;
}
.bi.bi-hidden{
visibility: hidden;
}
.bi.bi-special-bids {
background-image: url(../images/icon_special.png);
}
.bi.bi-opening-times {
background-image: url(../images/icon_open.svg);
}
.bi.bi-shipping-truck {
background-image: url(../images/icona_spedizioni_gratis.svg);
}
.bi.bi-noauto {
background-image: url(../images/icon_manualbid.png);
}
.bi.bi-timer {
background-image: url(../images/icon_timer.png);
}
.bi.bi-timer-white {
background-image: url(../images/icon_timer_white.png);
}
.bi.bi-timer-grey {
background-image: url(../images/ic-timer-grey.svg);
}
.bi.bi-timer-white {
background-image: url(../images/ic-timer-white.svg);
}
.bi.bi-truck {
width: 20px;
background-image: url(../images/ic-truck.svg);
}
.bi.bi-hotbid {
background-image: url(../images/icon_turbo.png);
}
@media (max-width: 576px) {
.auction-info .bi.bi-hotbid{
margin-top: 3px;
}
}
.bi.bi-crown {
background-image: url(../images/icon_crown.png);
}
.bi.bi-autobid {
background-image: url(../images/icon_autobid_sprite.svg);
background-position: 0 0;
width: 27px;
height: 20px;
}
.bi.bi-autobid.bi-dark{
background-position: 0 -16px;
}
.bi.bi-autobid.bi-green{
background-position: 0 -41px;
}
.bi.bi-coin {
background-image: url(../images/bids2.svg);
}
.bi.bi-benefit {
background-image: url(../images/icon_benefit.png);
}
.bi.bi-customer-care{
background-image: url(../images/icon-customer-care.png);
}
.bi.bi-customer-care-mobile{
background-image: url(../images/icon-customer-care-mobile.svg);
width: 18px;
height: 18px;
}
.bi.bi-left-side-item{
width: 20px;
height: 20px;
}
.bi.bi-cup{
background-image: url(../images/cup.svg);
}
.bi.bi-media{
background-image: url(../images/media.svg);
}
.bi.bi-question-mark{
background-image: url(../images/question_mark.svg);
}
.bi.bi-li-bids{
background-image: url(../images/all_bids.svg);
}
.bi.bi-left-arrow-optin{
background-image: url(../images/left-optin-arrow.svg);
}
.bi.bi-single-money{
background-image: url(../images/ic-single-money.svg);
}
.bi.bi-facebook{
background-image: url(../images/facebook_icon.svg)
}
.bi.bi-padlock{
background-image: url(../images/icon_padlock.svg);
}
.bi.bi-products{
background-image: url(../images/ic-product-auctions-mobile.svg);
}
.bi.bi-products.active{
background-position-y: 90px;
}
.bi.bi-amazon{
background-image: url(../images/amazon-voucher.svg);
background-position-y: 10px;
}
.bi.bi-amazon.active{
background-position-y: 78px;
}
.bi.bi-topup{
background-image: url(../images/phone-voucher.svg);
background-position-y: 10px;
}
.bi.bi-topup.active{
background-position-y: 78px;
}
.bi.bi-gas{
background-image: url(../images/gas-voucher.svg);
background-position-y: 10px;
}
.bi.bi-gas.active{
background-position-y: 78px;
}
/* BADGE COLOURS */
.badge.badge-primary {
background-color: #2b98f0;
}
/* Lists */
.green-tick-list {
margin: 0;
list-style: none;
padding: 0;
}
.green-tick-list li {
background: url(../images/icon_check_18.png) no-repeat left top;
padding: 0 18px 0 32px;
list-style: none;
margin: 0;
}
.fix-body-padding{
padding-top: 0px;
}
.fixed-zindex-low{
z-index: 5000;
}
.fixed-zindex-high{
z-index: 1031;
}
.modal-open .modal.sidebar-menu{
z-index: 2000;
}
@keyframes d {
0%, to {
transform: scale(0);
}
50% {
transform: scale(1);
}
}
@keyframes e {
to {
transform: rotate(1turn);
}
}
.page-loading-container {
display: block;
animation: c 1s;
}
.page-loading {
width: 96px;
height: 96px;
position: absolute;
top: 40%;
left: 50%;
margin-left: -48px;
margin-top: -48px;
animation: e 2s infinite linear;
}
.page-loading .dot1, .page-loading .dot2 {
width: 32px;
height: 32px;
position: absolute;
top: 50%;
left: 50%;
margin-top: -32px;
margin-left: -32px;
background-color: #00cc99;
border-radius: 24px;
animation: d 2s infinite ease-in-out;
}
.page-loading .dot2 {
margin-top: 0;
margin-left: 0;
animation-delay: -1s;
}
.ingenico-payment .card{
border-radius: 3px;
display: block;
margin: 0 auto;
width: 55px;
height: 30px;
}
.ingenico-payment .card .mastercard{
background-image: url(../images/mastercard-isolated.png);
width: 25px;
height: 16px;
margin-top: 5px;
}
.card .cbs{
/*background-image: url(https://1c308283f6f0dbd72b44-c007ec4697a7ceab9178ce16802c0e6b.ssl.cf2.rackcdn.com/1.0/images/ico_cbs_pay.png);*/
background-image: url(https://1c308283f6f0dbd72b44-c007ec4697a7ceab9178ce16802c0e6b.ssl.cf2.rackcdn.com/1.0/images/card_bidooshop.svg);
width: 55px;
height: 30px;
margin-top: 2px !important;
border-radius: 4px;
}
.ingenico-payment .card .visa{
background-image: url(../images/visa-isolated.png);
width: 38px;
height: 10px;
margin-top: 5px;
}
.ingenico-payment .card .paypal{
background-image: url(../images/logo_paypal.png);
width: 37px;
height: 10px;
margin-top: 5px;
}
.ingenico-payment .card-number{
font-weight: normal;
margin-top: 10px;
display: block;
}
@media (hover:hover){
.bi.bi-favorite:not(.bi-favorite-mobile):hover{
background-position-y: -21px;
}
}
@media screen and (min-width: 768px){
.text-lg-left{
text-align: left;
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.82 14.91"><defs><style>.cls-1{fill:#848484}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Livello_3" data-name="Livello 3"><path class="cls-1" d="M18 4.76H7.71A1.82 1.82 0 0 0 5.9 6.57v6.52a1.82 1.82 0 0 0 1.81 1.81H18a1.82 1.82 0 0 0 1.81-1.81V6.57A1.81 1.81 0 0 0 18 4.76zm.84 8.36a.66.66 0 0 1-.66.66H7.69a.66.66 0 0 1-.69-.66V8.53h11.84zm0-6.31H7v-.26a.66.66 0 0 1 .66-.66h10.53a.66.66 0 0 1 .66.66zm0 0"/><path class="cls-1" d="M7.58 3.64H14L12.67 1a1.82 1.82 0 0 0-2.44-.81L1 4.75a1.82 1.82 0 0 0-.81 2.43L3.08 13a1.82 1.82 0 0 0 2.1.95 2.73 2.73 0 0 1-.38-1.4V6.43a2.79 2.79 0 0 1 2.78-2.79zm0 0M8.89 13.07a1.16 1.16 0 0 0 .89-.41 1.18 1.18 0 1 0 0-1.53 1.18 1.18 0 1 0-.89 1.94zm0 0"/></g></g></svg>

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

File diff suppressed because one or more lines are too long
@@ -0,0 +1,84 @@
function IdleUser(){
"use strict"
var self = this;
self.IDLE_TIMEOUT = 600; // 600
self._idleSecondsCounter = 0;
self._stop = false;
self.setupIdleUser();
}
IdleUser.prototype.resetIdleCounter = function(){
"use strict"
var self = this;
self._idleSecondsCounter = 0;
}
IdleUser.prototype.setupResetIdleHandlers = function(){
"use strict"
var self = this;
var resetCallback = self.resetIdleCounter.bind(self);
$(document).on('click',resetCallback);
$(document).on('mousemove',resetCallback);
$(document).on('keypress',resetCallback);
$(document).on('resize',resetCallback);
$(document).on('scroll',resetCallback);
}
IdleUser.prototype.checkIdleUser = function() {
"use strict"
var self = this;
// self._idleSecondsCounter++; //commentando mi assicuro che non si incrementi mai e che quindi non appaia la modale
if (self._idleSecondsCounter >= self.IDLE_TIMEOUT && !$("#connectivityModal").is(":visible")) {
if (self._stop == false) {
clearInterval(self._idleCounter);
self._stop = true;
var scope = isDeepModal() ? window.parent : window;
//scope.BidooCnf.instances.auction.features.clearAutobidInfoPoll(); // [GR] REM errors in page auction.php, undefined clearAutobidInfoPoll() (instanced in index.js)
clearTimeout(window.timerIDElenco);
clearTimeout(window.timer_check_open);
if (window.stateTot == 'STOP') clearTimeout(window.timerGestState);
trackEvent({ name: 'Idle_Modal_Open', label: 'Idle Modal Open' });
//console.log('Idle_Modal_Open');
$("#idleM").modal().on({
'show.bs.modal': saveScrollPosition,
'hide.bs.modal': function() {
trackEvent({ name: 'Idle_Modal_Close', label: 'Idle Modal Close' });
//console.log('Idle_Modal_Close');
self._idleSecondsCounter = 0;
self._stop = false;
self._idleCounter = setInterval(self.checkIdleUser.bind(self), BidooCnf.intervals.user.idle_timeout);
//scope.BidooCnf.instances.auction.features.resetIntervals(); // [GR] REM errors in page auction.php, undefined resetIntervals() (instanced in index.js)
if (window.timer_check_status == 0 && "undefined"!=typeof window["processPageElenco"]) processPageElenco();
if (window.timer_check_status == 1 && "undefined"!=typeof window["CheckStatusAuct"]) window.timer_check_open = setTimeout(CheckStatusAuct, BidooCnf.intervals.auction.idle_timeout);
if (window.stateTot == 'STOP' && "undefined"!=typeof window["processGestState"]) processGestState();
setSavedScrollPosition();
$("#idleM").off("hide.bs.modal");
$("html, body").animate({scrollTop: 0}, 1); // [GR] ADD: scrool top
window.location.reload(true); // [GR] ADD
}
}).modal('show');
}
}
}
IdleUser.prototype.setupIdleUser = function(){
"use strict"
var self = this;
self.setupResetIdleHandlers();
self._idleCounter = setInterval(self.checkIdleUser.bind(self), BidooCnf.intervals.user.idle_timeout);
}
$(document).ready(function(){
"use strict"
new IdleUser();
});
@@ -0,0 +1,72 @@
function Ingenico(){
"use strict"
var self = this;
self.ENDPOINT = {
manage_card: "/manage_cards.php"
};
self.selectors = {
forms: $(".ingenico_form"),
direct_pay: $(".ingenico_direct_pay"),
pick_card: $(".ingenico_pick_card"),
card: {
brand: $(".ingenico_direct_pay .card-brand"),
number: $(".ingenico_direct_pay .card-number"),
expire: $(".ingenico_direct_pay .card-expire"),
holder: $(".ingenico_direct_pay .card-holder")
}
}
self.http = new HttpRequest();
self.lockButtonFromInterceptor();
}
Ingenico.prototype.showManageCards = function(){
"use strict"
var self = this;
//var parsedURL = parseURL(window.location.href);
//var search = parsedURL.search.length ? parsedURL.search+"&iframe=1" : "?iframe=1";
//var referrer = encodeURIComponent(parsedURL.pathname+search+"&back=1&notReloadNow=1");
//if(getUrlParam("referrer").length){
//referrer = encodeURIComponent(getUrlParam("referrer")+"?iframe=1&back=1&notReloadNow=1");
//}
var referrer = encodeURIComponent("/?iframe=1&back=1&notReloadNow=1");
var params = new URLSearchParams({
'back_url' : referrer
,'bCD' : screen.colorDepth // for 3dsv2
,'bJE' : navigator.javaEnabled() // for 3dsv2
,'bLg' : navigator.language // for 3dsv2
,'bSW' : screen.width // for 3dsv2
,'bSH' : screen.height // for 3dsv2
,'bTZ' : new Date().getTimezoneOffset() // for 3dsv2
});
var url = self.ENDPOINT.manage_card + "?" + params.toString(); // [self.ENDPOINT.manage_card,"?referrer=",referrer].join("")
var options = getOptions(true,true,false,false,false,"10px",false,false,false,false,true);
launchIframeModal(url,CONSTANTS.INGENICO.modal.width,CONSTANTS.INGENICO.modal.height,true,options);
}
Ingenico.prototype.lockButtonFromInterceptor = function(){
"use strict"
var self = this;
self.selectors.forms.submit(function(e){
$(".ingenico-loader").toggleClass("hidden",false); // loader fullscreen
if(!isPageInIframe() && $(this).hasClass("ingenico_pick_card")){
e.preventDefault();
e.stopImmediatePropagation();
let vrnt = $("#variantField").val();
if (typeof vrnt !== 'undefined') {
$("form.ingenico_form input[name='vrnt']").val(vrnt);
}
var url = $(this).attr("action")+"?"+$(this).serialize();
var options = getOptions(true,true,false,false,false,"10px",false,false,true,true,true); // true for avoidShowLoader, 10th parameter, to not show bottom circle loader
launchIframeModal(url,CONSTANTS.INGENICO.modal.width,CONSTANTS.INGENICO.modal.height,true,options);
return;
}
});
}
$(document).ready(function(){
"use strict"
BidooCnf.modules.user.ingenico = Ingenico;
BidooCnf.instances.user.ingenico = new Ingenico();
});
@@ -0,0 +1,579 @@
.ingenico-body{
padding: 0;
}
.ingenico-body:not(.no-padding){
padding-top: 20px;
background-color: #fcfcfd;
}
.ingenico-body .header{
font-size: 16px;
margin-top: -9px;
padding-bottom: 15px;
margin-bottom: 15px;
/*border-bottom: 0.3px solid #E4EAEE;*/
font-weight: lighter;
}
.ingenico-body .close{
opacity: 1;
font-size: 16px;
margin-top: 3px;
font-weight: lighter;
cursor: pointer;
}
.ingenico-body .close .left-arrow{
margin: -3px 5px 0 0;
}
.ingenico-body .header .price{
padding-left: 10px;
}
.ingenico-body .credit-cards{
margin-top: 5px;
}
.ingenico-body .or-pay-with-bids{
font-size: 13px !important;
padding: 9px 0 0 0;
}
.ingenico-body .dashed-or{
padding: 0;
border-style: dashed;
border-color: #9b9b9b;
}
.ingenico-body .title{
margin: 20px 0 25px 0;
color: #1c2125;
font-size: 23px;
}
.ingenico-body .grey{
color: #848484;
}
.ingenico-body .safe-payment{
font-size: 16px;
}
.ingenico-body .safe-payment .safe-payment-icon{
margin-right: 10px;
width: 18px;
height: 26px;
background-image: url(../images/lock_safe_payment.svg);
}
.ingenico-body .or.active{
margin-top: 10px;
}
.ingenico-body .pay-with-a-card{
border: 1px solid #D8D8D8;
background-color: transparent;
}
.ingenico-body .btn-with-shadow{
box-shadow: 0px 0px 20px -4px rgba(208, 209, 213, 0.6), 0 2px 2px 1px rgba(220, 221, 224, 0.4);
-webkit-box-shadow: 0px 0px 20px -4px rgba(208, 209, 213, 0.6), 0 2px 2px 1px rgba(220, 221, 224, 0.4);
-moz-box-shadow: 0px 0px 20px -4px rgba(208, 209, 213, 0.6), 0 2px 2px 1px rgba(220, 221, 224, 0.4);
}
.ingenico-body .btn{
width: 100%;
padding: 10px;
outline: 0;
max-height: 130px;
}
.ingenico-body .btn .pay-with-card{
font-weight: 900;
padding-left: 10px;
font-size: 15px;
}
.ingenico-body .btn .pay-with-card p{
margin-bottom: 0;
}
.ingenico-body .btn .pay-with-card .subtitle{
font-size: 12px;
font-weight: 900;
}
.ingenico-body .btn-blue-proceed{
padding: 10px 0;
background: #e3e3e3;
background: -moz-linear-gradient(bottom, #ececec 0%, #e3e3e3 100%);
background: -webkit-linear-gradient(top, #ececec 0%,#e3e3e3 100%);
background: linear-gradient(to bottom, #ececec 0%,#e3e3e3 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ececec', endColorstr='#e3e3e3',GradientType=0 );
color: #313131;
border: 1px solid #D8D8D8;
margin-top: 10px;
}
.ingenico-body .pay-with-a-card .pull-right{
padding-right: 6px;
}
.ingenico-body .pay-with-a-card span{
display: inline-block;
}
.ingenico-body .pay-with-a-card .no-paypal-btn{
margin-right: 10px;
}
.ingenico-body .fa-angle-right{
font-size: 35px;
}
.ingenico-body .pay-btn,
.ingenico-body .pay-btn:hover,
.ingenico-body .pay-btn:focus{
background: #0077E2;
background: -moz-linear-gradient(bottom, #02A1DE 0%, #0077E2 100%);
background: -webkit-linear-gradient(top, #02A1DE 0%,#0077E2 100%);
background: linear-gradient(to bottom, #02A1DE 0%,#0077E2 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#02A1DE', endColorstr='#0077E2',GradientType=0 );
color: white;
margin: 0;
border: 1px solid #2170CB;
height: 58px;
}
.ingenico-body .pay-now,
.ingenico-body .pay-now:hover,
.ingenico-body .pay-now:focus{
margin: 0;
font-size: 10px;
padding: 8px 5px 8px 9px;
}
@media(max-width:576px){
.ingenico-body .pay-now,
.ingenico-body .pay-now:hover,
.ingenico-body .pay-now:focus{
font-size: 10px;
padding: 8px 5px 8px 9px;
}
#order_your_product .order-product .pay-now .ingenico-pay-button .white-arrow {
margin-top: 0px !important;
}
}
.ingenico-body .pay-now .card-number{
font-size: 11px;
font-weight: 900;
}
body[data-lang=es] .ingenico-body .pay-now .card-number{
font-size: 10px;
}
.ingenico-body .card-brand-visa-background{
background-color: white;
border-radius: 1.5px;
width: 59px;
height: 31px;
display: inline-block;
margin: 4px 10px 0 0;
padding: 5px 0 0 6px;
}
body[data-lang=es] .ingenico-body .card-brand-visa-background{
margin-right: 5px;
width: 50px;
height: 33px;
padding: 4px 0 0 2px;
}
.ingenico-body .pay-now .card-brand-placeholder{
margin: 3px 10px 0 0;
width: 50px;
height: 32px;
}
body[data-lang=es] .ingenico-body .pay-now .card-brand-placeholder{
margin-right: 7px;
}
@media(max-width:320px){
.ingenico-body .pay-now .card-brand-placeholder{
width: 24px;
height: 19px;
margin-top: 10px;
margin-right: 5px;
}
.ingenico-body .pay-now .card-number{
font-size: 10px;
}
}
.ingenico-body .mastercard{
background-image: url(../images/mastercard.png);
}
.ingenico-body .visa{
background-image: url(../images/visa.png);
}
.ingenico-body .amex {
background-image: url(../images/amex_b.png);
}
.ingenico-body .pay-now .amex{
background-image: url(../images/amex_b.png);
}
.ingenico-body .pay-now .visa{
background-image: url(../images/visa-isolated.png);
width: 44px;
height: 13px;
}
.ingenico-body .postepay{
background-image: url(../images/postepay.png);
}
body[data-lang=es] .ingenico-body .postepay{
display: none;
}
.ingenico-body .card-holder{
margin-bottom: 0;
}
.ingenico-body .card-info-normal{
font-weight: 600;
font-size: 9px;
}
.ingenico-body .btn-text-size {
font-size: 14px;
font-weight: bold;
padding-right: 0px;
}
.ingenico-body .pay-now .ingenico-pay-button,
.ingenico-body .pay-now .ingenico-pay-button:hover{
padding: 7px 7px;
margin-top: 3px;
}
body[data-lang=es] .ingenico-body .pay-now .ingenico-pay-button,
body[data-lang=es] .ingenico-body .pay-now .ingenico-pay-button:hover{
padding: 7px 0px;
}
@media(max-width:576px){
.ingenico-body .pay-now .ingenico-pay-button,
.ingenico-body .pay-now .ingenico-pay-button:hover{
padding: 7px 1px;
margin-top: 3px;
}
.ingenico-body .btn-text-size{
font-size: 14px;/* 16px */
}
body[data-lang=es] .ingenico-body .btn-text-size{
font-size: 12px;/* 16px */
}
}
@media(max-width:400px){
body[data-lang=es] .ingenico-body .btn-text-size{
font-size: 11px;/* 16px */
}
}
@media(max-width:320px){
.ingenico-body .pay-now .ingenico-pay-button,
.ingenico-body .pay-now .ingenico-pay-button:hover{
padding: 7px 2px;
/*margin-top: -30px;*/
}
body[data-lang=es] .ingenico-body .btn-text-size{
font-size: 11px;/* 16px */
}
body[data-lang=es] .ingenico-body .card-info{
position: absolute;
}
}
.ingenico-body .select-new-card .btn-text{
margin-top: 3px;
}
.ingenico-body .select-new-card{
color: #333;
font-weight: normal;
}
.ingenico-body .ingenico-pay-button .arrow{
margin: -3px 0 0 5px;/* -3px 0 0 10px */
}
.ingenico-body .pay-with-a-card-first .arrow{
margin-top: 6px;
}
.ingenico-body .safe-payment{
position: absolute;
bottom: 20px;
}
.ingenico-body .ingenico-lock{
background: url(../images/lock.svg);
width: 22px;
height: 29px;
margin: -21px 10px 0;
}
.ingenico-body .btn-blue-proceed b{
padding-right: 10px;
}
.ingenico-body .accepted-cards-container:not(.pull-left){
margin-top: 10px;
}
.ingenico-body .pay-now .accepted-cards-container .text{
font-size: 12px;
padding-right: 9px;
}
.ingenico-body .accepted-cards-container .bi{
width: 43px;
height: 27px;
}
@media(max-width: 576px){
.ingenico-body .accepted-cards-container .bi{
width: 33px;
height: 23px;
}
.ingenico-body .pay-now .accepted-cards-container .text{
font-size: 10px;
}
}
@media(max-width: 320px){
.ingenico-body .accepted-cards-container .bi{
width: 20px;
height: 15px;
}
}
.ingenico-body .gray-text{
color: #aaaaaa;
font-size: 16px;
}
.ingenico-body .accepted-cards-container-first .gray-text{
font-size: 13px;
}
.ingenico-body .arrow,
.buy-error-message .arrow{
width: 12px;
height: 22px;
margin: 6px 5px 0 0;
}
.ingenico-body .white-arrow,
.buy-error-message .white-arrow{
background: url(../images/white-chevron.svg);
}
.ingenico-body .black-arrow{
background: url(../images/grey-chevron.svg);
}
.ingenico-body button{
height: 58px;
}
.ingenico-body .accepted-cards-container-first{
margin-top: 10px;
}
.ingenico-body .pay-with-a-card-first .arrow{
margin-top: 5px;
}
.ingenico-loader{
position: absolute;
z-index: 1;
background-color: rgba(255,255,255,0.8);
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.ingenico-loader .ingenico-blue-lock{
background: url(../images/lock-blue.svg?v=1);
margin-top: 63px;
width: 28px;
height: 37px;
}
.ingenico-loader .loader-text{
color: #1687E5;
font-size: 22px;
margin: -27px 0 0 0;
}
div.spinner {
position: relative;
width: 184px;
height: 184px;
margin: 146px 0 0 -92px;
left: 50%;
background: transparent;
padding: 10px;
border-radius: 10px;
}
div.spinner div {
width: 4%;
height: 16%;
background: #1687E5;
position: absolute;
left: 49%;
top: 43%;
opacity: 0;
-webkit-border-radius: 50px;
-webkit-box-shadow: 0 0 3px rgba(0,0,0,0.2);
-webkit-animation: fade 1s linear infinite;
}
@-webkit-keyframes fade {
from {opacity: 1;}
to {opacity: 0.25;}
}
div.spinner div.bar1 {
-webkit-transform:rotate(0deg) translate(0, -130%);
-webkit-animation-delay: 0s;
}
div.spinner div.bar2 {
-webkit-transform:rotate(30deg) translate(0, -130%);
-webkit-animation-delay: -0.9167s;
}
div.spinner div.bar3 {
-webkit-transform:rotate(60deg) translate(0, -130%);
-webkit-animation-delay: -0.833s;
}
div.spinner div.bar4 {
-webkit-transform:rotate(90deg) translate(0, -130%);
-webkit-animation-delay: -0.7497s;
}
div.spinner div.bar5 {
-webkit-transform:rotate(120deg) translate(0, -130%);
-webkit-animation-delay: -0.667s;
}
div.spinner div.bar6 {
-webkit-transform:rotate(150deg) translate(0, -130%);
-webkit-animation-delay: -0.5837s;
}
div.spinner div.bar7 {
-webkit-transform:rotate(180deg) translate(0, -130%);
-webkit-animation-delay: -0.5s;
}
div.spinner div.bar8 {
-webkit-transform:rotate(210deg) translate(0, -130%);
-webkit-animation-delay: -0.4167s;
}
div.spinner div.bar9 {
-webkit-transform:rotate(240deg) translate(0, -130%);
-webkit-animation-delay: -0.333s;
}
div.spinner div.bar10 {
-webkit-transform:rotate(270deg) translate(0, -130%);
-webkit-animation-delay: -0.2497s;
}
div.spinner div.bar11 {
-webkit-transform:rotate(300deg) translate(0, -130%);
-webkit-animation-delay: -0.167s;
}
div.spinner div.bar12 {
-webkit-transform:rotate(330deg) translate(0, -130%);
-webkit-animation-delay: -0.0833s;
}
.ingenico-body .error{
background-color: #D0021B;
border-radius: 2px;
color: white;
padding: 10px;
margin-bottom: 10px;
}
.ingenico-body .error .close-error{
background: url(../images/close-icon.svg);
position: absolute;
right: 10px;
margin-top: -2px;
width: 10px;
height: 10px;
cursor: pointer;
}
.ingenico-body .error .arrow-down{
background: url(../images/down-chevron.svg);
display: block;
width: 22px;
height: 12px;
margin: 7px auto 0 auto;
}
@media screen and (min-width: 768px){
.ingenico-body .pay-with-a-card-first,
.ingenico-body .pay-with-a-card-first:hover{
margin-top: 35px !important;
padding-right: 5px;
}
}
@media screen and (min-width: 500px) and (max-width: 990px){
.ingenico-body .or .col-xs-3{
width: 30%;
}
}
@media screen and (width: 370px) and (height: 420px){
.ingenico-body .no-paypal-btn{
height: 26px;
}
.ingenico-body .no-paypal{
width: 130px;
}
}
@media screen and (max-width: 360px){
.ingenico-body .title{
font-size: 22px;
}
}
@media screen and (max-width: 576px){
.ingenico-body .pay-with-a-card .pull-right{
margin-top: 6px;
}
}
@media screen and (max-width: 320px){
.ingenico-body .pay-with-a-card .pull-right{
margin-top: 6px;
}
.ingenico-body .container:eq(0){
padding-left: 0;
padding-right: 0;
}
.ingenico-body .title{
font-size: 19px;
}
.ingenico-body .btn-text-size{
font-size: 10px;
}
.ingenico-body .pay-with-a-card .pull-right{
padding-right: 2px;
}
.ingenico-body .pay-now .ingenico-pay-button .arrow{
margin-right: -5px;
}
.ingenico-body .error .close-error{
right: 5px;
margin-top: -5px;
}
}
.box-credit-card{
display: flex;
justify-content: space-between;
padding: 5px 0;
}
.box-credit-card img.img-center{
margin: 0px 2px;
width: 36px;
border: 1px solid #ddd;
border-radius: 3px;
}
@media(max-width: 576px){
.box-credit-card img.img-center{
width: 33px;
}
}
@media(max-width: 576px){
.box-credit-card img.img-center{
width: 30px;
margin: 0px 1px;
}
}
.btn-text {
margin-top: 5px;
margin-left: 5px;
}
.accepted-cards-container-first .box-credit-card{
margin-top: 0px;
padding-top: 0px;
}
.accepted-cards-container-first .box-credit-card img.img-center{
margin: 0px 2px;
border: 1px solid #ebebeb;
border-radius: 3px;
width: 38px;
}
@media(max-width: 320px){
.accepted-cards-container-first .box-credit-card img.img-center{
margin: 0px 1px;
width: 27px;
}
}
@media(max-width: 360px){
.ingenico-body .btn-text-size{
font-size: 10px;
}
body[data-lang=es] .card-info {
position: absolute;
}
.accepted-cards-container-first .box-credit-card img.img-center{
margin: 0px 1px;
width: 33px;
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<style type="text/css">
.st0{fill:#EFEFEF;}
.st1{fill:#BFBFBF;}
.st2{fill:#FFCC3B;}
.st3{fill:#FFF1D2;}
.st4{fill:#3D2900;}
</style>
<g>
<g>
<g>
<path class="st0" d="M35.64,0c-7.77,0-14.09,5.47-14.09,12.18v11.71h5.38V12.18c0-3.56,3.99-6.56,8.7-6.56
c4.34,0,8.06,2.54,8.63,5.72h5.42C49.19,5.01,43.08,0,35.64,0z"/>
<path class="st1" d="M35.64,3c-6.18,0-11.21,4.12-11.21,9.18v11.71h2.51V12.18c0-3.56,3.99-6.56,8.7-6.56
c4.34,0,8.06,2.54,8.63,5.72h2.53C46.28,6.68,41.47,3,35.64,3z"/>
</g>
<path class="st2" d="M29.07,21.13H5.11c-2.64,0-4.79,2.16-4.79,4.79v8.47v0.36v3.27C0.32,44.61,5.71,50,12.3,50h9.58
c6.59,0,11.98-5.39,11.98-11.98v-3.27v-0.36v-8.47C33.86,23.28,31.71,21.13,29.07,21.13z"/>
<path class="st3" d="M29.07,21.13H5.11c-2.64,0-4.79,2.16-4.79,4.79v1.92c0-2.64,2.16-4.79,4.79-4.79h23.96
c2.64,0,4.79,2.16,4.79,4.79v-1.92C33.86,23.28,31.71,21.13,29.07,21.13z"/>
<path class="st4" d="M20.59,35.44c0-1.94-1.57-3.5-3.5-3.5s-3.5,1.57-3.5,3.5c0,1.29,0.69,2.41,1.73,3.02l-0.38,2.65h4.31
l-0.38-2.65C19.9,37.85,20.59,36.73,20.59,35.44z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.28 14.09"><title>Asset 4lock_shopping</title><g id="d8d0e7fa-67ba-40dd-8783-be29e6326e6d" data-name="Layer 2"><g id="106ce40f-ec86-4fe6-8fdc-89d613316010" data-name="Livello 3"><path d="M10.55,6.23H9.86v-2a4.22,4.22,0,1,0-8.44,0v2H.73A.73.73,0,0,0,0,7v6.4a.73.73,0,0,0,.73.73h9.82a.73.73,0,0,0,.73-.73V7a.73.73,0,0,0-.73-.73Zm-7.36-2a2.45,2.45,0,1,1,4.89,0v2H3.19Zm3.24,6.19v1.31a.8.8,0,0,1-1.59,0V10.41a1.28,1.28,0,1,1,1.59,0Zm0,0" fill="#a3b5bf"/></g></g></svg>

After

Width:  |  Height:  |  Size: 519 B

@@ -0,0 +1,833 @@
var regIntervalImgs;
var lockLogin = false;
var lockSignup = false;
var captcha2renderSignup;
var captcha2renderLogin;
var login_16_DEBUG = false; // [GR] SET DEBUG
function reg_slider(action) {
if ((action == 'go') && MM_findObj('reg_imgs'))
regIntervalImgs = setInterval(function () {
img_reg = $('#reg_imgs').attr('src');
img_reg = img_reg.split('/');
img_reg = img_reg[(img_reg.length - 1)];
if (img_reg == 'iscrizioneD.png') img_reg = 'iscrizioneE.png';
else if (img_reg == 'iscrizioneE.png') img_reg = 'iscrizioneF.png';
else img_reg = 'iscrizioneD.png';
$('#reg_imgs').attr('src', path_static_img + img_reg);
}, 3000);
else clearInterval(regIntervalImgs);
}
function show_password(selector_container) {
"use strict"
selector_container = selector_container ? selector_container + " " : "";
var selector_pwd = $(selector_container + " .pwd");
var selector_eye = $(selector_container + " .fa");
if (selector_pwd.attr('type') == 'text') {
hidePassword(selector_pwd, selector_eye);
} else {
selector_pwd.attr('type', 'text');
selector_eye
.addClass("fa-eye")
.removeClass("fa-eye-slash");
}
};
function hidePassword(selector_pwd, selector_eye) {
"use strict"
selector_pwd = selector_pwd || $(".pwd");
selector_eye = selector_eye || $(".fa");
selector_pwd.attr('type', 'password')
selector_eye
.addClass("fa-eye-slash")
.removeClass("fa-eye");
}
function show_lost_password() {
"use strict"
$("#logMeIn").modal('hide');
launchIframeModal("/rec_psw.php", 370, 550, true, getOptions(true, true, true, false, false, "6px"));
}
function show_lost_password_autopopup() {
"use strict"
launchIframeModal("/rec_psw.php?tokenexpired=1", 370, 550, true, getOptions(true, true, true, false, false, "6px"), true);
}
function facebook_js() {
$("#logMeIn .closeme.showReg").off();
$("#logMeIn .closeme.showReg").on({
click: function (e) {
hidePassword();
$('#holdon .signup-capctha2-container').hide(); // [GR] ADD: hide reCapctha v2 container
$('#holdon .login_submit_extra_area').show(); // [GR] ADD: show area with ISCRIVITI button, facebook, etc.
$('#holdon .signup-input-container').show(); // [GR] ADD: show reg form
$("#holdon #password").val("");
$("#logMeIn").modal('hide');
hideToolTipError();
//$('.modal-backdrop').remove();
setTimeout(function () {
$("#holdon").modal('show');
}, 50);
}
});
$('#login_using_fb_btn').unbind("click"); // [GR] ADD
$('#login_using_fb_btn').click(function () {
var id = "#" + $(this).attr("id");
loginWithFacebook(id, function (response) {
if (response && response.status !== "connected") errorBtnTooltip(id, "Impossibile connettersi a Facebook");
else {
showSignup();
$("#register_using_fb_btn").click();
}
});
})
};
function generatePassword(len) {
var pwd = [],
cc = String.fromCharCode,
R = Math.random,
rnd, i;
pwd.push(cc(48 + (0 | R() * 10))); // push a number
pwd.push(cc(65 + (0 | R() * 26))); // push an upper case letter
for (i = 2; i < len; i++) {
rnd = 0 | R() * 62; // generate upper OR lower OR number
pwd.push(cc(48 + rnd + (rnd > 9 ? 7 : 0) + (rnd > 35 ? 6 : 0)));
}
// shuffle letters in password
return pwd.sort(function () {
return R() - .5;
}).join('');
}
function showErrorToolTip(message, sel) {
sel = sel ? sel + " " : "";
showTooltipErrorPermanent(sel + ".error_login", sel + ".input-group .form-control", message);
$(sel + ".bidoo_green").hide();
$(sel + ".form-control").addClass("error-control");
$(sel + ".input-group").each(function () {
$(this).find(".form-control").keyup(function () {
$(this).removeClass("error-control");
$(this).parent().find(".bidoo_green").show();
});
});
}
function hideToolTipError() {
$(".form_control").removeClass("error-control");
$(".error_login").hide();
$(".bidoo_green").show();
$(".error_login").tooltip("destroy");
}
function errorBtnTooltip(selector, msg) {
showTooltipErrorPermanent(selector, "", msg);
setTimeout(function () {
$(selector).tooltip("hide");
}, 3000);
}
function loginWithFacebook(id, callback, isSignup) { // no longer needed
if (login_16_DEBUG) { console.log("loginWithFacebook("+id+","+callback+","+isSignup+")"); }
FB.login(function (response) {
if (response) {
if (response.status !== "connected") return callback(response);
var token = response.authResponse.accessToken;
if (isSignup) setCookie('fbtoken', token, 1);
loginFacebookUser(id, callback, token);
}
}, {
scope: 'public_profile, email, user_friends',
auth_type: 'rerequest'
});
}
function fixIOSCursorsIssue() { // Notice: #494
"use strict"
$("body").toggleClass("modal-input-ios-fix", isIOSDevice());
}
function setCookieSignupModalDismiss() { // ???
"use strict"
$("#holdon").on("hide.bs.modal", setCookieMinutes.bind(null, "nfv", 1, 120));
}
function loginFacebookUser(id, callback, accessToken) { // no longer needed
"use strict"
if (login_16_DEBUG) { console.log("Enter in loginFacebookUser("+id+","+callback+","+accessToken+")"); }
var fbtoken = getCookie("fbtoken");
var isLogged = $("#NickLoggato").length;
if (login_16_DEBUG) { console.log("fbtoken = "+fbtoken+" isLogged = "+isLogged); }
if (isLogged && "undefined" === typeof fbtoken) {
if (login_16_DEBUG) { console.log("isLogged && 'undefined' === typeof fbtoken"); }
}
if (!isLogged && !accessToken) {
if (login_16_DEBUG) { console.log("!isLogged && !accessToken"); }
}
if ((isLogged && "undefined" === typeof fbtoken) || (!isLogged && !accessToken)) return; // if ((isLogged && "undefined" === typeof fbtoken) || (!isLogged && !accessToken)) return;
if (login_16_DEBUG) { console.log("call ajax login_facebook.php"); }
$.ajax({
type: "POST",
url: 'login_facebook.php',
data: {
authTok: ("undefined" != typeof fbtoken ? fbtoken : accessToken)
},
success: function (data) {
if (login_16_DEBUG) { console.log("ajax login_facebook.php success (isLogged = "+isLogged+")"); }
if (isLogged) return delCookie("fbtoken");
if (login_16_DEBUG) { console.log("ajax login_facebook.php success: check data response (data = "+data+")"); }
if (data.isvalid === true) {
if ($( "#ref_log" ).length) {
var redirect = getUrlParam("redirect");
if (redirect.length) {
window.location = "https://" + data.userlang + ".bidoo.com/" + redirect; // window.parent.location.href = redirect; (!!! verificare natura parametro redirect)
} else {
//window.location = "https://" + data.userlang + ".bidoo.com" ; // window.parent.location.reload();
if (login_16_DEBUG) { console.log("Refresh page: href = " + window.location.href.split("#")[0]); }
window.location = window.location.href.split("#")[0];
}
} else {
//window.location = "https://" + data.userlang + ".bidoo.com"; // document.location.href = message;
if (login_16_DEBUG) { console.log("Refresh page: href = " + window.location.href.split("#")[0]); }
window.location = window.location.href.split("#")[0];
}
} else if (data.isvalid === false) {
errorBtnTooltip(id, data.msg);
} else {
callback();
}
}
});
}
function getIndexError(level) {
"use strict"
switch (level) {
case 0:
return 1;
case 1:
case 4:
case 6:
return 0;
case 2:
case 8:
return 2;
case 3:
return 3;
}
return -1;
}
function showSignup() { // close login modal and show signup modal
$("#logMeIn").modal("hide");
$("#register_btn").click();
}
function showLogin() {
if (window.isNativeAppVar) {
console.log('Login call override');
window.location.href = "#native_login";
} else {
$("#menuModalTop, #holdon").modal('hide');
$("#logMeIn")
.on({
'show.bs.modal': saveScrollPosition,
'shown.bs.modal': fixIOSCursorsIssue,
'hide.bs.modal': setSavedScrollPosition
})
.modal();
$('#logMeIn .signup-input-container').show(); // show login form
$('#logMeIn .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#logMeIn .login_submit_extra_area').show(); // show area with submit button, facebook, etc.
facebook_js();
}
}
function login_post(post_username, post_password, post_token, captcha_type) { // post login data
if (login_16_DEBUG) { console.log("login_post("+post_username+", "+post_password+", "+post_token+", "+captcha_type); }
// -start: post login:
$.ajax({
url: "/userlogin.php"
, type: "POST"
, dataType: 'json'
//,data: postData
, data: {
email: post_username
, pswd: post_password
, recaptcha_response: post_token
, ctype: captcha_type
}
}).done(function (data, textStatus, jqXHR) {
AuctionsBidManage.remove();
localStorage.removeItem('smclient');
localStorage.removeItem('smuuid');
localStorage.removeItem('smvr');
if (login_16_DEBUG) { console.log("data response from userlogin.php: " + JSON.stringify(data)); }
if (data.forceRecaptcha === 3) {
recaptcha_login_config = 1; // set reCaptcha active (v3) on submit
if (data.errorcode === 0) {
if (typeof grecaptcha == 'undefined') {
logRecaptchaError('login', {'username': post_username });
$('#logMeIn .signup-input-container').show(); // show login form
$('#logMeIn .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#logMeIn .login_submit_extra_area').show(); // [GR] show area with submit button, facebook, etc.
errorBtnTooltip("#logMeIn .btlogin", "Errore: Prova a ricaricare la pagina o a cambiare browser.<br>Se il problema dovesse persistere contatta lAssistenza Clienti.");
$("#logMeIn .login-top-back a").hide();
lockLogin = false;
return false;
} else {
// auto submit login with reCaptcha v3 enabled:
grecaptcha.enterprise.ready(function () { // Google reCaptcha v3
grecaptcha.enterprise.execute('6LcjhUMpAAAAADxcuxrNs1Ou0iKbz2h3dn58Egnw', {action: 'login'}).then(function (token) {
if (login_16_DEBUG) { console.log("reCaptcha v3 (READY)"); }
login_post($("#logMeIn form input.email").val(), $("#logMeIn form input.pwd").val(), token, 3);
});
});
}
return false;
}
}
if (data.isvalid === true) {
let locationBase = window.location.href.replace("login=true", "").replace("?&", "?");
let nuovaLocationArray = locationBase.split("?");
if(nuovaLocationArray[1] === ""){
nuovaLocation = nuovaLocationArray[0].replace("?", "");
} else {
nuovaLocation = locationBase;
}
if ($( "#ref_log" ).length) {
var redirect = getUrlParam("redirect");
if (redirect.length) {
window.location = "https://" + data.userlang + ".bidoo.com/" + redirect; // window.parent.location.href = redirect; (!!! verificare natura parametro redirect)
} else {
//window.location = "https://" + data.userlang + ".bidoo.com" ; // window.parent.location.reload();
window.location.href = nuovaLocation.split("#")[0];
//window.location = window.location.href.split("#")[0];
}
} else {
//window.location = "https://" + data.userlang + ".bidoo.com"; // document.location.href = message;
//window.location = window.location.href.split("#")[0];
window.location.href = nuovaLocation.split("#")[0];
}
} else if (data.errorcode == 1 || data.forceRecaptcha === 2) { // reCaptchaV3 not passed or force reCaptchaV2
if (data.forceRecaptcha === 2) { // if reCaptchaV2 forced
recaptcha_login_config = 0; // disable reCaptchaV3 on submit
}
var reCaptcha_verifyCallback = function(response) { // callback on reCaptchaV2 response
if (login_16_DEBUG) {
console.log("reCaptcha_verifyCallback response: " + response);
}
// current_captcha_type = 2
lockLogin = false;
login_post($("#logMeIn form input.email").val(), $("#logMeIn form input.pwd").val(), response, 2);
};
$('#logMeIn .signup-input-container').hide(); // [GR] ADD: hide login form
$('#logMeIn .login_submit_extra_area').hide(); // [GR] ADD: hide area with submit button, facebook, etc.
if (captcha2renderLogin == 0) {
grecaptcha.enterprise.reset(captcha2renderLogin);
} else {
captcha2renderLogin = grecaptcha.enterprise.render('capctha2', {
'sitekey' : '6LdNh0MpAAAAAD91aMd6WjYKsnM-HyIRDZrPda8I'
,'theme' : 'light'
,'callback' : reCaptcha_verifyCallback
//,'expired-callback' : reCaptcha_expiredCallback
//,'error-callback' : reCaptcha_errorCallback
});
}
$('#logMeIn .signup-capctha2-container').show(); // [GR] ADD: show reCapctha v2 container
$("#logMeIn .login-top-back a").show();
$("#logMeIn .login-top-back a").unbind('click');
$("#logMeIn .login-top-back a").click(function (event) { // Back button: hide captcha and show login form
event.preventDefault();
$('#logMeIn .signup-input-container').show(); // [GR] ADD: show login form
$('#logMeIn .signup-capctha2-container').hide(); // [GR] ADD: hide reCapctha v2 container
$('#logMeIn .login_submit_extra_area').show(); // [GR] ADD: show area with submit button, facebook, etc.
//$(this).unbind('click');
$("#logMeIn .login-top-back a").hide();
});
} else {
/*if (data.errorcode == 3 && data.forceRecaptcha == 0) { // login KO after v2 OK
recaptcha_login_config = 0; // disable reCaptchaV3 on submit
}*/
$('#logMeIn .signup-input-container').show(); // show login form
$('#logMeIn .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#logMeIn .login_submit_extra_area').show(); // [GR] show area with submit button, facebook, etc.
$("#logMeIn .signup-input-container")
.toggleClass("signup-input-error", true)
.find(".signup-error-text")
.html(data.msg)
.parent()
.parent()
.find(".show-hide-password")
.hide();
$("#logMeIn .login-top-back a").hide();
}
lockLogin = false;
}).fail(function (jqXHR, textStatus, errorThrown) {
$('#logMeIn .signup-input-container').show(); // show login form
$('#logMeIn .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#logMeIn .login_submit_extra_area').show(); // [GR] show area with submit button, facebook, etc.
$("#logMeIn .signup-input-container")
.toggleClass("signup-input-error", true)
.find(".signup-error-text")
.html("Qualcosa è andato storto.")
.parent()
.parent()
.find(".show-hide-password")
.hide();
$("#logMeIn .login-top-back a").hide();
lockLogin = false;
}); // ajax
}
function getUrlVars() { // [GR]
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
function signup_post(post_email, post_username, post_password, post_policy, post_token, captcha_type, pbc, ckt) { // post login data
if (login_16_DEBUG) { console.log("signup_post("+post_username+", "+post_password+", "+post_policy+", "+post_token+", "+captcha_type); }
// isJustSignedUp = true; // ???
var idBtn = "#btnRegister";
$.ajax({
url: "/userregister.php"
, type: "POST"
, dataType: 'json'
, data: {
email: post_email
, username: post_username
, pswd: post_password
, policy: post_policy
, recaptcha_response: post_token
, ctype: captcha_type
, pbc: pbc
, ckt: ckt
}
}).done(function (data, textStatus, jqXHR) {
if (login_16_DEBUG) { console.log("data response from userlogin.php: " + JSON.stringify(data)); }
if (data.isvalid === true) {
BidooCnf.instances.signup.validation.showOkCheckMark(0,true); // ???
var getvars = getUrlVars();
// check utm parameters for promo code:
if ($(".signup-pcode-container input[name='pcode_utm_source']").val()) {
getvars["utm_source"] = $(".signup-pcode-container input[name='pcode_utm_source']").val();
};
if ($(".signup-pcode-container input[name='pcode_utm_medium']").val()) {
getvars["utm_medium"] = $(".signup-pcode-container input[name='pcode_utm_medium']").val();
};
if ($(".signup-pcode-container input[name='pcode_utm_campaign']").val()) {
getvars["utm_campaign"] = $(".signup-pcode-container input[name='pcode_utm_campaign']").val();
};
if ($(".signup-pcode-container input[name='pcode_utm_term']").val()) {
getvars["utm_term"] = $(".signup-pcode-container input[name='pcode_utm_term']").val();
};
if (Object.keys(getvars).length > 0) {
var build_query = $.param(getvars);
window.location = window.location.origin + "/home_redirect.php?onboard=true&nu=true&"+build_query; // standard home: index.php | alternative home: home_alt.php | manage by config: home_redirect.php
} else {
window.location = window.location.origin + "/home_redirect.php?onboard=true&nu=true"; // standard home: index.php | alternative home: home_alt.php | manage by config: home_redirect.php
}
} else if (data.errorcode == 1) { // reCaptchaV3 not passed
var reCaptcha_verifyCallback = function(response) { // callback on reCaptchaV2 response
if (login_16_DEBUG) { console.log("reCaptcha_verifyCallback response: " + response); }
lockSignup = false;
signup_post(post_email, post_username, post_password, post_policy, response, 2, pbc, ckt);
};
$('#logMeIn .signup-input-container').hide(); // hide login form
$('#logMeIn .login_submit_extra_area').hide(); // hide area with submit button, facebook, etc.
if (captcha2renderSignup == 0) {
grecaptcha.enterprise.reset(captcha2renderLogin);
} else {
captcha2renderSignup = grecaptcha.enterprise.render('reg_capctha2', {
'sitekey' : '6LdNh0MpAAAAAD91aMd6WjYKsnM-HyIRDZrPda8I'
,'theme' : 'light'
,'callback' : reCaptcha_verifyCallback
//,'expired-callback' : reCaptcha_expiredCallback
//,'error-callback' : reCaptcha_errorCallback
});
}
$('#holdon .signup-capctha2-container').show(); // show reCapctha v2 container
$('#holdon .login_submit_extra_area').hide(); // hide area with ISCRIVITI button, facebook, etc.
$('#holdon .signup-input-container').hide(); // hide reg form
} else {
$('#holdon .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#holdon .login_submit_extra_area').show(); // show area with ISCRIVITI button, facebook, etc.
if ($("#pcode-container input").val() != '' && $("#holdon .pcode-ok").is(":visible")) {
$('#holdon .signup-input-container:not(.signup-pcode-container)').show(); // show reg form
} else {
$('#holdon .signup-input-container').show(); // show reg form
}
if (data.context == 'email') {
$("#holdon input.email-reg").parent(".signup-input-container").toggleClass("signup-input-ok",false).toggleClass("signup-input-error", true).find(".signup-error-text").html(data.msg || '');
} else if (data.context == 'user') {
$("#holdon input.user-reg").parent(".signup-input-container").toggleClass("signup-input-ok",false).toggleClass("signup-input-error", true).find(".signup-error-text").html(data.msg || '');
} else if (data.context == 'password') {
$("#holdon input.pwd-reg").parent(".signup-input-container").toggleClass("signup-input-ok",false).toggleClass("signup-input-error", true).find(".signup-error-text").html(data.msg || '');
} else if (data.context == 'generic') {
errorBtnTooltip(idBtn, data.msg);
}
}
lockSignup = false;
}).fail(function (jqXHR, textStatus, errorThrown) {
$('#holdon .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#holdon .login_submit_extra_area').show(); // show area with ISCRIVITI button, facebook, etc.
$('#holdon .signup-input-container').show(); // show reg form
errorBtnTooltip(idBtn, "Qualcosa è andato storto."); // !!!
lockSignup = false;
}); // ajax
}
function validateEmail(email) {
const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
function logRecaptchaError(event_name, parameters)
{
const userAgent = navigator.userAgent;
const url = window.location.href;
const data = {
user_agent: userAgent,
url: url,
parameters: parameters,
event_name: event_name
}
$.ajax({
url: 'log_recaptcha_fail_ajax.php',
method: 'POST',
data: data
});
}
// ON LOAD: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$(document).ready(function () {
"use strict"
let pbc = $.trim($('#pbc').val()); // Variabile per le landing promotion
let ckt= $.trim($('#ckt').val()); // Variabile della firma per le landing promotion
//loginFacebookUser(); // no longer needed
fixIOSCursorsIssue();
$("#logMeIn .btlogin").click(function(e) {
e.preventDefault();
//if (evt) evt.preventDefault();
if (lockLogin) return;
if (login_16_DEBUG) { console.log("Login click"); }
// validate form:
if ($("#logMeIn form input.email").val() == '' || $("#logMeIn form input.pwd").val() == '') {
$("#logMeIn .signup-input-container")
.toggleClass("signup-input-error", true)
.find(".signup-error-text")
.html("Inserisci correttamente Username o Password");
return;
}
lockLogin = true;
if (recaptcha_login_config == 1) { // reCaptcha enabled
if (typeof grecaptcha == 'undefined') {
logRecaptchaError('login', {'username': $("#logMeIn form input.email").val() });
$('#logMeIn .signup-input-container').show(); // show login form
$('#logMeIn .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#logMeIn .login_submit_extra_area').show(); // [GR] show area with submit button, facebook, etc.
errorBtnTooltip("#logMeIn .btlogin", "Errore: Prova a ricaricare la pagina o a cambiare browser.<br>Se il problema dovesse persistere contatta lAssistenza Clienti.");
$("#logMeIn .login-top-back a").hide();
lockLogin = false;
return false;
} else {
grecaptcha.enterprise.ready(function () { // Google reCaptcha v3
grecaptcha.enterprise.execute('6LcjhUMpAAAAADxcuxrNs1Ou0iKbz2h3dn58Egnw', {action: 'login'}).then(function (token) {
if (login_16_DEBUG) { console.log("reCaptcha v3 (READY)"); }
login_post($("#logMeIn form input.email").val(), $("#logMeIn form input.pwd").val(), token, 3);
});
});
}
} else { // reCaptcha disabled or engage counter
login_post($("#logMeIn form input.email").val(), $("#logMeIn form input.pwd").val(), '', 10); // captcha_type = 10 -> reCapctha disabled
}
});
$('#login_btn, #login_btn1, #login_href').click(function (e) { // show modal login by clicking on buttons
e.preventDefault();
showLogin();
});
$('#register_btn, #register_btn1').click(function () { // hide left menu (mobile) and show reg modal by clicking on signup buttons
if (window.isNativeAppVar) {
console.log('Register call override');
window.location.href = "#native_register";
} else {
$('#holdon .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#holdon .login_submit_extra_area').show(); // show area with ISCRIVITI button, facebook, etc.
$('#holdon .signup-input-container').show(); // show reg form
// reset promo code data:
$("#holdon .signup-info-pcode").show();
$("#holdon .signup-pcode-container").show();
$("#holdon .pcode-ok").hide();
$("#holdon input.pcode-reg").val('');
$("#holdon .pcode-nfo-container .pcode-img-content").attr("src","");
$("#holdon .pcode-nfo-container .pcode-html-content .pcode-html-anim").html('');
$("#holdon h4.signup-title").css("visibility", "visible");
$("#holdon .signup-carousel").css("visibility", "visible");
$("#holdon .pcode-nfo-block").hide();
$("#pcode-container button").hide();
$("#cta_pcode .glyphicon").removeClass('glyphicon-menu-down').addClass("glyphicon-menu-right");
$('#pcode-container').collapse({toggle: false});
$("#pcode-container").collapse('hide');
$(".signup-pcode-container input[name='pcode_utm_source']").val("");
$(".signup-pcode-container input[name='pcode_utm_medium']").val("");
$(".signup-pcode-container input[name='pcode_utm_campaign']").val("");
$(".signup-pcode-container input[name='pcode_utm_term']").val("");
$("#menuModalTop").modal('hide');
$("#holdon")
.on({
'show.bs.modal': saveScrollPosition,
'hide.bs.modal': setSavedScrollPosition
})
.modal('show');
}
})
$('#register_using_fb_btn').click(function () { // signup by Facebook by clicking on button
var id = "#" + $(this).attr("id");
loginWithFacebook(id, function (response) {
if (response && response.status !== "connected") {
errorBtnTooltip(id, "Errore permessi Facebook. Effettua il login normalmente con username e password");
} else {
FB.api('/me', {fields: 'email'}, function (response) {
if (response.email) {
$('input[name="em"]').val(response.email);
}
$('input[name="pw"]').val(generatePassword(8));
$('.btlogin.btn-join').attr('src', path_country_img + 'images/login-iscriviti-con-fb2.png');
$('.signup-or').hide();
$('input[name="pw"]').parent().hide();
$('input[name="un"]').focus();
$('.text-danger small').html('');
$('#btnRegister,#span_terms').html('COMPLETA LA REGISTRAZIONE');
$(id).addClass("signup-error-hidden");
});
}
}, true);
});
$("#show_password_login").on('click', show_password); // show/hide password field content by clicking icon eye
setCookieSignupModalDismiss(); // ???
$("#btnRegister").click(function(e) { // signup by clicking on signup button
e.preventDefault();
e.stopPropagation();
if (lockSignup) return;
if (login_16_DEBUG) { console.log("Signup click"); }
if ($('#holdon input.pcode-reg').val()) {
pbc = $('#holdon input.pcode-reg').val(); // Codice promo inserito dall'utente
}
// validate form:
var email_value = $('#holdon input.email-reg').val();
$('#holdon input.email-reg').val(email_value.trim());
var user_value = $('#holdon input.user-reg').val();
$('#holdon input.user-reg').val(user_value.trim());
var pwd_value = $('#holdon input.pwd-reg').val();
$('#holdon input.pwd-reg').val(pwd_value.trim());
if ($('#holdon input.email-reg').val() == '' || !validateEmail($('#holdon input.email-reg').val())) {
$("#holdon input.email-reg").parent(".signup-input-container").toggleClass("signup-input-ok",false).toggleClass("signup-input-error", true).find(".signup-error-text").html("Formato email non valido o email già registrata");
return false;
}
if ($('#holdon input.user-reg').val() == '') {
$("#holdon input.user-reg").parent(".signup-input-container").toggleClass("signup-input-ok",false).toggleClass("signup-input-error", true).find(".signup-error-text").html("Formato username non valido");
return false;
}
if ($('#holdon input.pwd-reg').val() == '' || $('#holdon input.pwd-reg').val().length < 5) {
$("#holdon input.pwd-reg").parent(".signup-input-container").toggleClass("signup-input-o",false).toggleClass("signup-input-error", true).find(".signup-error-text").html("La password deve essere almeno di #MIN# caratteri".replace("#MIN#", "5"));
return false;
}
if ($('.policy-checkbox input:checked').val() != 'accepted') { return showManualTooltip("#holdon .policy-checkbox input"); }
if ($("#pcode-container input").val() != '' && $("#holdon .pcode-ok").is(":hidden")) {
if ($("#pcode-container .signup-error-warn").css("visibility") == "visible") {
return false;
} else {
$("#holdon input.pcode-reg").parents(".signup-input-container").toggleClass("signup-input-ok",false).toggleClass("signup-input-error", true).find(".signup-error-text").html("Clicca applica per utilizzare il codice regalo");
return false;
}
}
lockSignup = true;
if (recaptcha_signup_config == 1) { // reCaptcha enabled
if (typeof grecaptcha == 'undefined') {
logRecaptchaError('registrazione', {'email': $('.email-reg').val(), 'username': $('.user-reg').val(), 'policy-checkbox': $('.policy-checkbox input:checked').val()});
$('#holdon .signup-capctha2-container').hide(); // hide reCapctha v2 container
$('#holdon .login_submit_extra_area').show(); // show area with ISCRIVITI button, facebook, etc.
$('#holdon .signup-input-container').show(); // show reg form
errorBtnTooltip("#btnRegister", "Errore: Prova a ricaricare la pagina o a cambiare browser.<br>Se il problema dovesse persistere contatta lAssistenza Clienti.");
lockSignup = false;
return false;
} else {
grecaptcha.enterprise.ready(function () { // Google reCaptcha v3
grecaptcha.enterprise.execute('6LcjhUMpAAAAADxcuxrNs1Ou0iKbz2h3dn58Egnw', {action: 'register'}).then(function (token) {
if (login_16_DEBUG) {
console.log("reCaptcha v3 (READY)");
}
let pbc = $.trim($('#pbc').val()); // Variabile per le landing promotion
if ($('#holdon input.pcode-reg').val()) {
pbc = $('#holdon input.pcode-reg').val(); // Codice promo inserito dall'utente
}
signup_post($('.email-reg').val(), $('.user-reg').val(), $('.pwd-reg').val(), $('.policy-checkbox input:checked').val(), token, 3, pbc, ckt);
});
});
}
} else { // reCaptcha disabled
signup_post($('.email-reg').val(), $('.user-reg').val(), $('.pwd-reg').val(), $('.policy-checkbox input:checked').val(), '', 10, pbc, ckt); // captcha_type = 10 -> reCapctha disabled
}
});
$('#logMeIn').on('keypress', function (e) {
if (e.which == 13) {
$('#logMeIn .signup-btn').click();
}
});
}); //document.ready
@@ -0,0 +1,235 @@
function CarouselSignUp() {
"use strict"
var self = this;
self.discounts = [75,84,92];
$("#holdon .signup-carousel-discount-number")
.text(self.discounts[0]);
}
CarouselSignUp.prototype.startCarousel = function() {
"use strict"
var self = this;
var index = 0;
var nImg = ( $('.signup-carousel img').length > 0) ? $('.signup-carousel img').length - 1 : 4;
self.shouldLoopCarousel = true;
setAnimationFrameTimeout(3000,function() {
$("#holdon .signup-carousel")
.find("img")
.eq(index)
.animate({
opacity: "0"
},
500,
function() {
index = index + 1 > nImg ? 0 : index + 1;
$(this)
.hide()
.parent()
.find("img")
.eq(index)
.animate({
opacity: "1"
}, 500)
.show()
.parent()
.find(".signup-carousel-discount-number")
.text(self.discounts[index]);
});
return self.shouldLoopCarousel;
});
}
CarouselSignUp.prototype.stopCarousel = function(){
"use strict"
var self = this;
self.shouldLoopCarousel = false;
}
function CheckSignupInputs() {
"use strict"
var self = this;
self.isPolicy = $(".policy-checkbox").hasClass("hidden");;
$("#holdon input").each(function(index) {
$(this).focusout({
index: index,
element: $(this)
}, self.onFocusOut)
.focusin({
parent: $(this).parent()
},self.onFocusIn);
});
self.checkPolicySelection();
}
CheckSignupInputs.prototype.onFocusOut = function(e) {
"use strict"
var self = BidooCnf.instances.signup.validation;
var element = $(e.data.element);
var elem_value = $(element).val();
$(element).val(elem_value.trim());
if (!element.val().length || (e.relatedTarget && $(e.relatedTarget).hasClass("show-hide-password"))) return;
var index = e.data.index;
var indexes = getIndexesCheckFields();
//index = 0 == index ? indexes.email : (1 == index ? indexes.username : indexes.password);
index = 0 == index ? indexes.email : (1 == index ? indexes.username : (2 == index ? indexes.password : indexes.pcode));
checkFields(element, index, function() {
self.showOkCheckMark(e.data.index);
}, self.errorValidateFieldSignup, $(".username").val());
}
CheckSignupInputs.prototype.onFocusIn = function(e){
"use strict"
var self = BidooCnf.instances.signup.validation;
self.setVisibilityErrorMessages(e.data.parent);
}
CheckSignupInputs.prototype.showOkCheckMark = function(index,checkAll) {
"use strict"
var element = $("#holdon .signup-input-container")
if(!checkAll) element = element.eq(index);
element
.toggleClass("signup-input-ok", true)
.toggleClass("signup-input-error", false);
}
CheckSignupInputs.prototype.errorValidateFieldSignup = function(data){
"use strict"
var self = BidooCnf.instances.signup.validation;
self.setVisibilityErrorMessages(
$("#holdon .signup-input-container").eq(getIndexError(data.level)),
data.error
);
}
CheckSignupInputs.prototype.setVisibilityErrorMessages = function(field, text) {
"use strict"
var shouldShowError = ("undefined" !== typeof text && text.length > 0);
field
.toggleClass("signup-input-ok",false)
.toggleClass("signup-input-error", shouldShowError)
.find(".signup-error-text")
.html(text || '');
}
CheckSignupInputs.prototype.checkPolicySelection = function(){
"use strict"
var self = this;
var selector = "#holdon";
$(selector)
.find(".checkbox-inline input")
.change(function(){
self.isPolicy = $(this).is(":checked");
var element = $(selector).find("[data-toggle]");
var title = element.attr("data-title");
var options = {
html: true,
template: getTemplateTooltip("regular"),
title: title
};
element
.removeAttr("title")
.tooltip(self.isPolicy ? 'destroy' : options);
});
}
CheckSignupInputs.prototype.isPolicyAccepted = function(){
"use strict"
var self = this;
return self.isPolicy;
}
function CheckLoginInputs(selector){
"use strict"
var self = this;
$(selector)
.focusin(self.onLoginFieldFocusIn);
}
CheckLoginInputs.prototype.onLoginFieldFocusIn = function() {
"use strict"
var field = $(this);
field
.parent()
.toggleClass("signup-input-error", false)
.find(".show-hide-password")
.show();
}
CheckSignupInputs.prototype.checkPcode = function(pcode) {
var self = this;
$.ajax({
url: "/userregistercheckpcode.php"
, type: "POST"
, dataType: 'json'
, data: {
pcode: pcode
}
}).done(function (data, textStatus, jqXHR) {
if (data.isvalid === true) {
$("#pcode-container button").hide();
if (typeof data.imgs != 'undefined' && typeof data.html != 'undefined') {
$("#holdon .pcode-nfo-container .pcode-img-content").attr("src", data.imgs[0]);
$("#holdon .pcode-nfo-container .pcode-html-content .pcode-html-anim").html(data.html);
let first_p_html_content_width = $("#holdon .logo-head").width() - 74 - 18 - 30; // 74: avatar width, 18: margin left, 30: extra padding
$("#holdon .pcode-nfo-container .pcode-html-content .pcode-html-anim p:first-child").css("max-width", first_p_html_content_width+"px");
$("#holdon h4.signup-title").css("visibility", "hidden");
$("#holdon .signup-carousel").css("visibility", "hidden");
$("#holdon .pcode-nfo-block").show();
}
$("#holdon .signup-info-pcode").hide();
$("#holdon .signup-pcode-container").hide();
$("#holdon .pcode-ok").show();
$(".signup-pcode-container input[name='pcode_utm_source']").val(data.utm_source);
$(".signup-pcode-container input[name='pcode_utm_medium']").val(data.utm_medium);
$(".signup-pcode-container input[name='pcode_utm_campaign']").val(data.utm_campaign);
$(".signup-pcode-container input[name='pcode_utm_term']").val(data.utm_term);
} else {
self.setVisibilityErrorMessages(
$("#holdon .signup-input-container").eq(getIndexError(3)), data.msg
)
}
}); // ajax
}
$(function() {
"use strict"
BidooCnf.modules.signup.validation = CarouselSignUp;
BidooCnf.instances.signup.carousel = new CarouselSignUp();
BidooCnf.modules.signup.validation = CheckSignupInputs;
BidooCnf.instances.signup.validation = new CheckSignupInputs();
var carousel = BidooCnf.instances.signup.carousel;
$("#holdon")
.on("shown.bs.modal",carousel.startCarousel.bind(carousel))
.on("hide.bs.modal",carousel.stopCarousel.bind(carousel));
new CheckLoginInputs("#logMeIn input");
});
$(document).ready(function(){
$('#pcode-container').on('hide.bs.collapse', function(e) {
$("#pcode-container input").val("");
$("#pcode-container button").hide();
$("#cta_pcode .glyphicon").removeClass('glyphicon-menu-down').addClass("glyphicon-menu-right");
});
$('#pcode-container').on('show.bs.collapse', function(e) {
$("#pcode-container input").val("");
$("#pcode-container button").hide();
$("#cta_pcode .glyphicon").removeClass('glyphicon-menu-right').addClass("glyphicon-menu-down");
$(".signup-pcode-container").removeClass('signup-input-error');
});
$("#pcode-container input").keyup( function() {
if ($("#pcode-container input").val() != '') {
$("#pcode-container button").show();
$("#pcode-container").parent(".signup-input-container").toggleClass("signup-input-error", false)
} else {
$("#pcode-container button").hide();
$("#pcode-container").parent(".signup-input-container").toggleClass("signup-input-error", false)
}
});
$("#pcode-container button").click(function () {
CheckSignupInputs.prototype.checkPcode($("#pcode-container input").val())
});
}); //document.ready
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.35 32.36"><defs><style>.cls-1{fill:#3d3a3a;}.cls-2{fill:#bababa;}</style></defs><title>Asset 12logout</title><g id="Layer_2" data-name="Layer 2"><g id="Livello_1" data-name="Livello 1"><path class="cls-1" d="M32.25,14.31a1.26,1.26,0,0,0-.29-.43l-4-4.05a1.36,1.36,0,0,0-1.91,0,1.35,1.35,0,0,0,0,1.91l1.74,1.74H20.22a1.35,1.35,0,1,0,0,2.7h7.53L26,17.92a1.35,1.35,0,0,0,.95,2.3,1.37,1.37,0,0,0,1-.39l4-4a1.21,1.21,0,0,0,.29-.44A1.32,1.32,0,0,0,32.25,14.31Z"/><path class="cls-2" d="M22.92,18.87a1.35,1.35,0,0,0-1.35,1.35V27H16.18V5.39a1.35,1.35,0,0,0-1-1.29L10.53,2.7h11V9.44a1.35,1.35,0,1,0,2.7,0V1.35A1.35,1.35,0,0,0,22.92,0H1.35a.7.7,0,0,0-.14,0A.57.57,0,0,0,1,.06,1.13,1.13,0,0,0,.64.23l-.1,0,0,0A1.32,1.32,0,0,0,.16.72S.14.8.12.84A1.63,1.63,0,0,0,0,1.15s0,.08,0,.12,0,.05,0,.08v27a1.34,1.34,0,0,0,1.08,1.32l13.49,2.7a1.09,1.09,0,0,0,.26,0A1.37,1.37,0,0,0,16.18,31V29.66h6.74a1.35,1.35,0,0,0,1.35-1.35V20.22A1.36,1.36,0,0,0,22.92,18.87Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1010 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.9 KiB

@@ -0,0 +1,22 @@
<svg width="10" height="14" viewBox="0 0 10 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.18504 5.79611V4.20547C8.18504 3.38676 7.83493 2.60713 7.22302 2.06322V2.06322C7.00235 1.86707 6.75269 1.70619 6.48289 1.58628L6.42109 1.55881C5.61358 1.19993 4.69908 1.16488 3.86647 1.46091V1.46091C3.30599 1.66019 2.8212 2.02857 2.47905 2.51518L2.46372 2.53698C2.11365 3.03486 1.92578 3.62866 1.92578 4.23729V5.79611" stroke="#D8D8D8" stroke-width="0.722222"/>
<path d="M8.18504 5.79611V4.20547C8.18504 3.38676 7.83493 2.60713 7.22302 2.06322V2.06322C7.00235 1.86707 6.75269 1.70619 6.48289 1.58628L6.42109 1.55881C5.61358 1.19993 4.69908 1.16488 3.86647 1.46091V1.46091C3.30599 1.66019 2.8212 2.02857 2.47905 2.51518L2.46372 2.53698C2.11365 3.03486 1.92578 3.62866 1.92578 4.23729V5.79611" stroke="#D8D8D8" stroke-width="0.722222"/>
<path d="M7.70352 5.79698V4.28395C7.70352 3.5794 7.41527 2.90553 6.90574 2.41894L6.88512 2.39925C6.70137 2.22376 6.49091 2.07856 6.26161 1.96908L6.22955 1.95377C5.5381 1.6236 4.7415 1.59149 4.02572 1.86491V1.86491C3.56722 2.04006 3.17569 2.35544 2.90691 2.76612L2.84492 2.86084C2.55934 3.29721 2.40723 3.80741 2.40723 4.32893V5.79698" stroke="#D8D8D8" stroke-width="0.722186"/>
<path d="M7.70352 5.79698V4.28395C7.70352 3.5794 7.41527 2.90553 6.90574 2.41894L6.88512 2.39925C6.70137 2.22376 6.49091 2.07856 6.26161 1.96908L6.22955 1.95377C5.5381 1.6236 4.7415 1.59149 4.02572 1.86491V1.86491C3.56722 2.04006 3.17569 2.35544 2.90691 2.76612L2.84492 2.86084C2.55934 3.29721 2.40723 3.80741 2.40723 4.32893V5.79698" stroke="#B5B5B5" stroke-width="0.722186"/>
<g filter="url(#filter0_i_851_4177)">
<path d="M0.771484 6.75911C0.771484 6.22728 1.20262 5.79614 1.73445 5.79614H8.47519C9.00702 5.79614 9.43815 6.22728 9.43815 6.75911V9.64799C9.43815 11.7753 7.71362 13.4998 5.5863 13.4998H4.62333C2.49602 13.4998 0.771484 11.7753 0.771484 9.64799V6.75911Z" fill="#3F3F3F"/>
</g>
<circle cx="4.98419" cy="9.52722" r="0.842593" fill="white"/>
<path d="M4.62355 9.64758H5.34578L5.58652 10.8513H4.38281L4.62355 9.64758Z" fill="white"/>
<defs>
<filter id="filter0_i_851_4177" x="0.771484" y="5.79614" width="8.66699" height="7.70367" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="0.481481"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.356863 0 0 0 0 0.356863 0 0 0 0 0.356863 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_851_4177"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.07 12.63"><title>Asset 2mail_shopping</title><g id="61954354-ec73-4d7b-a923-05ca1a9f1e06" data-name="Layer 2"><g id="0e5a98c5-32eb-4454-90f2-eddd893f7962" data-name="Livello 3"><path d="M14.63,12.63a1.37,1.37,0,0,0,.94-.35L11,7.72l-.32.23-.83.59A5.17,5.17,0,0,1,9,9a2.59,2.59,0,0,1-1,.22H8A2.59,2.59,0,0,1,7,9a5.1,5.1,0,0,1-.85-.43l-.83-.59L5,7.72.49,12.27a1.37,1.37,0,0,0,.94.35Zm0,0" fill="#a3b5bf"/><path d="M.91,4.85A4.77,4.77,0,0,1,0,4.07V11L4,7,.91,4.85Zm0,0" fill="#a3b5bf"/><path d="M15.17,4.85Q13.34,6.09,12.06,7l4,4V4.07a5,5,0,0,1-.9.78Zm0,0" fill="#a3b5bf"/><path d="M14.63,0H1.44A1.28,1.28,0,0,0,.37.47,1.81,1.81,0,0,0,0,1.63,2.1,2.1,0,0,0,.49,2.86a4.46,4.46,0,0,0,1,1L3.38,5.17l1.44,1,.91.63.13.1.25.18.48.34.47.29A2.7,2.7,0,0,0,7.58,8,1.42,1.42,0,0,0,8,8H8A1.42,1.42,0,0,0,8.49,8,2.7,2.7,0,0,0,9,7.71l.47-.29L10,7.08l.25-.18.13-.1.91-.63,3.29-2.28a4.27,4.27,0,0,0,1.09-1.1,2.37,2.37,0,0,0,.44-1.35,1.38,1.38,0,0,0-.43-1,1.39,1.39,0,0,0-1-.42Zm0,0" fill="#a3b5bf"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,90 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Other/javascript.js to edit this template
*/
/*
* element: identificativo che intendiamo trattare. es. saldo puntate
* Target: div dove sarà visualizzato l'element
* Value: valore dell'element ottenuto dal server al caricamento della pagina
* archive: archiviazione che si intende dare agli elementi. es. sessionStorage
*/
window.manageBackBrowser = (function () {
let _element = null;
let _target = null;
let _currentUrl = window.location.href;
let _value = null;
function init (element, target, value, isLogged){
_element = element;
_target = target;
_value = parseInt(value);
//controllo errori per essere sicuro che tutto proceda bene
if(!isError(_element, _target, _value, isLogged)){
manage();
}
}
function isError(element, target, value, isLogged){
let error = false;
if(isLogged === true && document.getElementById('NickLoggato') === null){
console.error('utente non loggato');
error = true;
}
if(!Number.isInteger(value)){
console.error('value non è un intero');
error = true;
}
if(element.indexOf(' ') >= 0){
console.error('element non può contenere spazi');
error = true;
}
if(document.querySelectorAll(target) === null){
console.error('target passato non corrisponde ad alcun un elemento nel dom');
error = true;
}
return error;
}
function manage(){
if(sessionStorage.getItem('prelastUrl'+_element) == _currentUrl ){
// uso il valore dal sessionStorage
let elementStorage = parseInt(sessionStorage.getItem(_element));
if(Number.isInteger(elementStorage)){
//TODO controllare che sia un solo elemento, altrimenti metterlo in un ciclo
let elements = document.querySelectorAll(_target);
for (let i=0; i < elements.length; i++){
elements[i].innerText = elementStorage;
}
clearData();
}
}else{
// setto il saldo delle puntate a livello di sessionStorage
sessionStorage.setItem(_element, parseInt(_value));
}
updateQueue();
}
function updateQueue(){
let lastUrl = sessionStorage.getItem('lastUrl'+_element);
sessionStorage.setItem('prelastUrl'+_element, lastUrl);
sessionStorage.setItem('lastUrl'+_element, _currentUrl);
}
function clearData(){
sessionStorage.setItem('prelastUrl'+_element, null);
sessionStorage.setItem('lastUrl'+_element, null);
sessionStorage.setItem(_element, null);
}
return {
init: init
};
})();
@@ -0,0 +1,37 @@
const manageOfferBanner = (function() {
function set(name, value){
localStorage.setItem(name, value);
}
function get(name){
return localStorage.getItem(name);
}
function retrive(name){
let expireItem = get(name);
let dateNow = new Date();
let dateStart = new Date();
dateStart.setUTCHours(9,0,0);
if(dateNow.getTime() > expireItem){
remove(name);
return null;
}
if(dateNow.getTime() >= dateStart.getTime()){
return expireItem;
}
}
function remove(name){
localStorage.removeItem(name);
}
return {
set,
get,
retrive
}
})();
@@ -0,0 +1,236 @@
#pushNotification .bg-green {
background: #00cdac; /* Old browsers */
background: -moz-linear-gradient(top, #00cdac 0%, #02aaaf 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, #00cdac 0%,#02aaaf 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, #00cdac 0%,#02aaaf 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00cdac', endColorstr='#02aaaf',GradientType=0 ); /* IE6-9 */
}
#pushNotification .bg-red {
background: #d61c33; /* Old browsers */
background: -moz-linear-gradient(top, #d61c33 0%, #aa122d 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, #d61c33 0%,#aa122d 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, #d61c33 0%,#aa122d 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d61c33', endColorstr='#aa122d',GradientType=0 ); /* IE6-9 */
}
#pushNotification .text-green {
color: #33CC99;
font-weight: bold;
}
#pushNotification .text-notif-color{
color: #666666;
}
#pushNotification .text-notif-description{
}
#pushNotification .text-notif-description.error-text-notif{
margin-top: 0; /*5px*/
}
#pushNotification .text-notif-description.success-text-notif{
margin-top: -6px;
}
#pushNotification .text-notif-title.text-padding-title-medium{
padding: 46px 0px 46px 0px;
}
#pushNotification .notif-big-font{
font-size: 32px;
}
#pushNotification .notif-medium-font{
font-size: 18px;
}
#pushNotification .container-setup-notif{
font-size: 16px;
padding: 20px;
}
#pushNotification .container-setup-notif .image-notif{
background-color:#ffc23a;
margin: 0 -5px -20px;
border-radius: 0px 0px 5px 5px;
}
#pushNotification .close{
padding: 5px;
position: absolute;
right: 5px;
color: #000;
opacity: 1;
top: 0;
line-height: 10px;
}
#pushNotification .modal-body{
padding: 0px;
}
.optin-indicator{
position: fixed;
background-color: white;
border-radius: 8px;
padding: 10px 10px 15px 10px;
top: 13px;
margin-left: 600px;
}
.optin-indicator span:nth-child(2){
width: 50px;
height: 50px;
margin: -5px 0 0 10px;
}
.optin-indicator .bi-left-arrow-optin{
position: absolute;
width: 20px;
height: 20px;
background-size: contain;
background-repeat: no-repeat;
margin-top: -8px;
}
.optin-indicator.firefox{
left: 670px;
}
.optin-indicator.firefox .bi-left-arrow-optin{
left: 10px;
margin-top: 42px;
}
.optin-indicator.safari{
left: 50%;
margin-left: 275px;
}
@media screen and (max-width: 767px){
#pushNotification .text-notif-description.error-text-notif{
margin-top: -10px; /*0px*/
font-size: 11.8px; /*new*/
}
#pushNotification .text-notif-description{
}
}
@media screen and (max-width: 320px){
#pushNotification .text-notif-description.error-text-notif{
margin-top: -5px;
}
}
#onesignal-slidedown-container #onesignal-slidedown-dialog{
padding: 10px !important;
}
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-body-icon{
width: 40px !important;
height: 40px !important;
}
#onesignal-slidedown-container #onesignal-slidedown-dialog .slidedown-button{
padding: 5px !important;
font-size: 15px !important;
}
#notif-generic-msg {
}
#pushNotification .wrap{
display: flex;
align-items: center;
width: 100%;
justify-content: start;
margin-top: 5px;
}
.gest-cod-page #pushNotification .wrap{
flex-direction: column;
text-align: center;
}
.gest-cod-page #pushNotification .btn-go-auctions{
padding: 5px 40px;
font-weight: bold;
font-size: 16px;
border-radius: 10px;
border: none;
outline: 0;
background: #56BB62;
color: white;
margin-top: 15px;
}
.gest-cod-page #pushNotification .modal-content{
box-shadow: none;
border: none;
border-radius: 0;
}
.gest-cod-page #pushNotification .text-notif{
color: #EA4C3F;
font-size: 16px;
font-weight: bold;
display: block;
margin-bottom: 10px;
}
.gest-cod-page #pushNotification .content-msg{
width: 260px;
margin: auto;
}
body.gest-cod-page{
background-color: #fff;
}
#pushNotification .text-notif-title{
padding: 20px 16px;
}
@media (max-width: 576px){
#pushNotification .text-notif-title{
padding: 15px;
}
}
#pushNotification .text-notif-description{
width: 100%;
}
#pushNotification .text-notif-description .first-text{
font-weight: bold;
font-size: 19px;
}
#pushNotification .text-notif-description .text-content{
font-size: 18px;
}
@media (max-width: 576px){
#pushNotification .text-notif-description .first-text{
font-size: 19px;
}
#pushNotification .text-notif-description .text-content{
font-size: 16px;
}
}
#pushNotification #notif-credit{
text-align: left;
}
#pushNotification .modal-dialog{
width: 430px;
}
@media(max-width: 576px){
#pushNotification .modal-dialog{
width: 360px;
margin: 15px auto;
}
}
#pushNotification img.img-erned{
width: 37px;
margin-top: -15px;
}
#pushNotification .text-notif-title{
}
#pushNotification #notif-used .text-notif, #pushNotification #notif-expired .text-notif{
color: #E41B1B;
font-size: 19px;
font-weight: bold;
}
#pushNotification #notif-expired .text-content{
font-size: 18px;
}
@media(max-width: 576px){
#pushNotification #notif-used .text-notif, #pushNotification #notif-expired .text-notif{
font-size: 15px;
}
#pushNotification #notif-expired .text-content{
font-size: 14px;
}
}
#pushNotification #notif-used .text-content{
color: #5e5e5e;
font-weight: normal;
font-size: 18px;
}
@media(max-width: 576px){
#pushNotification #notif-used .text-content{
font-size: 14px;
}
}
@@ -0,0 +1,230 @@
$(function () {
if (typeof notif_blocked == 'undefined' || notif_blocked == null) {
BidooCnf.modules.push.notifications = PushNotifications;
BidooCnf.instances.push.notifications = new PushNotifications();
}
}); // end onready
function PushNotifications() {
"use strict"
// debugger;
var self = this;
var isUserAgentBidooApp = window.navigator.userAgent.match(/^(BIDOO\-APP)/i) !== null;
self.promocode = decodeURIComponent(getUrlParam("promocode")).replace(" ", "");
if (!$("#NickLoggato").length) {
if (self.promocode.length) {
if (isUserAgentBidooApp === false) {
showLogin();
}
}
return;
}
if (self.promocode.length)
self.sendPromoCode();
if (false == ('PushManager' in window) || "undefined" == typeof window["OneSignal"]) {
return launchOnBoardingWhenMobile();
}
}
PushNotifications.prototype.sendPromoCode = function () {
"use strict"
var self = this;
$.get('/push_promotions.php', {code: self.promocode}, function (data) {
if (data.startsWith("ok-")) {
var saldo = data.split("ok-")[1];
self.setNotifCreditVisibility(false);
setTimeout(self.hidePushNotifTips.bind(self), 5000);
$("#divSaldoBidBottom, #divSaldoBidMobile, #divSaldoBidMobileRight").text(saldo);
} else if (data.startsWith('expired-')) {
var expired = data.split('expired-')[1];
$("#push_date_expired").text(moment.unix(expired).local().format('DD/MM/YYYY HH:mm'));
self.showNotifExpired();
} else if (data == 'clicked') {
self.showNotifUsed();
} else if (data == 'no' && self.promocode != '') {
//self.showNotifNotExists();
return;
} else if (data == 'showVerify') {
showverify();
}
});
}
PushNotifications.prototype.getBrowserClass = function () {
"use strict"
if ("undefined" !== typeof InstallTrigger)
return "firefox";
if (/constructor/i.test(window.HTMLElement) || (function (p) {
return p.toString() === "[object SafariRemoteNotification]";
})(!window['safari'] || safari.pushNotification))
return "safari";
return false;
}
function createImg (){
let nodeImage = $('<img>', {
'class': 'img-erned',
'src': 'https://1c308283f6f0dbd72b44-c007ec4697a7ceab9178ce16802c0e6b.ssl.cf2.rackcdn.com/1.0/images/festone-infinite.gif'
});
return nodeImage;
}
PushNotifications.prototype.setNotifCreditVisibility = function (showAddHiddenClass, bids) {
"use strict"
var self = this;
self.setPushNotificationVisibility(true, true);
var selectors = [
"#notif-credit",
"#notif-success",
".text-notif-title",
".text-notif-description",
"#notif-generic-msg"
];
$(selectors.join(",")).toggleClass("hidden", showAddHiddenClass);
if (showAddHiddenClass)
return;
if (bids) {
var selector = $(selectors[0]);
$(selectors[1])
.find("b")
.text(["+", bids].join(" "));
selector
.find(".first-text")
.html([bids, " ", bids > 1 ? "Puntate" : "Puntata"].join(""));
// selector
// .find(".second-text")
// .html(bids > 1 ? "sono state accreditate" : "è stata accreditata");
let max = bids > 3 ? 3 : bids;
for(let x = 1; x <= max; x++){
selector.find(".first-text").append(createImg());
}
}
let current = localStorage.getItem('current');
if(current != null){
if($("#divSaldoBidBottom").text() == NaN){
$("#divSaldoBidBottom").text(current);
}
if($("#divSaldoBidMobileRight").text() == NaN){
$("#divSaldoBidMobileRight").text(current);
}
console.log($("#divSaldoBidMobile"));
if($("#divSaldoBidMobile").text() == NaN){
$("#divSaldoBidMobile").text(current);
}
localStorage.removeItem('current');
}
}
PushNotifications.prototype.setPushNotificationVisibility = function (shouldAddHiddenClass, shouldLaunchModal) {
"use strict"
var self = this;
var browserClass = this.getBrowserClass();
$(".optin-indicator").toggleClass("hidden", shouldAddHiddenClass);
if (browserClass)
$(".optin-indicator").toggleClass(browserClass, true);
if (shouldLaunchModal)
$("#pushNotification").modal('show');
$(".optin-backdrop")
.toggleClass("modal-backdrop", !shouldAddHiddenClass)
.off("click")
.click(function () {
self.setPushNotificationVisibility(true);
});
}
PushNotifications.prototype.showNotifExpired = function () {
"use strict"
var self = this;
self.showNotif("notif-expired");
}
PushNotifications.prototype.showNotifUsed = function () {
"use strict"
var self = this;
self.showNotif("notif-used");
}
PushNotifications.prototype.showNotifNotExists = function () {
"use strict"
var self = this;
self.showNotif("notif-not-exists");
}
PushNotifications.prototype.showNotif = function (id) {
"use strict"
var self = this;
if (self.doesNotShowErrorNotif())
return;
self.setPushNotificationVisibility(true, true);
var selectors = [
"#" + id,
"#wait-next-notif",
"#notif-error",
".text-notif-title",
".text-notif-description"
];
$(selectors.join(",")).removeClass("hidden");
$(".text-notif-title").addClass("text-padding-title-low");
self.savePrefsErrorNotif();
}
PushNotifications.prototype.hidePushNotifTips = function () {
"use strict"
var self = this;
$("#pushNotification").modal('hide');
self.setPushNotificationVisibility(true);
if (self.push_notification_timer)
clearInterval(self.push_notification_timer);
self.push_notification_timer = null;
}
PushNotifications.prototype.hidePushNotifTipsTimeout = function (callback, customDelay) {
"use strict"
var self = this;
if (callback)
$("#pushNotification").off("hide.bs.modal").on("hide.bs.modal", callback.bind(null));
if(!customDelay){
customDelay = BidooCnf.intervals.push.notifications.conversionTimeout;
}
setTimeout(self.hidePushNotifTips.bind(self),customDelay);
}
PushNotifications.prototype.savePrefsErrorNotif = function () {
"use strict"
var self = this;
if (!self.promocode.length)
return;
var notifs = sessionStorage.notifErrors ? JSON.parse(sessionStorage.notifErrors) : {};
notifs[self.promocode] = 1;
sessionStorage.notifErrors = JSON.stringify(notifs);
}
PushNotifications.prototype.doesNotShowErrorNotif = function () {
"use strict"
var self = this;
var notifs = sessionStorage.notifErrors || false;
return (self.promocode.length && notifs && JSON.parse(notifs)[self.promocode]);
}
@@ -0,0 +1,68 @@
// moment.js locale configuration
// locale : italian (it)
// author : Lorenzo : https://github.com/aliem
// author: Mattia Larentis: https://github.com/nostalgiaz
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
return moment.defineLocale('it', {
months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
weekdays : 'Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato'.split('_'),
weekdaysShort : 'Dom_Lun_Mar_Mer_Gio_Ven_Sab'.split('_'),
weekdaysMin : 'D_L_Ma_Me_G_V_S'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'LT:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
LLLL : 'dddd, D MMMM YYYY LT'
},
calendar : {
sameDay: '[Oggi alle] LT',
nextDay: '[Domani alle] LT',
nextWeek: 'dddd [alle] LT',
lastDay: '[Ieri alle] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[la scorsa] dddd [alle] LT';
default:
return '[lo scorso] dddd [alle] LT';
}
},
sameElse: 'L'
},
relativeTime : {
future : function (s) {
return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
},
past : '%s fa',
s : 'alcuni secondi',
m : 'un minuto',
mm : '%d minuti',
h : 'un\'ora',
hh : '%d ore',
d : 'un giorno',
dd : '%d giorni',
M : 'un mese',
MM : '%d mesi',
y : 'un anno',
yy : '%d anni'
},
ordinalParse : /\d{1,2}º/,
ordinal: '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));
File diff suppressed because one or more lines are too long
@@ -0,0 +1,154 @@
(function() {
var moment, strftimeFormats = {}, phpFormats = {};
if (typeof require !== "undefined" && require !== null) {
moment = require('moment');
} else {
moment = this.moment;
}
function translatePhpFormat(item) {
if (item.charAt(0) === "\\") {
return item.replace("\\", "");
}
switch (item) {
case "D":
return "ddd";
case "l":
return "dddd";
case "M":
return "MMM";
case "F":
return "MMMM";
case "j":
return "D";
case "m":
return "MM";
case "A":
return "A";
case "a":
return "a";
case "s":
return "ss";
case "i":
return "mm";
case "H":
return "HH";
case "g":
return "h";
case "h":
return "hh";
case "w":
return "d";
case "W":
return "ww";
case "y":
return "YY";
case "o":
case "Y":
return "YYYY";
case "O":
return "ZZ";
case "z":
return "DDD";
case "d":
return "DD";
case "n":
return "M";
case "G":
return "H";
case "e":
return "zz";
default:
return item;
}
}
function translateStrftimeToMoment(item) {
if (item.substring(0, 2) === "%%") {
return item.replace("%%", "%");
}
switch (item) {
case "%a":
return "ddd";
case "%A":
return "dddd";
case "%h":
case "%b":
return "MMM";
case "%B":
return "MMMM";
case "%c":
return "LLLL";
case "%d":
return "D";
case "%j":
return "DDDD";
case "%e":
return "Do";
case "%m":
return "MM";
case "%p":
return "A";
case "%P":
return "a";
case "%S":
return "ss";
case "%M":
return "mm";
case "%H":
return "HH";
case "%I":
return "hh";
case "%w":
return "d";
case "%W":
case "%U":
return "ww";
case "%x":
return "LL";
case "%X":
return "LT";
case "%g":
case "%y":
return "YY";
case "%G":
case "%Y":
return "YYYY";
case "%z":
return "ZZ";
case "%Z":
return "z";
case "%f":
return "SSS";
default:
return item;
}
}
// Put private copy on moment namespace. Useful for tests.
moment.fn.__translateStrftimeToMoment = translateStrftimeToMoment;
moment.fn.__translatePhpFormat = translatePhpFormat;
moment.fn.strftime = function(format) {
if (!strftimeFormats[format]) {
strftimeFormats[format] = format.replace(/%?.|%%/g, translateStrftimeToMoment);
}
return this.format(strftimeFormats[format]);
};
moment.fn.phpFormat = function(format) {
if (!phpFormats[format]) {
phpFormats[format] = format.replace(/\\?./g, translatePhpFormat);
}
return this.format(phpFormats[format]);
};
if (typeof module !== "undefined" && module !== null) {
module.exports = moment;
} else {
this.moment = moment;
}
}).call(this);

Some files were not shown because too many files have changed in this diff Show More