dbr.divify issue

(5 posts) (2 voices)
  1. ajdjackson, Member

    Hi

    I'm using dbr.divify for a simple a report but have hit an issue that I've tried to resolve.

    The code for the report is:

    select 'dbr.css','.Status {font-style:bold; display: block;text-align:center;font-size:1.5em;border: 2px solid gray;border-radius:5px;padding:5px;width:10%}'; select 'dbr.css','.plots {border:none;}';

    select 'dbr.divify';

    select 'dbr.hdr','PStatus';

    select (CASE when c.tblSalesInv_Net > 0 then 'Sold' when a.Plot_Contract = 'Yes' AND ifnull(c.tblSalesInv_Net,0)=0 then 'In Contract' when a.Plot_Contract = 'No' AND ifnull(c.tblSalesInv_Net,0)=0 AND ifnull(a.Plot_BookDate,0)<>0 then 'Booked' ELSE 'Available' END) AS 'Status[PStatus]', fn_plot(a.tblcontractxidjobno) as 'Plots[Plots]' from hilmark.tblsitesplotsjake a join hilmark.tblsitesjake b on a.Site_ID = b.Site_ID left outer join hilmark.tblsalesinv_j c on a.tblcontractxidjobno = c.tblSalesInv_XIDJob where b.Market_Name = inSite and fn_plot(a.tblcontractxidjobno) not in ("999","998") order by 1,fn_plot(a.tblcontractxidjobno);

    The issue I'm having is that the html output includes divs with class Status that have span inside with the class hdr.hide.

    So if I want to style the Status divs with the headers all the hidden divs are styled also eg

    <div> <div class="Status"> <span class="hdr_show">Available</span> </div> <div class="Plots">15</div> </div> <div> <div class="Status"> <span class="hdr_hide">Available</span> </div> <div class="Plots">16</div> </div> <div> <div class="Status"> <span class="hdr_hide">Available</span></div> <div class="Plots">17</div>

    I've tried using javascript such as 'dbr.javascript','$("span hdr_hide").parent().hide();'; but nothing I've used has worked.

    Is there a way to remove/hide the divs with the spans with the class hdr_hide?

    Cheers

    Jake

  2. myDBR Team, Key Master

    Jake,
    could you explain bit more what the actual problem is? What is it you are trying to do and what is preventing it?

    The code itself looks ok.

    --
    myDBR Team

  3. ajdjackson, Member

    Hi

    The code is working fine but I'm trying to do is put a border around the Status div which has the visible header data using the dbr.css statement above but the border is also being applied to the divs with the hidden spans as well.

    So I'm trying to hide those divs with the span that have a class hdr_hide.

    Hope you follow that.

    Thanks

    Jake

  4. myDBR Team, Key Master

    Instead of setting the style to ".Status", why not just set it to ".Status>.hdr_show"?

    --
    myDBR Team

  5. ajdjackson, Member

    Hi

    Thanks for that.

    I tried that earlier but forgot the full-stop after the >

    Doh!

    Lost a few hours of my life there :)

    Cheers and thanks as always.

    Jake


Reply

You must log in to post.