concrete5/concrete5 — Issue #366: File list styling breaks on 'rescan'
Author: arcanepain
Created: 2011-12-16 17:22:36+00:00
State: open

Shouldn't be too hard to fix, but you're best placed to take care of it, instead of my random messing that might screw something else up elsewhere.

Basically, following rescan in the file manager (specifically, after you hit 'x' out of the success/error dialog) the page is obviously AJAX reloaded with the newly rescanned content. In this process, we lose the .ccm-pane-body class and, consequently, the page falls apart a bit! Looks like you add the div with ccm-pane-body in conditionally in the search_results element (concrete > elements > files) and, because the $searchtype variable obviously isn't being re-set as 'DASHBOARD' following rescan and reload, the ccm-pane-body div doesn't get put back in.

Perhaps a bigger issue, i'm guessing this is caused by the the file list HTML getting stuck back into the page, flat out replacing (innerHTML or whatever) the HTML that was there before to reflect the new content/thumbnails BUT not taking into account the new, conditionally added, div.ccm-pane-body. Swapping out a child that wasn't there before (C5 5.4.2.1) and, consequently, nesting incorrectly -- a new, duplicated #ccm-search-results within the original #ccm-fileXXXXXXX-search-results, without the .ccm-pane-body. This also explains why the new #ccm-search-results is without it's unique file identifier (so i'm seeing id='ccm--search-results' for the new child div).

Hope you can make sense of that! Is a pretty nasty looking bug so *might* just be worth the pre-launch to-do list. Sorry I keep adding to it! Reloading the page, or just dropping in an extra ccm-pane-body class does fix it, but both are only really polyfills for the bigger prob that is the reload stuff getting thrown into the wrong place by javascript thanks to that extra, bootstrap friendly, div.ccm-pane-body.