Skip to main content
Solved

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

  • March 3, 2020
  • 5 replies
  • 339 views

mateusarakawa
AIMMS Champ
Forum|alt.badge.img+2

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!

Best answer by mohansx

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 {

5 replies

mateusarakawa
AIMMS Champ
Forum|alt.badge.img+2
  • Author
  • AIMMS Champ
  • 85 replies
  • March 3, 2020

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


mateusarakawa
AIMMS Champ
Forum|alt.badge.img+2
  • Author
  • AIMMS Champ
  • 85 replies
  • March 3, 2020

 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 {

 


mohansx
Forum|alt.badge.img+5
  • Former AIMMSian
  • 223 replies
  • Answer
  • March 4, 2020

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 {


mateusarakawa
AIMMS Champ
Forum|alt.badge.img+2
  • Author
  • AIMMS Champ
  • 85 replies
  • March 5, 2020

Hi, @mohansx . Thanks, it worked!

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


gdiepen
AIMMS Champ
Forum|alt.badge.img+7
  • AIMMS Champ
  • 155 replies
  • December 9, 2022

It is not completely clear to me, but is it possible to use this icon/button to trigger a procedure in AIMMS?

 

Would it be possible with some version of the above to style an icon/button in a table based on some identifier from the model and have AIMMS open another page whenever this icon/button is clicked (where which  page to open is coming also from the model)?



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

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