Chris2656882
Posts: 0
Joined: Fri May 11, 2012 3:47 pm

Class names for images and grids

How can I add a class name to a grid or image inside a list?

It is not an option in the properties tab. If I attempt to add it under 'More Properties', it says that the word is reserved/restricted.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Class names for images and grids

We will add 'class' property to both components. For now, you can select them and add style via jQuery.

Chris2656882
Posts: 0
Joined: Fri May 11, 2012 3:47 pm

Class names for images and grids

That doesn't seem to work when the grid is in a list.

For example, in the services output, I entered:

if(value.length == 0){
element.hide(); //hides the image
$('input[dsid="grid_cell_image"]').attr('style', 'display:none;');//doesnt hide cell
$('input[dsid="grid_cell_image"]').hide(); //doesnt hide cell
}

This hid the image (only because images have a visibility attribute in the services output), but not the grid cell (which does not).

I think the JQuery does not work because within a list, there are multiple elements with the same dsid. That's why I needed to modify the class.

Chris2656882
Posts: 0
Joined: Fri May 11, 2012 3:47 pm

Class names for images and grids

That doesn't seem to work when the grid is in a list.

For example, in the services output, I entered:

if(value.length == 0){
element.hide(); //hides the image
$('input[dsid="grid_cell_image"]').attr('style', 'display:none;');//doesnt hide cell
$('input[dsid="grid_cell_image"]').hide(); //doesnt hide cell
$('input[name="grid_cell_image"]').attr('style', 'display:none;');//doesnt hide cell
$('input[name="grid_cell_image"]').hide(); //doesnt hide cell
}

This hid the image (only because images have a visibility attribute in the services output), but not the grid cell (which does not).

I think the JQuery does not work because within a list, there are multiple elements with the same dsid. That's why I needed to modify the class.

I also noticed that even though it hid the image, the area (length x width) that the image placeholder consumed still exists. There is just an empty area in its place instead of everything getting resized to take its place.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Class names for images and grids

You probably just need to hide the parent (or even higher), not the image.

Return to “Issues”