Sub BtnPulsado_Clicked(ItemId As String)
Dim ContAux As ABMContainer
Dim Cont1 As ABMContainer
If MyToastId = 0 Then
Cont1 = page.Component("Cont1")
ContAux.Initialize(page, "ContAux" & Pasada, "")
ContAux.AddRowsM(1, True, 0, 0, "").AddCellsOS(NColumnas, 0, 0, 0, 12/NColumnas, 12/NColumnas, 12/NColumnas, "")
ContAux.BuildGrid
Cont1.Cell(1,1).AddComponent(ContAux)
Else
Cont1 = page.Component("Cont1")
ContAux = Cont1.Component("ContAux" & Pasada)
End If
MyToastId = MyToastId + 1
NRegistros = NRegistros + 1
ws.Session.SetAttribute("UnidadesEnCarrito", NRegistros)
ContAux.Cell(1, MyToastId).AddComponent(BuildContainerWithCard("ContWithCard" & NRegistros))
Cont1.Refresh
If MyToastId = NColumnas Then
MyToastId = 0
Pasada = Pasada + 1
If Pasada = 5 Then Pasada = 6
If Pasada = 7 Then Pasada = 12
NColumnas = Pasada
End If
End Sub
Sub BuildContainerWithCard(id As String) As ABMContainer
Dim ContainerAux As ABMContainer
ContainerAux.Initialize(page, id, "")
ContainerAux.AddRows(1, True, "").AddCellsOS(1,0,0,0,11,11,11,"").AddCellsOS(1,0,0,0,1,1,1,"")
ContainerAux.AddRows(3, True, "").AddCellsOS(3,0,0,0,4,4,4,"")
ContainerAux.BuildGrid
ContainerAux.Cell(1,1).AddArrayComponent(BuildCard(NRegistros, "../images/list1.jpg", "Card" & NRegistros), "Card")
Dim BtnTarjeta As ABMButton
BtnTarjeta.InitializeFloating(page, NRegistros, "mdi-image-exposure-plus-1", "darkred")
ContainerAux.Cell(1, 2).AddArrayComponent(BtnTarjeta, "BtnTarjeta")
ContainerAux.Cell(2, 1).AddArrayComponent(ABMShared.BuildParagraph(page, NRegistros, "{B}" & id & "{/B}"), "par1_")
ContainerAux.Cell(2, 2).AddArrayComponent(ABMShared.BuildParagraph(page, NRegistros, "{B}Stock:{/B}" & id & " {B}Art.{/B}"&id), "par2_")
ContainerAux.Cell(2, 3).AddArrayComponent(ABMShared.BuildParagraph(page, NRegistros, "{B}St.{/B}" & id), "par3_")
Return ContainerAux
End Sub
Sub BuildCard(id As String, image As String, title As String) As ABMCard
Dim card4 As ABMCard
card4.InitializeAsCard(page, id, title, "", ABM.CARD_NOTSPECIFIED,"whitetitle")
card4.Image = image
card4.AddAction("-")
Return card4
End Sub
Sub card_LinkClicked(Card As String, Action As String)
Log(Card & " " & Action)
End Sub
Sub btntarjeta_clicked(Target As String)
Log(Target)
End Sub