Project

General

Profile

Revision 6c281097

ID6c2810974f3b27f299a10766b8dce811f5bcf975
Parent e249276f
Child eea102b4

Added by Andreas Kohlbecker 4 months ago

ref #4372 adapting media gallery to zen theme - step 2

View differences:

src/main/java/eu/etaxonomy/dataportal/ElementUtils.java
65 65

  
66 66
        ArrayList<List<GalleryImage>> galleryImageRows = new ArrayList<List<GalleryImage>>();
67 67

  
68
        List<WebElement> tableRows = gallery.findElements(By.cssSelector("tr.media-row"));
69
        logger.debug("GalleryImages - total rows " + tableRows.size());
68
        List<WebElement> mediaRows = gallery.findElements(By.cssSelector("tr.media-row"));
69
        List<WebElement> captionRows = gallery.findElements(By.cssSelector("tr.caption-row"));
70
        logger.debug("GalleryImages - media rows: " + mediaRows.size() + " caption rows: " + captionRows.size());
70 71
        // loop table rows
71
        for(int rowId = 0; rowId * 2 < tableRows.size() && tableRows.size() > 0; rowId++ ){
72
        for(int rowId = 0; rowId < mediaRows.size(); rowId++ ){
72 73
            logger.debug("GalleryImages - gallery row " + rowId );
73
            List<WebElement> imageCells = tableRows.get(rowId * 2).findElements(By.tagName("td"));
74
            logger.debug("GalleryImages - number of image cells: " + imageCells.size());
75
            List<WebElement> captionCells = null;
76
            if(tableRows.size() > rowId * 2 + 1){
77
                captionCells = tableRows.get(rowId * 2 + 1).findElements(By.cssSelector("tr.caption-row"));
78
                logger.debug("GalleryImages - number of caption cells: " + captionCells.size());
79
            }
74
            List<WebElement> imageCells = mediaRows.get(rowId).findElements(By.tagName("td"));
75
            List<WebElement> captionCells = captionRows.get(rowId).findElements(By.tagName("td"));;
76
            logger.debug("GalleryImages - image cells: " + imageCells.size() + " caption cells "+ captionCells.size());
80 77

  
81 78
            galleryImageRows.add(new ArrayList<GalleryImage>());
82 79

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)