Solved

How to change specific table identifier (checkbox) to a image/button

  • 3 March 2020
  • 4 replies
  • 125 views

Userlevel 5

Hello everyone.

We are trying to change a specific identifier in our table to a button that opens a dialog page.

It’s the last column within this table:

 

However, as you can see in the image, our CSS styling is applying this change to all checkboxes within the table:

.tag-table[data-widget\.uri*="tbl_PlanoOperacional_Tratos"] .cell-wrapper input[type=checkbox][class*=boolean] + span{
background: white url(images/floppy-disk_roxo.png) no-repeat 50%/contain;
}

 

We have already tried to change it using annotations, but we weren’t able to make it work out.

Is this possible? Thanks!

icon

Best answer by mohansx 4 March 2020, 21:01

Hi @mateusarakawa , did you try the annotation selector before the cell-wrapper ? 

 

.annotation-showimage .cell-wrapper … 

 

I did this in my sample project and only the identifier with annotation as showimage is modified via css, not impacted by moving the column/row around. 

 

 

This is my code to restrict this only to the identifier with annotation showimage, in table newtable. 

 

.tag-table[data-widget\.uri="newtable"] .annotation-showimage .cell-wrapper input[type=checkbox][class*=boolean] + span {

View original

4 replies

Userlevel 5

Maybe the answer to my question is the same as we had in another topic:

https://community.aimms.com/aimms-webui-44/how-to-change-unit-and-decimals-by-parameters-532#post1340

Userlevel 5

 Update: We were able to make it work, but our CSS code is way too hard-coded. It references to the “col9” class that aimms creates to this identifier. If we change the position of this identifier within the table, we’ll lose its format.

.tag-table[data-widget\.uri*="tbl_PlanoOperacional_Tratos"] td[class*=col9] .cell-wrapper input[type=checkbox][class*=boolean] + span {

 

Userlevel 5

Hi @mateusarakawa , did you try the annotation selector before the cell-wrapper ? 

 

.annotation-showimage .cell-wrapper … 

 

I did this in my sample project and only the identifier with annotation as showimage is modified via css, not impacted by moving the column/row around. 

 

 

This is my code to restrict this only to the identifier with annotation showimage, in table newtable. 

 

.tag-table[data-widget\.uri="newtable"] .annotation-showimage .cell-wrapper input[type=checkbox][class*=boolean] + span {

Userlevel 5

Hi, @mohansx . Thanks, it worked!

Somehow we messed up something when we added the annotation reference to the css file.

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator